Describe the bug#
When using nextjs app router server component with queryClient.prefetchQuery and useSuspenseQuery to stream data as documented in your Advanced SSR doc. There are more api calls than it should be, inclusing 2 GET request in server, and one OPTIONS request and one GET request in the browser.
Your minimal, reproducible example#
https://codesandbox.io/p/devbox/ds7qkz
Steps to reproduce#
- Open terminal, refresh the page, you can see two GET request being log.
- Open devtool, navigate to network tab, refresh the page, you can see one more GET request.
Expected behavior#
It should be only one request from the server as the client will later receive the data and integrate with queryClient cache and no more api calls
How often does this bug happen?#
Every time
Screenshots or Videos#
https://github.com/user-attachments/assets/89d60d7d-6c4f-4757-bf46-803ca9104c50
Platform#
OS: macOS
Browser: Chrome
Tanstack Query adapter#
react-query
TanStack Query version#
v5.51.9
TypeScript version#
v.5.5.4
Additional context#
No response
Related to https://github.com/TanStack/query/issues/8828.