You are here

protected function ResolverRegistry::getRuntimeTypeResolver in GraphQL 8.4

Returns the type resolver that should be used on runtime.

Parameters

mixed $value:

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

\GraphQL\Type\Definition\ResolveInfo $info:

Return value

callable|null

1 call to ResolverRegistry::getRuntimeTypeResolver()
ResolverRegistry::resolveType in src/GraphQL/ResolverRegistry.php
Resolve a type.

File

src/GraphQL/ResolverRegistry.php, line 225

Class

ResolverRegistry
Contains all the mappings how to resolve a GraphQL request.

Namespace

Drupal\graphql\GraphQL

Code

protected function getRuntimeTypeResolver($value, ResolveContext $context, ResolveInfo $info) {
  return $this
    ->getTypeResolver(Type::getNamedType($info->returnType)->name);
}