Closed anthonyhoegberg closed 1 week ago
It's not needed at all: ssrMode
only works with single-hydration-pass SSR, but Next.js is using streaming SSR, which is a completely different mechanism
.
It's essentially a legacy option you only need when you do renderToString
so please don't use it in this context :)
I have a different question, i just got done setting up a new project using makeClient code etc, but in my browser inspector i can see the browser making requests to the graphql server directly, shouldn't the requests be from the server to graphql server?
SSR of Client Components only happens on initial page load. Every request you start after that is purely in the browser.
SSR of Client Components only happens on initial page load. Every request you start after that is purely in the browser.
I think this should be a bit more clear in the docs or readme, that every request after that happens in the browser. It wouldn't really be SSR if requests after are made from the browser.
That's how Next.js works, that has nothing to do with this library.
Next.js executes RSC on the server and does a single SSR pass of Client Components on page load, but after that executes Client Components purely in the browser.
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better.
In the readme under In Client Components and streaming SSR section this following code is provided
Inside here:
is
ssrMode: true,
necessary here or is it handled internally by @apollo/experimental-nextjs-app-support where we imported it from?