Skip to content
Discussion options

You must be logged in to vote
  1. You only invalidate after the last mutation is done by adding a guard:
onSettled: () => {
  if (queryClient.isMutating(filter) === 1) {
    queryClient.invalidateQueries(...)
  }
}

filter should filter for mutations you care about

  1. You run those mutations in a queue by setting scope.id on your mutation. All mutations in the same scope are guaranteed run in serial.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by kuldeeprajput-dev
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants