[4.3.0] getDataFromTree always issue (client side prefetch)
See original GitHub issueWhen using the default config or setting { getDataFromTree: 'always' }
client side prefetching won’t work
GraphQL error occurred [getDataFromTree] Invariant Violation: ReactDOMServer does not yet support Suspense.
Reproducible here: https://y8ltr.sse.codesandbox.io/ Code for above: https://codesandbox.io/s/next-with-apollo-y8ltr
Unfortunately beyond removing support for the feature there does not seem to be an obvious solution
There is an open issue on the next.js repo here https://github.com/zeit/next.js/issues/8289
If you rely on it I would recommend sticking with 4.2.0
for now
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:7 (3 by maintainers)
Top Results From Across the Web
[getDataFromTree] Invariant Violation: Element type is invalid ...
This issue is present before refactoring render prop components to hooks. ... [4.3.0] getDataFromTree always issue (client side prefetch) ...
Read more >Server-side rendering - Apollo GraphQL Docs
This prevents Apollo Client from refetching queries unnecessarily, and it also enables you to use the getDataFromTree function (covered below). Instead of ...
Read more >Improve app performance with React server-side rendering
React server-side rendering offers performance benefits vs. client-side rendering. Learn about different React SSR frameworks.
Read more >next-with-apollo - npm
In 4.3.0 all the queries where fetched on server by default ( getDataFromTree option was set to 'always' by default). In order to...
Read more >Mastering data fetching with React Query and Next.js
are great for managing client-side only state, but they require a lot ... debounedSearchValue] , which will always be unique for our data....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@qw-in This is probably an issue with Apollo, the
getDataFromTree
from@apollo/react-hooks
is probably not the same implementationwithApollo(..., {getDataFromTree: "ssr"})
seem to “hide” the warning? I don’t know how it works (or not work) though…