Replies: 1 comment
-
|
Although manually specifying the queryKey and queryFn resolves the issue, I would prefer to continue relying on the auto-generated behavior rather than overriding it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When using openapi-react-query with Next.js 15 App Router and Server Components, a mismatch occurs between automatically generated queryKeys:
Server-side: requires manually passing cookies/headers
Client-side: auto-generated queryKey does not include these headers
Result: dehydrated data is rendered correctly 🎯 but Next.js logs a 500 Internal Server Error on the server ❌
Because the two environments generate different query keys, React Query treats them as different queries.
Any guidance or recommended fix for this issue would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions