https://github.com/up9cloud/graphql-tools-type-email
https://github.com/up9cloud/graphql-tools-type-email
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/up9cloud/graphql-tools-type-email
- Owner: up9cloud
- Created: 2018-01-27T06:19:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-08-02T11:18:35.000Z (almost 5 years ago)
- Last Synced: 2025-10-20T08:34:34.934Z (8 months ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# graphql-tools-type-email
[](https://travis-ci.org/up9cloud/graphql-tools-type-email)
[](https://coveralls.io/github/up9cloud/graphql-tools-type-email?branch=master)
Email scalar type for [graphql-tools](https://github.com/apollographql/graphql-tools)
## Usage
```js
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
```