question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

with-apollo example broken with Apollo 3

See original GitHub issue

Bug 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:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
todortotevcommented, Jun 8, 2020

Screenshot 2020-06-08 at 19 01 03

@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.

0reactions
balazsorban44commented, Jan 30, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found