You are here

public function QueryArticles::__construct in GraphQL 8.4

Articles constructor.

@codeCoverageIgnore

Parameters

array $configuration: The plugin configuration.

string $pluginId: The plugin id.

mixed $pluginDefinition: The plugin definition.

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager:

Overrides ContextAwarePluginBase::__construct

File

examples/graphql_example/src/Plugin/GraphQL/DataProducer/QueryArticles.php, line 69

Class

QueryArticles
Plugin annotation @DataProducer( id = "query_articles", name = @Translation("Load articles"), description = @Translation("Loads a list of articles."), produces = @ContextDefinition("any", label = @Translation("Article connection") ), …

Namespace

Drupal\graphql_examples\Plugin\GraphQL\DataProducer

Code

public function __construct(array $configuration, $pluginId, $pluginDefinition, EntityTypeManagerInterface $entityTypeManager) {
  parent::__construct($configuration, $pluginId, $pluginDefinition);
  $this->entityTypeManager = $entityTypeManager;
}