-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(graphcache) - Fix offline queries not flowing through the entire cacheExchange #1011
Conversation
🦋 Changeset detectedLatest commit: 301c590 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Tested against: https://codesandbox.io/s/urql-crud-router-doesnt-update-forked-7c622?file=/src/urql.js Working as intended! The todos page starts fetching and receives an empty result with the passed operation as expected. |
@urql/svelte is not working because I think @urql/core is not updated to latest one. Am I wrong? |
@frederikhors If you've upgraded |
I tried. Also with @urql/core 1.13.1 it doesn't work. I'll update my CodeSandBox reproduction now and I will post it here or where you want. |
Also in the Preact reproduction on CodeSandBox only updating:
doesn't fix. So I think with Svelte is the same: only upgrading Something in |
Here the broken reproduction with Svelte today: https://codesandbox.io/s/urql-svelte-crud-offline-fetching-stale-data-rj22w. If you wish I can open an issue. |
@frederikhors ive got a fixed up sandbox in the original issue that's been tested to work. I think with Svelte we'll need to focus on new bindings. There's too many things that can break, be misused, or are buggy in the state that they're in. |
Yep because you updated However, I'm very tired of all this. Maybe I'll leave Svelte and I'll use Vue with Apollo. We'll see. It has been a great adventure with you so far, but I feel I bother you a lot every time. Thanks for everything. |
@frederikhors that's alright; that said though, |
Test against: https://codesandbox.io/s/urql-crud-router-doesnt-update-forked-3nf19
This change updates when queries that have received an offline / network error are dispatched as
cache-only
operations again, and adds support for them being retried automatically (in case they're still active) when the client comes back online.A small change has also been made to
@urql/core
to allowclient.reexecuteOperation
to be called with mutations.