You are here

protected function EntityQuery::getQueryContext in GraphQL 8.3

Retrieves an arbitrary value to write into the query metadata.

Parameters

mixed $value: The parent value.

array $args: The field arguments array.

\Drupal\graphql\GraphQL\Execution\ResolveContext $context: The resolve context.

\GraphQL\Type\Definition\ResolveInfo $info: The resolve info object.

Return value

mixed The query context.

2 calls to EntityQuery::getQueryContext()
EntityQuery::getBaseQuery in modules/graphql_core/src/Plugin/GraphQL/Fields/EntityQuery/EntityQuery.php
Create the basic entity query for the plugin's entity type.
EntityReferenceQuery::getQueryContext in modules/graphql_core/src/Plugin/GraphQL/Fields/EntityReference/EntityReferenceQuery.php
Retrieves an arbitrary value to write into the query metadata.
1 method overrides EntityQuery::getQueryContext()
EntityReferenceQuery::getQueryContext in modules/graphql_core/src/Plugin/GraphQL/Fields/EntityReference/EntityReferenceQuery.php
Retrieves an arbitrary value to write into the query metadata.

File

modules/graphql_core/src/Plugin/GraphQL/Fields/EntityQuery/EntityQuery.php, line 212

Class

EntityQuery
@GraphQLField( id = "entity_query", secure = false, type = "EntityQueryResult", arguments = { "filter" = "EntityQueryFilterInput", "sort" = "[EntityQuerySortInput]", "offset" =…

Namespace

Drupal\graphql_core\Plugin\GraphQL\Fields\EntityQuery

Code

protected function getQueryContext($value, array $args, ResolveContext $context, ResolveInfo $info) {

  // Forward the whole set of arguments by default.
  return [
    'parent' => $value,
    'args' => $args,
    'info' => $info,
  ];
}