public function TypeResolver::addTypeResolver in GraphQL 8
Same name and namespace in other branches
- 8.2 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\graphqlCode
public function addTypeResolver(TypeResolverInterface $resolver, $priority = 0) {
$this->resolvers[$priority][] = $resolver;
$this->sortedResolvers = NULL;
}