Created
April 21, 2017 15:57
-
-
Save du5rte/713ceb731a9a33e24dd76d9838daf51a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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