You are here

protected function ArgumentAwarePluginTrait::buildArgumentType in GraphQL 8.3

Builds an argument's type.

Parameters

mixed $argument: The argument definition.

Return value

array The pre-parsed type definition of the argument.

1 call to ArgumentAwarePluginTrait::buildArgumentType()
ArgumentAwarePluginTrait::buildArguments in src/Plugin/GraphQL/Traits/ArgumentAwarePluginTrait.php
Builds the list of arguments.

File

src/Plugin/GraphQL/Traits/ArgumentAwarePluginTrait.php, line 38

Class

ArgumentAwarePluginTrait

Namespace

Drupal\graphql\Plugin\GraphQL\Traits

Code

protected function buildArgumentType($argument) {
  $type = is_array($argument) ? $argument['type'] : $argument;
  return StringHelper::parseType($type);
}