You are here

public function ResolverBuilder::fromContext in GraphQL 8.4

Resolves a value from the context by context name.

Parameters

string $name:

callable|null $default:

Return value

\Drupal\graphql\GraphQL\Resolver\Context

File

src/GraphQL/ResolverBuilder.php, line 163

Class

ResolverBuilder
Wires and maps different resolvers together to build the GraphQL tree.

Namespace

Drupal\graphql\GraphQL

Code

public function fromContext($name, $default = NULL) {
  return new Context($name, $default);
}