You are here

public function QueryMap::getQuery in GraphQL 8.3

Returns a single GraphQL query from the map.

Parameters

$queryId:

Return value

string|null A single GraphQL query.

Overrides QueryMapInterface::getQuery

File

src/Entity/QueryMap.php, line 62

Class

QueryMap
Plugin annotation @ConfigEntityType( id = "graphql_query_map", label = @Translation("Query map"), handlers = { "list_builder" = "Drupal\graphql\Controller\QueryMapListBuilder", "form" = { "import" =…

Namespace

Drupal\graphql\Entity

Code

public function getQuery($queryId) {
  if (isset($this->map[$queryId])) {
    return $this->map[$queryId];
  }
  return NULL;
}