-
-
Notifications
You must be signed in to change notification settings - Fork 458
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
Multiple duplicated requests using cache-and-network
or netowrk-only
#3199
Comments
Added REPL. |
Can you at least narrow this down first please to either the canary Graphcache release or something else? It's likely that this is because of Graphcache rebounding the requests now during hydration. Also, my usual note, as per other issues, There's many notes on this use-case not being recommended. There's almost no point in caching if you issue a request on every single load anyway. |
Sorry, I wasn't clear enough: after fixing #3093 I thought the duplicate requests were cause of the update, instead they are the result of changes in graphcache to fix #3093.
What usecase? I'm curious, because I could be using it wrong as I use it now. Can you please better explain?
This is just an example to narrow down a simple bug reproduction. |
Alright, closing this then in favour of #3093 since it doesn't affect a published, stable version |
Describe the bug
I have an issue with duplicated requests (I remove the now deprecated
dedupExchange
: I read all CHANGELOGs and announcement issues like #3114).If I use this code:
As you can read in the comments I isolated the issue: if I use the
'cache-first'
policy it only send one request.If I use the
requestPolicy: 'cache-and-network'
the requests are 2, duplicated, the same ones.If I use the
requestPolicy: 'network-only'
the requests are 3 now! Crazy!What am I doing wrong?
Reproduction
This repl is using your modified
graphcache
version that fixes #3093.REPL: https://x2y2ub-5173.csb.app/todos
Steps:
click on "Todos list"
open the browser dev tools
reload the page
the requests are 2!
If you use
network-only
in the list file the requests are 3 nowUrql version
I upgraded:
Validations
The text was updated successfully, but these errors were encountered: