l Query Revalidation Completes After Mutation
Hey! I've globally set up my MutationCache like this:
Now, in another component, I have an edit form that triggers a mutation inside a popup. The issue is that the popup closes immediately after the mutation, but revalidating (with invalidateQueries) takes some time before the list gets updated.
Do you know if there's any way I can check if queryClient.invalidateQueries(); is still in progress? I’d like to prevent the popup from closing until revalidation is complete.
Thanks!
1 Reply
quickest-silver•12mo ago
You can return the promise from invalidateQueries, then the mutation will stay in pending state until the invalidation is complete