graphql-tools-type-email
v2.0.2
Published
Email scalar type for graphql-tools
Downloads
14
Maintainers
Readme
graphql-tools-type-email
Email scalar type for graphql-tools
Usage
import { makeExecutableSchema } from 'graphql-tools'
import Email from 'graphql-tools-type-email'
let typeDefs = [`
scalar Email
type Query {
value(email: Email): Email
}`
]
let resolvers = {
Email,
Query: {
value: (root, { email }) => email
}
}
let schema = makeExecutableSchema({ typeDefs, resolvers })
export default schema