Skip to content

Instantly share code, notes, and snippets.

@a7v8x
Created July 7, 2017 14:40
Show Gist options
  • Save a7v8x/ebf08576849521dcda089e66de4565e4 to your computer and use it in GitHub Desktop.
Save a7v8x/ebf08576849521dcda089e66de4565e4 to your computer and use it in GitHub Desktop.
import {
GraphQLString,
GraphQLID,
GraphQLInputObjectType,
GraphQLObjectType,
} from 'graphql';
export const UserType = new GraphQLObjectType({
name: 'UserType',
description: 'User type definition',
fields: () => ({
id: {
type: GraphQLID,
},
email: {
type: GraphQLString,
},
}),
});
export const UserInputType = new GraphQLInputObjectType({
name: 'UserInputType',
description: 'User payload definition',
fields: () => ({
email: {
type: GraphQLString,
},
}),
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment