apollographql / apollographql/apollo-client-integrations

Dev-mode warning: `Warning: Only plain objects can be passed to Client Components from Server Components. Classes or other objects with methods are not supported.`

Open
#332 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
556
Forks
53
PR merge metrics
No merged PRs in 30d

Description

This seems to be caused by `queryRef.toPromise()`.

I'd love to keep the function in there in the long term, but we might need to ask the React team to make that possible. Meanwhile I'll probably (temporarily?) remove the function.

([Reported in Discord](https://discord.com/channels/1022972389463687228/1262792222659842109))

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the queryRef.toPromise() implementation in the Next.js App Router integration and reproduce the warning in development mode. Check the reported Server Components and Client Components boundary, then verify that the warning no longer appears after the proposed temporary change while the surrounding query behavior remains covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.