Describe the bug
When a query is disabled, calling suspense() in SSR context causes hang.
Your minimal, reproducible example
https://stackblitz.com/edit/tanstack-query-5ck7qt?file=app.vue
Steps to reproduce
const fetcher = async () =>
await fetch('https://jsonplaceholder.typicode.com/posts').then((response) =>
response.json()
);
const { data, suspense } = useQuery({
queryKey: ['test'],
queryFn: fetcher,
enabled: false,
});
onServerPrefetch(async () => {
await suspense(); // <-- Causes hang
});
Expected behavior
When query is disabled, I expect suspense() not to hang the application
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Universal
Tanstack Query adapter
vue-query
TanStack Query version
5.61.3
TypeScript version
No response
Additional context
No response
Describe the bug
When a query is disabled, calling
suspense()in SSR context causes hang.Your minimal, reproducible example
https://stackblitz.com/edit/tanstack-query-5ck7qt?file=app.vue
Steps to reproduce
Expected behavior
When query is disabled, I expect
suspense()not to hang the applicationHow often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Universal
Tanstack Query adapter
vue-query
TanStack Query version
5.61.3
TypeScript version
No response
Additional context
No response