public function TypePluginBase::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/ Types/ TypePluginBase.php, line 59
Class
Namespace
Drupal\graphql\Plugin\GraphQL\TypesCode
public function getDefinition() {
$definition = $this
->getPluginDefinition();
return [
'name' => $definition['name'],
'description' => $this
->buildDescription($definition),
'interfaces' => $this
->buildInterfaces($definition),
'unions' => $this
->buildUnions($definition),
'contexts' => $this
->buildCacheContexts($definition),
'weight' => $definition['weight'],
];
}