Email.php in GraphQL 8.3
File
modules/graphql_core/src/Plugin/GraphQL/Scalars/TypedData/Email.phpView 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 = "email",
* name = "Email",
* type = "email"
* )
*/
class Email extends ScalarPluginBase {
/**
* {@inheritdoc}
*/
public static function createInstance(SchemaBuilderInterface $builder, TypePluginManager $manager, $definition, $id) {
return Type::string();
}
}