You are here

interface PersistedQueryPluginInterface in GraphQL 8.4

Defines plugins that represent persisted GraphQL queries.

Hierarchy

Expanded class hierarchy of PersistedQueryPluginInterface

All classes that implement PersistedQueryPluginInterface

3 files declare their use of PersistedQueryPluginInterface
PersistedQueryPluginBase.php in src/PersistedQuery/PersistedQueryPluginBase.php
Server.php in src/Entity/Server.php
ServerInterface.php in src/Entity/ServerInterface.php
1 string reference to 'PersistedQueryPluginInterface'
graphql.services.yml in ./graphql.services.yml
graphql.services.yml

File

src/Plugin/PersistedQueryPluginInterface.php, line 12

Namespace

Drupal\graphql\Plugin
View source
interface PersistedQueryPluginInterface extends ConfigurableInterface, PluginInspectionInterface {

  /**
   * Returns a query if this plugin has it.
   *
   * @param string $id
   *   ID of the persisted query.
   * @param \GraphQL\Server\OperationParams $operation
   *   The operation with parameters.
   *
   * @return string|null
   *   The actual GraphQL query, or NULL if this plugin does not support a query
   *   with that ID.
   */
  public function getQuery($id, OperationParams $operation);

  /**
   * Returns the label for use on the administration pages.
   *
   * @return string
   *   The administration label.
   */
  public function label();

  /**
   * Returns the plugin's description.
   *
   * @return string
   *   The plugin description.
   */
  public function getDescription();

  /**
   * Returns the weight of this plugin instance.
   *
   * @return int
   *   The default weight for the given stage.
   */
  public function getWeight();

  /**
   * Sets the weight for this plugin instance.
   *
   * @param int $weight
   *   The weight.
   */
  public function setWeight($weight);

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 11
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 12
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 12
PersistedQueryPluginInterface::getDescription public function Returns the plugin's description. 1
PersistedQueryPluginInterface::getQuery public function Returns a query if this plugin has it. 3
PersistedQueryPluginInterface::getWeight public function Returns the weight of this plugin instance. 1
PersistedQueryPluginInterface::label public function Returns the label for use on the administration pages. 1
PersistedQueryPluginInterface::setWeight public function Sets the weight for this 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