Created
June 7, 2019 22:00
-
-
Save felipe-ssilva/6d76b470c6ff1e416e09e6690e205866 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 typeDefs = ` | |
type Mutation { | |
deleteUser(id: ID!): User | |
} | |
`; | |
const resolvers = { | |
Mutation: { | |
deleteUser: (parent, args) => { | |
const removeUser = Object.assign({}, args); | |
delete removeUser[args]; | |
return removeUser; | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment