fetchQuery
inside useQuery
with the same queryKey
causes infinite loading
#8494
Labels
fetchQuery
inside useQuery
with the same queryKey
causes infinite loading
#8494
Describe the bug
When using
fetchQuery
insideuseQuery
with the samequeryKey
causes infinite loadingYour minimal, reproducible example
https://stackblitz.com/edit/vitejs-vite-qqzwgwu2?file=src%2FApp.tsx
Steps to reproduce
Expected behavior
I expect the resource to load instead of getting stuck on isLoading
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
MacOs Chrome 131.0.6778.205
Tanstack Query adapter
react-query
TanStack Query version
5.62.11
TypeScript version
5.5.4
Additional context
It used to work in v4, I noticed this issue after upgrading to v5
The text was updated successfully, but these errors were encountered: