You are here

public function PersistedQueryPluginInterface::getQuery in GraphQL 8.4

Returns a query if this plugin has it.

Parameters

string $id: ID of the persisted query.

\GraphQL\Server\OperationParams $operation: The operation with parameters.

Return value

string|null The actual GraphQL query, or NULL if this plugin does not support a query with that ID.

3 methods override PersistedQueryPluginInterface::getQuery()
PersistedQueryPluginOne::getQuery in tests/modules/graphql_persisted_queries_test/src/Plugin/GraphQL/PersistedQuery/PersistedQueryPluginOne.php
Returns a query if this plugin has it.
PersistedQueryPluginThree::getQuery in tests/modules/graphql_persisted_queries_test/src/Plugin/GraphQL/PersistedQuery/PersistedQueryPluginThree.php
Returns a query if this plugin has it.
PersistedQueryPluginTwo::getQuery in tests/modules/graphql_persisted_queries_test/src/Plugin/GraphQL/PersistedQuery/PersistedQueryPluginTwo.php
Returns a query if this plugin has it.

File

src/Plugin/PersistedQueryPluginInterface.php, line 26

Class

PersistedQueryPluginInterface
Defines plugins that represent persisted GraphQL queries.

Namespace

Drupal\graphql\Plugin

Code

public function getQuery($id, OperationParams $operation);