Closed hosmelq closed 2 years ago
Hey Hosmel, thanks for filing this. I think if you want to just have access to a Relay environment in your Next.js app without having the per-page query you can wrap your app with a RelayEnvironmentProvider
in _app.ts
, no relay-nextjs
needed!
Hello @rrdelaney, thanks for the reply, if I use RelayEnvironmentProvider
I think this is going to do two queries, one on the server and another on the client.
I'm not sure this is possible then. Queries have to be attached to page-level components because only they can request server-side data in Next.js apps. You can also use useLazyLoadQuery
exclusively on the client-side.
Yes, I am using useLazyLoadQuery
in some parts of the pages, The thing that I would like is to have the shared store without making a query at the page level. I will try to find i way to do that.
Thank You very much.
Hello, first of all, thanks for this package.
I would like to know if there a way to create a server environment without passing the query. I do not want to do the query on the top-level page.
Thanks.