From ddac1299b294f62dac35040db676349be503d1f4 Mon Sep 17 00:00:00 2001 From: WuMingDao <146366930+WuMingDao@users.noreply.github.com> Date: Thu, 6 Nov 2025 19:57:20 +0800 Subject: [PATCH 1/8] docs: fix grammar issue in CONTRIBUTING.md (#9849) * docs: fix grammar issue in CONTRIBUTING.md * update --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2d90db264c..05a49822a1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -133,11 +133,11 @@ https://github.com/fulopkovacs/form/assets/43729152/9d35a3c3-8153-4e74-9cb2-af27 #### Note on standalone execution -If you want to run an example without installing dependencies for the whole repo, just follow instructions from the example's README.md file. It will be then run against the latest TanStack Query release. +If you want to run an example without installing dependencies for the whole repo, just follow the instructions from the example's README.md file. It will then be run against the latest TanStack Query release. ## Online one-click setup -You can use Gitpod (An Online Open Source VS Code like IDE which is free for Open Source) for developing online. With a single click it will start a workspace and automatically: +You can use Gitpod (An Online open-source VS Code-like IDE that is free for Open Source) for developing online. With a single click it will start a workspace and automatically: - clone the `TanStack/query` repo. - install all the dependencies in `/` and `/docs`. From 7783a7ae49c9e39291ff57eaf3bcbc30ba0c6668 Mon Sep 17 00:00:00 2001 From: Sarah Date: Thu, 6 Nov 2025 03:59:56 -0800 Subject: [PATCH 2/8] docs: add community resources page (#9831) * add community resources page * update link for blog posts * update community resource links * rm vue community section * update old links * fix community resource link --- docs/community-resources.md | 194 ++++++++++++++++++ docs/config.json | 55 +---- .../react/community/community-projects.md | 181 ---------------- .../framework/react/community/tkdodos-blog.md | 130 ------------ docs/framework/react/guides/advanced-ssr.md | 2 +- .../react/guides/important-defaults.md | 8 +- .../react/guides/infinite-queries.md | 3 +- .../react/guides/initial-query-data.md | 2 +- .../guides/invalidations-from-mutations.md | 3 +- docs/framework/react/guides/mutations.md | 3 +- .../react/guides/optimistic-updates.md | 2 +- .../react/guides/placeholder-query-data.md | 2 +- docs/framework/react/guides/prefetching.md | 2 +- docs/framework/react/guides/queries.md | 2 +- docs/framework/react/guides/query-keys.md | 4 +- .../react/guides/render-optimizations.md | 4 +- docs/framework/react/guides/testing.md | 3 +- docs/framework/react/overview.md | 2 +- .../framework/react/reference/queryOptions.md | 2 +- docs/framework/react/typescript.md | 3 +- docs/framework/react/videos.md | 110 ---------- .../solid/community/community-projects.md | 6 - .../framework/solid/community/tkdodos-blog.md | 5 - .../vue/community/community-projects.md | 55 ----- docs/framework/vue/community/tkdodos-blog.md | 5 - docs/reference/QueryCache.md | 12 +- 26 files changed, 227 insertions(+), 573 deletions(-) create mode 100644 docs/community-resources.md delete mode 100644 docs/framework/react/community/community-projects.md delete mode 100644 docs/framework/react/community/tkdodos-blog.md delete mode 100644 docs/framework/react/videos.md delete mode 100644 docs/framework/solid/community/community-projects.md delete mode 100644 docs/framework/solid/community/tkdodos-blog.md delete mode 100644 docs/framework/vue/community/community-projects.md delete mode 100644 docs/framework/vue/community/tkdodos-blog.md diff --git a/docs/community-resources.md b/docs/community-resources.md new file mode 100644 index 0000000000..34a607afd1 --- /dev/null +++ b/docs/community-resources.md @@ -0,0 +1,194 @@ +--- +title: Community Resources +articles: + [ + { + title: "TkDodo's Blog Posts", + url: 'https://tkdodo.eu/blog/practical-react-query', + description: 'TkDodo, a maintainer of TanStack Query, writes a series of blog posts about the library. These articles offer general best practices and often present opinionated perspectives on using TanStack Query.', + }, + ] +media: + [ + { + title: 'React Query: It’s Time to Break up with your Global State! – Tanner Linsley', + url: 'https://www.youtube.com/watch?v=seU46c6Jz7E', + description: 'Get the lowdown on “global state” and how React Query can help you fetch, cache and manage your asynchronous data with a fraction of the effort and code that you’re used to', + }, + { + title: 'All About React Query (with Tanner Linsley) — Learn With Jason', + url: 'https://www.youtube.com/watch?v=DocXo3gqGdI', + description: 'Learn all about React Query with its creator Tanner Linsley.', + }, + { + title: 'Hooks for Fetching with ReactQuery Creator Tanner Linsley aka @tannerlinsley', + url: 'https://www.youtube.com/watch?v=PPvWXbSCtBU', + description: 'Learn how React Query simplifies asynchronous data fetching in React applications.', + }, + { + title: 'React Query - Open Source Friday stream with Tanner Linsley from', + url: 'https://www.youtube.com/watch?v=B3cJDT3j19I', + description: 'An Open Source Friday stream featuring Tanner Linsley.', + }, + { + title: 'React Query Presentation - Tanner Linsley', + url: 'https://www.youtube.com/watch?v=_ehibado6rU', + description: 'Tanner Linsley gives a talk to Lambda School students about the React Query.', + }, + { + title: 'TanStack Query v4 (with Dominik Dorfmeister) — Learn With Jason', + url: 'https://www.youtube.com/watch?v=SPPQm0dvEes', + description: 'Dominik Dorfmeister covering TanStack Query v4.', + }, + { + title: 'React Query Exposed by Its Maintainer', + url: 'https://www.youtube.com/watch?v=8-RTNnn9GR8', + description: 'Dominik Dorfmeister explores the less favorable aspects of React Query and situations where it may not be the best fit.', + }, + { + title: 'React Query API Design: Lessons Learned - Dominik Dorfmeister', + url: 'https://www.youtube.com/watch?v=l3PxErcKeAI', + description: 'Dominik Dorfmeister walks through some of the API design choices that were made in React Query to get to the DX.', + }, + ] +utilities: + [ + { + title: 'batshit', + url: 'https://github.com/yornaath/batshit', + description: 'A batch manager that will deduplicate and batch requests for a certain data type made within a window', + }, + { + title: 'GraphQL Code Generator', + url: 'https://the-guild.dev/graphql/codegen', + description: 'Generate React Query hooks from your GraphQL schema', + }, + + { + title: 'Http-wizard', + url: 'https://http-wizard.com', + description: 'End-to-end type-safe Fastify API with typeScript magic ✨', + }, + + { + title: 'Normy', + url: 'https://github.com/klis87/normy', + description: 'Automatic normalization and data updates for data fetching libraries', + }, + + { + title: 'Orval', + url: 'https://orval.dev/', + description: 'Generate TypeScript client from OpenAPI specifications.', + }, + { + title: 'Query Key Factory', + url: 'https://github.com/lukemorales/query-key-factory', + description: 'A library for creating typesafe standardized query keys, useful for cache management in @tanstack/query', + }, + + { + title: 'React Query Kit', + url: 'https://github.com/liaoliao666/react-query-kit', + description: '🕊️ A toolkit for ReactQuery that makes ReactQuery hooks reusable and typesafe', + }, + { + title: 'React Query Rewind', + url: 'https://reactqueryrewind.com/', + description: 'Time travel and visualize state during development', + }, + { + title: 'React Query Swagger', + url: 'https://github.com/Shaddix/react-query-swagger', + description: 'Generate React Query hooks based on Swagger API definitions', + }, + { + title: 'Suspensive React Query', + url: 'https://suspensive.org/docs/react-query/motivation', + description: 'Enhances React Query with Suspense support, allowing for simpler and more declarative data fetching', + }, + { + title: 'tRPC', + url: 'https://trpc.io/', + description: 'End-to-end typesafe APIs made easy', + }, + ] +others: + [ + { + title: 'Atomic CRM', + url: 'https://marmelab.com/atomic-crm/', + description: 'A full-featured CRM built with React, react-admin, and Supabase.', + }, + { + title: 'Blitz', + url: 'https://blitzjs.com/', + description: 'The Missing Fullstack Toolkit for Next.js', + }, + { + title: 'Connect', + url: 'https://connectrpc.com/docs', + description: 'A family of libraries for building browser and gRPC-compatible HTTP APIs.', + }, + { + title: 'Hey API', + url: 'https://heyapi.dev/openapi-ts/plugins/tanstack-query', + description: 'The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more.', + }, + { + title: 'Kubb', + url: 'https://www.kubb.dev/', + description: 'Generate SDKs for all your APIs', + }, + { + title: 'OpenAPI codegen', + url: 'https://github.com/fabien0102/openapi-codegen', + description: 'A tool for generating code based on an OpenAPI schema.', + }, + { + title: 'OpenAPI Qraft React', + url: 'https://github.com/OpenAPI-Qraft/openapi-qraft', + description: 'Generate type-safe API clients and Hooks for TanStack Query directly from OpenAPI Documents.Zero-runtime overhead, Proxy-based design, seamless SSR support, and full TanStack Query functionality.', + }, + { + title: 'OpenAPI React Query codegen', + url: 'https://github.com/7nohe/openapi-react-query-codegen', + description: 'Generate TanStack Query hooks based on an OpenAPI specification file.', + }, + { + title: 'OpenAPI zod client', + url: 'https://github.com/astahmer/openapi-zod-client', + description: 'Generate a zodios client from an OpenAPI specification', + }, + { + title: 'openapi-fetch', + url: 'https://openapi-ts.dev/openapi-react-query/', + description: 'A 2KB min, typesafe fetch wrapper that uses static TypeScript type inference and no runtime checks.', + }, + { + title: 'oRPC', + url: 'https://orpc.unnoq.com/docs/integrations/tanstack-query', + description: 'Easy to build APIs that are end-to-end type-safe and adhere to OpenAPI standards.', + }, + { + title: 'Rapini', + url: 'https://github.com/rametta/rapini', + description: '🥬 OpenAPI to React Query (or SWR) & Axios', + }, + { + title: 'ts-rest', + url: 'https://ts-rest.com/', + description: 'Incrementally adoptable type-safety for your new and existing APIs', + }, + { + title: 'wagmi', + url: 'https://wagmi.sh/', + description: 'React Hooks for Ethereum based on @tanstack/react-query', + }, + { + title: 'zodios', + url: 'https://www.zodios.org/', + description: 'End-to-end typesafe REST API toolbox', + }, + ] +--- diff --git a/docs/config.json b/docs/config.json index 0ca2b1fbac..f7cfdff9ef 100644 --- a/docs/config.json +++ b/docs/config.json @@ -6,6 +6,11 @@ "indexName": "tanstackquery" }, "sections": [ + { + "label": "Community Resources", + "children": [], + "frameworks": [] + }, { "label": "Getting Started", "children": [], @@ -29,10 +34,6 @@ "label": "Devtools", "to": "framework/react/devtools" }, - { - "label": "Videos & Talks", - "to": "framework/react/videos" - }, { "label": "Comparison", "to": "framework/react/comparison" @@ -1012,51 +1013,7 @@ } ] }, - { - "label": "Community Resources", - "children": [], - "frameworks": [ - { - "label": "react", - "children": [ - { - "label": "TkDodo's Blog", - "to": "framework/react/community/tkdodos-blog" - }, - { - "label": "Community Projects", - "to": "framework/react/community/community-projects" - } - ] - }, - { - "label": "solid", - "children": [ - { - "label": "TkDodo's Blog", - "to": "framework/solid/community/tkdodos-blog" - }, - { - "label": "Community Projects", - "to": "framework/solid/community/community-projects" - } - ] - }, - { - "label": "vue", - "children": [ - { - "label": "TkDodo's Blog", - "to": "framework/vue/community/tkdodos-blog" - }, - { - "label": "Community Projects", - "to": "framework/vue/community/community-projects" - } - ] - } - ] - }, + { "label": "Examples", "children": [], diff --git a/docs/framework/react/community/community-projects.md b/docs/framework/react/community/community-projects.md deleted file mode 100644 index 7c33d0838a..0000000000 --- a/docs/framework/react/community/community-projects.md +++ /dev/null @@ -1,181 +0,0 @@ ---- -id: community-projects -title: Community Projects ---- - -There are lots of community projects that build on top of React Query and use it to provide additional functionality or enhanced developer experience. Projects are listed in alphabetical order. If you have a project that you would like to add to this list, please open a PR! - -> Please note that these projects are entirely community maintained. If you have questions about these projects, please reach out to the project maintainers. - -## Atomic CRM - -A full-featured CRM built with React, react-admin, and Supabase. - -Link: https://marmelab.com/atomic-crm/ - -## batshit - -A batch manager that will deduplicate and batch requests for a certain data type made within a window - -Link: https://github.com/yornaath/batshit - -## Blitz - -The Missing Fullstack Toolkit for Next.js - -Link: https://blitzjs.com/ - -## Connect - -A family of libraries for building browser and gRPC-compatible HTTP APIs. - -Link: https://connectrpc.com/docs - -## DevTools Browser Extensions - -Browser extensions for Chrome, Firefox, and Edge that provide devtools for TanStack Query, allowing you to inspect and debug queries, mutations, and cache state directly in browser DevTools. - -Links: - -- Chrome logo [Devtools for Chrome](https://chromewebstore.google.com/detail/tanstack-query-devtools/annajfchloimdhceglpgglpeepfghfai) -- Firefox logo [Devtools for Firefox](https://addons.mozilla.org/en-US/firefox/addon/tanstack-query-devtools/) -- Edge logo [Devtools for Edge](https://microsoftedge.microsoft.com/addons/detail/tanstack-query-devtools/edmdpkgkacmjopodhfolmphdenmddobj) - -## GraphQL Code Generator - -Generate React Query hooks from your GraphQL schema - -Link: https://the-guild.dev/graphql/codegen - -## Hey API - -The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more. - -Link: https://heyapi.dev/openapi-ts/plugins/tanstack-query - -## Http-wizard - -End-to-end type-safe Fastify API with typeScript magic ✨ - -Link: https://http-wizard.com - -## Kubb - -Generate SDKs for all your APIs - -Link: https://www.kubb.dev/ - -## NgQuery - -Query adapter for Angular - -Link: https://ngneat.github.io/query/ - -## Normy - -Automatic normalization and data updates for data fetching libraries - -Link: https://github.com/klis87/normy - -## OpenAPI codegen - -A tool for generating code based on an OpenAPI schema. - -Link: https://github.com/fabien0102/openapi-codegen - -## OpenAPI Qraft React - -Generate type-safe API clients and Hooks for TanStack Query directly from OpenAPI Documents. -Zero-runtime overhead, Proxy-based design, seamless SSR support, and full TanStack Query functionality. - -Link: https://github.com/OpenAPI-Qraft/openapi-qraft - -## OpenAPI React Query codegen - -Generate TanStack Query hooks based on an OpenAPI specification file. - -Link: https://github.com/7nohe/openapi-react-query-codegen - -### OpenAPI zod client - -Generate a zodios client from an OpenAPI specification - -Link: https://github.com/astahmer/openapi-zod-client - -## openapi-fetch - -A 2KB min, typesafe fetch wrapper that uses static TypeScript type inference and no runtime checks. - -Link: https://openapi-ts.dev/openapi-react-query/ - -## oRPC - -Easy to build APIs that are end-to-end type-safe and adhere to OpenAPI standards. - -Link: https://orpc.unnoq.com/docs/integrations/tanstack-query - -## Orval - -Generate TypeScript client from OpenAPI specifications - -Link: https://orval.dev/ - -## Query Key factory - -A library for creating typesafe standardized query keys, useful for cache management in `@tanstack/query` - -Link: https://github.com/lukemorales/query-key-factory - -## Rapini - -🥬 OpenAPI to React Query (or SWR) & Axios - -Link: https://github.com/rametta/rapini - -## React Query Kit - -🕊️ A toolkit for ReactQuery that makes ReactQuery hooks reusable and typesafe - -Link: https://github.com/liaoliao666/react-query-kit - -## React Query Rewind - -Time travel and visualize state during development - -Link: https://reactqueryrewind.com/ - -## React Query Swagger - -Generate React Query hooks based on Swagger API definitions - -Link: https://github.com/Shaddix/react-query-swagger - -## Suspensive React Query - -Enhances React Query with Suspense support, allowing for simpler and more declarative data fetching - -Link: https://suspensive.org/docs/react-query/motivation - -## tRPC - -End-to-end typesafe APIs made easy - -Link: https://trpc.io/ - -## ts-rest - -Incrementally adoptable type-safety for your new and existing APIs - -Link: https://ts-rest.com/ - -## wagmi - -React Hooks for Ethereum based on `@tanstack/react-query` - -Link: https://wagmi.sh/ - -## zodios - -End-to-end typesafe REST API toolbox - -Link: https://www.zodios.org/ diff --git a/docs/framework/react/community/tkdodos-blog.md b/docs/framework/react/community/tkdodos-blog.md deleted file mode 100644 index 92c328c104..0000000000 --- a/docs/framework/react/community/tkdodos-blog.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -id: tkdodos-blog -title: TkDodo's Blog ---- - -TanStack Query maintainer [TkDodo](https://bsky.app/profile/tkdodo.eu) has a series of blog posts about using and working with the library. Some articles show general best practices, but most have an _opinionated_ point of view. - -## [#1: Practical React Query](https://tkdodo.eu/blog/practical-react-query) - -> An advanced introduction to React Query, showing practical tips that go beyond the docs. It covers explaining the defaults (`staleTime` vs. `gcTime`), concepts like keeping server and client state separate, handling dependencies and creating custom hooks, as well as outlining why the `enabled` option is very powerful. [Read more...](https://tkdodo.eu/blog/practical-react-query) - -## [#2: React Query Data Transformations](https://tkdodo.eu/blog/react-query-data-transformations) - -> Learn the possibilities to perform the quite common and important task of transforming your data with React Query. From transforming in the `queryFn` to using the `select` option, this article outlines the pros and cons of all the different approaches. [Read more...](https://tkdodo.eu/blog/react-query-data-transformations) - -## [#3: React Query Render Optimizations](https://tkdodo.eu/blog/react-query-render-optimizations) - -> Let's take a look at what you can do when your component re-renders too often when using React Query. The library is already pretty optimized, but there are still some opt-in features (like `tracked queries`) that you can use to avoid the `isFetching` transition. We're also looking into what `structural sharing` refers to. [Read more...](https://tkdodo.eu/blog/react-query-render-optimizations) - -## [#4: Status Checks in React Query](https://tkdodo.eu/blog/status-checks-in-react-query) - -> We usually check for `isPending` first before checking for `isError` , but sometimes, checking if `data` is available should be the first thing to do. This article shows how the wrong status check order can negatively impact user experience. [Read more...](https://tkdodo.eu/blog/status-checks-in-react-query) - -## [#5: Testing React Query](https://tkdodo.eu/blog/testing-react-query) - -> The docs already cover pretty well what you need to do to get started when testing React Query. This article shows some additional tips (like turning off `retries` or silencing the `console`) you might want to follow when testing custom hooks or components using them. It also links to an [example repository](https://github.com/TkDodo/testing-react-query) with tests for success and error states, powered by `mock-service-worker`. [Read more...](https://tkdodo.eu/blog/testing-react-query) - -## [#6: React Query and TypeScript](https://tkdodo.eu/blog/react-query-and-type-script) - -> Since React Query is written in TypeScript, it has great support for it. This blog post explains the various Generics, how you can leverage type inference to avoid having to explicitly type `useQuery` and friends, what to do with `unknown` errors, how type narrowing works and more! [Read more...](https://tkdodo.eu/blog/react-query-and-type-script) - -## [#7: Using WebSockets with React Query](https://tkdodo.eu/blog/using-web-sockets-with-react-query) - -> A step-by-step guide on how to make real-time notifications work with React Query, with either event-based subscriptions or pushing full data directly to the client. Applicable to anything from the browser native WebSocket API over Firebase and even GraphQL subscriptions. [Read more...](https://tkdodo.eu/blog/using-web-sockets-with-react-query) - -## [#8: Effective React Query Keys](https://tkdodo.eu/blog/effective-react-query-keys) - -> Most examples just use a simple String or Array Query Key, but how do you organize your keys effectively once your app grows past a todo list? This article shows how co-location and Query Key Factories can make life easier. [Read more...](https://tkdodo.eu/blog/effective-react-query-keys) - -## [#8a: Leveraging the Query Function Context](https://tkdodo.eu/blog/leveraging-the-query-function-context) - -> In this amendment to the previous blog post, we look at how we can leverage the Query Function Context and Object Query Keys for maximum safety as our app grows. [Read more...](https://tkdodo.eu/blog/leveraging-the-query-function-context) - -## [#9: Placeholder and Initial Data in React Query](https://tkdodo.eu/blog/placeholder-and-initial-data-in-react-query) - -> Placeholder and Initial Data are two similar yet different concepts for synchronously showing data instead of a loading spinner to improve an application's UX. This blog post compares the two and outlines the scenarios where each one shines. [Read more...](https://tkdodo.eu/blog/placeholder-and-initial-data-in-react-query) - -## [#10: React Query as a State Manager](https://tkdodo.eu/blog/react-query-as-a-state-manager) - -> React Query doesn't fetch any data for you - it's a data synchronization tool that excels when used for server state. This article has everything you need to know to make React Query your single source of truth state manager for your async state. You'll learn how to let React Query do it's magic and why customizing `staleTime` might be all you need. [Read more...](https://tkdodo.eu/blog/react-query-as-a-state-manager) - -## [#11: React Query Error Handling](https://tkdodo.eu/blog/react-query-error-handling) - -> Handling errors is an integral part of working with asynchronous data, especially data fetching. We have to face it: Not all requests will be successful, and not all Promises will be fulfilled. This blog post describes various ways of coping with errors in React Query, such as the error property, using Error Boundaries or onError callbacks, so that you can prepare your application for the cases when "Something went wrong". [Read more...](https://tkdodo.eu/blog/react-query-error-handling) - -## [#12: Mastering Mutations in React Query](https://tkdodo.eu/blog/mastering-mutations-in-react-query) - -> Mutations are the important, second part necessary to work with server data - for situations where you need to update it. This blog post covers what mutations are and how they are different from queries. You'll learn the difference between `mutate` and `mutateAsync` as well as how you can tie queries and mutations together. [Read more...](https://tkdodo.eu/blog/mastering-mutations-in-react-query) - -## [#13: Offline React Query](https://tkdodo.eu/blog/offline-react-query) - -> There are many ways to produce promises - which is everything React Query needs - but by far the biggest use-case is data fetching. Very often, that requires an active network connection. But sometimes, especially on mobile devices where, the network connection can be unreliable, you need your app to also work without it. In this article, you'll learn about the different offline strategies React Query offers. [Read more...](https://tkdodo.eu/blog/offline-react-query) - -## [#14: React Query and Forms](https://tkdodo.eu/blog/react-query-and-forms) - -> Forms tend to blur the line between what is server state and what is client state. In most applications, we would not only like to display state, but also let the user interact with it. This article shows two different approaches as well as some tips and tricks about using React Query with Forms. [Read more...](https://tkdodo.eu/blog/react-query-and-forms) - -## [#15: React Query FAQs](https://tkdodo.eu/blog/react-query-fa-qs) - -> This article tries to answer the most frequently asked questions about React Query. [Read more...](https://tkdodo.eu/blog/react-query-fa-qs) - -## [#16: React Query meets React Router](https://tkdodo.eu/blog/react-query-meets-react-router) - -> Remix and React Router are changing the game when thinking about _when_ to fetch data. This article goes into why React Query and Routers that support data loading are a match made in heaven. [Read more...](https://tkdodo.eu/blog/react-query-meets-react-router) - -## [#17: Seeding the Query Cache](https://tkdodo.eu/blog/seeding-the-query-cache) - -> This blog post shows multiple ways how to get data into your Query Cache _before_ you start rendering to minimize the amount of loading spinners displayed in your app. The options range from prefetching on the server or in your router to seeding cache entries via `setQueryData`. [Read more...](https://tkdodo.eu/blog/seeding-the-query-cache) - -## [#18: Inside React Query](https://tkdodo.eu/blog/inside-react-query) - -> If you've ever wondered how React Query works under the hood - this post is for you. It explains the architecture (including visuals), starting with the agnostic Query Core and how it communicates with the framework specific adapters. [Read more...](https://tkdodo.eu/blog/inside-react-query) - -## [#19: Type-safe React Query](https://tkdodo.eu/blog/type-safe-react-query) - -> There's a big difference between "having types" and "being type-safe". This article tries to outline those differences and shows how you can get the best possible type-safety when using React Query together with TypeScript [Read more...](https://tkdodo.eu/blog/type-safe-react-query) - -## [#20: You Might Not Need React Query](https://tkdodo.eu/blog/you-might-not-need-react-query) - -> If your application doesn’t rely on client-side data fetching, especially when using frameworks like Next.js or Remix with built-in server components, React Query may be unnecessary. That said, it still shines in hybrid use cases (like infinite scrolling or offline support) where its smart caching and revalidation can be invaluable. [Read more...](https://tkdodo.eu/blog/you-might-not-need-react-query) - -## [#21: Thinking in React Query](https://tkdodo.eu/blog/thinking-in-react-query) - -> React Query isn’t a data-fetching library - it's an async state manager designed to treat parameters as dependencies, optimize refetch behavior via `staleTime`, and encourage declarative patterns where `queryKey` drives cache and updates. A small shift in mindset can dramatically streamline how you use React Query. [Read more...](https://tkdodo.eu/blog/thinking-in-react-query) - -## [#22: React Query and React Context](https://tkdodo.eu/blog/react-query-and-react-context) - -> React Query lets components independently manage their own data, making them self-sufficient and resilient, but when shared data (like user info fetched higher up) is needed deeper in the tree, React Context can make that implicit dependency explicit and safer. [Read more...](https://tkdodo.eu/blog/react-query-and-react-context) - -## [#23: Why You Want React Query](https://tkdodo.eu/blog/why-you-want-react-query) - -> While fetching data with `fetch` inside `useEffect` may seem simple, it quickly gets tangled with bugs like race conditions, missing loading states, stale data, and Strict Mode quirks—making async state management far more complex than it appears. [Read more...](https://tkdodo.eu/blog/why-you-want-react-query) - -## [#24: The Query Options API](https://tkdodo.eu/blog/the-query-options-api) - -> React Query v5 introduces a unified "Query Options" API - where all functions like `useQuery`, `invalidateQueries`, and imperative calls accept a single object - simplifying the interface and making reuse across different query contexts much easier while at the same time improving type-safety. [Read more...](https://tkdodo.eu/blog/the-query-options-api) - -## [#25: Automatic Query Invalidation after Mutations](https://tkdodo.eu/blog/automatic-query-invalidation-after-mutations) - -> React Query doesn’t automatically tie mutations to queries - but you can leverage "global cache callbacks" in a central `MutationCache` to define shared behaviors like invalidating queries on every mutation. [Read more...](https://tkdodo.eu/blog/automatic-query-invalidation-after-mutations) - -## [#26: How Infinite Queries work](https://tkdodo.eu/blog/how-infinite-queries-work) - -> This blog post is a deep dive into how Infinite Queries are designed and work under the hood. Interestingly, there is no distinct InfiniteQuery representation - just a different "behaviour" attached to regular Queries. [Read more...](https://tkdodo.eu/blog/how-infinite-queries-work) - -## [#27: React Query API Design - Lessons Learned](https://tkdodo.eu/blog/react-query-api-design-lessons-learned) - -> In this talk, Dominik walks us through some of the API design choices that were made in React Query to get to its arguably good developer experience. You'll hear stories about things that went well, but also about tradeoffs and mistakes that were made, and what lessons we can all learn from those. [Read more...](https://tkdodo.eu/blog/react-query-api-design-lessons-learned) - -## [#28: React Query - The Bad Parts](https://tkdodo.eu/blog/react-query-the-bad-parts) - -> In this talk, Dominik explores the less favorable aspects of React Query and situations where it may not be the best fit. No library is perfect; every choice involves trade-offs. By the end of this talk, you'll have a better understanding of React Query's limitations and why it remains a compelling choice despite them. [Read more...](https://tkdodo.eu/blog/react-query-the-bad-parts) - -## [#29: Concurrent Optimistic Updates in React Query](https://tkdodo.eu/blog/concurrent-optimistic-updates-in-react-query) - -> Optimistic updates in React Query can cause race conditions when multiple mutations run at once, leading to inconsistent UI states. Cancelling in-flight queries helps, but overlapping invalidations may still overwrite newer updates. [Read more...](https://tkdodo.eu/blog/concurrent-optimistic-updates-in-react-query) - -## [#30: React Query Selectors, Supercharged](https://tkdodo.eu/blog/react-query-selectors-supercharged) - -> React Query’s `select` option enables components to subscribe only to the specific part of a query’s data they care about - so updating one field won’t cause unrelated UI to re-render unnecessarily. This fine-grained approach keeps full responses in the cache while optimizing component updates for performance. [Read more...](https://tkdodo.eu/blog/react-query-selectors-supercharged) diff --git a/docs/framework/react/guides/advanced-ssr.md b/docs/framework/react/guides/advanced-ssr.md index 30abf188bb..6961b339f0 100644 --- a/docs/framework/react/guides/advanced-ssr.md +++ b/docs/framework/react/guides/advanced-ssr.md @@ -626,6 +626,6 @@ Similarly, it would be impossible to teach all the intricacies of this new parad ## Further reading -To understand if your application can benefit from React Query when also using Server Components, have a look at [You Might Not Need React Query](../../community/tkdodos-blog.md#20-you-might-not-need-react-query) from the Community Resources. +To understand if your application can benefit from React Query when also using Server Components, see the article [You Might Not Need React Query](https://tkdodo.eu/blog/you-might-not-need-react-query). [//]: # 'Materials' diff --git a/docs/framework/react/guides/important-defaults.md b/docs/framework/react/guides/important-defaults.md index 5330ca4eee..e6183996b9 100644 --- a/docs/framework/react/guides/important-defaults.md +++ b/docs/framework/react/guides/important-defaults.md @@ -40,10 +40,10 @@ Out of the box, TanStack Query is configured with **aggressive but sane** defaul ## Further Reading -Have a look at the following articles from our Community Resources for further explanations of the defaults: +Have a look at the following articles from our [Community Resources](../../../../community-resources) for further explanations of the defaults: -- [Practical React Query](../../community/tkdodos-blog.md#1-practical-react-query) -- [React Query as a State Manager](../../community/tkdodos-blog.md#10-react-query-as-a-state-manager) -- [Thinking in React Query](../../community/tkdodos-blog.md#21-thinking-in-react-query) +- [Practical React Query](https://tkdodo.eu/blog/practical-react-query) +- [React Query as a State Manager](https://tkdodo.eu/blog/react-query-as-a-state-manager) +- [Thinking in React Query](https://tkdodo.eu/blog/thinking-in-react-query) [//]: # 'Materials' diff --git a/docs/framework/react/guides/infinite-queries.md b/docs/framework/react/guides/infinite-queries.md index d73cfb8dd3..dccadec1a1 100644 --- a/docs/framework/react/guides/infinite-queries.md +++ b/docs/framework/react/guides/infinite-queries.md @@ -261,7 +261,6 @@ return useInfiniteQuery({ ## Further reading -To get a better understanding of how Infinite Queries work under the hood, read [How Infinite Queries work](../../community/tkdodos-blog.md#26-how-infinite-queries-work) from -the Community Resources. +To get a better understanding of how Infinite Queries work under the hood, see the article [How Infinite Queries work](https://tkdodo.eu/blog/how-infinite-queries-work). [//]: # 'Materials' diff --git a/docs/framework/react/guides/initial-query-data.md b/docs/framework/react/guides/initial-query-data.md index 3e1c23920b..bc6ed2ce34 100644 --- a/docs/framework/react/guides/initial-query-data.md +++ b/docs/framework/react/guides/initial-query-data.md @@ -170,6 +170,6 @@ const result = useQuery({ ## Further reading -For a comparison between `Initial Data` and `Placeholder Data`, have a look at the [Community Resources](../../community/tkdodos-blog.md#9-placeholder-and-initial-data-in-react-query). +For a comparison between `Initial Data` and `Placeholder Data`, see the [article by TkDodo](https://tkdodo.eu/blog/placeholder-and-initial-data-in-react-query). [//]: # 'Materials' diff --git a/docs/framework/react/guides/invalidations-from-mutations.md b/docs/framework/react/guides/invalidations-from-mutations.md index f1396a312c..6f2198021c 100644 --- a/docs/framework/react/guides/invalidations-from-mutations.md +++ b/docs/framework/react/guides/invalidations-from-mutations.md @@ -52,7 +52,6 @@ You can wire up your invalidations to happen using any of the callbacks availabl ## Further reading -For a technique to automatically invalidate Queries after Mutations, have a look at [Automatic Query Invalidation after Mutations](../../community/tkdodos-blog.md#25-automatic-query-invalidation-after-mutations) from -the Community Resources. +For a technique to automatically invalidate Queries after Mutations, have a look at [TkDodo's article on Automatic Query Invalidation after Mutations](https://tkdodo.eu/blog/automatic-query-invalidation-after-mutations). [//]: # 'Materials' diff --git a/docs/framework/react/guides/mutations.md b/docs/framework/react/guides/mutations.md index 925954bf09..ced1fcfc12 100644 --- a/docs/framework/react/guides/mutations.md +++ b/docs/framework/react/guides/mutations.md @@ -408,7 +408,6 @@ const mutation = useMutation({ ## Further reading -For more information about mutations, have a look at [#12: Mastering Mutations in React Query](../../community/tkdodos-blog.md#12-mastering-mutations-in-react-query) from -the Community Resources. +For more information about mutations, have a look at [TkDodo's article on Mastering Mutations in React Query](https://tkdodo.eu/blog/mastering-mutations-in-react-query). [//]: # 'Materials' diff --git a/docs/framework/react/guides/optimistic-updates.md b/docs/framework/react/guides/optimistic-updates.md index 27b958dd97..c35fdb3700 100644 --- a/docs/framework/react/guides/optimistic-updates.md +++ b/docs/framework/react/guides/optimistic-updates.md @@ -191,6 +191,6 @@ However, if you have multiple places on the screen that would require to know ab ## Further reading -Have a look at the Community Resources for a guide on [Concurrent Optimistic Updates](../../community/tkdodos-blog.md#29-concurrent-optimistic-updates-in-react-query). +Have a look at the guide by TkDodo on [Concurrent Optimistic Updates](https://tkdodo.eu/blog/concurrent-optimistic-updates-in-react-query). [//]: # 'Materials' diff --git a/docs/framework/react/guides/placeholder-query-data.md b/docs/framework/react/guides/placeholder-query-data.md index b9e1a0fa5f..d19d17872a 100644 --- a/docs/framework/react/guides/placeholder-query-data.md +++ b/docs/framework/react/guides/placeholder-query-data.md @@ -96,6 +96,6 @@ function Todo({ blogPostId }) { ## Further reading -For a comparison between `Placeholder Data` and `Initial Data`, have a look at the [Community Resources](../../community/tkdodos-blog.md#9-placeholder-and-initial-data-in-react-query). +For a comparison between `Placeholder Data` and `Initial Data`, see the [article by TkDodo](https://tkdodo.eu/blog/placeholder-and-initial-data-in-react-query). [//]: # 'Materials' diff --git a/docs/framework/react/guides/prefetching.md b/docs/framework/react/guides/prefetching.md index d11b6f22b4..197a3a57de 100644 --- a/docs/framework/react/guides/prefetching.md +++ b/docs/framework/react/guides/prefetching.md @@ -431,7 +431,7 @@ queryClient.setQueryData(['todos'], todos) ## Further reading -For a deep-dive on how to get data into your Query Cache before you fetch, have a look at [#17: Seeding the Query Cache](../../community/tkdodos-blog.md#17-seeding-the-query-cache) from the Community Resources. +For a deep-dive on how to get data into your Query Cache before you fetch, see the [article Seeding the Query Cache by TkDodo](https://tkdodo.eu/blog/seeding-the-query-cache). Integrating with Server Side routers and frameworks is very similar to what we just saw, with the addition that the data has to passed from the server to the client to be hydrated into the cache there. To learn how, continue on to the [Server Rendering & Hydration guide](../ssr.md). diff --git a/docs/framework/react/guides/queries.md b/docs/framework/react/guides/queries.md index 8107801143..f255483a87 100644 --- a/docs/framework/react/guides/queries.md +++ b/docs/framework/react/guides/queries.md @@ -140,6 +140,6 @@ So keep in mind that a query can be in `pending` state without actually fetching ## Further Reading -For an alternative way of performing status checks, have a look at the [Community Resources](../../community/tkdodos-blog.md#4-status-checks-in-react-query). +For an alternative way of performing status checks, have a look at [this article by TkDodo](https://tkdodo.eu/blog/status-checks-in-react-query). [//]: # 'Materials' diff --git a/docs/framework/react/guides/query-keys.md b/docs/framework/react/guides/query-keys.md index 4d95b09bd9..f21c87c62a 100644 --- a/docs/framework/react/guides/query-keys.md +++ b/docs/framework/react/guides/query-keys.md @@ -97,7 +97,7 @@ Note that query keys act as dependencies for your query functions. Adding depend ## Further reading -For tips on organizing Query Keys in larger applications, have a look at [Effective React Query Keys](../../community/tkdodos-blog.md#8-effective-react-query-keys) and check the [Query Key Factory Package](../../community/community-projects.md#query-key-factory) from -the Community Resources. +For tips on organizing Query Keys in larger applications, have a look at [Effective React Query Keys](https://tkdodo.eu/blog/effective-react-query-keys) and check the [Query Key Factory Package](https://github.com/lukemorales/query-key-factory) from +the [Community Resources](../../../../community-resources). [//]: # 'Materials' diff --git a/docs/framework/react/guides/render-optimizations.md b/docs/framework/react/guides/render-optimizations.md index e06dd84825..4d7ac243bf 100644 --- a/docs/framework/react/guides/render-optimizations.md +++ b/docs/framework/react/guides/render-optimizations.md @@ -72,5 +72,5 @@ export const useTodoCount = () => { ## Further Reading -For an in-depth guide about these topics, read [React Query Render Optimizations](../../community/tkdodos-blog.md#3-react-query-render-optimizations) from -the Community Resources. To learn how to best optimize the `select` option, read [React Query Selectors, Supercharged](../../community/tkdodos-blog.md#30-react-query-selectors-supercharged) +For an in-depth guide about these topics, read [React Query Render Optimizations](https://tkdodo.eu/blog/react-query-render-optimizations) from +the TkDodo. To learn how to best optimize the `select` option, read [React Query Selectors, Supercharged](https://tkdodo.eu/blog/react-query-selectors-supercharged) diff --git a/docs/framework/react/guides/testing.md b/docs/framework/react/guides/testing.md index 598d9c30cc..8228cb1b0a 100644 --- a/docs/framework/react/guides/testing.md +++ b/docs/framework/react/guides/testing.md @@ -167,5 +167,4 @@ _Note_: when using React 18, the semantics of `waitFor` have changed as noted ab ## Further reading -For additional tips and an alternative setup using `mock-service-worker`, have a look at [Testing React Query](../../community/tkdodos-blog.md#5-testing-react-query) from -the Community Resources. +For additional tips and an alternative setup using `mock-service-worker`, have a look at [this article by TkDodo on Testing React Query](https://tkdodo.eu/blog/testing-react-query). diff --git a/docs/framework/react/overview.md b/docs/framework/react/overview.md index 5ca9c1eaa4..977814c89d 100644 --- a/docs/framework/react/overview.md +++ b/docs/framework/react/overview.md @@ -97,6 +97,6 @@ function Example() { - Consider taking the official [TanStack Query Course](https://query.gg?s=tanstack) (or buying it for your whole team!) - Learn TanStack Query at your own pace with our amazingly thorough [Walkthrough Guide](../installation.md) and [API Reference](../reference/useQuery.md) -- Have a read at [Why You Want React Query](../community/tkdodos-blog.md#23-why-you-want-react-query) from the Community Resources. +- See the Article [Why You Want React Query](https://tkdodo.eu/blog/why-you-want-react-query). [//]: # 'Materials' diff --git a/docs/framework/react/reference/queryOptions.md b/docs/framework/react/reference/queryOptions.md index c62abc669b..c5360510fb 100644 --- a/docs/framework/react/reference/queryOptions.md +++ b/docs/framework/react/reference/queryOptions.md @@ -27,6 +27,6 @@ You can generally pass everything to `queryOptions` that you can also pass to [` ## Further reading -To learn more about `QueryOptions`, have a look at [The Query Options API](../../community/tkdodos-blog.md#24-the-query-options-api) from the Community Resources. +To learn more about `QueryOptions`, have a look at [this article by TkDodo The Query Options API](https://tkdodo.eu/blog/the-query-options-api). [//]: # 'Materials' diff --git a/docs/framework/react/typescript.md b/docs/framework/react/typescript.md index 59f56d3268..6407b9973b 100644 --- a/docs/framework/react/typescript.md +++ b/docs/framework/react/typescript.md @@ -275,7 +275,6 @@ Read more about it in the [Disabling Queries](../guides/disabling-queries.md) gu ## Further Reading -For tips and tricks around type inference, have a look at [React Query and TypeScript](../community/tkdodos-blog.md#6-react-query-and-typescript) from -the Community Resources. To find out how to get the best possible type-safety, you can read [Type-safe React Query](../community/tkdodos-blog.md#19-type-safe-react-query). [The Query Options API](../community/tkdodos-blog.md#24-the-query-options-api) outlines how type inference works with the `queryOptions` helper function. +For tips and tricks around type inference, see the article [React Query and TypeScript](https://tkdodo.eu/blog/react-query-and-type-script). To find out how to get the best possible type-safety, you can read [Type-safe React Query](https://tkdodo.eu/blog/type-safe-react-query). [The Query Options API](https://tkdodo.eu/blog/the-query-options-api) outlines how type inference works with the `queryOptions` helper function. [//]: # 'Materials' diff --git a/docs/framework/react/videos.md b/docs/framework/react/videos.md deleted file mode 100644 index 7d305cf084..0000000000 --- a/docs/framework/react/videos.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -id: videos -title: Videos & Talks ---- - - - -[Click here to view the Repository used for the above presentation](https://github.com/tannerlinsley/react-query-blog-refactor-example) - - - - - - - - - - - - - - diff --git a/docs/framework/solid/community/community-projects.md b/docs/framework/solid/community/community-projects.md deleted file mode 100644 index c3e5a20546..0000000000 --- a/docs/framework/solid/community/community-projects.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -id: community-projects -title: Community Projects -ref: docs/framework/react/community/community-projects.md -replace: { 'React Query': 'TanStack Query' } ---- diff --git a/docs/framework/solid/community/tkdodos-blog.md b/docs/framework/solid/community/tkdodos-blog.md deleted file mode 100644 index 16c937b2ae..0000000000 --- a/docs/framework/solid/community/tkdodos-blog.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -id: tkdodos-blog -title: TkDodo's Blog -ref: docs/framework/react/community/tkdodos-blog.md ---- diff --git a/docs/framework/vue/community/community-projects.md b/docs/framework/vue/community/community-projects.md deleted file mode 100644 index 9d3326c086..0000000000 --- a/docs/framework/vue/community/community-projects.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -id: community-projects -title: Community Projects ---- - -There are lots of community projects that build on top of Vue Query and use it to provide additional functionality or enhanced developer experience. Projects are listed in alphabetical order. If you have a project that you would like to add to this list, please open a PR! - -> Please note that these projects are entirely community maintained. If you have questions about these projects, please reach out to the project maintainers. - -## DevTools Browser Extensions - -Browser extensions for Chrome, Firefox, and Edge that provide devtools for TanStack Query, allowing you to inspect and debug queries, mutations, and cache state directly in browser DevTools. - -Links: - -- Chrome logo [Devtools for Chrome](https://chromewebstore.google.com/detail/tanstack-query-devtools/annajfchloimdhceglpgglpeepfghfai) -- Firefox logo [Devtools for Firefox](https://addons.mozilla.org/en-US/firefox/addon/tanstack-query-devtools/) -- Edge logo [Devtools for Edge](https://microsoftedge.microsoft.com/addons/detail/tanstack-query-devtools/edmdpkgkacmjopodhfolmphdenmddobj) - -## oRPC - -Easy to build APIs that are end-to-end type-safe and adhere to OpenAPI standards. - -Link: https://orpc.unnoq.com/docs/integrations/tanstack-query - -## Hey API - -The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more. - -Link: https://heyapi.dev/openapi-ts/plugins/tanstack-query - -## Query Key factory - -A library for creating typesafe standardized query keys, useful for cache management in `@tanstack/query` - -Link: https://github.com/lukemorales/query-key-factory - -## Model: Unified Data Source - -Zova provides the Model mechanism based on Vue Query in the MVC architecture, encapsulating unified data sources through Model, thereby standardizing the use of data, simplifying the code structure, and improving the maintainability of the code - -Link: https://github.com/cabloy/zova -Docs: https://zova.js.org/guide/techniques/model/introduction.html - -## Normy - -Automatic normalization and data updates for data fetching libraries - -Link: https://github.com/klis87/normy - -## Query Rewind - -Time travel and visualize state during development - -Link: https://reactqueryrewind.com/ diff --git a/docs/framework/vue/community/tkdodos-blog.md b/docs/framework/vue/community/tkdodos-blog.md deleted file mode 100644 index 16c937b2ae..0000000000 --- a/docs/framework/vue/community/tkdodos-blog.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -id: tkdodos-blog -title: TkDodo's Blog -ref: docs/framework/react/community/tkdodos-blog.md ---- diff --git a/docs/reference/QueryCache.md b/docs/reference/QueryCache.md index 2b3843cc1f..2bcf16705d 100644 --- a/docs/reference/QueryCache.md +++ b/docs/reference/QueryCache.md @@ -27,10 +27,11 @@ const query = queryCache.find(['posts']) Its available methods are: -- [`find`](#querycachefind) -- [`findAll`](#querycachefindall) -- [`subscribe`](#querycachesubscribe) -- [`clear`](#querycacheclear) +- [`queryCache.find`](#querycachefind) +- [`queryCache.findAll`](#querycachefindall) +- [`queryCache.subscribe`](#querycachesubscribe) +- [`queryCache.clear`](#querycacheclear) +- [Further reading](#further-reading) **Options** @@ -117,7 +118,6 @@ queryCache.clear() ## Further reading -To get a better understanding how the QueryCache works internally, have a look at [#18: Inside React Query -](../../framework/react/community/tkdodos-blog.md#18-inside-react-query) from the Community Resources. +To get a better understanding how the QueryCache works internally, have a look at [the Inside React Query article by TkDodo](https://tkdodo.eu/blog/inside-react-query). [//]: # 'Materials' From 2eb772cbd5c3c287ed481d9d7629f864456b4cb9 Mon Sep 17 00:00:00 2001 From: AhmadKamal049 <40216302+AhmadKamal049@users.noreply.github.com> Date: Sat, 8 Nov 2025 11:50:06 -0500 Subject: [PATCH 3/8] docs: Rename Todo component to BlogPost (#9853) --- docs/framework/react/guides/placeholder-query-data.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/framework/react/guides/placeholder-query-data.md b/docs/framework/react/guides/placeholder-query-data.md index d19d17872a..ac11c0757a 100644 --- a/docs/framework/react/guides/placeholder-query-data.md +++ b/docs/framework/react/guides/placeholder-query-data.md @@ -75,7 +75,7 @@ In some circumstances, you may be able to provide the placeholder data for a que [//]: # 'ExampleCache' ```tsx -function Todo({ blogPostId }) { +function BlogPost({ blogPostId }) { const queryClient = useQueryClient() const result = useQuery({ queryKey: ['blogPost', blogPostId], From 7bc954392887d8ba7e253d3fc4c5c06aba723e33 Mon Sep 17 00:00:00 2001 From: Wonsuk Choi Date: Sun, 9 Nov 2025 01:51:03 +0900 Subject: [PATCH 4/8] test(react-query-persist-client/use-queries-with-persist): switch to fake timers, replace 'waitFor' with 'vi.advanceTimersByTimeAsync', and replace 'setTimeout' with 'sleep' (#9850) --- .../use-queries-with-persist.test.tsx | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/packages/react-query-persist-client/src/__tests__/use-queries-with-persist.test.tsx b/packages/react-query-persist-client/src/__tests__/use-queries-with-persist.test.tsx index e8fae6d785..95b628ec6e 100644 --- a/packages/react-query-persist-client/src/__tests__/use-queries-with-persist.test.tsx +++ b/packages/react-query-persist-client/src/__tests__/use-queries-with-persist.test.tsx @@ -1,7 +1,8 @@ -import { afterEach, beforeEach, describe, expect, it } from 'vitest' -import { render, waitFor } from '@testing-library/react' +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' +import { act, render } from '@testing-library/react' import * as React from 'react' import { QueryClient, useQueries } from '@tanstack/react-query' +import { sleep } from '@tanstack/query-test-utils' import { PersistQueryClientProvider } from '@tanstack/react-query-persist-client' import type { PersistedClient, @@ -13,6 +14,7 @@ describe('useQueries with persist and memoized combine', () => { const storage: { [key: string]: string } = {} beforeEach(() => { + vi.useFakeTimers() Object.defineProperty(window, 'localStorage', { value: { getItem: (key: string) => storage[key] || null, @@ -31,6 +33,7 @@ describe('useQueries with persist and memoized combine', () => { }) afterEach(() => { + vi.useRealTimers() Object.keys(storage).forEach((key) => delete storage[key]) }) @@ -51,10 +54,9 @@ describe('useQueries with persist and memoized combine', () => { }, restoreClient: async () => { const stored = storage['REACT_QUERY_OFFLINE_CACHE'] - if (stored) { - await new Promise((resolve) => setTimeout(resolve, 10)) - return JSON.parse(stored) as PersistedClient - } + if (stored) + return sleep(10).then(() => JSON.parse(stored) as PersistedClient) + return undefined }, removeClient: () => { @@ -95,7 +97,7 @@ describe('useQueries with persist and memoized combine', () => { const combinedQueries = useQueries({ queries: [1, 2, 3].map((id) => ({ queryKey: ['post', id], - queryFn: () => Promise.resolve(id), + queryFn: () => sleep(100).then(() => id), staleTime: 30_000, })), combine: React.useCallback( @@ -126,9 +128,9 @@ describe('useQueries with persist and memoized combine', () => { , ) - await waitFor(() => { - expect(getByTestId('pending').textContent).toBe('false') - expect(getByTestId('data').textContent).toBe('1,2,3') - }) + await act(() => vi.advanceTimersByTimeAsync(10)) + await act(() => vi.advanceTimersByTimeAsync(0)) + expect(getByTestId('pending').textContent).toBe('false') + expect(getByTestId('data').textContent).toBe('1,2,3') }) }) From c0ec9fe0d1426fe3f233adda3ebf23989ffaa110 Mon Sep 17 00:00:00 2001 From: Josiah Nunemaker Date: Sat, 8 Nov 2025 11:53:09 -0500 Subject: [PATCH 5/8] fix(query-core): allow partial query keys in `QueryFilters` (#9686) * fix(query-core): allow partial query keys in `QueryFilters` and `MutationFilters` Add a type to match tuple prefixes to match partial query keys in `QueryFilters` and `MutationFilters` Fixes tanstack/query#9680 * test(query-core): add tests for partial QueryKey matching for `QueryFilters` add tests to verify that the new partial QueryKey matching for `QueryFilters` does match partial query keys, and also doesn't allow invalid query keys. * fix(query-core): move tuple prefix helper types to utils.ts prevent tuple helper types from getting exported, and showing up in the public api * Add changeset * ci: apply automated fixes --------- Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> --- .changeset/wise-numbers-double.md | 5 ++++ .../query-core/src/__tests__/utils.test-d.tsx | 29 +++++++++++++++++-- packages/query-core/src/utils.ts | 15 ++++++++-- 3 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 .changeset/wise-numbers-double.md diff --git a/.changeset/wise-numbers-double.md b/.changeset/wise-numbers-double.md new file mode 100644 index 0000000000..cd87bca9b1 --- /dev/null +++ b/.changeset/wise-numbers-double.md @@ -0,0 +1,5 @@ +--- +'@tanstack/query-core': patch +--- + +fix: allow partial query keys in `QueryFilters` diff --git a/packages/query-core/src/__tests__/utils.test-d.tsx b/packages/query-core/src/__tests__/utils.test-d.tsx index 03a7aebad3..3aacc61b81 100644 --- a/packages/query-core/src/__tests__/utils.test-d.tsx +++ b/packages/query-core/src/__tests__/utils.test-d.tsx @@ -1,4 +1,4 @@ -import { describe, expectTypeOf, it } from 'vitest' +import { assertType, describe, expectTypeOf, it } from 'vitest' import { QueryClient } from '../queryClient' import type { QueryFilters } from '../utils' import type { DataTag, QueryKey } from '../types' @@ -35,11 +35,36 @@ describe('QueryFilters', () => { } const queryClient = new QueryClient() - const data = queryClient.getQueryData(a.queryKey!) expectTypeOf(data).toEqualTypeOf() const error = queryClient.getQueryState(a.queryKey!)?.error expectTypeOf(error).toEqualTypeOf() }) + + it('should allow a partial query key to be passed', () => { + const filters: QueryFilters = { + queryKey: ['key'], + } + + expectTypeOf(filters.queryKey).toEqualTypeOf< + | undefined + | readonly [] + | ['key'] + | readonly [ + 'key', + { + a: number + b: string + }, + ] + >() + }) + + it('should error on invalid query keys', () => { + assertType>({ + // @ts-expect-error cannot pass invalid query key + queryKey: ['invalid', { a: 1, b: '1' }], + }) + }) }) diff --git a/packages/query-core/src/utils.ts b/packages/query-core/src/utils.ts index 2b46cc1c74..1be53edd2d 100644 --- a/packages/query-core/src/utils.ts +++ b/packages/query-core/src/utils.ts @@ -16,6 +16,17 @@ import type { FetchOptions, Query } from './query' // TYPES +type DropLast> = T extends readonly [ + ...infer R, + unknown, +] + ? R + : never + +type TuplePrefixes> = T extends readonly [] + ? readonly [] + : TuplePrefixes> | T + export interface QueryFilters { /** * Filter to active queries, inactive queries or all queries @@ -32,7 +43,7 @@ export interface QueryFilters { /** * Include queries matching this query key */ - queryKey?: TQueryKey + queryKey?: TuplePrefixes /** * Include or exclude stale queries */ @@ -62,7 +73,7 @@ export interface MutationFilters< /** * Include mutations matching this mutation key */ - mutationKey?: MutationKey + mutationKey?: TuplePrefixes /** * Filter by mutation status */ From f7c952613a049bae93bb9521352dc362a7d3bddd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 8 Nov 2025 18:17:47 +0000 Subject: [PATCH 6/8] ci: Version Packages (#9854) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/wise-numbers-double.md | 5 ----- examples/angular/auto-refetching/package.json | 2 +- examples/angular/basic-persister/package.json | 6 +++--- examples/angular/basic/package.json | 2 +- examples/angular/devtools-panel/package.json | 2 +- .../angular/infinite-query-with-max-pages/package.json | 2 +- examples/angular/optimistic-updates/package.json | 2 +- examples/angular/pagination/package.json | 2 +- .../angular/query-options-from-a-service/package.json | 2 +- examples/angular/router/package.json | 2 +- examples/angular/rxjs/package.json | 2 +- examples/angular/simple/package.json | 2 +- examples/react/algolia/package.json | 2 +- examples/react/auto-refetching/package.json | 2 +- examples/react/basic-graphql-request/package.json | 2 +- examples/react/basic/package.json | 6 +++--- examples/react/chat/package.json | 2 +- examples/react/default-query-function/package.json | 2 +- examples/react/devtools-panel/package.json | 2 +- examples/react/eslint-legacy/package.json | 6 +++--- examples/react/infinite-query-with-max-pages/package.json | 2 +- examples/react/load-more-infinite-scroll/package.json | 2 +- examples/react/nextjs-app-prefetching/package.json | 2 +- examples/react/nextjs-suspense-streaming/package.json | 2 +- examples/react/nextjs/package.json | 2 +- examples/react/offline/package.json | 6 +++--- examples/react/optimistic-updates-cache/package.json | 2 +- examples/react/optimistic-updates-ui/package.json | 2 +- examples/react/pagination/package.json | 2 +- examples/react/playground/package.json | 2 +- examples/react/prefetching/package.json | 2 +- examples/react/react-native/package.json | 2 +- examples/react/react-router/package.json | 2 +- examples/react/rick-morty/package.json | 2 +- examples/react/shadow-dom/package.json | 2 +- examples/react/simple/package.json | 2 +- examples/react/star-wars/package.json | 2 +- examples/react/suspense/package.json | 2 +- examples/solid/astro/package.json | 2 +- examples/solid/basic-graphql-request/package.json | 2 +- examples/solid/basic/package.json | 2 +- examples/solid/default-query-function/package.json | 2 +- examples/solid/simple/package.json | 2 +- examples/solid/solid-start-streaming/package.json | 2 +- examples/svelte/auto-refetching/package.json | 2 +- examples/svelte/basic/package.json | 6 +++--- examples/svelte/load-more-infinite-scroll/package.json | 2 +- examples/svelte/optimistic-updates/package.json | 2 +- examples/svelte/playground/package.json | 2 +- examples/svelte/simple/package.json | 2 +- examples/svelte/ssr/package.json | 2 +- examples/svelte/star-wars/package.json | 2 +- examples/vue/basic/package.json | 2 +- examples/vue/dependent-queries/package.json | 2 +- examples/vue/persister/package.json | 8 ++++---- examples/vue/simple/package.json | 2 +- integrations/angular-cli-20/package.json | 2 +- packages/angular-query-experimental/CHANGELOG.md | 7 +++++++ packages/angular-query-experimental/package.json | 2 +- packages/angular-query-persist-client/CHANGELOG.md | 8 ++++++++ packages/angular-query-persist-client/package.json | 2 +- packages/query-async-storage-persister/CHANGELOG.md | 8 ++++++++ packages/query-async-storage-persister/package.json | 2 +- packages/query-broadcast-client-experimental/CHANGELOG.md | 7 +++++++ packages/query-broadcast-client-experimental/package.json | 2 +- packages/query-core/CHANGELOG.md | 6 ++++++ packages/query-core/package.json | 2 +- packages/query-persist-client-core/CHANGELOG.md | 7 +++++++ packages/query-persist-client-core/package.json | 2 +- packages/query-sync-storage-persister/CHANGELOG.md | 8 ++++++++ packages/query-sync-storage-persister/package.json | 2 +- packages/react-query-persist-client/CHANGELOG.md | 8 ++++++++ packages/react-query-persist-client/package.json | 2 +- packages/react-query/CHANGELOG.md | 7 +++++++ packages/react-query/package.json | 2 +- packages/solid-query-persist-client/CHANGELOG.md | 8 ++++++++ packages/solid-query-persist-client/package.json | 2 +- packages/solid-query/CHANGELOG.md | 7 +++++++ packages/solid-query/package.json | 2 +- packages/svelte-query-persist-client/CHANGELOG.md | 8 ++++++++ packages/svelte-query-persist-client/package.json | 2 +- packages/svelte-query/CHANGELOG.md | 7 +++++++ packages/svelte-query/package.json | 2 +- packages/vue-query/CHANGELOG.md | 7 +++++++ packages/vue-query/package.json | 2 +- pnpm-lock.yaml | 2 +- 86 files changed, 187 insertions(+), 89 deletions(-) delete mode 100644 .changeset/wise-numbers-double.md diff --git a/.changeset/wise-numbers-double.md b/.changeset/wise-numbers-double.md deleted file mode 100644 index cd87bca9b1..0000000000 --- a/.changeset/wise-numbers-double.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/query-core': patch ---- - -fix: allow partial query keys in `QueryFilters` diff --git a/examples/angular/auto-refetching/package.json b/examples/angular/auto-refetching/package.json index 6fbf37ef91..c7c6fc6252 100644 --- a/examples/angular/auto-refetching/package.json +++ b/examples/angular/auto-refetching/package.json @@ -13,7 +13,7 @@ "@angular/compiler": "^20.0.0", "@angular/core": "^20.0.0", "@angular/platform-browser": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.9", + "@tanstack/angular-query-experimental": "^5.90.10", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "0.15.0" diff --git a/examples/angular/basic-persister/package.json b/examples/angular/basic-persister/package.json index 6cfa232576..eab72c888a 100644 --- a/examples/angular/basic-persister/package.json +++ b/examples/angular/basic-persister/package.json @@ -13,9 +13,9 @@ "@angular/compiler": "^20.0.0", "@angular/core": "^20.0.0", "@angular/platform-browser": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.9", - "@tanstack/angular-query-persist-client": "^5.62.14", - "@tanstack/query-async-storage-persister": "^5.90.9", + "@tanstack/angular-query-experimental": "^5.90.10", + "@tanstack/angular-query-persist-client": "^5.62.15", + "@tanstack/query-async-storage-persister": "^5.90.10", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "0.15.0" diff --git a/examples/angular/basic/package.json b/examples/angular/basic/package.json index 5604d77050..0edf6dbc3b 100644 --- a/examples/angular/basic/package.json +++ b/examples/angular/basic/package.json @@ -13,7 +13,7 @@ "@angular/compiler": "^20.0.0", "@angular/core": "^20.0.0", "@angular/platform-browser": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.9", + "@tanstack/angular-query-experimental": "^5.90.10", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "0.15.0" diff --git a/examples/angular/devtools-panel/package.json b/examples/angular/devtools-panel/package.json index 96e32b4f22..583e637d06 100644 --- a/examples/angular/devtools-panel/package.json +++ b/examples/angular/devtools-panel/package.json @@ -14,7 +14,7 @@ "@angular/core": "^20.0.0", "@angular/platform-browser": "^20.0.0", "@angular/router": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.9", + "@tanstack/angular-query-experimental": "^5.90.10", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "0.15.0" diff --git a/examples/angular/infinite-query-with-max-pages/package.json b/examples/angular/infinite-query-with-max-pages/package.json index c3cc933b07..04453e5f0e 100644 --- a/examples/angular/infinite-query-with-max-pages/package.json +++ b/examples/angular/infinite-query-with-max-pages/package.json @@ -13,7 +13,7 @@ "@angular/compiler": "^20.0.0", "@angular/core": "^20.0.0", "@angular/platform-browser": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.9", + "@tanstack/angular-query-experimental": "^5.90.10", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "0.15.0" diff --git a/examples/angular/optimistic-updates/package.json b/examples/angular/optimistic-updates/package.json index 12ca880f67..2827c51e26 100644 --- a/examples/angular/optimistic-updates/package.json +++ b/examples/angular/optimistic-updates/package.json @@ -14,7 +14,7 @@ "@angular/core": "^20.0.0", "@angular/forms": "^20.0.0", "@angular/platform-browser": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.9", + "@tanstack/angular-query-experimental": "^5.90.10", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "0.15.0" diff --git a/examples/angular/pagination/package.json b/examples/angular/pagination/package.json index 20368fa9ff..240d33f269 100644 --- a/examples/angular/pagination/package.json +++ b/examples/angular/pagination/package.json @@ -13,7 +13,7 @@ "@angular/compiler": "^20.0.0", "@angular/core": "^20.0.0", "@angular/platform-browser": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.9", + "@tanstack/angular-query-experimental": "^5.90.10", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "0.15.0" diff --git a/examples/angular/query-options-from-a-service/package.json b/examples/angular/query-options-from-a-service/package.json index 90faaf5694..2887b389fc 100644 --- a/examples/angular/query-options-from-a-service/package.json +++ b/examples/angular/query-options-from-a-service/package.json @@ -14,7 +14,7 @@ "@angular/core": "^20.0.0", "@angular/platform-browser": "^20.0.0", "@angular/router": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.9", + "@tanstack/angular-query-experimental": "^5.90.10", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "0.15.0" diff --git a/examples/angular/router/package.json b/examples/angular/router/package.json index b50afce7a4..a90e8d555d 100644 --- a/examples/angular/router/package.json +++ b/examples/angular/router/package.json @@ -14,7 +14,7 @@ "@angular/core": "^20.0.0", "@angular/platform-browser": "^20.0.0", "@angular/router": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.9", + "@tanstack/angular-query-experimental": "^5.90.10", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "0.15.0" diff --git a/examples/angular/rxjs/package.json b/examples/angular/rxjs/package.json index 264921c427..f053f17f5a 100644 --- a/examples/angular/rxjs/package.json +++ b/examples/angular/rxjs/package.json @@ -14,7 +14,7 @@ "@angular/core": "^20.0.0", "@angular/forms": "^20.0.0", "@angular/platform-browser": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.9", + "@tanstack/angular-query-experimental": "^5.90.10", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "0.15.0" diff --git a/examples/angular/simple/package.json b/examples/angular/simple/package.json index 791a0bf15d..71934e8179 100644 --- a/examples/angular/simple/package.json +++ b/examples/angular/simple/package.json @@ -13,7 +13,7 @@ "@angular/compiler": "^20.0.0", "@angular/core": "^20.0.0", "@angular/platform-browser": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.9", + "@tanstack/angular-query-experimental": "^5.90.10", "rxjs": "^7.8.2", "tslib": "^2.8.1", "zone.js": "0.15.0" diff --git a/examples/react/algolia/package.json b/examples/react/algolia/package.json index b7b3e11d04..51637f8c8a 100644 --- a/examples/react/algolia/package.json +++ b/examples/react/algolia/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@algolia/client-search": "5.2.1", - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "react": "^19.0.0", "react-dom": "^19.0.0" diff --git a/examples/react/auto-refetching/package.json b/examples/react/auto-refetching/package.json index 04d777fa6c..86003b6f7c 100644 --- a/examples/react/auto-refetching/package.json +++ b/examples/react/auto-refetching/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "next": "^15.3.1", "react": "^18.2.0", diff --git a/examples/react/basic-graphql-request/package.json b/examples/react/basic-graphql-request/package.json index 6f8fbc8392..200b462148 100644 --- a/examples/react/basic-graphql-request/package.json +++ b/examples/react/basic-graphql-request/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "graphql": "^16.9.0", "graphql-request": "^7.1.2", diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json index 777ce74cd3..d8ab8d87ff 100644 --- a/examples/react/basic/package.json +++ b/examples/react/basic/package.json @@ -9,10 +9,10 @@ "test:eslint": "eslint ./src" }, "dependencies": { - "@tanstack/query-async-storage-persister": "^5.90.9", - "@tanstack/react-query": "^5.90.7", + "@tanstack/query-async-storage-persister": "^5.90.10", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", - "@tanstack/react-query-persist-client": "^5.90.9", + "@tanstack/react-query-persist-client": "^5.90.10", "react": "^19.0.0", "react-dom": "^19.0.0" }, diff --git a/examples/react/chat/package.json b/examples/react/chat/package.json index 90354ebaf8..a316cf1e83 100644 --- a/examples/react/chat/package.json +++ b/examples/react/chat/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "react": "^19.0.0", "react-dom": "^19.0.0" diff --git a/examples/react/default-query-function/package.json b/examples/react/default-query-function/package.json index 0bba649530..d0d6262de9 100644 --- a/examples/react/default-query-function/package.json +++ b/examples/react/default-query-function/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "react": "^19.0.0", "react-dom": "^19.0.0" diff --git a/examples/react/devtools-panel/package.json b/examples/react/devtools-panel/package.json index c5fd8a5ac8..3c076563d8 100644 --- a/examples/react/devtools-panel/package.json +++ b/examples/react/devtools-panel/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "react": "^19.0.0", "react-dom": "^19.0.0" diff --git a/examples/react/eslint-legacy/package.json b/examples/react/eslint-legacy/package.json index 025ae2d746..6a2d9b021b 100644 --- a/examples/react/eslint-legacy/package.json +++ b/examples/react/eslint-legacy/package.json @@ -9,10 +9,10 @@ "test:eslint": "ESLINT_USE_FLAT_CONFIG=false eslint ./src/**/*.tsx" }, "dependencies": { - "@tanstack/query-async-storage-persister": "^5.90.9", - "@tanstack/react-query": "^5.90.7", + "@tanstack/query-async-storage-persister": "^5.90.10", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", - "@tanstack/react-query-persist-client": "^5.90.9", + "@tanstack/react-query-persist-client": "^5.90.10", "react": "^19.0.0", "react-dom": "^19.0.0" }, diff --git a/examples/react/infinite-query-with-max-pages/package.json b/examples/react/infinite-query-with-max-pages/package.json index d6f4151ed4..aa0460181f 100644 --- a/examples/react/infinite-query-with-max-pages/package.json +++ b/examples/react/infinite-query-with-max-pages/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "next": "^15.3.1", "react": "^18.2.0", diff --git a/examples/react/load-more-infinite-scroll/package.json b/examples/react/load-more-infinite-scroll/package.json index 3c6c2220fe..a78c4b095a 100644 --- a/examples/react/load-more-infinite-scroll/package.json +++ b/examples/react/load-more-infinite-scroll/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "next": "^15.3.1", "react": "^18.2.0", diff --git a/examples/react/nextjs-app-prefetching/package.json b/examples/react/nextjs-app-prefetching/package.json index 7528921463..a7049f3576 100644 --- a/examples/react/nextjs-app-prefetching/package.json +++ b/examples/react/nextjs-app-prefetching/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "next": "^15.3.1", "react": "^19.0.0", diff --git a/examples/react/nextjs-suspense-streaming/package.json b/examples/react/nextjs-suspense-streaming/package.json index c508323080..cdabcf4110 100644 --- a/examples/react/nextjs-suspense-streaming/package.json +++ b/examples/react/nextjs-suspense-streaming/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "@tanstack/react-query-next-experimental": "^5.90.2", "next": "^15.3.1", diff --git a/examples/react/nextjs/package.json b/examples/react/nextjs/package.json index c13c6a9c9f..cc05d24d24 100644 --- a/examples/react/nextjs/package.json +++ b/examples/react/nextjs/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "next": "^15.3.1", "react": "^18.2.0", diff --git a/examples/react/offline/package.json b/examples/react/offline/package.json index 33f3d17f48..bbe8a026b2 100644 --- a/examples/react/offline/package.json +++ b/examples/react/offline/package.json @@ -8,11 +8,11 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/query-async-storage-persister": "^5.90.9", + "@tanstack/query-async-storage-persister": "^5.90.10", "@tanstack/react-location": "^3.7.4", - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", - "@tanstack/react-query-persist-client": "^5.90.9", + "@tanstack/react-query-persist-client": "^5.90.10", "msw": "^2.6.6", "react": "^19.0.0", "react-dom": "^19.0.0", diff --git a/examples/react/optimistic-updates-cache/package.json b/examples/react/optimistic-updates-cache/package.json index f4cc46606d..d03d8e9ea6 100755 --- a/examples/react/optimistic-updates-cache/package.json +++ b/examples/react/optimistic-updates-cache/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "next": "^15.3.1", "react": "^18.2.0", diff --git a/examples/react/optimistic-updates-ui/package.json b/examples/react/optimistic-updates-ui/package.json index caaa9affb3..d303dc492b 100755 --- a/examples/react/optimistic-updates-ui/package.json +++ b/examples/react/optimistic-updates-ui/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "next": "^15.3.1", "react": "^18.2.0", diff --git a/examples/react/pagination/package.json b/examples/react/pagination/package.json index fcb258680b..b75c057744 100644 --- a/examples/react/pagination/package.json +++ b/examples/react/pagination/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "next": "^15.3.1", "react": "^18.2.0", diff --git a/examples/react/playground/package.json b/examples/react/playground/package.json index f6b40b2d11..994abfc322 100644 --- a/examples/react/playground/package.json +++ b/examples/react/playground/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "react": "^19.0.0", "react-dom": "^19.0.0" diff --git a/examples/react/prefetching/package.json b/examples/react/prefetching/package.json index 61ef1c55d3..bc80c8ce1a 100644 --- a/examples/react/prefetching/package.json +++ b/examples/react/prefetching/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "next": "^15.3.1", "react": "^18.2.0", diff --git a/examples/react/react-native/package.json b/examples/react/react-native/package.json index bedc9d0853..86077fa4fd 100644 --- a/examples/react/react-native/package.json +++ b/examples/react/react-native/package.json @@ -14,7 +14,7 @@ "@react-native-community/netinfo": "^11.4.1", "@react-navigation/native": "^6.1.18", "@react-navigation/stack": "^6.4.1", - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "expo": "^52.0.11", "expo-constants": "^17.0.3", diff --git a/examples/react/react-router/package.json b/examples/react/react-router/package.json index f525f3299c..e5c49ff77e 100644 --- a/examples/react/react-router/package.json +++ b/examples/react/react-router/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "localforage": "^1.10.0", "match-sorter": "^6.3.4", diff --git a/examples/react/rick-morty/package.json b/examples/react/rick-morty/package.json index 1657df35d3..f82ef9ae16 100644 --- a/examples/react/rick-morty/package.json +++ b/examples/react/rick-morty/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "react": "^19.0.0", "react-dom": "^19.0.0", diff --git a/examples/react/shadow-dom/package.json b/examples/react/shadow-dom/package.json index 1af70d1375..6115ecc12c 100644 --- a/examples/react/shadow-dom/package.json +++ b/examples/react/shadow-dom/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "react": "^19.0.0", "react-dom": "^19.0.0" diff --git a/examples/react/simple/package.json b/examples/react/simple/package.json index 3b3d18716d..aa085e237c 100644 --- a/examples/react/simple/package.json +++ b/examples/react/simple/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "react": "^19.0.0", "react-dom": "^19.0.0" diff --git a/examples/react/star-wars/package.json b/examples/react/star-wars/package.json index 0b7d102b68..35ea6efbba 100644 --- a/examples/react/star-wars/package.json +++ b/examples/react/star-wars/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "react": "^19.0.0", "react-dom": "^19.0.0", diff --git a/examples/react/suspense/package.json b/examples/react/suspense/package.json index 4948d1a339..1f6456eaba 100644 --- a/examples/react/suspense/package.json +++ b/examples/react/suspense/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/react-query": "^5.90.7", + "@tanstack/react-query": "^5.90.8", "@tanstack/react-query-devtools": "^5.90.2", "font-awesome": "^4.7.0", "react": "^19.0.0", diff --git a/examples/solid/astro/package.json b/examples/solid/astro/package.json index 2f9fbea5a8..c72a706ece 100644 --- a/examples/solid/astro/package.json +++ b/examples/solid/astro/package.json @@ -15,7 +15,7 @@ "@astrojs/solid-js": "^5.0.7", "@astrojs/tailwind": "^6.0.2", "@astrojs/vercel": "^8.1.3", - "@tanstack/solid-query": "^5.90.10", + "@tanstack/solid-query": "^5.90.11", "@tanstack/solid-query-devtools": "^5.90.4", "astro": "^5.5.6", "solid-js": "^1.9.7", diff --git a/examples/solid/basic-graphql-request/package.json b/examples/solid/basic-graphql-request/package.json index 85fc428ed8..424753fa4c 100644 --- a/examples/solid/basic-graphql-request/package.json +++ b/examples/solid/basic-graphql-request/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/solid-query": "^5.90.10", + "@tanstack/solid-query": "^5.90.11", "@tanstack/solid-query-devtools": "^5.90.4", "graphql": "^16.9.0", "graphql-request": "^7.1.2", diff --git a/examples/solid/basic/package.json b/examples/solid/basic/package.json index 873b7a12cb..42c9647904 100644 --- a/examples/solid/basic/package.json +++ b/examples/solid/basic/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/solid-query": "^5.90.10", + "@tanstack/solid-query": "^5.90.11", "@tanstack/solid-query-devtools": "^5.90.4", "solid-js": "^1.9.7" }, diff --git a/examples/solid/default-query-function/package.json b/examples/solid/default-query-function/package.json index 68e5088a1b..85c303c652 100644 --- a/examples/solid/default-query-function/package.json +++ b/examples/solid/default-query-function/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/solid-query": "^5.90.10", + "@tanstack/solid-query": "^5.90.11", "@tanstack/solid-query-devtools": "^5.90.4", "solid-js": "^1.9.7" }, diff --git a/examples/solid/simple/package.json b/examples/solid/simple/package.json index 8fcfe1f97a..0f3a91d04d 100644 --- a/examples/solid/simple/package.json +++ b/examples/solid/simple/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/solid-query": "^5.90.10", + "@tanstack/solid-query": "^5.90.11", "@tanstack/solid-query-devtools": "^5.90.4", "solid-js": "^1.9.7" }, diff --git a/examples/solid/solid-start-streaming/package.json b/examples/solid/solid-start-streaming/package.json index 15cddba5f3..9d10d16f76 100644 --- a/examples/solid/solid-start-streaming/package.json +++ b/examples/solid/solid-start-streaming/package.json @@ -12,7 +12,7 @@ "@solidjs/meta": "^0.29.4", "@solidjs/router": "^0.15.3", "@solidjs/start": "^1.1.3", - "@tanstack/solid-query": "^5.90.10", + "@tanstack/solid-query": "^5.90.11", "@tanstack/solid-query-devtools": "^5.90.4", "solid-js": "^1.9.7", "vinxi": "^0.5.3" diff --git a/examples/svelte/auto-refetching/package.json b/examples/svelte/auto-refetching/package.json index 8f128abe38..a7e5e3612a 100644 --- a/examples/svelte/auto-refetching/package.json +++ b/examples/svelte/auto-refetching/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/svelte-query": "^6.0.5", + "@tanstack/svelte-query": "^6.0.6", "@tanstack/svelte-query-devtools": "^6.0.0" }, "devDependencies": { diff --git a/examples/svelte/basic/package.json b/examples/svelte/basic/package.json index ca4ce96f85..2d0eb26d63 100644 --- a/examples/svelte/basic/package.json +++ b/examples/svelte/basic/package.json @@ -8,10 +8,10 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/query-async-storage-persister": "^5.90.9", - "@tanstack/svelte-query": "^6.0.5", + "@tanstack/query-async-storage-persister": "^5.90.10", + "@tanstack/svelte-query": "^6.0.6", "@tanstack/svelte-query-devtools": "^6.0.0", - "@tanstack/svelte-query-persist-client": "^6.0.7" + "@tanstack/svelte-query-persist-client": "^6.0.8" }, "devDependencies": { "@sveltejs/adapter-auto": "^6.1.0", diff --git a/examples/svelte/load-more-infinite-scroll/package.json b/examples/svelte/load-more-infinite-scroll/package.json index 891b70e312..ca1dfb3842 100644 --- a/examples/svelte/load-more-infinite-scroll/package.json +++ b/examples/svelte/load-more-infinite-scroll/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/svelte-query": "^6.0.5", + "@tanstack/svelte-query": "^6.0.6", "@tanstack/svelte-query-devtools": "^6.0.0" }, "devDependencies": { diff --git a/examples/svelte/optimistic-updates/package.json b/examples/svelte/optimistic-updates/package.json index d8fcc17d4c..74564d3480 100644 --- a/examples/svelte/optimistic-updates/package.json +++ b/examples/svelte/optimistic-updates/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/svelte-query": "^6.0.5", + "@tanstack/svelte-query": "^6.0.6", "@tanstack/svelte-query-devtools": "^6.0.0" }, "devDependencies": { diff --git a/examples/svelte/playground/package.json b/examples/svelte/playground/package.json index b86a1e7cf4..2bab1e8c5b 100644 --- a/examples/svelte/playground/package.json +++ b/examples/svelte/playground/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/svelte-query": "^6.0.5", + "@tanstack/svelte-query": "^6.0.6", "@tanstack/svelte-query-devtools": "^6.0.0" }, "devDependencies": { diff --git a/examples/svelte/simple/package.json b/examples/svelte/simple/package.json index a87b0430ad..f7a135611f 100644 --- a/examples/svelte/simple/package.json +++ b/examples/svelte/simple/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/svelte-query": "^6.0.5", + "@tanstack/svelte-query": "^6.0.6", "@tanstack/svelte-query-devtools": "^6.0.0" }, "devDependencies": { diff --git a/examples/svelte/ssr/package.json b/examples/svelte/ssr/package.json index 32ec453d59..764298c536 100644 --- a/examples/svelte/ssr/package.json +++ b/examples/svelte/ssr/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/svelte-query": "^6.0.5", + "@tanstack/svelte-query": "^6.0.6", "@tanstack/svelte-query-devtools": "^6.0.0" }, "devDependencies": { diff --git a/examples/svelte/star-wars/package.json b/examples/svelte/star-wars/package.json index 64ea4b75fc..9767b8925a 100644 --- a/examples/svelte/star-wars/package.json +++ b/examples/svelte/star-wars/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/svelte-query": "^6.0.5", + "@tanstack/svelte-query": "^6.0.6", "@tanstack/svelte-query-devtools": "^6.0.0" }, "devDependencies": { diff --git a/examples/vue/basic/package.json b/examples/vue/basic/package.json index 2dd8c84c9f..1e5c1a7ff3 100644 --- a/examples/vue/basic/package.json +++ b/examples/vue/basic/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.90.7", + "@tanstack/vue-query": "^5.90.8", "@tanstack/vue-query-devtools": "^5.91.0", "vue": "^3.4.27" }, diff --git a/examples/vue/dependent-queries/package.json b/examples/vue/dependent-queries/package.json index 67b514a777..a21be37632 100644 --- a/examples/vue/dependent-queries/package.json +++ b/examples/vue/dependent-queries/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.90.7", + "@tanstack/vue-query": "^5.90.8", "vue": "^3.4.27" }, "devDependencies": { diff --git a/examples/vue/persister/package.json b/examples/vue/persister/package.json index 5df0ac28a6..43492b6325 100644 --- a/examples/vue/persister/package.json +++ b/examples/vue/persister/package.json @@ -8,10 +8,10 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/query-core": "^5.90.7", - "@tanstack/query-persist-client-core": "^5.91.6", - "@tanstack/query-sync-storage-persister": "^5.90.9", - "@tanstack/vue-query": "^5.90.7", + "@tanstack/query-core": "^5.90.8", + "@tanstack/query-persist-client-core": "^5.91.7", + "@tanstack/query-sync-storage-persister": "^5.90.10", + "@tanstack/vue-query": "^5.90.8", "idb-keyval": "^6.2.1", "vue": "^3.4.27" }, diff --git a/examples/vue/simple/package.json b/examples/vue/simple/package.json index 31a101818d..b9623c5d05 100644 --- a/examples/vue/simple/package.json +++ b/examples/vue/simple/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.90.7", + "@tanstack/vue-query": "^5.90.8", "@tanstack/vue-query-devtools": "^5.91.0", "vue": "^3.4.27" }, diff --git a/integrations/angular-cli-20/package.json b/integrations/angular-cli-20/package.json index 329b883e5d..4754b56763 100644 --- a/integrations/angular-cli-20/package.json +++ b/integrations/angular-cli-20/package.json @@ -14,7 +14,7 @@ "@angular/forms": "^20.0.0", "@angular/platform-browser": "^20.0.0", "@angular/router": "^20.0.0", - "@tanstack/angular-query-experimental": "^5.90.9", + "@tanstack/angular-query-experimental": "^5.90.10", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.15.0" diff --git a/packages/angular-query-experimental/CHANGELOG.md b/packages/angular-query-experimental/CHANGELOG.md index b8b1af284b..33bce189cb 100644 --- a/packages/angular-query-experimental/CHANGELOG.md +++ b/packages/angular-query-experimental/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/angular-query-experimental +## 5.90.10 + +### Patch Changes + +- Updated dependencies [[`c0ec9fe`](https://github.com/TanStack/query/commit/c0ec9fe0d1426fe3f233adda3ebf23989ffaa110)]: + - @tanstack/query-core@5.90.8 + ## 5.90.9 ### Patch Changes diff --git a/packages/angular-query-experimental/package.json b/packages/angular-query-experimental/package.json index fa501df348..e796b23a90 100644 --- a/packages/angular-query-experimental/package.json +++ b/packages/angular-query-experimental/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/angular-query-experimental", - "version": "5.90.9", + "version": "5.90.10", "description": "Signals for managing, caching and syncing asynchronous and remote data in Angular", "author": "Arnoud de Vries", "license": "MIT", diff --git a/packages/angular-query-persist-client/CHANGELOG.md b/packages/angular-query-persist-client/CHANGELOG.md index 77acfc957a..d4c5e10243 100644 --- a/packages/angular-query-persist-client/CHANGELOG.md +++ b/packages/angular-query-persist-client/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/angular-query-persist-client +## 5.62.15 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/angular-query-experimental@5.90.10 + - @tanstack/query-persist-client-core@5.91.7 + ## 5.62.14 ### Patch Changes diff --git a/packages/angular-query-persist-client/package.json b/packages/angular-query-persist-client/package.json index 890be917bd..caa7eb1e6e 100644 --- a/packages/angular-query-persist-client/package.json +++ b/packages/angular-query-persist-client/package.json @@ -1,7 +1,7 @@ { "name": "@tanstack/angular-query-persist-client", "private": true, - "version": "5.62.14", + "version": "5.62.15", "description": "Angular bindings to work with persisters in TanStack/angular-query", "author": "Omer Gronich", "license": "MIT", diff --git a/packages/query-async-storage-persister/CHANGELOG.md b/packages/query-async-storage-persister/CHANGELOG.md index dc7532e15e..e78ca0118b 100644 --- a/packages/query-async-storage-persister/CHANGELOG.md +++ b/packages/query-async-storage-persister/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/query-async-storage-persister +## 5.90.10 + +### Patch Changes + +- Updated dependencies [[`c0ec9fe`](https://github.com/TanStack/query/commit/c0ec9fe0d1426fe3f233adda3ebf23989ffaa110)]: + - @tanstack/query-core@5.90.8 + - @tanstack/query-persist-client-core@5.91.7 + ## 5.90.9 ### Patch Changes diff --git a/packages/query-async-storage-persister/package.json b/packages/query-async-storage-persister/package.json index 8a3067b79f..5f6b5cc9ab 100644 --- a/packages/query-async-storage-persister/package.json +++ b/packages/query-async-storage-persister/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-async-storage-persister", - "version": "5.90.9", + "version": "5.90.10", "description": "A persister for asynchronous storages, to be used with TanStack/Query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/query-broadcast-client-experimental/CHANGELOG.md b/packages/query-broadcast-client-experimental/CHANGELOG.md index f371cc7562..f201b79172 100644 --- a/packages/query-broadcast-client-experimental/CHANGELOG.md +++ b/packages/query-broadcast-client-experimental/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/query-broadcast-client-experimental +## 5.90.8 + +### Patch Changes + +- Updated dependencies [[`c0ec9fe`](https://github.com/TanStack/query/commit/c0ec9fe0d1426fe3f233adda3ebf23989ffaa110)]: + - @tanstack/query-core@5.90.8 + ## 5.90.7 ### Patch Changes diff --git a/packages/query-broadcast-client-experimental/package.json b/packages/query-broadcast-client-experimental/package.json index 22c1c085bf..6cf0f7ca7e 100644 --- a/packages/query-broadcast-client-experimental/package.json +++ b/packages/query-broadcast-client-experimental/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-broadcast-client-experimental", - "version": "5.90.7", + "version": "5.90.8", "description": "An experimental plugin to for broadcasting the state of your queryClient between browser tabs/windows", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/query-core/CHANGELOG.md b/packages/query-core/CHANGELOG.md index 39bf563a96..a76a1bb43d 100644 --- a/packages/query-core/CHANGELOG.md +++ b/packages/query-core/CHANGELOG.md @@ -1,5 +1,11 @@ # @tanstack/query-core +## 5.90.8 + +### Patch Changes + +- fix: allow partial query keys in `QueryFilters` ([#9686](https://github.com/TanStack/query/pull/9686)) + ## 5.90.7 ### Patch Changes diff --git a/packages/query-core/package.json b/packages/query-core/package.json index 072481d583..cda1341ef8 100644 --- a/packages/query-core/package.json +++ b/packages/query-core/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-core", - "version": "5.90.7", + "version": "5.90.8", "description": "The framework agnostic core that powers TanStack Query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/query-persist-client-core/CHANGELOG.md b/packages/query-persist-client-core/CHANGELOG.md index 1a7640eebc..ec94f3f1f3 100644 --- a/packages/query-persist-client-core/CHANGELOG.md +++ b/packages/query-persist-client-core/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/query-persist-client-core +## 5.91.7 + +### Patch Changes + +- Updated dependencies [[`c0ec9fe`](https://github.com/TanStack/query/commit/c0ec9fe0d1426fe3f233adda3ebf23989ffaa110)]: + - @tanstack/query-core@5.90.8 + ## 5.91.6 ### Patch Changes diff --git a/packages/query-persist-client-core/package.json b/packages/query-persist-client-core/package.json index 09f65dcfb1..9ca3129347 100644 --- a/packages/query-persist-client-core/package.json +++ b/packages/query-persist-client-core/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-persist-client-core", - "version": "5.91.6", + "version": "5.91.7", "description": "Set of utilities for interacting with persisters, which can save your queryClient for later use", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/query-sync-storage-persister/CHANGELOG.md b/packages/query-sync-storage-persister/CHANGELOG.md index 96659f9b45..2b4e3ef8b4 100644 --- a/packages/query-sync-storage-persister/CHANGELOG.md +++ b/packages/query-sync-storage-persister/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/query-sync-storage-persister +## 5.90.10 + +### Patch Changes + +- Updated dependencies [[`c0ec9fe`](https://github.com/TanStack/query/commit/c0ec9fe0d1426fe3f233adda3ebf23989ffaa110)]: + - @tanstack/query-core@5.90.8 + - @tanstack/query-persist-client-core@5.91.7 + ## 5.90.9 ### Patch Changes diff --git a/packages/query-sync-storage-persister/package.json b/packages/query-sync-storage-persister/package.json index af33cd187c..8e8362de3a 100644 --- a/packages/query-sync-storage-persister/package.json +++ b/packages/query-sync-storage-persister/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/query-sync-storage-persister", - "version": "5.90.9", + "version": "5.90.10", "description": "A persister for synchronous storages, to be used with TanStack/Query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/react-query-persist-client/CHANGELOG.md b/packages/react-query-persist-client/CHANGELOG.md index 348565f7fe..7677e90d87 100644 --- a/packages/react-query-persist-client/CHANGELOG.md +++ b/packages/react-query-persist-client/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/react-query-persist-client +## 5.90.10 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/query-persist-client-core@5.91.7 + - @tanstack/react-query@5.90.8 + ## 5.90.9 ### Patch Changes diff --git a/packages/react-query-persist-client/package.json b/packages/react-query-persist-client/package.json index d981fc6ea1..79b97ab81b 100644 --- a/packages/react-query-persist-client/package.json +++ b/packages/react-query-persist-client/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-query-persist-client", - "version": "5.90.9", + "version": "5.90.10", "description": "React bindings to work with persisters in TanStack/react-query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/react-query/CHANGELOG.md b/packages/react-query/CHANGELOG.md index 199c48422e..2b4ad3f78e 100644 --- a/packages/react-query/CHANGELOG.md +++ b/packages/react-query/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/react-query +## 5.90.8 + +### Patch Changes + +- Updated dependencies [[`c0ec9fe`](https://github.com/TanStack/query/commit/c0ec9fe0d1426fe3f233adda3ebf23989ffaa110)]: + - @tanstack/query-core@5.90.8 + ## 5.90.7 ### Patch Changes diff --git a/packages/react-query/package.json b/packages/react-query/package.json index 44262abed1..5fdd568f23 100644 --- a/packages/react-query/package.json +++ b/packages/react-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-query", - "version": "5.90.7", + "version": "5.90.8", "description": "Hooks for managing, caching and syncing asynchronous and remote data in React", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/solid-query-persist-client/CHANGELOG.md b/packages/solid-query-persist-client/CHANGELOG.md index 8095105282..e2f63c042f 100644 --- a/packages/solid-query-persist-client/CHANGELOG.md +++ b/packages/solid-query-persist-client/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/solid-query-persist-client +## 5.90.11 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/query-persist-client-core@5.91.7 + - @tanstack/solid-query@5.90.11 + ## 5.90.10 ### Patch Changes diff --git a/packages/solid-query-persist-client/package.json b/packages/solid-query-persist-client/package.json index 16843c61ee..e09812a1f4 100644 --- a/packages/solid-query-persist-client/package.json +++ b/packages/solid-query-persist-client/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/solid-query-persist-client", - "version": "5.90.10", + "version": "5.90.11", "description": "Solid.js bindings to work with persisters in TanStack/solid-query", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/solid-query/CHANGELOG.md b/packages/solid-query/CHANGELOG.md index 55ff2bda9b..2f8043f92e 100644 --- a/packages/solid-query/CHANGELOG.md +++ b/packages/solid-query/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/solid-query +## 5.90.11 + +### Patch Changes + +- Updated dependencies [[`c0ec9fe`](https://github.com/TanStack/query/commit/c0ec9fe0d1426fe3f233adda3ebf23989ffaa110)]: + - @tanstack/query-core@5.90.8 + ## 5.90.10 ### Patch Changes diff --git a/packages/solid-query/package.json b/packages/solid-query/package.json index 50be78014a..81f6270c33 100644 --- a/packages/solid-query/package.json +++ b/packages/solid-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/solid-query", - "version": "5.90.10", + "version": "5.90.11", "description": "Primitives for managing, caching and syncing asynchronous and remote data in Solid", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/svelte-query-persist-client/CHANGELOG.md b/packages/svelte-query-persist-client/CHANGELOG.md index ed2c1be862..3545f6d114 100644 --- a/packages/svelte-query-persist-client/CHANGELOG.md +++ b/packages/svelte-query-persist-client/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/svelte-query-persist-client +## 6.0.8 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/query-persist-client-core@5.91.7 + - @tanstack/svelte-query@6.0.6 + ## 6.0.7 ### Patch Changes diff --git a/packages/svelte-query-persist-client/package.json b/packages/svelte-query-persist-client/package.json index 9eb8b129f6..5c817559cd 100644 --- a/packages/svelte-query-persist-client/package.json +++ b/packages/svelte-query-persist-client/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/svelte-query-persist-client", - "version": "6.0.7", + "version": "6.0.8", "description": "Svelte bindings to work with persisters in TanStack/svelte-query", "author": "Lachlan Collins", "license": "MIT", diff --git a/packages/svelte-query/CHANGELOG.md b/packages/svelte-query/CHANGELOG.md index 87912e3519..546df08629 100644 --- a/packages/svelte-query/CHANGELOG.md +++ b/packages/svelte-query/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/svelte-query +## 6.0.6 + +### Patch Changes + +- Updated dependencies [[`c0ec9fe`](https://github.com/TanStack/query/commit/c0ec9fe0d1426fe3f233adda3ebf23989ffaa110)]: + - @tanstack/query-core@5.90.8 + ## 6.0.5 ### Patch Changes diff --git a/packages/svelte-query/package.json b/packages/svelte-query/package.json index 3689e99c8d..983ae42875 100644 --- a/packages/svelte-query/package.json +++ b/packages/svelte-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/svelte-query", - "version": "6.0.5", + "version": "6.0.6", "description": "Primitives for managing, caching and syncing asynchronous and remote data in Svelte", "author": "Lachlan Collins", "license": "MIT", diff --git a/packages/vue-query/CHANGELOG.md b/packages/vue-query/CHANGELOG.md index 5d9f8348d9..5d4ed37ca0 100644 --- a/packages/vue-query/CHANGELOG.md +++ b/packages/vue-query/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/vue-query +## 5.90.8 + +### Patch Changes + +- Updated dependencies [[`c0ec9fe`](https://github.com/TanStack/query/commit/c0ec9fe0d1426fe3f233adda3ebf23989ffaa110)]: + - @tanstack/query-core@5.90.8 + ## 5.90.7 ### Patch Changes diff --git a/packages/vue-query/package.json b/packages/vue-query/package.json index 34b2645096..0729abb3d6 100644 --- a/packages/vue-query/package.json +++ b/packages/vue-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/vue-query", - "version": "5.90.7", + "version": "5.90.8", "description": "Hooks for managing, caching and syncing asynchronous and remote data in Vue", "author": "Damian Osipiuk", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a538336218..edf2323c6a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -250,7 +250,7 @@ importers: specifier: workspace:* version: link:../../../packages/angular-query-experimental '@tanstack/angular-query-persist-client': - specifier: ^5.62.14 + specifier: ^5.62.15 version: link:../../../packages/angular-query-persist-client '@tanstack/query-async-storage-persister': specifier: workspace:* From b2bd79d0a6b2707461897c426b0d2275a3318e4b Mon Sep 17 00:00:00 2001 From: Damian Osipiuk Date: Wed, 12 Nov 2025 13:35:04 +0100 Subject: [PATCH 7/8] feat(vue-query): support useQuery options getter (#9866) --- .changeset/dark-birds-turn.md | 5 +++++ .../vue-query/src/__tests__/useQuery.test.ts | 18 ++++++++++++++++++ packages/vue-query/src/useBaseQuery.ts | 6 +++++- packages/vue-query/src/useQuery.ts | 16 ++++------------ 4 files changed, 32 insertions(+), 13 deletions(-) create mode 100644 .changeset/dark-birds-turn.md diff --git a/.changeset/dark-birds-turn.md b/.changeset/dark-birds-turn.md new file mode 100644 index 0000000000..567a45dde4 --- /dev/null +++ b/.changeset/dark-birds-turn.md @@ -0,0 +1,5 @@ +--- +'@tanstack/vue-query': minor +--- + +feat(vue-query): support useQuery options getter diff --git a/packages/vue-query/src/__tests__/useQuery.test.ts b/packages/vue-query/src/__tests__/useQuery.test.ts index c62b6c06de..f83ba374a3 100644 --- a/packages/vue-query/src/__tests__/useQuery.test.ts +++ b/packages/vue-query/src/__tests__/useQuery.test.ts @@ -44,6 +44,24 @@ describe('useQuery', () => { ) }) + test('should work with options getter', async () => { + const query = useQuery(() => ({ + queryKey: ['key01'], + queryFn: () => sleep(0).then(() => 'result01'), + })) + + await vi.advanceTimersByTimeAsync(0) + + expect(query).toMatchObject({ + status: { value: 'success' }, + data: { value: 'result01' }, + isPending: { value: false }, + isFetching: { value: false }, + isFetched: { value: true }, + isSuccess: { value: true }, + }) + }) + test('should return pending status initially', () => { const query = useQuery({ queryKey: ['key1'], diff --git a/packages/vue-query/src/useBaseQuery.ts b/packages/vue-query/src/useBaseQuery.ts index 2e9963e5f6..f5c444b3ae 100644 --- a/packages/vue-query/src/useBaseQuery.ts +++ b/packages/vue-query/src/useBaseQuery.ts @@ -82,7 +82,11 @@ export function useBaseQuery< const client = queryClient || useQueryClient() const defaultedOptions = computed(() => { - const clonedOptions = cloneDeepUnref(options as any) + let resolvedOptions = options + if (typeof resolvedOptions === 'function') { + resolvedOptions = resolvedOptions() + } + const clonedOptions = cloneDeepUnref(resolvedOptions as any) if (typeof clonedOptions.enabled === 'function') { clonedOptions.enabled = clonedOptions.enabled() diff --git a/packages/vue-query/src/useQuery.ts b/packages/vue-query/src/useQuery.ts index 3e1e825dcf..a64d5fc2d7 100644 --- a/packages/vue-query/src/useQuery.ts +++ b/packages/vue-query/src/useQuery.ts @@ -114,12 +114,8 @@ export function useQuery< TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, >( - options: UseQueryOptions< - TQueryFnData, - TError, - TData, - TQueryFnData, - TQueryKey + options: MaybeRefOrGetter< + UseQueryOptions >, queryClient?: QueryClient, ): UseQueryReturnType @@ -130,12 +126,8 @@ export function useQuery< TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, >( - options: UseQueryOptions< - TQueryFnData, - TError, - TData, - TQueryFnData, - TQueryKey + options: MaybeRefOrGetter< + UseQueryOptions >, queryClient?: QueryClient, ): From d46d35cdc20db16c7396e7288d10b7e9ba95e287 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 12 Nov 2025 12:37:27 +0000 Subject: [PATCH 8/8] ci: Version Packages (#9867) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/dark-birds-turn.md | 5 ----- examples/vue/basic/package.json | 4 ++-- examples/vue/dependent-queries/package.json | 2 +- examples/vue/persister/package.json | 2 +- examples/vue/simple/package.json | 4 ++-- packages/vue-query-devtools/CHANGELOG.md | 7 +++++++ packages/vue-query-devtools/package.json | 2 +- packages/vue-query/CHANGELOG.md | 6 ++++++ packages/vue-query/package.json | 2 +- 9 files changed, 21 insertions(+), 13 deletions(-) delete mode 100644 .changeset/dark-birds-turn.md diff --git a/.changeset/dark-birds-turn.md b/.changeset/dark-birds-turn.md deleted file mode 100644 index 567a45dde4..0000000000 --- a/.changeset/dark-birds-turn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/vue-query': minor ---- - -feat(vue-query): support useQuery options getter diff --git a/examples/vue/basic/package.json b/examples/vue/basic/package.json index 1e5c1a7ff3..a9237ebc40 100644 --- a/examples/vue/basic/package.json +++ b/examples/vue/basic/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.90.8", - "@tanstack/vue-query-devtools": "^5.91.0", + "@tanstack/vue-query": "^5.91.0", + "@tanstack/vue-query-devtools": "^6.0.0", "vue": "^3.4.27" }, "devDependencies": { diff --git a/examples/vue/dependent-queries/package.json b/examples/vue/dependent-queries/package.json index a21be37632..81ad0f2779 100644 --- a/examples/vue/dependent-queries/package.json +++ b/examples/vue/dependent-queries/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.90.8", + "@tanstack/vue-query": "^5.91.0", "vue": "^3.4.27" }, "devDependencies": { diff --git a/examples/vue/persister/package.json b/examples/vue/persister/package.json index 43492b6325..526a923780 100644 --- a/examples/vue/persister/package.json +++ b/examples/vue/persister/package.json @@ -11,7 +11,7 @@ "@tanstack/query-core": "^5.90.8", "@tanstack/query-persist-client-core": "^5.91.7", "@tanstack/query-sync-storage-persister": "^5.90.10", - "@tanstack/vue-query": "^5.90.8", + "@tanstack/vue-query": "^5.91.0", "idb-keyval": "^6.2.1", "vue": "^3.4.27" }, diff --git a/examples/vue/simple/package.json b/examples/vue/simple/package.json index b9623c5d05..a2a54afff1 100644 --- a/examples/vue/simple/package.json +++ b/examples/vue/simple/package.json @@ -8,8 +8,8 @@ "preview": "vite preview" }, "dependencies": { - "@tanstack/vue-query": "^5.90.8", - "@tanstack/vue-query-devtools": "^5.91.0", + "@tanstack/vue-query": "^5.91.0", + "@tanstack/vue-query-devtools": "^6.0.0", "vue": "^3.4.27" }, "devDependencies": { diff --git a/packages/vue-query-devtools/CHANGELOG.md b/packages/vue-query-devtools/CHANGELOG.md index d6f6013675..d06534bfc1 100644 --- a/packages/vue-query-devtools/CHANGELOG.md +++ b/packages/vue-query-devtools/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/vue-query-devtools +## 6.0.0 + +### Patch Changes + +- Updated dependencies [[`b2bd79d`](https://github.com/TanStack/query/commit/b2bd79d0a6b2707461897c426b0d2275a3318e4b)]: + - @tanstack/vue-query@5.91.0 + ## 5.91.0 ### Minor Changes diff --git a/packages/vue-query-devtools/package.json b/packages/vue-query-devtools/package.json index 979a2826f2..8d0da85c8e 100644 --- a/packages/vue-query-devtools/package.json +++ b/packages/vue-query-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/vue-query-devtools", - "version": "5.91.0", + "version": "6.0.0", "description": "Developer tools to interact with and visualize the TanStack/vue-query cache", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/vue-query/CHANGELOG.md b/packages/vue-query/CHANGELOG.md index 5d4ed37ca0..c091a32c9f 100644 --- a/packages/vue-query/CHANGELOG.md +++ b/packages/vue-query/CHANGELOG.md @@ -1,5 +1,11 @@ # @tanstack/vue-query +## 5.91.0 + +### Minor Changes + +- feat(vue-query): support useQuery options getter ([#9866](https://github.com/TanStack/query/pull/9866)) + ## 5.90.8 ### Patch Changes diff --git a/packages/vue-query/package.json b/packages/vue-query/package.json index 0729abb3d6..b34b429a9a 100644 --- a/packages/vue-query/package.json +++ b/packages/vue-query/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/vue-query", - "version": "5.90.8", + "version": "5.91.0", "description": "Hooks for managing, caching and syncing asynchronous and remote data in Vue", "author": "Damian Osipiuk", "license": "MIT",