You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, do you think it could be relevant to add an option to disable a query to run on the server ?
I have a use case where I want the nextjs app to load first, and dont wait for all queries to run.
An option to force some specifically slow queries to run on the client-only could help.
Tell me if it you need more information / an example repo to explain my use case.
The text was updated successfully, but these errors were encountered:
I had considered this feature before, and decided against it.
A slow loading page is not as bad as having holes in the server side rendered content that affect SEO, etc. The best fix is to improve the speed of the slow queries; there is almost always something that can be done about it and a slow query on the client is still a problem to be fixed anyway.
In the meantime you should be able to skip SSR by setting loadOnMount to false, and calling load() manually on mount via a useEffect hook. Something like this:
const{ load }=useGraphQL({loadOnMount: false,// Other options…})useEffect(()=>{load()},[load])
I just free-handed that code, so I may have overlooked something 😅
Hey, do you think it could be relevant to add an option to disable a query to run on the server ?
I have a use case where I want the nextjs app to load first, and dont wait for all queries to run.
An option to force some specifically slow queries to run on the client-only could help.
Tell me if it you need more information / an example repo to explain my use case.
The text was updated successfully, but these errors were encountered: