You are here

public function MenuLinkUrl::resolve in GraphQL 8.4

Resolver.

Parameters

\Drupal\Core\Menu\MenuLinkInterface $link:

Return value

\Drupal\Core\Url

File

src/Plugin/GraphQL/DataProducer/Menu/MenuLink/MenuLinkUrl.php, line 36

Class

MenuLinkUrl
Returns the URL object of a menu link.

Namespace

Drupal\graphql\Plugin\GraphQL\DataProducer\Menu\MenuLink

Code

public function resolve(MenuLinkInterface $link) {
  return $link
    ->getUrlObject();
}