Serializing Preloaded Queries
- Dominant language
- Rust
- Stars
- 19k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
Hi Relay team 🤗
We're using Relay for streaming SSR with React and Tanstack Router and I wanted to check whether the guidance in the Relay examples repo is still considered the recommended approach.
In [issue-tracker-next-v13](https://github.com/relayjs/relay-examples/blob/main/issue-tracker-next-v13), the following helpers are used to ensure preloaded query references are serializable from server → client during streaming / partial hydration:
**loadSerializableQuery.ts**
https://github.com/relayjs/relay-examples/blob/main/issue-tracker-next-v13/src/relay/loadSerializableQuery.ts
**useSerializablePreloadedQuery.ts**
https://github.com/relayjs/relay-examples/blob/main/issue-tracker-next-v13/src/relay/useSerializablePreloadedQuery.ts
1. Are these helpers still the recommended / best-practice way to ensure preloaded query references are serializable when streaming?
2. With newer Relay releases and ongoing RSC / streaming support, is there a more modern or preferred pattern for handling this use case?
If so, is there documentation or an example that reflects the current recommended approach?
Thanks a lot for any clarification you can provide!
Contributor guide
Assessment
This issue has not been assessed yet.