Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

resolve-suspense-setquerydata.md

5 lines413 Bytes

1---
2"@tanstack/query-core": patch
3---
4​
5Resolve suspense when query data is set programmatically via setQueryData or streamedQuery. Previously, fetchOptimistic returned only the fetch promise, which left the Suspense boundary stuck until the queryFn completed β€” even when data already existed in the cache. The fix uses Promise.race with a cache subscriber to release suspense as soon as data becomes available.