TanStackT
TanStack2y ago
8 replies
wispy-olive

TanStack Query if I need session in call?

I am using NextJS app router. I thought I could use TanStack Query following the Advanced SSR guide, however it seems that if I need the session, I cant have useQuery or queryClient.prefetchQuery() call my function because if its server side, I won't have access. Any ideas?

Using Next Auth, getServerSession, or useSession.
Was this page helpful?