public function EntityUrl::resolve in GraphQL 8.4
Resolver.
Parameters
\Drupal\Core\Entity\EntityInterface $entity:
Return value
Throws
\Drupal\Core\Entity\EntityMalformedException
File
- src/
Plugin/ GraphQL/ DataProducer/ Entity/ EntityUrl.php, line 36
Class
- EntityUrl
- Returns the URL of an entity.
Namespace
Drupal\graphql\Plugin\GraphQL\DataProducer\EntityCode
public function resolve(EntityInterface $entity) {
return $entity
->toUrl();
}