Skip to content

Instantly share code, notes, and snippets.

@du5rte
Created April 21, 2017 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save du5rte/713ceb731a9a33e24dd76d9838daf51a to your computer and use it in GitHub Desktop.
Save du5rte/713ceb731a9a33e24dd76d9838daf51a to your computer and use it in GitHub Desktop.
const ProfileType = new GraphQLObjectType({
name: 'Profile',
description: 'User Profile',
fields: {
email: {type: new GraphQLNonNull(GraphQLString)},
username: {
type: new GraphQLNonNull(GraphQLString),
resolve(profile) {
return profile.split("@")[0]
}
},
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment