public function EnumPluginBase::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/ Enums/ EnumPluginBase.php, line 32
Class
Namespace
Drupal\graphql\Plugin\GraphQL\EnumsCode
public function getDefinition() {
$definition = $this
->getPluginDefinition();
return [
'name' => $definition['name'],
'description' => $this
->buildDescription($definition),
'values' => $this
->buildEnumValues($definition),
'contexts' => $this
->buildCacheContexts($definition),
];
}