welp
Configuration help
Hello!
I want to apply the following configuration on the client:
https://tanstack.com/query/v4/docs/react/guides/window-focus-refetching
Which is basically setting
refetchOnWindowFocus
to false. How can I achieve this in tRPC?
Thank you for your help.4 replies
Is it possible to create 2 routers inside a single file?
I am having an issue in which it is impossible to me to use a class instance within 2 routers. I tried declaring the routers in a single file and then exporting them, it doesn't work. The issue I am facing is this: https://github.com/vercel/next.js/issues/49309
Any insight/help would be greatly appreciated.
8 replies
Initial websockets getToken() returns null: next-auth + websockets :)
Hello!
So the way I am trying to authenticate websockets is like this:
And it works except for the initial requests. I wouldn't mind this (maybe I would since needless errors), but my problem is trying to use subscriptions: it just will prompt an error on the initial request and I can't think of a way to retry (retrying works for everything else). I would like to solve this initial null JWT token request problem as that would make everything work very nicely but I wouldn't mind making the subscriptions work either.
The way I am subscribing in my react component:
I would really appreciate some commentary/insight! Thank you for your time.
5 replies
Error: No QueryClient set, use QueryClientProvider to set one
Hello!
I have wrapped my _app.tsx properly and I have made useQuery functionality possible, however on this specific component it just won't work.
pages/room/[slug].tsx
:
The error in particular looks like:
https://i.imgur.com/o3C1Zas.png8 replies