NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #857 most downloaded on npm
The framework agnostic core that powers TanStack Query
Latest stable
5.108.2
Last release 2 days ago
20 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Most releases are documented
notes for 49 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
458 releases · first in 2022
Drag across the ruler to compare, or tap a release to open it.
Patch Changes Updated dependencies []: @tanstack/query-core@5.108.2
#12628 80d6c41 - The devtools no longer use goober. Their styles are a static stylesheet adopted into the document or shadow root the devtools render in, instead of a <style> element in <head>. This means:
<style> elements. styleNonce is no longer needed and is deprecated.shadowDOMTarget.shadowDOMTarget, the settings menu is styled.#_goober style element or set window.__nonce__.#12643 fd62c95 - Add a trustedTypesPolicy option, so the devtools render on pages that enforce require-trusted-types-for 'script'.
Updated dependencies [f7abc93, 80d6c41, fd62c95]:
Your coding agent can read these notes before it upgrades. Set up the MCP server →
### Patch Changes - #12636 `0cf8f49` - Require getNextPageParam in the types for queryClient.infiniteQuery, the deprecated infinite query methods, and
0cf8f49 - Require getNextPageParam in the types for queryClient.infiniteQuery, the deprecated infinite query methods, and usePrefetchInfiniteQuery. If you omit pages, a stale query can still refetch multiple cached pages and needs the callback to compute their page parameters. Reuse the same infiniteQueryOptions you pass to useInfiniteQuery to supply the callback.Updated dependencies [ 5fc9a3e ]:
5fc9a3e]:
Updated dependencies [ b160291 ]:
b160291]:
### Patch Changes - #12542 `025773a` - fix(vue-query): keep query-core's enabled(query) callback. Zero-argument getters and refs stay reactive; the qu
#12542 025773a - fix(vue-query): keep query-core's enabled(query) callback. Zero-argument getters and refs stay reactive; the query callback is passed through to query-core.
#12541 f4199ab - feat(vue-query): return a reactive state from useQuery so status === 'success' narrows data without unwrapping refs
Updated dependencies []:
Updated dependencies [`b6add89`]:
#12494 00dc8de - Reset isRestoring in VueQueryPlugin when the clientPersister promise rejects, so queries no longer wait forever for a failed restore, and handle the rejection instead of leaving it unhandled.
#12537 2cdba60 - fix(vue-query/useInfiniteQuery): return 'UseInfiniteQueryDefinedReturnType' from the 'Defined' overload so 'data' is no longer typed as possibly 'undefined' when 'initialData' is defined
Updated dependencies [b6add89]:
b6add89]:
a8c2a17 - feat({solid,svelte}-query-devtools): add './production' entry to lazy load the devtools in production buildsa4d72f7]:
a4d72f7]:
b6add89]:
a4d72f7 - feat(query-devtools): add a filter scope toggle to filter queries and mutations by key, data (mutation variables or data), or both. Data and All scopes initialize explorer searches with the filter. Mutation explorers initialize searches only for matching variables or data, and filtering refreshes when mutation variables change in place.b6add89]:
a4d72f7]:
### Patch Changes - Updated dependencies []: - @tanstack/react-query@5.106.1
### Patch Changes - Updated dependencies []: - @tanstack/query-core@5.106.0
f69b28a - Add search for nested property names and values in the query and mutation Data Explorer, with highlighted matches and automatic expansion.#12499 46d0477 - Let inline devtools panels fill their container height while keeping a 500px default height when the container has no set height.
#12517 1176d37 - chore(query-devtools/tsdown.config): add '@refresh skip' banner so the app's 'solid-refresh' does not wrap the bundled Solid runtime
#12502 254350f - Virtualize query and mutation lists to keep large caches responsive, and reduce repeated cache scans.
Updated dependencies []:
Updated dependencies [`3f4de1b`, `969e580`]:
Updated dependencies [`2ee2fd9`, `8d0dc27`, `e69cac6`, `f2215d2`, `86e7957`, `b6576b3`, `af0e0ef`, `05d9b6a`]:
8d0dc27 - Exclude status from the filters accepted by QueryClient.isMutating, useIsMutating, and injectIsMutating. These APIs always count mutations with status: 'pending'.2ee2fd9, 8d0dc27, e69cac6, f2215d2, 86e7957, b6576b3, af0e0ef, 05d9b6a]:
8d0dc27]:
8d0dc27]:
#12230 1e1caa5 - Update the observer options before subscribing so revealing an <Activity> tree whose query key changed while hidden no longer fetches the previous key.
#12480 8d0dc27 - Exclude status from the filters accepted by QueryClient.isMutating, useIsMutating, and injectIsMutating. These APIs always count mutations with status: 'pending'.
Updated dependencies [2ee2fd9, 8d0dc27, e69cac6, f2215d2, 86e7957, b6576b3, af0e0ef, 05d9b6a]:
#10969 2ee2fd9 - Fix infinite queries to respect a reduced maxPages limit when fetching in either direction.
#12480 8d0dc27 - Exclude status from the filters accepted by QueryClient.isMutating, useIsMutating, and injectIsMutating. These APIs always count mutations with status: 'pending'.
#12442 e69cac6 - Handle the rejection of a paused refetch started by refetchQueries with throwOnError, so cancelling it later no longer causes an unhandled CancelledError.
#12447 f2215d2 - Use () => void instead of the DOM-only VoidFunction type in addConsumeAwareSignal, so the published declarations type-check without the DOM lib.
#10777 86e7957 - Fix shallowEqualObjects to compare own property keys and values and ignore inherited properties. Objects with different own keys now compare as unequal, including when the differing values are undefined.
#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 - Clear isPaused on a mutation that can start once its onMutate resolves, so it is no longer dehydrated and resumed a second time while its request is in flight.
Updated dependencies [`6f8a48d`, `18e54bf`]:
#11373 7ccba6e - fix({react,preact,angular,solid,vue}-query/infiniteQueryOptions): correct the overload selected for a possibly-undefined 'initialData'
#12390 18e54bf - Exclude fetchStatus from the filters accepted by QueryClient.isFetching, useIsFetching, and injectIsFetching. These APIs always count queries with fetchStatus: 'fetching'.
Updated dependencies [6f8a48d, 18e54bf]:
#11373 7ccba6e - fix({react,preact,angular,solid,vue}-query/infiniteQueryOptions): correct the overload selected for a possibly-undefined 'initialData'
#11595 b9f369a - fix(solid-query/{queryOptions,useQuery}): correct the overload selected for 'initialData'
#12390 18e54bf - Exclude fetchStatus from the filters accepted by QueryClient.isFetching, useIsFetching, and injectIsFetching. These APIs always count queries with fetchStatus: 'fetching'.
Updated dependencies [6f8a48d, 18e54bf]:
#11678 db79da7 - fix(query-persist-client-core): catch errors when persisting in 'persistQueryClientSubscribe' to prevent unhandled promise rejections, and log them in development
#11919 8be136b - Validate persisted query keys, hashes, state objects, and data update timestamps before retrieval, restoration, garbage collection, or filtered removal. Remove malformed entries without interrupting subsequent queries, while preserving valid null data.
Updated dependencies [6f8a48d, 18e54bf]:
#12406 6f8a48d - Reduce temporary allocations when checking tracked result properties for observer notifications.
#12390 18e54bf - Exclude fetchStatus from the filters accepted by QueryClient.isFetching, useIsFetching, and injectIsFetching. These APIs always count queries with fetchStatus: 'fetching'.
### Patch Changes - #11921 `c5de051` - fix(vue-query/queryClient): infer the data and error types of 'getQueryState' from a tagged query key - Updated
8f9dfcb - feat(angular-query-experimental/injectDevtoolsPanel): add the 'theme' and 'hideDisabledQueries' optionsUpdated dependencies [`f608f93`]:
1f8d134]:
1f8d134]:
f608f93]:
1f8d134]:
1f8d134]:
1f8d134]:
f608f93]:
Updated dependencies [`1fee044`, `fce89dd`]:
#11722 0992a92 - fix(react-query-devtools): create the devtools instance only once instead of on every render
#11728 a108398 - fix(react-query*): declare '@types/react' as an optional peer dependency
Updated dependencies [c8f5eac, c208861, b61abc2, a108398]:
#11251 fc3a384 - fix({preact,solid,svelte,angular-query-experimental}): switch to 'export type *' for type-only re-exports
#11375 0addcd2 - Allow queries with falsy errors to retry on mount when throwOnError returns false.
#11259 2ce5190 - fix(preact-query): do not go into optimistic fetching state when not subscribed
Updated dependencies [1fee044, fce89dd]:
#11251 fc3a384 - fix({preact,solid,svelte,angular-query-experimental}): switch to 'export type *' for type-only re-exports
#11920 7ea0278 - fix(solid-query): subscribe to the new observer when the queryClient passed to useQuery changes
Updated dependencies [1fee044, fce89dd]:
Updated dependencies [`0f15bc9`]:
0f15bc9]:
ed4d849 - fix(query-persist-client-core/createPersister): await the storage write in persistQuery, so persistQueryByKey resolves only once the entry has actually been written and rejects when the write fails instead of leaving an unhandled rejection0f15bc9]:
ed4d849]:
ed4d849]:
ed4d849]:
@tanstack/query-persist-client-core@5.104.2
03e8c39]:
@tanstack/query-persist-client-core@5.104.1
ec060b6]:
Updated dependencies [ 5279b05 ]:
Patch Changes Updated dependencies []: @tanstack/query-core@5.103.3
@tanstack/query-persist-client-core@5.103.2
8a28904]:
Updated dependencies [ 8330b2f , 3212966 ]:
Updated dependencies [ e57f816 , fdae2ce , a1119e5 , cbf77bf ]:
e57f816 - Export the FocusManager, OnlineManager, and TimeoutManager types so their methods appear in the generated reference docs.Patch Changes Updated dependencies []: @tanstack/query-core@5.102.8
Patch Changes Updated dependencies []: @tanstack/query-core@5.102.7
Patch Changes Updated dependencies []: @tanstack/query-core@5.102.6
Updated dependencies [ 578e5c2 ]:
578e5c2]:
### Patch Changes - #11293 `a05df6a` - Avoid scheduling stale timeouts for disabled query observers.
Patch Changes Updated dependencies []: @tanstack/query-core@5.102.3
### Patch Changes - #11263 `80fbf73` - Export MutationCacheConfig and QueryCacheConfig.
### Patch Changes - #11260 `134890d` - Type hydration input as a partial dehydrated state so omitted mutation and query collections are supported.
### Minor Changes - #10658 `c6fc17c` - add query and infiniteQuery methods, deprecate old imperative methods ### Patch Changes - #11161 `34f7cee` - fi
#11161 34f7cee - fix(query-core): clear a stale select error when the observer switches to a query without data, and reset isPlaceholderData on 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): reset isPlaceholderData when select throws on placeholder data
#11224 294d4e6 - Fix queryOptions and infiniteQueryOptions return types so exported inferred options can be emitted in declaration files without leaking internal data tag symbols.
#11225 1f631b3 - Skip unused result tracking when notifying useQueries listeners without a combine function.
#11215 01a02bf - Avoid repeatedly synchronizing the same tracked property across all observers in useQueries.
#11172 18c1c1e - Reattach MutationObserver to its current mutation when a listener subscribes again, so a useMutation result no longer stays pending after React tears down and re-establishes the subscription mid-mutation.
#11128 5448063 - Ignore a retained pendingThenable settlement callback invoked after the thenable has settled. Holding a reference to resolve/reject and calling it later used to overwrite status and reason even 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 when undefined extends TVariables
#11221 1ef4208 - Remove experimental render-time prefetching and the promise property 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 shared state.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 falsy combine results when the function and query results are unchanged.
### Patch Changes - Updated dependencies \[]: - @tanstack/query-core@5.101.4
Updated dependencies \[`7e3c822`]:
7e3c822]:
7e3c822]:
### Patch Changes - Updated dependencies \[]: - @tanstack/query-core@5.101.2
#10813 f5bf180 - fix(query-devtools/PiPContext): reset 'pip_open' in 'localStore' from 'closePipWindow' so the auto-open createEffect does not reopen the window after a programmatic close
#10812 25cdd97 - fix(query-devtools/utils): make 'last updated' sort return 0 for queries with equal 'dataUpdatedAt' to follow the standard comparator contract
#10815 ecd89c8 - fix(query-devtools/utils): scope the 'setupStyleSheet' dedup check to the target so a 'shadowDOMTarget' still receives its own '#_goober' style tag when 'document.head' already has one
#10811 01c7634 - fix(query-devtools/Devtools): correct the Theme sub-trigger className from 'position' to 'theme'
#10736 49012db - setupStyleSheet now sets window.__nonce__ when a styleNonce is provided.
The devtools use goober for CSS-in-JS, which reads window.__nonce__ every time it creates or accesses its style element. Without this, goober overwrote the nonce with undefined, causing CSP violations even when styleNonce was correctly passed to <ReactQueryDevtools>.
Updated dependencies \[`9eff92e`]:
9eff92e]:
9eff92e]:
### Patch Changes - #10826 `1348095` - Replace deprecated isServer with environmentManager.isServer() - Updated dependencies \[]: - @tanstack/query-co
### Patch Changes - Updated dependencies \[]: - @tanstack/query-core@5.100.14
fix(react-query): do not go into optimistic fetching state when not subscribed (#10759)
Updated dependencies []:
ed20b6d]:
ed20b6d]:
ed20b6d]:
fix(query-core): drop the custom NoInfer re-export and rely on TypeScript's built-in NoInfer (TS ≥ 5.4) so NoInfer stays assignable to X[K] in generic
d423168]:
d423168]:
### Patch Changes - Updated dependencies \[]: - @tanstack/query-core@5.100.12
fix(vue-query): allow reactive and getter values as queryKey property in queryOptions
fix(vue-query): allow reactive and getter values as queryKey property in queryOptions (#10530)
This fixes a regression introduced in #10452 where queryOptions only accepted plain arrays for the queryKey property, but not computed refs, Ref values, or getter functions. The related fix in #10465 only covered the enabled property.
Now the queryKey property in queryOptions accepts the same reactive forms as enabled:
QueryKey arraysRef<QueryKey>ComputedRef<QueryKey>() => QueryKey (getter)Updated dependencies []:
Nothing published for this version
Updated dependencies \[`fcee7bd`]:
fcee7bd]:
3d21cac]:
3d21cac]:
fcee7bd]:
setOnClose callback type to return void. (#10607)persister's TQueryKey in NoInfer so that the persister slot no longer contributes to TQueryKey inference. Follow-up to #10510, which removed NoInfer on all three persister generics. Preserving NoInfer<TQueryKey> keeps that fix's benefit for TQueryFnData while preventing TQueryKey from widening to the augmented constraint when Register.queryKey is narrowed — which made DataTag-branded wrapper returns un-assignable in contravariant slots. (#10601)3d21cac]:
### Patch Changes - Updated dependencies \[]: - @tanstack/query-core@5.100.8
refactor(preact-query-devtools): replace deprecated 'JSX.CSSProperties' with 'CSSProperties' from Preact namespace (#10622)
Updated dependencies []:
### Patch Changes - Updated dependencies \[]: - @tanstack/query-core@5.100.7
Nothing published for this version
fix(core): propagate AbortSignal reason in infinite queries (`a53ef97`)
a53ef97)Nothing published for this version
fix(suspense): skip calling combine when queries would suspend
fix(query-core): allow persister to contribute to TQueryFnData inference so a queryFn that declares a parameter no longer produces a spurious overload
fix(query-core): allow persister to contribute to TQueryFnData inference so a queryFn that 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)
Fix bugs where hydrating queries with promises that had already resolved could cause queries to briefly and incorrectly show as pending/fetching
feat(query-core): accept callback function for retryOnMount
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
fix(query-core): use explicit undefined check for timer IDs so that custom TimeoutProviders returning 0 as a valid timer ID are properly cleared
undefined check for timer IDs so that custom TimeoutProviders returning 0 as a valid timer ID are properly cleared (#10401)Nothing published for this version
Nothing published for this version
Nothing published for this version
fix(timeoutManager): make sure NodeJs.Timout doesn't leak
One column per quarter.