-
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
[3.0-beta] SSR's getDataFromTree(): queries resolved from cache have networkStatus set to loading #5835
Comments
shYkiSto
changed the title
SSR's getDataFromTree(): queries resolved from cache have networkStatus set to loading
[3.0-beta] SSR's getDataFromTree(): queries resolved from cache have networkStatus set to loading
Jan 28, 2020
According to this issue, it's because getDataFromTree doesn't run in the browser any longer. |
Perhaps also related to #5947 |
2 tasks
I'm not a fan of "me too" comments, but since 3.0 has been released I thought people would like to know that this issue is still present in 3.0. |
I've verified this is no longer an issue with @apollo/client@3.1.2. Thanks! See #6710 for details |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Intended outcome:
getDataFromTree()
should populate cache with queries data, so that during final render on the server all server-side queries resolve data from cache, instead of firing off network call, and therefore rendering in loading state.Actual outcome:
While cache is fulfilled with queries data as expected, the queries themselves have networkStatus set to
loading
. Which is not intended outcome, as the data is ready (pulled from cache), and there's no network request inflight.How to reproduce the issue:
You can find reproduction here https://github.com/shYkiSto/apollo-client-beta-3-ssr:
git clone git@github.com:shYkiSto/apollo-client-beta-3-ssr.git
cd apollo-client-beta-3-ssr && npm install && npm run start
or, SSR with Next.js found here: https://github.com/shYkiSto/apollo-client-beta-3-ssr/tree/next-js:
git clone --branch next-js git@github.com:shYkiSto/apollo-client-beta-3-ssr.git
cd apollo-client-beta-3-ssr && npm install && npm run dev
Versions
The text was updated successfully, but these errors were encountered: