You are here

protected function QueryProcessor::resolveRootValue 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::resolveRootValue()
QueryProcessor::doExecuteOperation in src/GraphQL/Execution/QueryProcessor.php

File

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

Class

QueryProcessor

Namespace

Drupal\graphql\GraphQL\Execution

Code

protected function resolveRootValue(ServerConfig $config, OperationParams $params, DocumentNode $document, $operation) {
  $root = $config
    ->getRootValue();
  if (is_callable($root)) {
    $root = $root($params, $document, $operation);
  }
  return $root;
}