From f795a96f463a239548ba8ae4bfbb020dd0afc8f3 Mon Sep 17 00:00:00 2001 From: David Jay Date: Thu, 23 Feb 2017 13:19:09 -0500 Subject: [PATCH] Returning dontagree id on post. --- graph/resolvers/root_mutation.js | 3 +-- graph/typeDefs.graphql | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/graph/resolvers/root_mutation.js b/graph/resolvers/root_mutation.js index e2dba5821..2462962c6 100644 --- a/graph/resolvers/root_mutation.js +++ b/graph/resolvers/root_mutation.js @@ -13,7 +13,6 @@ const wrapResponse = (key) => (promise) => { } return res; }).catch((err) => { - if (err instanceof errors.APIError) { return { errors: [err] @@ -39,7 +38,7 @@ const RootMutation = { return wrapResponse('flag')(Action.create({item_id, item_type, action_type: 'FLAG', group_id: reason, metadata: {message}})); }, createDontAgree(_, {dontagree: {item_id, item_type, reason, message}}, {mutators: {Action}}) { - return wrapResponse('dontagee')(Action.create({item_id, item_type, action_type: 'DONTAGREE', group_id: reason, metadata: {message}})); + return wrapResponse('dontagree')(Action.create({item_id, item_type, action_type: 'DONTAGREE', group_id: reason, metadata: {message}})); }, deleteAction(_, {id}, {mutators: {Action}}) { return wrapResponse(null)(Action.delete({id})); diff --git a/graph/typeDefs.graphql b/graph/typeDefs.graphql index e005b88ea..aad6026eb 100644 --- a/graph/typeDefs.graphql +++ b/graph/typeDefs.graphql @@ -601,7 +601,7 @@ input CreateDontAgreeInput { item_type: ACTION_ITEM_TYPE! # The reason for not agreeing with the item. - reason: String! + reason: String # An optional message sent with the don't agree action by the user. message: String