tobias-tengler/relay-rsc-poc

refetchable paginated queries

Opened this issue · 0 comments

I was trying to implement a paginated query and I noticed that it doesn't work if I pass my paginated fragment to the RSC loadStreamableQuery, Relay can't find the @refetchable directive for some reason even though it's defined.

The only way I found to get it working is to use a useLazyLoadQuery on the client side component, with this everything works, because the lazy query finds the data available from what the RSC component streamed to the client, so no additional client-side network requests are made.

The problem is I get this warning:

Warning: Only plain objects can be passed to Client Components from Server Components. Objects with symbol properties like RSC-Stream are not supported.
[web-client]:   <... query={{__fragments: ..., __id: ..., __fragmentOwner: ...}}>

I'm not sure how bad is it and if anything can be done to avoid this?