Skip to content

Commit 92d8682

Browse files
authored
refactor(dataproducer): ContextAwarePluginBase got removed, make it work for Drupal 10 (#1296)
1 parent 923a322 commit 92d8682

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Plugin/GraphQL/DataProducer/DataProducerPluginBase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
namespace Drupal\graphql\Plugin\GraphQL\DataProducer;
44

55
use Drupal\Component\Plugin\Exception\ContextException;
6-
use Drupal\Component\Plugin\ContextAwarePluginBase;
6+
use Drupal\Component\Plugin\PluginBase;
77
use Drupal\graphql\GraphQL\Execution\FieldContext;
88
use Drupal\graphql\Plugin\DataProducerPluginInterface;
99
use Drupal\Core\Plugin\ContextAwarePluginTrait;
1010

1111
/**
1212
* Base class for data producers that resolve fields for queries or mutations.
1313
*/
14-
abstract class DataProducerPluginBase extends ContextAwarePluginBase implements DataProducerPluginInterface {
14+
abstract class DataProducerPluginBase extends PluginBase implements DataProducerPluginInterface {
1515
use DataProducerPluginCachingTrait;
1616
use ContextAwarePluginTrait;
1717

src/Plugin/GraphQL/DataProducer/EntityDefinition/EntityDefinition.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ public function __construct(
101101
* The entity definition.
102102
*/
103103
public function resolve(string $entity_type,
104-
?string $bundle = NULL,
105-
?string $field_types = NULL,
104+
?string $bundle,
105+
?string $field_types,
106106
FieldContext $field_context
107107
): EntityTypeInterface {
108108
if ($bundle) {

src/Plugin/GraphQL/DataProducer/EntityDefinition/Fields.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ public function __construct(
117117
*/
118118
public function resolve(
119119
EntityTypeInterface $entity_definition,
120-
?array $bundle_context = NULL,
121-
?string $field_types_context = NULL,
120+
?array $bundle_context,
121+
?string $field_types_context,
122122
FieldContext $field_context
123123
): \Iterator {
124124

0 commit comments

Comments
 (0)