@tanstack/query-core#
5.108.3#
Patch Changes#
#12633
7843249- FixQueriesObserverreturning a stalecombineresult built from the previous queries when one of them updates beforesetQueriesis called with the new queries.#12575
6b849cf- Keep a memoized placeholder result whenselectmaps it toundefined, so a query withkeepPreviousDatathat is disabled or still loading no longer loops betweenpendingandsuccess.#12651
08de6c5- PreventpartialMatchKeyfrom matching an array element against a plain object.#12658
0538c98- FixQueriesObserver.setQueries(used byuseQueries) keeping the queries it replaced, and their data, in memory after they are removed from the cache.#12677
3e36f30- Share the array helper for adding and trimming pages in both directions to reduce bundle size.#12649
a1e2497- Fix render loops when placeholder data or a selector produces a new result on each render.
5.108.2#
No changes in this release.
5.108.1#
Patch Changes#
- #12636
0cf8f49- RequiregetNextPageParamin the types forqueryClient.infiniteQuery, the deprecated infinite query methods, andusePrefetchInfiniteQuery. If you omitpages, a stale query can still refetch multiple cached pages and needs the callback to compute their page parameters. Reuse the sameinfiniteQueryOptionsyou pass touseInfiniteQueryto supply the callback.
5.108.0#
Minor Changes#
- #12610
5fc9a3e- Release the Angular adapter packages in the same fixed version group as@tanstack/query-core, so they share the core version from now on.
5.107.2#
Patch Changes#
- #12587
b160291- Replace star exports with explicit exports while preserving the current public API. Adapters continue to re-export all of their corresponding core package.
5.107.1#
No changes in this release.
5.107.0#
Patch Changes#
- #12540
b6add89- Keep the timestamp stable for the same selector error to prevent infinite render loops.
5.106.1#
No changes in this release.
5.106.0#
No changes in this release.
5.105.3#
Patch Changes#
#11537
3f4de1b- Prevent a cancelled retry from pausing the query when its retry delay expires.#12497
969e580- Allow static queries without data to refetch after reset, invalidation, or an explicit refetch. A query is static only when it has data.
5.105.2#
Patch Changes#
#10969
2ee2fd9- Fix infinite queries to respect a reducedmaxPageslimit when fetching in either direction.#12480
8d0dc27- Excludestatusfrom the filters accepted byQueryClient.isMutating,useIsMutating, andinjectIsMutating. These APIs always count mutations withstatus: 'pending'.#12442
e69cac6- Handle the rejection of a paused refetch started byrefetchQuerieswiththrowOnError, so cancelling it later no longer causes an unhandledCancelledError.#12447
f2215d2- Use() => voidinstead of the DOM-onlyVoidFunctiontype inaddConsumeAwareSignal, so the published declarations type-check without the DOM lib.#10777
86e7957- FixshallowEqualObjectsto compare own property keys and values and ignore inherited properties. Objects with different own keys now compare as unequal, including when the differing values areundefined.#12489
b6576b3- Keep all callers of an in-flight query waiting for the replacement fetch when invalidation cancels it, including after repeated invalidations.#12481
af0e0ef- Prevent cancelled streamed queries from writing to the cache or starting a delayed stream, even when the stream does not consume the abort signal.#11788
05d9b6a- ClearisPausedon a mutation that can start once itsonMutateresolves, so it is no longer dehydrated and resumed a second time while its request is in flight.
5.105.1#
Patch Changes#
#12406
6f8a48d- Reduce temporary allocations when checking tracked result properties for observer notifications.#12390
18e54bf- ExcludefetchStatusfrom the filters accepted byQueryClient.isFetching,useIsFetching, andinjectIsFetching. These APIs always count queries withfetchStatus: 'fetching'.
5.105.0#
No changes in this release.
5.104.5#
Patch Changes#
- #12131
f608f93- Use the supplied query options when fetching optimistically so Suspense queries can fetch after their cache entry is recreated without a query function.
5.104.4#
Patch Changes#
#11470
1fee044- Clear the mutation cache before notifying subscribers souseMutationStateanduseIsMutatingupdate correctly afterqueryClient.clear().#11527
fce89dd- Preserve a storednullfirst page parameter when refetching an infinite query.
5.104.3#
Patch Changes#
5.104.2#
Patch Changes#
5.104.1#
No changes in this release.
5.104.0#
Minor Changes#
5.103.3#
No changes in this release.
5.103.2#
Patch Changes#
- #11524
8a28904- Ignore removal requests for query instances that are no longer stored in the cache.
5.103.1#
Patch Changes#
#11512
8330b2f- Handle plain objects with an ownconstructordata property during structural sharing and query-key hashing.#11510
3212966- Preservenullvalues returned by customstreamedQueryreducers instead of replacing them withinitialValue.
5.103.0#
Minor Changes#
- #11438
e57f816- Export theFocusManager,OnlineManager, andTimeoutManagertypes so their methods appear in the generated reference docs.
Patch Changes#
#11332
fdae2ce- Reuse the shared query option resolver for refetch intervals to reduce bundle size.#11436
a1119e5- ref(hydration): remove outdated dehydratedAt fallback#11502
cbf77bf- Prevent longer partial query-key filters with trailing undefined values from matching shorter query keys.
5.102.8#
5.102.7#
5.102.6#
5.102.5#
Patch Changes#
- #11302
578e5c2- Reduce the Query Core bundle size by removing unused symbol descriptions and simplifying internal helpers.
5.102.4#
Patch Changes#
5.102.3#
5.102.2#
Patch Changes#
5.102.1#
Patch Changes#
- #11260
134890d- Type hydration input as a partial dehydrated state so omitted mutation and query collections are supported.
5.102.0#
Minor Changes#
Patch Changes#
#11161
34f7cee- fix(query-core): clear a staleselecterror when the observer switches to a query without data, and resetisPlaceholderDataon select-error results to match the declared result types, so a previous query's select error no longer leaks into the new result#11253
b4368c4- Improve hydration performance by skipping no-op data transforms and default error-redaction callbacks. Export dehydrateQuery.#11214
5bb089d- Reduce observer churn overhead by removing observers in place instead of copying the observer list for every unsubscribe.#11011
ba4650c- fix(query-core): resetisPlaceholderDatawhenselectthrows on placeholder data#11224
294d4e6- FixqueryOptionsandinfiniteQueryOptionsreturn types so exported inferred options can be emitted in declaration files without leaking internal data tag symbols.#11225
1f631b3- Skip unused result tracking when notifyinguseQuerieslisteners without acombinefunction.#11215
01a02bf- Avoid repeatedly synchronizing the same tracked property across all observers inuseQueries.#11172
18c1c1e- ReattachMutationObserverto its current mutation when a listener subscribes again, so auseMutationresult no longer stayspendingafter React tears down and re-establishes the subscription mid-mutation.#11128
5448063- Ignore a retainedpendingThenablesettlement callback invoked after the thenable has settled. Holding a reference toresolve/rejectand calling it later used to overwritestatusandreasoneven though the underlying promise had already settled, leaving the thenable advertising a state that disagreed with its value.#8737
2215bb0- fix: make mutation variables optional whenundefined extends TVariables#11221
1ef4208- Remove experimental render-time prefetching and thepromiseproperty from query results.#11218
5981771- Release a mutation's retryer once its execution settles, so the settled promise no longer keeps that mutation's result, variables and context in memory for as long as the mutation cache retains it.#11163
4a9bef6- Release a query's retryer once its fetch settles, so the settled promise no longer keeps that fetch's raw result in memory alongside the structurally sharedstate.data(or after the query is reset or removed).#11036
bef4bc7- Resolve 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.#11234
9656dc4- Notify every query observer when another observer unsubscribes synchronously during the same query update.#11211
326aaf1- fix: resetQueries now preserves the queries matched before query.reset() changes their state.#11065
3e83601- Memoize falsycombineresults when the function and query results are unchanged.
5.101.4#
5.101.3#
Patch Changes#
5.101.2#
5.101.1#
Patch Changes#
5.101.0#
5.100.14#
5.100.13#
Patch Changes#
- fix(query-core): drop the custom
NoInfer<T>re-export and rely on TypeScript's built-inNoInfer(TS β₯ 5.4) soNoInfer<X[K]>stays assignable toX[K]in generic contexts (fixes #9937) (#10593)
5.100.12#
5.100.11#
5.100.10#
5.100.9#
Patch Changes#
- fix(query-core): wrap
persister'sTQueryKeyinNoInferso that thepersisterslot no longer contributes toTQueryKeyinference. Follow-up to #10510, which removedNoInferon all threepersistergenerics. PreservingNoInfer<TQueryKey>keeps that fix's benefit forTQueryFnDatawhile preventingTQueryKeyfrom widening to the augmented constraint whenRegister.queryKeyis narrowed β which madeDataTag-branded wrapper returns un-assignable in contravariant slots. (#10601)
5.100.8#
5.100.7#
5.100.6#
5.100.5#
Patch Changes#
- fix(core): propagate AbortSignal reason in infinite queries (
a53ef97)
5.100.4#
5.100.3#
Patch Changes#
- fix(suspense): skip calling combine when queries would suspend (#10576)
5.100.2#
Patch Changes#
fix(query-core): allow
persisterto contribute toTQueryFnDatainference so aqueryFnthat declares a parameter no longer produces a spurious overload mismatch against a typed persister (#7842). (#10510)fix: preserve infinite query behavior during SSR hydration (#8825) (#10074)
ref(core): remove leftover setStateOptions (#10574)
5.100.1#
Patch Changes#
- Fix bugs where hydrating queries with promises that had already resolved could cause queries to briefly and incorrectly show as pending/fetching (#10444)
5.100.0#
Minor Changes#
- feat(query-core): accept callback function for retryOnMount (#10515)
5.99.2#
5.99.1#
5.99.0#
5.98.0#
5.97.0#
Patch Changes#
- fix(query-core): use explicit
undefinedcheck for timer IDs so that customTimeoutProviders returning0as a valid timer ID are properly cleared (#10401)
5.96.2#
5.96.1#
5.96.0#
5.95.2#
Patch Changes#
- fix(timeoutManager): make sure NodeJs.Timout doesn't leak (#10325)
5.95.1#
Patch Changes#
- fix(timeoutManager): make sure NodeJs.Timout doesn't leak (#10323)
5.95.0#
5.94.5#
Patch Changes#
- fix(*): resolve issue about excluded build directory (#10312)
5.94.4#
Patch Changes#
- chore: fixed version (#10064)
5.91.2#
Patch Changes#
- fix(streamedQuery): maintain error state on reset refetch with initialData defined (#10287)
5.91.1#
Patch Changes#
- fix(core): cancel paused initial fetch when last observer unsubscribes (#10291)
5.91.0#
Minor Changes#
- feat: environmentManager (#10199)
5.90.20#
Patch Changes#
- Fix: onMutate callback now runs synchronously when mutationCache.config.onMutate is not defined (#10066)
5.90.19#
Patch Changes#
- fix stable combine reference not updating when queries change dynamically (#9954)
5.90.18#
Patch Changes#
- Align experimental_prefetchInRender promise rejection with Suspense behavior by only throwing when no data is available. (#10025)
5.90.17#
Patch Changes#
- fix(query-core): replaceEqualDeep max depth (#10032)
5.90.16#
Patch Changes#
5.90.15#
Patch Changes#
- Fix: Always treat existing data as stale when query goes into error state. (#9927)
5.90.14#
Patch Changes#
- Fix streamedQuery reducer being called twice (#9970)
5.90.13#
Patch Changes#
- Made context.signal consume aware with streamedQuery (#9963)
5.90.12#
Patch Changes#
- fix: update react and nextJs (#9944)
5.90.11#
Patch Changes#
- Prevent infinite render loops when useSuspenseQueries has duplicate queryKeys (#9886)
5.90.10#
Patch Changes#
fix(types): allow QueryFilters union with different lengths (#9878)
Fix streamedQuery to avoid returning undefined when the stream yields no values (#9876)
5.90.9#
Patch Changes#
- fix(types): do not drop readonly for partial QueryFilter matching (#9872)
5.90.8#
Patch Changes#
- fix: allow partial query keys in
QueryFilters(#9686)
5.90.7#
Patch Changes#
- fix(core): only attach .then and .catch onto a promise if it gets dehydrated (#9847)
5.90.6#
Patch Changes#
- Fixed isFetchedAfterMount in cases where initialData is applied (#9743)
5.90.5#
Patch Changes#
- fix: observing "promise" needs to implicitly observe "data" (#9772)
5.90.4#
Patch Changes#
- fix(types): remove duplicate Array condition in MutationKey type (#9754)
5.90.3#
Patch Changes#
- Avoid unhandled promise rejection errors during de/rehydration of pending queries. (#9752)