mathsgod / gql-scalar-email
This package is abandoned and no longer maintained.
No replacement package was suggested.
graphql scalar email
1.0.3
2019-10-31 08:23 UTC
Requires
None
Requires (Dev)
- phpunit/phpunit: ^6.5
- webonyx/graphql-php: ^0.12.6
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-29 02:36:44 UTC
README
$gql = "
scalar Email
type Query{
test(email:Email):Email
}
";
$typeConfigDecorator = function ($typeConfig) {
$name = $typeConfig['name'];
if ($name === 'Email') {
$email = new Scalar\Email();
$typeConfig["serialize"] = [$email, "serialize"];
$typeConfig["parseLiteral"] = [$email, "parseLiteral"];
}
return $typeConfig;
};
$schema = BuildSchema::build($gql, $typeConfigDecorator);