Last active
August 30, 2017 19:36
-
-
Save matthieu-D/6bf90a0128a405baac160ad1a28a8f65 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
var MutationCreate = { | |
type: new GraphQLList(UserType), | |
description: 'Create a User', | |
args: { | |
name: { | |
name: 'User name', | |
type: new GraphQLNonNull(GraphQLString) | |
} | |
}, | |
resolve: (root, {name}) => { | |
USERs.push({ | |
id: (new Date()).getTime(), | |
name: name | |
}); | |
return USERs; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment