public function EntityLabel::resolve in GraphQL 8.4
Resolver.
Parameters
\Drupal\Core\Entity\EntityInterface $entity:
Return value
string|null
File
- src/
Plugin/ GraphQL/ DataProducer/ Entity/ EntityLabel.php, line 35
Class
- EntityLabel
- Returns the labels of an entity.
Namespace
Drupal\graphql\Plugin\GraphQL\DataProducer\EntityCode
public function resolve(EntityInterface $entity) {
return $entity
->label();
}