You are here

protected function TypedDataTypeResolver::resolveRecursivePrimitive in GraphQL 8

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

Resolves primitive data definitions.

Parameters

\Drupal\Core\TypedData\DataDefinitionInterface $type: The primitive data 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::resolveRecursivePrimitive()
TypedDataTypeResolver::resolveRecursive in src/TypeResolver/TypedDataTypeResolver.php

File

src/TypeResolver/TypedDataTypeResolver.php, line 251

Class

TypedDataTypeResolver
Generically resolves the schema for typed data types.

Namespace

Drupal\graphql\TypeResolver

Code

protected function resolveRecursivePrimitive(DataDefinitionInterface $type) {
  if (!($resolvedType = $this
    ->getPrimitiveType($type))) {
    return NULL;
  }
  return $resolvedType;
}