You are here

Uri.php in GraphQL 8.3

File

modules/graphql_core/src/Plugin/GraphQL/Scalars/TypedData/Uri.php
View source
<?php

namespace Drupal\graphql_core\Plugin\GraphQL\Scalars\TypedData;

use Drupal\graphql\Plugin\SchemaBuilderInterface;
use Drupal\graphql\Plugin\GraphQL\Scalars\ScalarPluginBase;
use Drupal\graphql\Plugin\TypePluginManager;
use GraphQL\Type\Definition\Type;

/**
 * @GraphQLScalar(
 *   id = "uri",
 *   name = "Uri",
 *   type = "uri"
 * )
 */
class Uri extends ScalarPluginBase {

  /**
   * {@inheritdoc}
   */
  public static function createInstance(SchemaBuilderInterface $builder, TypePluginManager $manager, $definition, $id) {
    return Type::string();
  }

}

Classes

Namesort descending Description
Uri Plugin annotation @GraphQLScalar( id = "uri", name = "Uri", type = "uri" )