public function ExternalUrl::applies in GraphQL 8.3
Checks whether this type applies to a given object.
Parameters
mixed $object: The object to check against.
\Drupal\graphql\GraphQL\Execution\ResolveContext $context: The resolve context.
\GraphQL\Type\Definition\ResolveInfo $info: The resolve info object.
Return value
null|bool TRUE if this type applies to the given object or FALSE if it doesn't.
Overrides TypePluginBase::applies
File
- modules/
graphql_core/ src/ Plugin/ GraphQL/ Types/ Routing/ ExternalUrl.php, line 24
Class
- ExternalUrl
- GraphQL type for non-Drupal urls.
Namespace
Drupal\graphql_core\Plugin\GraphQL\Types\RoutingCode
public function applies($object, ResolveContext $context, ResolveInfo $info) {
return $object instanceof Url && $object
->isExternal();
}