Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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