You are here

protected function ArgumentAwarePluginTrait::buildArgumentDefault in GraphQL 8.3

Builds an argument's default value.

Parameters

mixed $argument: The argument definition.

array $definition: The plugin definition array.

Return value

mixed The argument's default value.

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

File

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

Class

ArgumentAwarePluginTrait

Namespace

Drupal\graphql\Plugin\GraphQL\Traits

Code

protected function buildArgumentDefault($argument, $definition) {
  return isset($argument['default']) ? $argument['default'] : NULL;
}