2.0.2 • Published 5 years ago

graphql-tools-type-email v2.0.2

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

graphql-tools-type-email

Build Status Coverage Status

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