You are here

public function EntityUuid::resolve in GraphQL 8.4

Resolver.

Parameters

\Drupal\Core\Entity\EntityInterface $entity:

Return value

null|string

File

src/Plugin/GraphQL/DataProducer/Entity/EntityUuid.php, line 34

Class

EntityUuid
Returns the entity's uuid.

Namespace

Drupal\graphql\Plugin\GraphQL\DataProducer\Entity

Code

public function resolve(EntityInterface $entity) {
  return $entity
    ->uuid();
}