From 717d5e656677202059fadfeda7ce9c2b9b8c24b9 Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Mon, 8 Jan 2018 14:43:14 +0100 Subject: [PATCH] Rename UnBan and UnSuspend --- client/coral-admin/src/graphql/index.js | 4 ++-- client/coral-framework/graphql/fragments.js | 4 ++-- client/coral-framework/graphql/mutations.js | 8 ++++---- graph/typeDefs.graphql | 14 +++++++------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/client/coral-admin/src/graphql/index.js b/client/coral-admin/src/graphql/index.js index ed4e772cf..80573a2ad 100644 --- a/client/coral-admin/src/graphql/index.js +++ b/client/coral-admin/src/graphql/index.js @@ -56,7 +56,7 @@ export default { proxy.writeFragment({fragment: userStatusFragment, id: fragmentId, data: updated}); } }), - UnSuspendUser: ({variables: {input: {id}}}) => ({ + UnsuspendUser: ({variables: {input: {id}}}) => ({ update: (proxy) => { const fragmentId = `User_${id}`; const data = proxy.readFragment({fragment: userStatusFragment, id: fragmentId}); @@ -92,7 +92,7 @@ export default { proxy.writeFragment({fragment: userStatusFragment, id: fragmentId, data: updated}); } }), - UnBanUser: ({variables: {input: {id}}}) => ({ + UnbanUser: ({variables: {input: {id}}}) => ({ update: (proxy) => { const fragmentId = `User_${id}`; const data = proxy.readFragment({fragment: userStatusFragment, id: fragmentId}); diff --git a/client/coral-framework/graphql/fragments.js b/client/coral-framework/graphql/fragments.js index 26073676b..9d6ff3f72 100644 --- a/client/coral-framework/graphql/fragments.js +++ b/client/coral-framework/graphql/fragments.js @@ -6,11 +6,11 @@ export default { 'SetUserRoleResponse', 'ChangeUsernameResponse', 'BanUsersResponse', - 'UnBanUserResponse', + 'UnbanUserResponse', 'SetUserSuspensionStatusResponse', 'SetCommentStatusResponse', 'SetUsernameStatusResponse', - 'UnSuspendUserResponse', + 'UnsuspendUserResponse', 'SuspendUserResponse', 'CreateCommentResponse', 'CreateFlagResponse', diff --git a/client/coral-framework/graphql/mutations.js b/client/coral-framework/graphql/mutations.js index 0086d9a00..27b10669b 100644 --- a/client/coral-framework/graphql/mutations.js +++ b/client/coral-framework/graphql/mutations.js @@ -179,9 +179,9 @@ export const withSuspendUser = withMutation( export const withUnsuspendUser = withMutation( gql` - mutation UnSuspendUser($input: UnSuspendUserInput!) { + mutation UnsuspendUser($input: UnsuspendUserInput!) { unsuspendUser(input: $input) { - ...UnSuspendUserResponse + ...UnsuspendUserResponse } } `, { @@ -275,9 +275,9 @@ export const withBanUser = withMutation( export const withUnbanUser = withMutation( gql` - mutation UnBanUser($input: UnBanUserInput!) { + mutation UnbanUser($input: UnbanUserInput!) { unbanUser(input: $input) { - ...UnBanUserResponse + ...UnbanUserResponse } } `, { diff --git a/graph/typeDefs.graphql b/graph/typeDefs.graphql index e39238d4e..002318bc3 100644 --- a/graph/typeDefs.graphql +++ b/graph/typeDefs.graphql @@ -1314,7 +1314,7 @@ input BanUserInput { message: String! } -input UnBanUserInput { +input UnbanUserInput { id: ID! } @@ -1322,7 +1322,7 @@ type BanUsersResponse implements Response { errors: [UserError!] } -type UnBanUserResponse implements Response { +type UnbanUserResponse implements Response { errors: [UserError!] } @@ -1336,13 +1336,13 @@ type SuspendUserResponse implements Response { errors: [UserError!] } -input UnSuspendUserInput { +input UnsuspendUserInput { id: ID! } -# UnSuspendUserResponse is the response returned with possibly some +# UnsuspendUserResponse is the response returned with possibly some # errors relating to the suspend action attempt. -type UnSuspendUserResponse implements Response { +type UnsuspendUserResponse implements Response { # An array of errors relating to the mutation that occurred. errors: [UserError!] @@ -1396,7 +1396,7 @@ type RootMutation { # Sets the suspension status on a given user. Requires the `MODERATOR` role. # Mutation is restricted. - unsuspendUser(input: UnSuspendUserInput!): UnSuspendUserResponse + unsuspendUser(input: UnsuspendUserInput!): UnsuspendUserResponse # Sets the ban status on a given user. Requires the `MODERATOR` role. # Mutation is restricted. @@ -1404,7 +1404,7 @@ type RootMutation { # Sets the ban status on a given user. Requires the `MODERATOR` role. # Mutation is restricted. - unbanUser(input: UnBanUserInput!): UnBanUserResponse + unbanUser(input: UnbanUserInput!): UnbanUserResponse # Sets the username status on a given user to `APPROVED`. Requires the # `MODERATOR` role. Mutation is restricted.