-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Cache Redirect not causing query to run on partial data when using lists #9063
Comments
I think I ran into this same problem here: https://community.apollographql.com/t/apollo-inmemory-cache-type-policy-for-query-with-list-of-ids-as-argument/1989 |
Same here since we upgraded to 3.x (no issue in 2.x), but I use a workaround. Something like that :
I hope this can help. |
I can confirm, that the issue is still there. How to we help to push this issue forward? |
I provided a failing test for this issue: #9902 |
@sebastienva Thank you for your workaround, I've been running in to the same issue and was wasting a lot of time trying to solive it until I finally found this issue :) @jpvajda I can confirm this bug still exists in |
Yes, it works. But with this cache redirect doesn't work updateQuery - previousResult return empty object.
},` |
Intended outcome:
Query should be sent to the server to receive the missing reference
Actual outcome:
Query not sent to server and I get no data
How to reproduce the issue:
This will return [item]
If you run a query that queries items that do not exist in the cache, the read function will run, returning a list of 1 reference as expected.
But since the reference references to something that does not exist in cache, the query should run. But it doesn't.
Versions
System:
OS: macOS 12.0.1
Binaries:
Node: 14.18.1 - ~/.nvm/versions/node/v14.18.1/bin/node
Yarn: 1.22.15 - ~/.yarn/bin/yarn
npm: 6.14.15 - ~/.nvm/versions/node/v14.18.1/bin/npm
Browsers:
Chrome: 95.0.4638.69
Safari: 15.1
npmPackages:
apollo-server-express: ^3.3.0 => 3.4.0
The text was updated successfully, but these errors were encountered: