Created
June 7, 2019 22:00
-
-
Save felipe-ssilva/ddd288373a6efbc96f0c032d342ad62b 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