From 1153c52c2c702529df6d9d7209986a3b8f849eb8 Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Fri, 9 Jun 2017 00:31:29 +0700 Subject: [PATCH] Correct optimistic response --- client/coral-framework/graphql/mutations.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/client/coral-framework/graphql/mutations.js b/client/coral-framework/graphql/mutations.js index dcba97891..3b9ef01f4 100644 --- a/client/coral-framework/graphql/mutations.js +++ b/client/coral-framework/graphql/mutations.js @@ -200,8 +200,8 @@ export const withAddTag = withMutation( asset_id: assetId }, optimisticResponse: { - deleteAction: { - __typename: 'DeleteActionResponse', + addTag: { + __typename: 'ModifyTagResponse', errors: null, } }, @@ -242,6 +242,12 @@ export const withRemoveTag = withMutation( name, asset_id: assetId }, + optimisticResponse: { + removeTag: { + __typename: 'ModifyTagResponse', + errors: null, + } + }, update: (proxy) => { const fragmentId = `Comment_${id}`;