You are here

public function SchemaPluginBase::processType in GraphQL 8.3

Processes a optimized type definition structure.

Parameters

array $type: The type definition with the first array element representing the name of the type and the second array element representing the list of decorators to apply to the type.

Return value

\GraphQL\Type\Definition\Type The decorated type instance corresponding to the given type definition.

Overrides SchemaBuilderInterface::processType

1 call to SchemaPluginBase::processType()
SchemaPluginBase::processArguments in src/Plugin/GraphQL/Schemas/SchemaPluginBase.php
Processes a list of argument definitions.

File

src/Plugin/GraphQL/Schemas/SchemaPluginBase.php, line 472

Class

SchemaPluginBase

Namespace

Drupal\graphql\Plugin\GraphQL\Schemas

Code

public function processType(array $type) {
  list($type, $decorators) = $type;
  return array_reduce($decorators, function ($type, $decorator) {
    return $decorator($type);
  }, $this
    ->getType($type));
}