You are here

public function QueryRouteEnhancer::applies in GraphQL 8.4

Returns whether the enhancer runs on the current route.

Parameters

\Symfony\Component\Routing\Route $route: The current route.

Return value

bool

1 call to QueryRouteEnhancer::applies()
QueryRouteEnhancer::enhance in src/Routing/QueryRouteEnhancer.php

File

src/Routing/QueryRouteEnhancer.php, line 26

Class

QueryRouteEnhancer
Adds GraphQL operation information to the Symfony route being resolved.

Namespace

Drupal\graphql\Routing

Code

public function applies(Route $route) {
  return $route
    ->hasDefault('_graphql');
}