From 0403c46c6ce4eb96caf1e8dca2d92f57e2eed011 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Mon, 13 Feb 2017 16:13:03 -0300 Subject: [PATCH] Adding errors response --- client/coral-admin/src/graphql/mutations/index.js | 2 -- .../src/graphql/mutations/setCommentStatus.graphql | 6 +++++- .../coral-admin/src/graphql/mutations/setUserStatus.graphql | 6 +++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/client/coral-admin/src/graphql/mutations/index.js b/client/coral-admin/src/graphql/mutations/index.js index 5e1503062..fe3a1faf9 100644 --- a/client/coral-admin/src/graphql/mutations/index.js +++ b/client/coral-admin/src/graphql/mutations/index.js @@ -1,5 +1,3 @@ -// acceptComment -// rejectComment import {graphql} from 'react-apollo'; import SET_USER_STATUS from './setUserStatus.graphql'; import SET_COMMENT_STATUS from './setCommentStatus.graphql'; diff --git a/client/coral-admin/src/graphql/mutations/setCommentStatus.graphql b/client/coral-admin/src/graphql/mutations/setCommentStatus.graphql index cfcc76421..7ff6173a8 100644 --- a/client/coral-admin/src/graphql/mutations/setCommentStatus.graphql +++ b/client/coral-admin/src/graphql/mutations/setCommentStatus.graphql @@ -1,3 +1,7 @@ mutation setCommentStatus($commentId: ID!, $status: COMMENT_STATUS!){ - setCommentStatus(id: $commentId, status: $status) + setCommentStatus(id: $commentId, status: $status) { + errors { + translation_key + } + } } diff --git a/client/coral-admin/src/graphql/mutations/setUserStatus.graphql b/client/coral-admin/src/graphql/mutations/setUserStatus.graphql index 0ebaf54fd..32fcf7e20 100644 --- a/client/coral-admin/src/graphql/mutations/setUserStatus.graphql +++ b/client/coral-admin/src/graphql/mutations/setUserStatus.graphql @@ -1,3 +1,7 @@ mutation setUserStatus($userId: ID!, $status: USER_STATUS!) { - setUserStatus(id: $userId, status: $status) + setUserStatus(id: $userId, status: $status) { + errors { + translation_key + } + } }