You are here

public function MutationPluginBase::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 MutationPluginInterface::getDefinition

File

src/Plugin/GraphQL/Mutations/MutationPluginBase.php, line 39

Class

MutationPluginBase

Namespace

Drupal\graphql\Plugin\GraphQL\Mutations

Code

public function getDefinition() {
  $definition = $this
    ->getPluginDefinition();
  return [
    'type' => $this
      ->buildType($definition),
    'description' => $this
      ->buildDescription($definition),
    'args' => $this
      ->buildArguments($definition),
    'deprecationReason' => $this
      ->buildDeprecationReason($definition),
  ];
}