with-apollo example broken with Apollo 3
See original GitHub issueBug report
Describe the bug
The index page (with ssr: true
) just keeps loading forever until it times out. The client-only page (with ssr: false
) works fine.
To Reproduce
Update package.json
:
{
"name": "with-apollo",
"version": "2.0.0",
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start"
},
"dependencies": {
"@apollo/client": "3.0.0-rc.0",
"@apollo/react-ssr": "^4.0.0-beta.1",
"graphql": "^14.0.2",
"graphql-tag": "2.10.3",
"next": "latest",
"prop-types": "^15.6.2",
"react": "^16.7.0",
"react-dom": "^16.7.0"
},
"license": "ISC",
"devDependencies": {
"babel-plugin-graphql-tag": "^2.5.0"
}
}
Update all imports to import from @apollo/client
instead of @apollo/react-hooks
, apollo-client
etc.
Expected behavior
The page should load, with queries processed via SSR.
System information
- OS: macOS
- Browser (if applies): Firefox 77
- Version of Next.js: 9.4.4
- Version of Node.js: 14.2.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Migrating to Apollo Client 3.0 - Apollo GraphQL Docs
WARNING: Apollo Client 3.0 is a major-version release that includes breaking changes. If you are updating an existing application to use Apollo Client...
Read more >How to use Apollo GraphQL subscriptions in the client-side ...
Found workaround to make it work, take look at this answer ...
Read more >Setting up Apollo GraphQL in Next.js with Server Side ...
Let's add a few script to make the application run. Good news similar to create-react-app, Next.js abstracts away the web-pack config and by ......
Read more >A comprehensive guide to GraphQL with Apollo Client in React
In this example, SOME_QUERY is a query string to fetch data. Now let's look at a request with a declarative description of query...
Read more >Why use Next.js with Apollo - LogRocket Blog
Once again, this is a great example of how the Apollo Client helps speed up development and make us more efficient developers when...
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
@Timer The example has been updated by @lfades , also the with-apollo example doesn’t use the beta version of @apollo/client, so that issue is not relevant I believe.
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.