When using updateQueries no refetch is needed

This commit is contained in:
Chi Vinh Le
2017-04-07 03:43:14 +07:00
parent 10836f7918
commit 449152d400
@@ -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({