Closed frederikhors closed 1 year ago
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.
Can you at least narrow this down first please to either the canary Graphcache release or something else?
Sorry, I wasn't clear enough: after fixing https://github.com/urql-graphql/urql/issues/3093 I thought the duplicate requests were cause of the update, instead they are the result of changes in graphcache to fix https://github.com/urql-graphql/urql/issues/3093.
There's many notes on this use-case not being recommended
What usecase? I'm curious, because I could be using it wrong as I use it now. Can you please better explain?
There's almost no point in caching if you issue a request on every single load anyway.
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 https://github.com/urql-graphql/urql/issues/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 https://github.com/urql-graphql/urql/issues/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