-
-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(next-urql) - Node crashes with { ssr: true }
#2307
Comments
We often ask for a minimal reproducible example as we can't really go through the full code of everyone 😅 hence I made a small repro already here and will try to shed some light on the difference betweeen As you might have noticed the new next method getXProps are happening outside of React land which makes us do a lot of passing stuff through to each other, this was not always the case. Before this EDIT: I tried your repo and it just works for me, might be your node version
|
my node version is I just tried with
I also tried deploying to vercel and the page will not load. the only difference is commenting/uncommenting |
Well I think it is because as alluded to you are causing a 38 request waterfall and afaik next api functions (ssr) times out in 15 seconds 😅 EDIT: hmm looking into it as essentially these should be identical queries... hard to dive into the project as there's some redundant logic too 😅 this seems to be caused by the new |
Correct, they are all duplicate queries, so should it not be deduped? or does the dedup exchange have no effect with ssr? redundant logic? sorry I am still new to this 😅 I'm open to suggestions |
My best guess is currently that in EDIT: yup that's it |
urql version & exchanges:
Steps to reproduce
git clone https://github.com/longfellowone/tools.git
cd tools/web
git checkout bug
npm install
npm run dev
http://localhost:3000/
tools/web/components/EmployeeOption.tsx
uncomment line 18// const [{ data }] = useEmployeeListQuery()
Might have something to do with
useEmployeeListQuery()
needing to be deduped as its called within a loopExpected behavior
Should work
Actual behavior
Page does not load / Crash
The text was updated successfully, but these errors were encountered: