You are here

public static function Executor::create in GraphQL 8.4

Constructs an object from a services container.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container:

\GraphQL\Executor\Promise\PromiseAdapter $adapter:

\GraphQL\Type\Schema $schema:

\GraphQL\Language\AST\DocumentNode $document:

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

mixed $root:

mixed $variables:

string $operation:

callable $resolver:

Return value

\Drupal\graphql\GraphQL\Execution\Executor

1 call to Executor::create()
ExecutorFactory::create in src/GraphQL/Execution/ExecutorFactory.php
Factory method to make a new executor.

File

src/GraphQL/Execution/Executor.php, line 184

Class

Executor
Executes GraphQL queries with cache lookup.

Namespace

Drupal\graphql\GraphQL\Execution

Code

public static function create(ContainerInterface $container, PromiseAdapter $adapter, Schema $schema, DocumentNode $document, ResolveContext $context, $root, $variables, $operation, callable $resolver) {
  return new static($container
    ->get('cache_contexts_manager'), $container
    ->get('cache.graphql.results'), $container
    ->get('request_stack'), $container
    ->get('event_dispatcher'), $adapter, $schema, $document, $context, $root, $variables, $operation, $resolver);
}