0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-16 22:50:20 +00:00
Commit graph

370 commits

Author SHA1 Message Date
Dominik Dorfmeister 🔮
279bb5508b
chore: update to ts 7 and move cut-off to 5.6 (#11212)
* update to ts 7 and move cut-off to 5.7

* changeset

* fix: use typescript v6 with tsup

* ci: apply automated fixes

* ref: update sveltejs/package

* ref: make ts6 the default typescript

* fix: lit build

* effing tsup

* move ignoreDeprecations to solid tsup config

* move ignoreDeprecations to relevant tsup configs

* better lit fix

* restore vue queryClient

* Revert "restore vue queryClient"

This reverts commit 4f95fc918a.

* fix things

* ignore devDep ordering

* vue needs to use ts6

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-17 22:50:18 +02:00
SiHyunLee
bcb030bfbb
docs: fix in-page anchor links to match the docs site's slug format (#11162) 2026-08-17 09:09:57 +02:00
Wonsuk Choi
6423f9eb9e
docs(vue-query/reference): hide React-only 'React.use()' mention from useInfiniteQuery (#11203) 2026-08-17 04:24:43 +09:00
Wonsuk Choi
0785da5510
docs(vue-query/guides/ssr): fix 'queryKey' to use array form (#11202) 2026-08-17 03:24:57 +09:00
hamed-bavar
bdfbeadb70
docs(vue-query/guides/suspense): update example to v5 object syntax (#11159)
docs(vue-query): update suspense guide example to v5 object syntax
2026-08-17 03:08:59 +09:00
Wonsuk Choi
b36374c150
docs(react-query/reference): fix 'queryClient' nesting in 'HydrationBoundary' options (#11201) 2026-08-17 02:45:36 +09:00
Wonsuk Choi
4ace03b55a
docs(react-query/reference): remove stale 'suspense' references left over from the v5 suspense split (#11200) 2026-08-17 02:44:07 +09:00
Wonsuk Choi
f1a435977f
docs: regenerate reference docs to drop redundant TypeDoc page title heading (#11196) 2026-08-16 22:08:19 +09:00
Wonsuk Choi
a9f416bbae
docs: regenerate reference docs to fix stale content and Preact source links (#11189) 2026-08-16 17:58:55 +09:00
Wonsuk Choi
c5f29995fe
docs(solid-query/useQuery): document 'throwOnError' default value and its exceptions (#11170)
* docs(solid-query/useQuery): document 'throwOnError' default value

* docs(solid-query/useQuery): document SSR and 'suspense' exceptions to 'throwOnError' default
2026-08-16 14:06:04 +09:00
Wonsuk Choi
159982c80b
docs(react-query/useQuery): document 'throwOnError' default value (#11156)
* docs(react-query/useQuery): document 'throwOnError' default and its absence in suspense hooks

* docs(react-query/useQuery): use framework-agnostic wording for suspense throwOnError note

* docs(react-query/useQuery): remove inaccurate suspense-mode throwOnError note
2026-08-12 10:03:07 +09:00
Melih Arık
31c7f374e2
docs(angular-query): fix invalid imports and syntax error in guide examples (#11090)
* docs(angular-query): fix three broken examples in the guides

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-02 17:34:23 +09:00
max
79d2384db5
docs(*): fix 'homogenous', 'stoage', 'supressed', 'compoennts' spelling typos (#11040)
* fix: correct spelling typos across docs, examples, and source comments

- homogenous -> homogeneous in 7 useQueries/createQueries source files
- stoage -> storage in react and vue createPersister docs
- supressed -> suppressed in react and angular pagination examples
- compoennts -> components in solid-start-streaming example

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs(react-query/useSuspenseQueries): correct 'homogenous' typo to 'homogeneous' in comment

---------

Co-authored-by: maxtaran2010 <ocotifuzo727@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
2026-07-13 14:06:03 +09:00
Samuel Wai Weng Yong
f6cf12002a
docs({react,solid}-query): add missing 'errorUpdateCount' to 'useQuery' return signature (#11041)
* docs(react-query): add missing errorUpdateCount to useQuery return signature

* docs(react-query): move errorUpdateCount after errorUpdatedAt

* docs(react-query): keep 'errorUpdateCount' before 'errorUpdatedAt' to preserve alphabetical order

---------

Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
2026-07-13 03:28:00 +09:00
Wonsuk Choi
d6798b56b4
docs(angular-query/devtools): add the 'theme' option (#11002) 2026-06-29 12:10:31 +09:00
Dmytro Borysov
ad57c81fd3
docs(devtools): make markdown consistent (#10987)
Currently there is a bug, which prevents proper rendering of the links if there are both MD & HTML syntax in the same line (see https://tanstack.com/query/latest/docs/framework/react/devtools), probably should be fixed in @tanstack/markdown. Not sure that the source code of this package is published?

In the meantime, I just converted all links to html.

Converting everything (logos) to markdown won't work because we need to set width/height, which can't be done in markdown
2026-06-27 21:50:32 +02:00
Bartek Iwańczuk
b03390bfc8
docs: add Deno to installation instructions (#10971)
docs: add Deno to install instructions
2026-06-27 17:05:59 +02:00
Poetry Of Code
661c1afe79
docs(preact): add polling guide (#10991)
* docs(svelte): replace deprecated isLoading with isPending in overview

`isLoading` is a deprecated alias for `isPending && isFetching` and is
scheduled for removal in the next major version. The overview example
shows a standard (always-enabled) query, so `isPending` is the correct
flag. All other framework overview docs (React, Vue, Angular, Lit,
Preact) already use `isPending`.

Note: `isLoading` is intentionally retained in disabling-queries guides
where it is the right flag for disabled/lazy queries.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs(preact): add missing polling guide

The Polling guide existed for React, Vue, Solid, and Angular but was
missing from the Preact docs. Added the ref stub and wired it into
the nav config between Window Focus Refetching and Disabling Queries,
matching the ordering used by all other frameworks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 15:45:37 +02:00
Poetry Of Code
ac7a42d6a4
docs(svelte): replace deprecated isLoading with isPending in overview (#10990)
`isLoading` is a deprecated alias for `isPending && isFetching` and is
scheduled for removal in the next major version. The overview example
shows a standard (always-enabled) query, so `isPending` is the correct
flag. All other framework overview docs (React, Vue, Angular, Lit,
Preact) already use `isPending`.

Note: `isLoading` is intentionally retained in disabling-queries guides
where it is the right flag for disabled/lazy queries.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 15:40:35 +02:00
Jonghyeon Ko
1f84256a2e
docs: document the select typing caveat for parallel-queries hooks (#10984)
Inlining a `select` on a query object passed to `useQueries` /
`useSuspenseQueries` can't infer its `data` argument from the sibling
`queryFn` and falls back to `unknown` — a known TypeScript limitation
(TanStack/query#6556).

Document the two workarounds (annotate the `select` parameter, or define
the query with the `queryOptions` helper) in the React docs, and add type
tests guarding the behavior. Scoped to React for an easier review; the
other framework adapters can follow the same pattern in separate PRs.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 15:30:15 +02:00
Jakub Šimko
47e539a9f4
docs(react-query): recommend against using server actions in queryFn (#10927) 2026-06-14 13:04:16 +02:00
Wonsuk Choi
dc0effd033
docs(framework/react/guides): replace deprecated 'isServer' with 'environmentManager.isServer()' (#10866) 2026-06-03 22:23:14 +09:00
Wonsuk Choi
dcc4a161d4
docs(framework/vue/devtools): inline the toggle and 'onClose' handler in the 'Embedded Mode' example to match the other adapters (#10856) 2026-06-01 17:07:14 +09:00
Wonsuk Choi
b1337cd568
docs(framework/vue/devtools): align the 'Embedded Mode' example with the other adapters and add the missing 'ref' import (#10855) 2026-06-01 16:23:30 +09:00
Wonsuk Choi
a79fc8d03b
docs(framework/vue/devtools): correct 'your React app' typo to 'your Vue app' in the Embedded Mode section (#10854) 2026-06-01 15:27:48 +09:00
Wonsuk Choi
1b4e73161f
docs(framework/{preact,solid}/devtools): add the 'Embedded Mode' section (#10853) 2026-06-01 15:10:21 +09:00
Cam Jackson
b125ba9c5c
docs(react-query): undefined vs. null in query-functions.md (#10008)
* docs(react-query): undefined vs. null in query-functions.md

* Apply suggestion from @TkDodo

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2026-05-22 18:37:05 +02:00
Stephen Gibler
ae054a0e9a
docs: update Next.js TypeScript docs reference (#10753)
Co-authored-by: Stephen Gibler <261876204+sgibler-droid@users.noreply.github.com>
2026-05-22 16:18:07 +02:00
Gaurav
4082894509
feat: lit query adapter
* feat lit-query: add initial lit-query package

* remove internal docs from initial PR

* fix review issues

* align scripts with monorepo Nx targets and use workspace:* for query-core

* feat(lit-query): fix type inference and monorepo integration

  - Fix createQueriesController tuple type inference with recursive types
  - Add DataTag support to queryOptions
  - Fix build config and vitest custom-condition resolution
  - Fix example install scripts for standalone bootstrap

* fix(lit-query): polish package validation and examples

* ci: apply automated fixes

* lit-query: preserve provider handshake ordering in BaseController

* Update .changeset/lemon-memes-divide.md

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>

* removing prettier config from adapter, so that global config from the monorepo is used

* removed the package local format scripts so formatting stays centralized at the monorepo root

* removing like other adapters keep build and test:build as separate targets

* Compared against the other adapters and removed the lit-query-only aliases/gates, keeping the standard Nx target names so root CI can pick them up consistently

* package:check has been removed. The CJS smoke check is still needed because lit-query publishes custom CJS output/types

* fix(lit-query): align lit examples and integration with monorepo conventions

* chore(lit-query): clean up stale package checks

* fix(lit-query): address review feedback for lit examples and lifecycle tests

* chore: fix lockfile

* fix: add customCondition

* docs(lit-query): add Lit docs and generated reference

* docs(lit-query): fix Lit docs review comment and align examples

---------

Co-authored-by: gauravchugh <gauravchugh@servicenow.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-08 15:18:50 +02:00
Dami Oyeniyi
0d63459555
docs(devtools): correct 'errorTypes' type to array (#10634)
docs(devtools): document errorTypes as array
2026-05-05 12:08:07 +09:00
Wonsuk Choi
bf2546feb0
docs(devtools): add missing 'theme' option (#10621) 2026-05-02 10:50:20 +09:00
Wonsuk Choi
868577d5da
docs(devtools): align logo, panel, and option union descriptions across docs and JSDoc (#10617)
* docs(devtools): replace framework-specific logo with 'TanStack logo' to match the actual rendered component

* docs(vue-query/devtools): replace 'React Query' panel leftover with 'Vue Query'

* docs(devtools): replace framework-specific logo with 'TanStack logo' and use adapter naming for 'devtools panel' in JSDoc

* docs(devtools): add missing 'relative' to JSDoc 'buttonPosition' union

* chore(.changeset): add changeset for devtools logo, panel, and 'buttonPosition' union alignment

* docs(preact-query-devtools): add missing 'position' union to JSDoc
2026-05-01 16:34:40 +09:00
Wonsuk Choi
0694696025
docs(preact-query/devtools): add missing 'relative' to 'buttonPosition' (#10611) 2026-04-29 23:41:15 +09:00
Dami Oyeniyi
4ef364ac3d
docs(devtools): add 'relative' to Vue/Solid 'buttonPosition' and fix Vue 'style' type (#10608)
docs(devtools): align Vue and Solid option types
2026-04-29 23:29:29 +09:00
Dami Oyeniyi
3d1a62e63b
fix(devtools): change onClose callback type from () => unknown to () … (#10118)
* fix(devtools): change onClose callback type from () => unknown to () => void

* Fix onClose callback type in devtools

Updated onClose callback type in devtools to improve type safety.

* chore(changeset): fixed truncated changeset description

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2026-04-25 17:40:17 +02:00
Dominik Dorfmeister 🔮
6540a4126b
feat(core): callback for retryOnMount (#10515)
* feat(core): callback for retryOnMount

* ci: apply automated fixes

* fix: vue

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-23 14:45:49 +02:00
sourena kazemi
63909c76e3
docs(react): small grammar fix in advanced-ssr docs (#10507) 2026-04-16 20:53:27 +09:00
Wonsuk Choi
f279ad2488
feat(vue-query): add 'mutationOptions' (#10381)
* feat(vue-query): add 'mutationOptions'

* ci: apply automated fixes

* chore(.changeset): add changeset for 'mutationOptions' in vue-query

* feat(vue-query/mutationOptions): add getter support and fix test descriptions to match actual behavior

* refactor(vue-query): rename 'VueMutationOptions' to 'MutationOptions'

* docs(vue-query): add 'mutationOptions' reference page

* test(vue-query/mutationOptions): add runtime test for getter without 'mutationKey'

* docs(vue-query): add 'mutationOptions' to config.json navigation

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-11 19:49:32 +02:00
thalassophilia
b97513f288
feat(vue-query): add usePrefetchQuery and usePrefetchInfiniteQuery (#10372)
* feat(vue-query): add prefetch composables

- Add usePrefetchQuery and usePrefetchInfiniteQuery to vue-query.
- Includes runtime and type tests, plus a changeset

* docs(vue-query): document prefetch composables

* revert unrelated change

* ci: apply automated fixes

---------

Co-authored-by: Damian Osipiuk <osipiukd+git@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-11 15:27:47 +02:00
Zelys
67b12ae1a0
docs: add polling guide (#10330)
* docs(react): add polling guide

Adds a dedicated guide for refetchInterval-based polling. The option was
only mentioned in passing in important-defaults.md with no explanation of
how it works, how to adapt it dynamically, or how it interacts with window
focus, networkMode, and the enabled flag.

Covers:
- Basic setup and independence from staleTime
- Dynamic intervals via function form
- refetchIntervalInBackground for dashboards / always-on UIs
- Disabling window-focus refetching for fullscreen game and kiosk UIs
- Pausing polling with the enabled flag
- networkMode: 'always' for unreliable navigator.onLine environments
- Deduplication behavior across multiple observers

Updates config.json to add the guide to the React sidebar between
Window Focus Refetching and Disabling/Pausing Queries.
Adds a cross-reference in important-defaults.md.

* docs(react/polling): add example markers for framework portability

* docs(react): fix deduplication note — timers are per observer, not per query

* docs(react): address review feedback on polling guide

- Remove staleTime enumeration; link to Important Defaults instead
- Remove game/kiosk focus management examples (scope creep)
- Rewrite pausing polling to use refetchInterval function instead of enabled: false
- Fix offline support section: connectivity uses online/offline events, not navigator.onLine
- Fix deduplication note: remove queuing implication and em dash
- Add non-browser environments note pointing to React Native guide

* docs(solid,vue): add polling guide framework ports

* docs: wrap React Native section in markers for framework port exclusion

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-01 11:04:45 +02:00
Zelys
3fd34606eb
docs(react): clarify staleTime 'static' vs Infinity with 'always' triggers (#10354)
* docs(react): clarify staleTime 'static' vs Infinity with 'always' triggers

* docs(react): lead with invalidateQueries() distinction for staleTime: 'static' vs Infinity
2026-03-31 16:11:02 +02:00
Pavan Shinde
5cd3896947
docs(react): update legacy react-query GitHub links (#10232)
* docs(react): update legacy react-query GitHub links

* docs: fix React Query stars badge repo
2026-03-18 12:49:21 +01:00
Wonsuk Choi
09397ca84c
feat(solid-query): add 'mutationOptions' (#10138) 2026-03-18 03:12:01 +01:00
Dominik Dorfmeister 🔮
67cf8b60d9
ref: ts cutoff (#10253)
* ref: update typescript versions

* check for tsgo

* drop 5.2 and 5.3

* docs

* ref: fix tsup config

* ref: use built-in NoInfer

* ci: apply automated fixes

* fix tsup config

* Revert "ref: use built-in NoInfer"

This reverts commit 45d428ce71.

# Conflicts:
#	packages/preact-query/src/useQuery.ts

* ref: remove tsgo for now

* fix builds

* fix: update svelte-check

* fix: svelte-check still needs ts 5.9

* fix: knip + ts rewrite

* ci: apply automated fixes

* fix: make ts 5.9 the tscurrent version

* fix custom conditions

* fix: coderabbit comments

* fix: lockfile

* revert docs

* fix: override eslint to 8.56.1

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-09 08:12:35 +01:00
Pavan Shinde
fe25edc2f9
docs(react): fix broken anchors in SSR and migration guides (#10214)
* docs(react): fix broken anchors in SSR and migration guides

* Update docs/framework/react/guides/ssr.md

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-03-04 13:46:58 +01:00
Wonsuk Choi
b2dfe4f4e3
feat(svelte-query): add 'mutationOptions' (#10175)
* feat(svelte-query/mutationOptions): add 'mutationOptions' identity function for type-safe mutation configuration

* test(svelte-query/mutationOptions): add type and runtime tests for 'mutationOptions'

* docs(svelte-query/mutationOptions): add reference documentation for 'mutationOptions'

* chore(svelte-query): add changeset for 'mutationOptions'

* ci: apply automated fixes

* test(svelte-query/mutationOptions): use 'Accessor' type for props in BaseExample and wrap test values with arrow functions

* style(svelte-query/mutationOptions): remove blank lines between 'fireEvent' and assertion blocks

* refactor(svelte-query/mutationOptions): split BaseExample into BaseExample and MultiExample for single and multi mutation tests

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-02 08:47:12 +01:00
Jovi De Croock
887541a2fa
Add preact persist plugin (#10120)
* Add preact persist plugin

* Add docs

* Add tests

* Fix type issue

* ci: apply automated fixes

* Fixes

* Update changeset for preact-query packages

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2026-03-02 08:43:33 +01:00
Jovi De Croock
8fb3a5a6f1
Add preact query devtools (#10119)
* Add preact query devtools

* chore(deps): update dependency @sveltejs/kit to v2.52.2 [security] (#10158)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* ci: apply automated fixes

* knip

* Another fix

* Update versioning for preact-query packages

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2026-03-01 19:07:24 +01:00
Wonsuk Choi
0da627ba70
docs({solid,vue}-query/broadcastQueryClient): remove unnecessary 'replace' that doesn't match source content (#10193) 2026-02-26 17:06:46 +01:00
Roitium.
3f30619e7f
docs(react-native): fix example to include initial state (#10172)
* docs: fix expo-network example code block

* Apply suggestions from code review

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-02-26 15:14:24 +01:00