Skip to content

Instantly share code, notes, and snippets.

@a7v8x
Last active October 5, 2017 19:05
Show Gist options
  • Save a7v8x/7bf63408c4e2fb50d9177b0406d97983 to your computer and use it in GitHub Desktop.
Save a7v8x/7bf63408c4e2fb50d9177b0406d97983 to your computer and use it in GitHub Desktop.
import {
GraphQLString,
GraphQLID,
GraphQLObjectType,
GraphQLNonNull,
} from 'graphql';
const UserType = new GraphQLObjectType({
name: 'User',
description: 'User type definition',
fields: () => ({
id: {
type: new GraphQLNonNull(GraphQLID),
},
username: {
type: new GraphQLNonNull(GraphQLString),
},
email: {
type: GraphQLString,
},
phone: {
type: GraphQLString,
},
firstName: {
type: GraphQLString,
},
lastName: {
type: GraphQLString,
},
}),
});
export {
UserType as default
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment