Server-side prefetch + tanstack-query
Hi,
Trying to implement this https://supabase.com/blog/react-query-nextjs-app-router-cache-helpers but I'm running into an error:
The error is coming from the prefetch function of
@supabase-cache-helpers/postgrest-react-query
More of my code for reference:
Is this still the way to go or is there a new way to fetch on server and hydrate the client? Didn't find anything while Googling2 Replies
I get the same error when I remove all server-side prefetches and fetch from client-side only
I see there is an issue open at https://github.com/psteinroe/supabase-cache-helpers/issues/579
I posted my repository. Hope that helps with fixing the bug!
GitHub
Server Side Caching Error · Issue #579 · psteinroe/supabase-cache...
Describe the bug Using @supabase-cache-helpers/postgrest-server in Next and react-query with either cache.swr(query) or cache.query(query) results in a runtime error, both: On the server when used ...