You are here

protected function TypedDataTypeResolver::resolveRecursiveReference in GraphQL 8

Same name and namespace in other branches
  1. 8.2 src/TypeResolver/TypedDataTypeResolver.php \Drupal\graphql\TypeResolver\TypedDataTypeResolver::resolveRecursiveReference()

Resolves data reference definitions.

Parameters

\Drupal\Core\TypedData\DataReferenceDefinitionInterface $type: The data reference definition to be resolved.

Return value

\Fubhy\GraphQL\Type\Definition\Types\ObjectType|null The object type or NULL if the type does not have any resolvable fields.

1 call to TypedDataTypeResolver::resolveRecursiveReference()
TypedDataTypeResolver::resolveRecursive in src/TypeResolver/TypedDataTypeResolver.php

File

src/TypeResolver/TypedDataTypeResolver.php, line 233

Class

TypedDataTypeResolver
Generically resolves the schema for typed data types.

Namespace

Drupal\graphql\TypeResolver

Code

protected function resolveRecursiveReference(DataReferenceDefinitionInterface $type) {
  $targetDefinition = $type
    ->getTargetDefinition();
  if (!($targetType = $this->typeResolver
    ->resolveRecursive($targetDefinition))) {
    return NULL;
  }
  return $targetType;
}