You are here

public function InputTypePluginBase::getDefinition in GraphQL 8.3

Returns the plugin's type or field definition for the schema.

Return value

array The type or field definition of the plugin.

Overrides TypePluginInterface::getDefinition

File

src/Plugin/GraphQL/InputTypes/InputTypePluginBase.php, line 37

Class

InputTypePluginBase

Namespace

Drupal\graphql\Plugin\GraphQL\InputTypes

Code

public function getDefinition() {
  $definition = $this
    ->getPluginDefinition();
  return [
    'name' => $definition['name'],
    'description' => $this
      ->buildDescription($definition),
    'fields' => $this
      ->buildFields($definition),
    'contexts' => $this
      ->buildCacheContexts($definition),
  ];
}