Skip to content

Instantly share code, notes, and snippets.

@a7v8x
Created May 2, 2020 10:36
Show Gist options
  • Save a7v8x/80cb0730f6467011f8693d26a901f925 to your computer and use it in GitHub Desktop.
Save a7v8x/80cb0730f6467011f8693d26a901f925 to your computer and use it in GitHub Desktop.
import {
GraphQLString,
GraphQLID,
GraphQLObjectType,
GraphQLNonNull,
} from 'graphql';
const User = 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 default User;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment