apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Refetchqueries does not update cache if vue router push is called

Open brettins opened this issue 3 years ago • 0 comments

Describe the bug When refetching queries after a mutation and using vue router to push to a new page upon response from the original mutation, the apollo cache is not updated.

To Reproduce

  1. Using an ApolloMutation component, create an object.
  2. Include the "refetchQueries" with a query that will include that new object.
  3. In the @done event for the ApolloMutation, use vue router to push to a new page.
  4. Go to the page with the refetchedQuery, observe that it is not updated.

Using this same query & setup without the vue router push will result in an updated cache and the list of objects showing correctly.

Expected behavior The cache should be updated regardless of router pushes.

Versions vue: 2.6.11 vue-apollo: 3.0.7 apollo-client: 2.6.10

Additional context Add any other context about the problem here.

brettins avatar Jun 23 '21 18:06 brettins