protected function TypeResolver::getFirstApplicableTypeResolver in GraphQL 8
Same name and namespace in other branches
- 8.2 src/TypeResolver.php \Drupal\graphql\TypeResolver::getFirstApplicableTypeResolver()
Returns the first applicable provider for the given type definition.
Parameters
mixed $type:
Return value
\Drupal\graphql\TypeResolverInterface|null
1 call to TypeResolver::getFirstApplicableTypeResolver()
File
- src/
TypeResolver.php, line 50
Class
- TypeResolver
- Attempts to GraphQL type definitions from arbitrary data types.
Namespace
Drupal\graphqlCode
protected function getFirstApplicableTypeResolver($type) {
foreach ($this
->getSortedResolvers() as $resolver) {
if ($resolver
->applies($type)) {
return $resolver;
}
}
return NULL;
}