setUsername refactor

This commit is contained in:
Belen Curcio
2017-11-20 15:35:16 -03:00
parent debda80db1
commit dbe88e58f4
3 changed files with 50 additions and 5 deletions
@@ -196,6 +196,26 @@ export const withRejectUsername = withMutation(
})
});
export const withSetUsername = withMutation(
gql`
mutation RejectUsername($id: ID!, $username: String) {
setUsername(id: $id, username: $username) {
...SetUsernameResponse
}
}
`, {
props: ({mutate}) => ({
setUsername: (id, username) => {
return mutate({
variables: {
id,
username,
},
});
}
})
});
export const withSetUserBanStatus = withMutation(
gql`
mutation SetUserBanStatus($input: SetUserBanStatusInput!) {