unstale

npm / @tanstack/solid-query

@tanstack/solid-query

What changed in @tanstack/solid-query 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

75 breaking9 deprecations16 new APIs and options1 performance1 behavior and defaults12 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@tanstack/solid-query 5114 changes

Breaking changes 75

  • The filters accepted by this API no longer include status; it always counts mutations with status: 'pending'.

    5.105.2release notes

  • Excludes fetchStatus from filters accepted by QueryClient.isFetching, useIsFetching, and injectIsFetching; these APIs always count queries with fetchStatus: 'fetching'.

    5.105.1release notes

  • Removes the promise property from query results.

    5.102.0release notes

  • Removes experimental render-time prefetching.

    5.102.0release notes

  • The Solid prefix was removed from SolidInfiniteQueryOptions, making InfiniteQueryOptions the type name.

    5.100.6release notes

  • The Solid prefix was removed from SolidMutationOptions, making MutationOptions the type name.

    5.100.6release notes

  • The Solid prefix was removed from SolidQueryOptions, making QueryOptions the type name.

    5.100.6release notes

  • Custom loggers have been removed; logging only had an effect in development mode.

    5.0.0upgrade guide

  • Custom loggers have been removed; logging only had an effect in development mode, where passing a custom logger is not necessary.

    5.0.0upgrade guide

  • Queries and mutations are always dehydrated by default; customize this with shouldDehydrateQuery or shouldDehydrateMutation instead of boolean options.

    5.0.0upgrade guide

  • Queries and mutations are always dehydrated by default; use shouldDehydrateQuery or shouldDehydrateMutation to change this behavior.

    5.0.0upgrade guide

  • Error is now the default TypeScript error type instead of unknown; specify a generic for other thrown values.

    5.0.0upgrade guide

  • Error is now the default TypeScript error type instead of unknown; specify a generic to use another thrown value type.

    5.0.0upgrade guide

  • Renamed from cacheTime; it controls when unused query data is garbage collected.

    5.0.0upgrade guide

  • Renames cacheTime to gcTime to clarify that the duration applies after a query becomes unused, before its data is garbage collected.

    5.0.0upgrade guide

  • Now required for infinite queries; returning null or undefined indicates that no further page is available.

    5.0.0upgrade guide

  • Returning null, as well as undefined, now indicates that no further page is available.

    5.0.0upgrade guide

  • Returning null or undefined now indicates that no further page is available.

    5.0.0upgrade guide

  • Renamed from hashQueryKey; it also hashes mutation keys and can be used in mutation predicates.

    5.0.0upgrade guide

  • Renames hashQueryKey to hashKey, which also hashes mutation keys.

    5.0.0upgrade guide

  • Required for infinite queries and supplies the pageParam for the first page instead of implicitly passing undefined.

    5.0.0upgrade guide

  • Infinite queries now require an explicit initialPageParam, used as the pageParam for the first page.

    5.0.0upgrade guide

  • Removed; use structuralSharing to provide the equivalent comparison behavior.

    5.0.0upgrade guide

  • The useQuery option has been removed; use structuralSharing to implement equivalent data comparison.

    5.0.0upgrade guide

  • For queries, now means isPending && isFetching; for mutations, the former isLoading flag is renamed isPending.

    5.0.0upgrade guide

  • Replaces isLoading as the derived flag for pending queries and mutations.

    5.0.0upgrade guide

  • Use this flag in place of isPreviousData; placeholderData now puts the query into success state and dataUpdatedAt stays at 0.

    5.0.0upgrade guide

  • Removed in favor of isPlaceholderData.

    5.0.0upgrade guide

  • The keepPreviousData option was removed; use placeholderData with the identity function or the included keepPreviousData function.

    5.0.0upgrade guide

  • An included identity function can be passed to placeholderData to achieve the previous keep-previous-data behavior.

    5.0.0upgrade guide

  • The keepPreviousData option and isPreviousData flag are removed; use placeholderData with an identity function or the included keepPreviousData function.

    5.0.0upgrade guide

  • Removed the ability to override pagination parameters by passing pageParam directly to fetchNextPage or fetchPreviousPage; getNextPageParam is now required.

    5.0.0upgrade guide

  • Manual mode for infinite queries has been removed, and getNextPageParam is now required.

    5.0.0upgrade guide

  • Network status no longer relies on navigator.onLine; it starts online and updates from online and offline events.

    5.0.0upgrade guide

  • Starts online and updates only in response to online and offline events instead of relying on navigator.onLine.

    5.0.0upgrade guide

  • Removed from queries and QueryObserver callbacks; mutation callbacks are unchanged.

    5.0.0upgrade guide

  • Query callbacks onSuccess, onError, and onSettled have been removed; mutation callbacks remain.

    5.0.0upgrade guide

  • Now receives previous query data as an argument, allowing an identity function to provide keep-previous-data behavior.

    5.0.0upgrade guide

  • Its callback now receives previous query data, enabling an identity function to provide the prior data as placeholder data.

    5.0.0upgrade guide

  • Class fields and methods that were TypeScript-private now use ECMAScript private features and cannot be accessed externally at runtime.

    5.0.0upgrade guide

  • Class fields and methods that were TypeScript-private now use ECMAScript private features and cannot be accessed from outside at runtime.

    5.0.0upgrade guide

  • QueryClient methods that accept query or mutation filters now use the single options-object form instead of positional overloads.

    5.0.0upgrade guide

  • Now accepts only queryKey; the filters argument is no longer accepted.

    5.0.0upgrade guide

  • Now accepts only a queryKey argument; remove any filters argument from calls.

    5.0.0upgrade guide

  • Now merges all matching registrations instead of returning only the first matching registration.

    5.0.0upgrade guide

  • Now accepts only queryKey; the filters argument is no longer accepted.

    5.0.0upgrade guide

  • Now accepts only a queryKey argument; remove any filters argument from calls.

    5.0.0upgrade guide

  • Registrations should be ordered from the most generic query key to the least generic because matching defaults are merged.

    5.0.0upgrade guide

  • Its callback now receives only query rather than data and query; transformed data is not provided.

    5.0.0upgrade guide

  • Its callback now receives only the query, rather than data and query.

    5.0.0upgrade guide

  • Window-focus refetching now uses visibilitychange exclusively and no longer listens to the focus event.

    5.0.0upgrade guide

  • Removed in favor of maxPages for limiting infinite-query pages stored and refetched.

    5.0.0upgrade guide

  • The infinite-query refetchPage option has been removed in favor of maxPages, which limits stored and refetched pages.

    5.0.0upgrade guide

  • Removed from the useQuery result; use queryClient.removeQueries with queryKey to remove a query.

    5.0.0upgrade guide

  • The remove method has been removed from useQuery; use queryClient.removeQueries({ queryKey }) to remove a query.

    5.0.0upgrade guide

  • Retries now default to 0 on the server instead of 3.

    5.0.0upgrade guide

  • Retries now default to 0 on the server.

    5.0.0upgrade guide

  • Function equivalent to the removed dehydrateMutations boolean option for controlling mutation dehydration.

    5.0.0upgrade guide

  • Function equivalent to the removed dehydrateQueries boolean option for controlling query dehydration.

    5.0.0upgrade guide

  • The loading status value is now pending for queries and mutations.

    5.0.0upgrade guide

  • The loading status is renamed to pending for queries and mutations; isLoading is renamed to isPending, and queries gain a new isLoading flag.

    5.0.0upgrade guide

  • The supported browser requirements have been updated to produce a more modern, performant, and smaller bundle.

    5.0.0upgrade guide

  • The experimental suspense boolean flag on query hooks has been removed in favor of dedicated suspense hooks.

    5.0.0upgrade guide

  • Replaces useErrorBoundary as the option for controlling whether errors are thrown.

    5.0.0upgrade guide

  • The minimum required TypeScript version is now 4.7.

    5.0.0upgrade guide

  • The minimum required TypeScript version is now 4.7.

    5.0.0upgrade guide

  • No longer automatically used as the batching function; frameworks can register a custom function with notifyManager.setBatchNotifyFunction.

    5.0.0upgrade guide

  • Renamed to throwOnError to describe its behavior in a framework-agnostic way.

    5.0.0upgrade guide

  • Infinite-query hooks now support only the single options-object signature; positional overloads have been removed.

    5.0.0upgrade guide

  • The hook now supports only the single options-object signature; positional overloads have been removed.

    5.0.0upgrade guide

  • The hook now supports only the single options-object signature; positional overloads have been removed.

    5.0.0upgrade guide

  • Mutation hooks now support only the single options-object signature; positional overloads have been removed.

    5.0.0upgrade guide

  • Query hooks now support only the single options-object signature; positional overloads are no longer supported.

    5.0.0upgrade guide

  • Query hooks now support only the single options-object signature; positional overloads have been removed.

    5.0.0upgrade guide

  • Window-focus refetching now listens exclusively to the visibilitychange event, not the focus event.

    5.0.0upgrade guide

Deprecations 9

  • Deprecated because it has the same behavior as the new isLoading flag and will be removed in the next major version.

    5.0.0upgrade guide

  • isInitialLoading is deprecated; it has the same behavior as the new isLoading flag and will be removed in the next major version.

    5.0.0upgrade guide

  • Deprecated in favor of queryClient.infiniteQuery with staleTime set to static and will be removed in v6.

    5.0.0upgrade guide

  • Deprecated in favor of queryClient.query with staleTime set to static and will be removed in v6.

    5.0.0upgrade guide

  • Deprecated in favor of queryClient.infiniteQuery and will be removed in v6.

    5.0.0upgrade guide

  • Deprecated in favor of queryClient.query and will be removed in v6.

    5.0.0upgrade guide

  • Imperative fetch and prefetch methods are deprecated in favor of queryClient.query and queryClient.infiniteQuery, and will be removed in v6.

    5.0.0upgrade guide

  • Deprecated in favor of queryClient.infiniteQuery with a catch handler and will be removed in v6.

    5.0.0upgrade guide

  • Deprecated in favor of queryClient.query with a catch handler and will be removed in v6.

    5.0.0upgrade guide

New APIs and options 16

  • Adds mutationOptions to solid-query.

    5.91.0release notes

  • A new option for useQueries.

    5.0.0upgrade guide

  • A new combine option is available for useQueries.

    5.0.0upgrade guide

  • An experimental fine-grained storage persister is available.

    5.0.0upgrade guide

  • An experimental fine-grained storage persister is available.

    5.0.0upgrade guide

  • Limits the number of pages stored in infinite-query data and subsequently refetched; both pagination directions must be defined.

    5.0.0upgrade guide

  • Infinite queries can limit the number of pages stored and refetched; the infinite list must define both getNextPageParam and getPreviousPageParam.

    5.0.0upgrade guide

  • Infinite-query prefetching can use the pages option to prefetch more than the first page.

    5.0.0upgrade guide

  • Infinite queries can prefetch more than the first page using the pages option.

    5.0.0upgrade guide

  • Introduced as the replacement for queryClient.fetchInfiniteQuery and as an API for infinite queries with an options object.

    5.0.0upgrade guide

  • Introduced as the replacement for queryClient.fetchQuery and as an API for querying with an options object.

    5.0.0upgrade guide

  • A typesafe way to create query options is available.

    5.0.0upgrade guide

  • Mutation results expose submittedAt and variables for simplified optimistic UI updates without writing data directly to the cache.

    5.0.0upgrade guide

  • A dedicated suspense infinite-query hook provides data that is never potentially undefined at the type level.

    5.0.0upgrade guide

  • A dedicated suspense queries hook provides data that is never potentially undefined at the type level.

    5.0.0upgrade guide

  • A dedicated suspense query hook provides data that is never potentially undefined at the type level.

    5.0.0upgrade guide

Performance 1

  • The supported browser set was updated to produce a more modern, performant, and smaller bundle.

    5.0.0upgrade guide

Behavior and default changes 1

  • Allows a framework with a custom batching function to register it with TanStack Query.

    5.0.0upgrade guide

Fixes and other changes 12

  • Corrects the overload selected when initialData may be undefined.

    5.105.1release notes

  • Corrects the overload selected for initialData in solid-query's queryOptions and useQuery.

    5.105.1release notes

  • When the queryClient passed to useQuery changes, the hook now subscribes to the new observer.

    5.104.4release notes

  • Switched the SSR cleanup property to address an Astro crash.

    5.103.3release notes

  • Fixes return types so exported inferred options can be emitted in declaration files without leaking internal data tag symbols.

    5.102.0release notes

  • Mutation variables are optional when undefined extends TVariables.

    5.102.0release notes

  • Propagates generic type parameters to the select callback.

    5.102.0release notes

  • Maintains the error state on reset refetch when initialData is defined.

    5.91.3release notes

  • Fixed solid-router so context reads use only useQueryClient and useIsRestoring.

    5.90.26release notes

  • Solid now allows both create- and use-style APIs.

    5.90.25release notes

  • Deprecated type aliases now forward generic parameters.

    5.90.24release notes

  • Errors are skipped if returned data is undefined.

    5.90.9release notes