Is this a @urql/graphcache v6 breaking change not documented?

52 Views Asked by At

I'm opening this question because in the transition from @urql/graphcache version 4 to version 6 I noticed a breaking change which unfortunately is not fixable even using request-policy-exchange (from the advice @kitten gave me).

Steps to reproduce (using request-policy-exchange too)

  1. Start the backend visiting: https://codesandbox.io/p/sandbox/h1pcl

  2. Open the frontend reproduction: https://codesandbox.io/p/sandbox/n9zgfw

  3. Go to the "Todos list" page and wait for todos list to be rendered

  4. Now the cache is fullfilled with todos

  5. Try to delete some todos, or click the button "Add more random todos"

  6. Click on the "Reload" button

  7. As you can see the (old) list is immediately loaded (from the cache) > a call is pending > but the stale flag is false and the data is not updated.

This is a big problem for our applications

Almost all of the clients of our customers are browsers on low hardware and with little RAM. Those browsers are closed by the operating system and are restarted when you return to use them. As you can imagine if the data is not reloaded when the page restarts it is a serious problem.

I also tried using shouldUpgrade, but the data doesn't get updated.

Am I doing something wrong? And what?

0

There are 0 best solutions below