Now using changeUsername

This commit is contained in:
Belen Curcio
2017-11-20 16:07:50 -03:00
parent 43e9da9cbc
commit 2706e47f85
3 changed files with 11 additions and 10 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ import {createDefaultResponseFragments} from '../utils';
// fragments defined here are automatically registered.
export default {
...createDefaultResponseFragments(
'SetUsernameResponse',
'ChangeUsernameResponse',
'SetUserBanStatusResponse',
'SetUserSuspensionStatusResponse',
'SetCommentStatusResponse',
+5 -5
View File
@@ -196,16 +196,16 @@ export const withRejectUsername = withMutation(
})
});
export const withSetUsername = withMutation(
export const withChangeUsername = withMutation(
gql`
mutation RejectUsername($id: ID!, $username: String!) {
setUsername(id: $id, username: $username) {
...SetUsernameResponse
mutation ChangeUsername($id: ID!, $username: String!) {
changeUsername(id: $id, username: $username) {
...ChangeUsernameResponse
}
}
`, {
props: ({mutate}) => ({
setUsername: (id, username) => {
changeUsername: (id, username) => {
return mutate({
variables: {
id,