You are here

protected function DescribablePluginTrait::buildDescription in GraphQL 8.3

Parameters

$definition:

Return value

null|string

9 calls to DescribablePluginTrait::buildDescription()
EnumPluginBase::getDefinition in src/Plugin/GraphQL/Enums/EnumPluginBase.php
Returns the plugin's type or field definition for the schema.
FieldPluginBase::getDefinition in src/Plugin/GraphQL/Fields/FieldPluginBase.php
Returns the plugin's type or field definition for the schema.
InputTypePluginBase::getDefinition in src/Plugin/GraphQL/InputTypes/InputTypePluginBase.php
Returns the plugin's type or field definition for the schema.
InterfacePluginBase::getDefinition in src/Plugin/GraphQL/Interfaces/InterfacePluginBase.php
Returns the plugin's type or field definition for the schema.
MutationPluginBase::getDefinition in src/Plugin/GraphQL/Mutations/MutationPluginBase.php
Returns the plugin's type or field definition for the schema.

... See full list

File

src/Plugin/GraphQL/Traits/DescribablePluginTrait.php, line 12

Class

DescribablePluginTrait

Namespace

Drupal\graphql\Plugin\GraphQL\Traits

Code

protected function buildDescription($definition) {
  if (!empty($definition['description'])) {
    return (string) $definition['description'];
  }
  return NULL;
}