From 449152d400aa3b0082c939a4e8eff95cd4c4d5eb Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Fri, 7 Apr 2017 03:43:14 +0700 Subject: [PATCH] When using updateQueries no refetch is needed --- .../client/containers/RespectButton.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/plugins/coral-plugin-respect/client/containers/RespectButton.js b/plugins/coral-plugin-respect/client/containers/RespectButton.js index 30e7bb380..f102a00b5 100644 --- a/plugins/coral-plugin-respect/client/containers/RespectButton.js +++ b/plugins/coral-plugin-respect/client/containers/RespectButton.js @@ -31,15 +31,6 @@ export const RESPECT_QUERY = gql` const withQuery = graphql(RESPECT_QUERY); -function getRefetchTarget(props) { - return { - query: RESPECT_QUERY, - variables: { - commentId: props.commentId, - }, - }; -} - const withDeleteAction = graphql(gql` mutation deleteAction($id: ID!) { deleteAction(id:$id) { @@ -49,9 +40,6 @@ const withDeleteAction = graphql(gql` } } `, { - options: (props) => ({ - refetchQueries: [getRefetchTarget(props)], - }), props: ({mutate}) => ({ deleteAction: (id) => { return mutate({ @@ -98,9 +86,6 @@ const withPostRespect = graphql(gql` } } `, { - options: (props) => ({ - refetchQueries: [getRefetchTarget(props)], - }), props: ({mutate}) => ({ postRespect: (respect) => { return mutate({