You are here

public function QueryProviderInterface::getQuery in GraphQL 8.3

Returns a query string given the query parameters.

Can be used to load a query string from arbitrary query parameters e.g. when using persisted queries (loading queries by their hash or version and id).

Parameters

string $id: The query id.

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

Return value

string|null The query string or NULL if it couldn't be determined.

3 methods override QueryProviderInterface::getQuery()
EntityQueryMapQueryProvider::getQuery in src/GraphQL/QueryProvider/EntityQueryMapQueryProvider.php
Returns a query string given the query parameters.
JsonQueryMapQueryProvider::getQuery in src/GraphQL/QueryProvider/JsonQueryMapQueryProvider.php
Returns a query string given the query parameters.
QueryProvider::getQuery in src/GraphQL/QueryProvider/QueryProvider.php
Returns a query string given the query parameters.

File

src/GraphQL/QueryProvider/QueryProviderInterface.php, line 24

Class

QueryProviderInterface

Namespace

Drupal\graphql\GraphQL\QueryProvider

Code

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