How to disable SSR?
punkpeye opened this issue · 2 comments
punkpeye commented
It is really hard to debug when something goes wrong server-side.
How do I force relay-nextjs
to serve static JavaScript and make GraphQL queries client-side?
rrdelaney commented
Next.js makes it quite difficult to entirely disable SSR, and relay-nextjs
's data fetching is tightly integrated with the lifecycle of Next.js pages. Suggested workarounds are:
- Start the session on a page separate from the one being debugged (a simple static page will work), then navigate to the target page.
relay-nextjs
does not use SSR orgetServerSideProps
on subsequent page navigations. - Use
lazyLoadQuery
to fetch page data rather thanwithRelay
. This will skip over pretty much all ofrelay-nextjs
's internal workings so debugging how this library works would be difficult.
Let me know if either of these work for you, we'd be happy to add them to an FAQ on the documentation site.
punkpeye commented
Use lazyLoadQuery to fetch page data rather than withRelay. This will skip over pretty much all of relay-nextjs's internal workings so debugging how this library works would be difficult.
I will try this path.
Thank you