You are here

interface DataProducerPluginInterface in GraphQL 8.4

Defines the contract of data producer plugins.

Note that this misses a definition of the resolve() method as that has a different signature per plugin.

Hierarchy

Expanded class hierarchy of DataProducerPluginInterface

All classes that implement DataProducerPluginInterface

2 files declare their use of DataProducerPluginInterface
DataProducerPluginBase.php in src/Plugin/GraphQL/DataProducer/DataProducerPluginBase.php
DataProducerProxy.php in src/Plugin/GraphQL/DataProducer/DataProducerProxy.php
1 string reference to 'DataProducerPluginInterface'
graphql.services.yml in ./graphql.services.yml
graphql.services.yml

File

src/Plugin/DataProducerPluginInterface.php, line 16

Namespace

Drupal\graphql\Plugin
View source
interface DataProducerPluginInterface extends ContextAwarePluginInterface, CacheableDependencyInterface, DerivativeInspectionInterface {

  /**
   * Resolves the queried field with the given context.
   *
   * @param \Drupal\graphql\GraphQL\Execution\FieldContext $field
   *
   * @return \GraphQL\Deferred|mixed
   */
  public function resolveField(FieldContext $field);

}

Members

Namesort descending Modifiers Type Description Overrides
CacheableDependencyInterface::getCacheContexts public function The cache contexts associated with this object. 34
CacheableDependencyInterface::getCacheMaxAge public function The maximum age for which this object may be cached. 34
CacheableDependencyInterface::getCacheTags public function The cache tags associated with this object. 27
ContextAwarePluginInterface::getContext public function Gets a defined context. 1
ContextAwarePluginInterface::getContextDefinition public function Gets a specific context definition of the plugin. Overrides ContextAwarePluginInterface::getContextDefinition
ContextAwarePluginInterface::getContextDefinitions public function Gets the context definitions of the plugin. Overrides ContextAwarePluginInterface::getContextDefinitions
ContextAwarePluginInterface::getContextMapping public function Gets a mapping of the expected assignment names to their context names. 1
ContextAwarePluginInterface::getContexts public function Gets the defined contexts. 1
ContextAwarePluginInterface::getContextValue public function Gets the value for a defined context. 1
ContextAwarePluginInterface::getContextValues public function Gets the values for all defined contexts. 1
ContextAwarePluginInterface::setContext public function Set a context on this plugin. 1
ContextAwarePluginInterface::setContextMapping public function Sets a mapping of the expected assignment names to their context names. 1
ContextAwarePluginInterface::setContextValue public function Sets the value for a defined context. 1
ContextAwarePluginInterface::validateContexts public function Validates the set values for the defined contexts. 1
DataProducerPluginInterface::resolveField public function Resolves the queried field with the given context. 1
DerivativeInspectionInterface::getBaseId public function Gets the base_plugin_id of the plugin instance. 1
DerivativeInspectionInterface::getDerivativeId public function Gets the derivative_id of the plugin instance. 1
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2