setUsername refactor

This commit is contained in:
Belen Curcio committed 2017-11-20 15:35:16 -03:00
1 parent debda80db1
commit dbe88e58f4
3 files changed
+50 -5

No files matched your search

@@ -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!) {