Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Last active August 30, 2017 19:36
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 matthieu-D/6bf90a0128a405baac160ad1a28a8f65 to your computer and use it in GitHub Desktop.
Save matthieu-D/6bf90a0128a405baac160ad1a28a8f65 to your computer and use it in GitHub Desktop.
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