overwrite or delete cached mutation #7155
-
I've been wondering how could I handle the following scenario: say you have a mutation that can update an "order status" and you update the order status 2 times:
this two mutations if fired while offline will be cached and persisted on storage, when back online we can resume them and our server will receive two requests updating the order status, but in this case the only request that matters and represents the true status of the order is the last "READY" status. How could I approach this scenario and keep only one cached mutation, so when resumed it makes a single request directly to the "correct state"? except from directly manipulating the Am I not supposed to handle this kind of state on the react-query layer? or is there a different way to handle this with react-query? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think the scoped mutations proposal could solve this some day, but not immediately: |
Beta Was this translation helpful? Give feedback.
I think the scoped mutations proposal could solve this some day, but not immediately: