Support for renderToPipeableStream and renderToStringWithData?

Using renderToPipeableStream opts you into React 18’s “streaming SSR” mode, which means that it won’t wait for the full page to render on the server, but sends over incremental chunks.

That also means that Apollo Client needs to send over incremental chunks - but React doesn’t have a mechanism for that kind of data synchronization.

As this point, we have support for streaming SSR with Next.js with a separate package you can find at GitHub - apollographql/apollo-client-nextjs: Apollo Client support for the Next.js App Router, and also an experimental build for Redwood.js that you can find here: do-not-merge: experiment(redwood): Change import of ServerHtmlContext to redwood by dac09 · Pull Request #91 · apollographql/apollo-client-nextjs · GitHub

Both of these rely on a “insert data into the stream” functionality that is build by those frameworks. If you really want to use this in a custom streaming SSR scenario, you’d have to recreate that “insert into stream” functionality and then fork our package to use that. I fear that’s not really feasible, though.

But unfortunately: as long as React doesn’t decide to ship that on it’s own, it’s the only option. We can’t make it work with “just React” at this point.