Hussam
How do I prefetch the nextPage of an infiniteQuery?
why don't you call
query.fetchNextPage
based on the scrollbar position,
if you want to prefetch it, make it in such a way that next page is fetched well before the user reaches the bottom of the page.
you have to figure out when you want to prefetch, I don't think you would want to call it repeatedly until there are no results left.7 replies
The inferred type of this node exceeds the maximum length the compiler will serialize.
I moved everything into
router({ })
, and the type error is gone.
Just a head ups @Nick Lucas, it's fixed for me now. I hadn't created a github issue, as I couldn't reproduce the issue easily.
thanks a lot all of you.19 replies
The inferred type of this node exceeds the maximum length the compiler will serialize.
just so that I get to question right
Did you mean I could do this instead ?
I followed this setup,
https://github.com/calcom/cal.com/blob/main/packages/trpc/server/routers/viewer.tsx#LL1281C20-L1281C20,
Also, thanks you made me realize
router()
is Deprecated
https://trpc.io/docs/typedoc/server/functions/router-1#deprecated19 replies
The inferred type of this node exceeds the maximum length the compiler will serialize.
it's a private repo, I can share snippet if you like to.
I am referring to cal.com setup, my local setup for cal.com also error out the same way.
https://github.com/calcom/cal.com/blob/main/packages/trpc/server/routers/viewer.tsx#LL1281C20-L1281C20,
19 replies