You are here

public function FieldContext::__construct in GraphQL 8.4

FieldContext constructor.

Parameters

\Drupal\graphql\GraphQL\Execution\ResolveContext $context:

\GraphQL\Type\Definition\ResolveInfo $info:

File

src/GraphQL/Execution/FieldContext.php, line 35

Class

FieldContext
Context that is passed to data producer plugins.

Namespace

Drupal\graphql\GraphQL\Execution

Code

public function __construct(ResolveContext $context, ResolveInfo $info) {
  $this
    ->addCacheContexts([
    'user.permissions',
  ]);
  $this->context = $context;
  $this->info = $info;
}