You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: trey-rexel mentioned this issue in Discord, with a different repository and steps.
We are experiencing an issue with the offlineExchange in URQL where optimistic updates appear to retain values from a cache.readQuery after the first call. The second call with the same input results in the UI rolling back to the value from the first call, even if other changes have happened. This behavior results in the UI becoming erratic and often displaying incorrect data.
This is not related to when the device comes online. The behavior described is while entirely offline.
To reproduce using the linked repository:
While online and from the index page: add one of each product to a cart.
View the cart page and note the Product Quantity of each product appears correct, all of them at 1.
Use devtools to go offline and go back to the index page.
Add one of each of the items to the same cart.
View the cart page, again, and note the Product Quantities still appear correct, all of them at 2.
Return to the index page and add each of the items to the cart for a third time.
View the cart page and notice Product Quantities will revert back to values that happened in a previous step. They should have all been 3, but instead only the last mutation called will have 3, the others will have 2.
If you keep adding items, or clear the cart and re-add a single item, it becomes a guessing game as to what will display.
Describe the bug
Note:
trey-rexel
mentioned this issue in Discord, with a different repository and steps.We are experiencing an issue with the offlineExchange in URQL where optimistic updates appear to retain values from a
cache.readQuery
after the first call. The second call with the same input results in the UI rolling back to the value from the first call, even if other changes have happened. This behavior results in the UI becoming erratic and often displaying incorrect data.This is not related to when the device comes online. The behavior described is while entirely offline.
To reproduce using the linked repository:
1
.2
.3
, but instead only the last mutation called will have3
, the others will have2
.If you keep adding items, or clear the cart and re-add a single item, it becomes a guessing game as to what will display.
Reproduction
https://github.com/danholladayrexel/urql-offline-issue
Urql version
@urql/vue: 1.4.1
Validations
The text was updated successfully, but these errors were encountered: