You are here

protected function QueryProcessor::resolveContextValue in GraphQL 8.3

Parameters

\GraphQL\Server\ServerConfig $config:

\GraphQL\Server\OperationParams $params:

\GraphQL\Language\AST\DocumentNode $document:

$operation:

Return value

mixed

1 call to QueryProcessor::resolveContextValue()
QueryProcessor::doExecuteOperation in src/GraphQL/Execution/QueryProcessor.php

File

src/GraphQL/Execution/QueryProcessor.php, line 396

Class

QueryProcessor

Namespace

Drupal\graphql\GraphQL\Execution

Code

protected function resolveContextValue(ServerConfig $config, OperationParams $params, DocumentNode $document, $operation) {
  $context = $config
    ->getContext();
  if (is_callable($context)) {
    $context = $context($params, $document, $operation);
  }
  return $context;
}