Open linucks opened 4 months ago
Just to add: I suspect this will break all userland code that exports a destructured method call, not just Apollo Client.
same here
Edit by maintainer bot: Comment was automatically minimized because it was considered unhelpful. (If you think this was by mistake, let us know). Please only comment if it adds context to the issue. If you want to express that you have the same problem, use the upvote 👍 on the issue description or subscribe to the issue for updates. Thanks!
Link to the code that reproduces this issue
https://github.com/linucks/nextjs-apollo-bug
To Reproduce
npm install && npm run dev
Current vs. Expected behavior
The code should perform a query using Apollo GraphQL and display the returned data. Instead it fails with:
Reverting to version 14.1.0 resolves the issue. All NextJS releases tested after 14.1.1 display the problem.
I originally reported the issue to the Apollo team and they advised me to file a bug report here.
Provide environment information
Which area(s) are affected? (Select all that apply)
Runtime
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
The problem can be circumvented by changing the code in
apollo/ApolloRSC.tsx
from:to save the client in a variable: