DefaultInternalUrl.php in GraphQL 8.3
File
modules/graphql_core/src/Plugin/GraphQL/Types/Routing/DefaultInternalUrl.php
View source
<?php
namespace Drupal\graphql_core\Plugin\GraphQL\Types\Routing;
use Drupal\Core\Url;
use Drupal\graphql\GraphQL\Execution\ResolveContext;
use Drupal\graphql\Plugin\GraphQL\Types\TypePluginBase;
use GraphQL\Type\Definition\ResolveInfo;
class DefaultInternalUrl extends TypePluginBase {
public function applies($object, ResolveContext $context, ResolveInfo $info) {
return $object instanceof Url && !$object
->isExternal();
}
}
Classes
Name |
Description |
DefaultInternalUrl |
Plugin annotation
@GraphQLType(
id = "default_internal_url",
name = "DefaultInternalUrl",
interfaces = {"InternalUrl"},
weight = -1
) |