Infinite network request loop when suspense: true #3420
Unanswered
mrtnbroder
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've setup urql like described in the docs for next.js 13 (14 now actually).
https://formidable.com/open-source/urql/docs/advanced/server-side-rendering/#nextjs
where I am using the urql Provider as my method.
Everything works as expected when
suspense: false
, but as soon as I set it to true (for both server and client therefore) I'm getting stuck into an inf. request loop on the client.when I set
suspense: typeof window !== 'undefined'
to only set it to true on the client, everything works.my question basically is, did I just set the flag incorrectly? is it "correct" to only set it to true on the client? because I dont see it mentioned anywhere in the docs. Or should it be true for both SSR and client? I'm not running into issues atm, but still curious and unexpected!
EDIT: actually after some more playing around i noticed that sometimes urql throws that the hydration didnt match with the server. setting
suspense: false
now. Anyone got ideas for why I am running into inf. loops here?EDIT2: Further investigation reveals it's actually related to
authExchange
. Removing it seems to get around the inf. loop issue.This is the Provider:
Beta Was this translation helpful? Give feedback.
All reactions