mathsgod / gql-scalar-email
graphql scalar email
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/mathsgod/gql-scalar-email
Requires (Dev)
- phpunit/phpunit: ^6.5
- webonyx/graphql-php: ^0.12.6
This package is auto-updated.
Last update: 2025-09-29 02:28:36 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);