-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
invoking suspense()
with enabled: false
will wait infinite while ssr
#7609
Comments
* enable ref `shouldFetch` by default as workaround of TanStack/query#7609 @ pages/posts.vue @ fe
* enable ref `shouldFetch` by default as workaround of TanStack/query#7609 @ pages/posts.vue @ fe
* fix never thrown `ApiResponseError` as `FetchError` will be throw when the response status code is not 2xx @ api/index.ts * enable ref `shouldFetch` by default as workaround of TanStack/query#7609 @ pages/posts.vue @ fe
@n0099 This is done on purpose in response to an old ticket, where this particular behavior was requested. And since it's rather easy to skip Related tickets: |
onServerPrefetch(async () => { // https://github.com/TanStack/query/issues/7609
if (toValue(toValue(options)?.enabled) ?? true)
await ret.suspense();
}); |
…pages/posts.vue` @ api/index.ts * fix still trying to render `<PageNextButton>` that inside `<PostPage>` with non-existing route name `posts/cursor` after changing the route from non empty to empty query * fix watching on `isFetching` will get debounced without `flush: sync` while prefetch in SSR * fix hydrated state `queryStartedAtSSR` might be `0` when prefetch failed while SSR @ watcher for `*UpdatedAt` @ pages/posts.vue @ fe
How do I make this compatible with #7566 that introduced a param |
Describe the bug
Your minimal, reproducible example
https://codesandbox.io/p/devbox/eloquent-frog-3w6pk9?file=%2Fapp.vue
Steps to reproduce
/app.vue
Expected behavior
Instantly exit
suspense()
as there's nothing to fetch while ssr.How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
nuxt^3.5.2
Windows 11
Chrome 126
Tanstack Query adapter
vue-query
TanStack Query version
5.45.0
TypeScript version
No response
Additional context
This only reproducible when using
useInfiniteQuery()
,useQuery()
is not affected:The text was updated successfully, but these errors were encountered: