You are here

public function TypedDataTypeResolver::resolveRecursive in GraphQL 8.2

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

Parameters

mixed $type:

Return value

\Fubhy\GraphQL\Type\Definition\Types\TypeInterface|null

Overrides TypeResolverInterface::resolveRecursive

1 method overrides TypedDataTypeResolver::resolveRecursive()
ContentEntityTypeResolver::resolveRecursive in src/TypeResolver/ContentEntityTypeResolver.php

File

src/TypeResolver/TypedDataTypeResolver.php, line 57

Class

TypedDataTypeResolver
Generically resolves the schema for typed data types.

Namespace

Drupal\graphql\TypeResolver

Code

public function resolveRecursive($type) {
  if ($type instanceof ListDataDefinitionInterface) {
    return $this
      ->resolveRecursiveList($type);
  }
  if ($type instanceof ComplexDataDefinitionInterface) {
    return $this
      ->resolveRecursiveComplex($type);
  }
  if ($type instanceof DataReferenceDefinitionInterface) {
    return $this
      ->resolveRecursiveReference($type);
  }
  if ($type instanceof DataDefinitionInterface) {
    return $this
      ->resolveRecursivePrimitive($type);
  }
  return NULL;
}