Handling optimistic update rollback when multiple mutations have been ran
I have this query, users typically quickly add ingredients, and on a slow network there may be multiple outgoing mutations at the same time. When they fail, the rollback function only rolls back the most recent context. Is there a way to roll back the first mutation that failed?
The invalidateQueries eventually gets it if the API is still online but this can take a bit and the UI looks wonky on slow networks.
0 Replies