resumePausedMutations
and idempotence
#9439
-
Based on my experience and how the code seems to behave, I gather that this is what happens when you call
This is enormously useful. In my use case, it means that an arbitrary query can wait for any currently paused mutations to unpause themselves; when the user returns online from being offline, it allows me to ensure all paused mutations are committed before we ask for new data. But suppose I have two such queries that don't coordinate. The first one to execute will correctly wait for all paused mutations to resume and finish before it proceeds. The second to execute — even if it's one millisecond later! — seems like it will call In my case, I worked around this by having each query call a wrapper function that keeps track of this. (It'll still call I suspect that I could throw this together by being really clever about how I use the methods on |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think resuming is something you should do globally, like, when network connection is regained, not on a query level. The query can wait until all mutations are done by checking |
Beta Was this translation helpful? Give feedback.
I think resuming is something you should do globally, like, when network connection is regained, not on a query level. The query can wait until all mutations are done by checking
useIsMutating
.