You are here

public function TypeResolver::addTypeResolver in GraphQL 8.2

Same name and namespace in other branches
  1. 8 src/TypeResolver.php \Drupal\graphql\TypeResolver::addTypeResolver()

Adds a active theme negotiation service.

Parameters

\Drupal\graphql\TypeResolverInterface $resolver: The type resolver to add.

int $priority: Priority of the type resolver.

File

src/TypeResolver.php, line 38

Class

TypeResolver
Attempts to GraphQL type definitions from arbitrary data types.

Namespace

Drupal\graphql

Code

public function addTypeResolver(TypeResolverInterface $resolver, $priority = 0) {
  $this->resolvers[$priority][] = $resolver;
  $this->sortedResolvers = NULL;
}