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

5,168 commits

Author SHA1 Message Date
Wonsuk Choi
3c24ff3ba2
ci(labeler-config): add missing 'preact-query-devtools' and 'preact-query-persist-client' package labels (#10618) 2026-05-01 14:49:50 +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
Wonsuk Choi
c5ab5a1065
test(preact-query/ErrorBoundary): replace British 'behaviour' with American 'behavior' (#10605) 2026-04-29 03:18:28 +09:00
github-actions[bot]
87f7ccf580
ci: Version Packages (#10604) release-2026-04-28-1641 @tanstack/vue-query-devtools@6.1.25 @tanstack/angular-query-experimental@5.100.6 @tanstack/eslint-plugin-query@5.100.6 @tanstack/preact-query-devtools@5.100.6 @tanstack/preact-query-persist-client@5.100.6 @tanstack/preact-query@5.100.6 @tanstack/query-async-storage-persister@5.100.6 @tanstack/query-broadcast-client-experimental@5.100.6 @tanstack/query-core@5.100.6 @tanstack/query-devtools@5.100.6 @tanstack/query-persist-client-core@5.100.6 @tanstack/query-sync-storage-persister@5.100.6 @tanstack/react-query-devtools@5.100.6 @tanstack/react-query-next-experimental@5.100.6 @tanstack/react-query-persist-client@5.100.6 @tanstack/react-query@5.100.6 @tanstack/solid-query-devtools@5.100.6 @tanstack/solid-query-persist-client@5.100.6 @tanstack/solid-query@5.100.6 @tanstack/svelte-query-devtools@6.1.25 @tanstack/svelte-query-persist-client@6.1.25 @tanstack/svelte-query@6.1.25 @tanstack/vue-query@5.100.6
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-29 01:36:20 +09:00
Wonsuk Choi
3af3a5ded3
refactor(solid-query): remove 'Solid' prefix from 'SolidQueryOptions', 'SolidInfiniteQueryOptions', and 'SolidMutationOptions' (#10500)
* refactor(solid-query): remove 'Solid' prefix from 'SolidQueryOptions', 'SolidInfiniteQueryOptions', and 'SolidMutationOptions'

* ci: apply automated fixes

* chore(changeset): add changeset for 'Solid' prefix removal

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-28 18:25:53 +02:00
Wonsuk Choi
f88a608c59
test(angular-query-experimental/injectIsRestoring): add test for resolving 'provideIsRestoring' value with 'injector' option (#10599) 2026-04-29 00:48:22 +09:00
Wonsuk Choi
dd901aef98
test(angular-query-experimental/injectQueries): add test for error state when one of the queries rejects (#10597) 2026-04-26 18:18:41 +09:00
Wonsuk Choi
3547f86e13
test(angular-query-experimental/injectIsRestoring): add test for reactively reflecting changes to the provided signal (#10596) 2026-04-26 18:09:51 +09:00
Wonsuk Choi
c9755be3ed
test(angular-query-experimental/injectIsMutating): add filter test by 'mutationKey' (#10595) 2026-04-26 17:54:35 +09:00
Wonsuk Choi
7a5b53c4ea
test(angular-query-experimental/injectIsFetching): add filter test by 'queryKey' (#10594) 2026-04-26 17:46:11 +09:00
Wonsuk Choi
51ef23f46b
test(angular-query-experimental/injectMutation): add test for 'mutateAsync' resolving with 'mutationFn' return value (#10591) 2026-04-26 17:28:05 +09:00
Wonsuk Choi
72a15ae4d9
test(angular-query-experimental/injectMutation): switch 'pending' test to '@Component' + 'render' pattern (#10590) 2026-04-26 15:31:53 +09:00
Wonsuk Choi
e69e5d2a07
test(angular-query-experimental/injectMutation): switch 'error' test to '@Component' + 'render' pattern (#10589) 2026-04-26 15:03:29 +09:00
Wonsuk Choi
d78883bff0
test(angular-query-experimental/injectQuery): remove duplicate error test already covered by 'should reject and update signal' (#10588) 2026-04-26 14:53:07 +09:00
Wonsuk Choi
76161b7a6b
test(angular-query-experimental/injectQuery): add test for 'placeholderData' lifecycle (#10587) 2026-04-26 14:42:26 +09:00
Wonsuk Choi
4f373699e0
test(angular-query-experimental/injectQuery): add test for 'select' option transforming 'queryFn' data (#10586) 2026-04-26 14:21:24 +09:00
Wonsuk Choi
20fc6c2908
test(angular-query-experimental/injectInfiniteQuery): add test for error state when 'queryFn' rejects (#10585) 2026-04-26 14:09:31 +09:00
github-actions[bot]
441204b9d2
ci: Version Packages (#10582) release-2026-04-25-1732 @tanstack/angular-query-experimental@5.100.5 @tanstack/eslint-plugin-query@5.100.5 @tanstack/preact-query-devtools@5.100.5 @tanstack/preact-query-persist-client@5.100.5 @tanstack/preact-query@5.100.5 @tanstack/query-async-storage-persister@5.100.5 @tanstack/query-broadcast-client-experimental@5.100.5 @tanstack/query-core@5.100.5 @tanstack/query-devtools@5.100.5 @tanstack/query-persist-client-core@5.100.5 @tanstack/query-sync-storage-persister@5.100.5 @tanstack/react-query-devtools@5.100.5 @tanstack/react-query-next-experimental@5.100.5 @tanstack/react-query-persist-client@5.100.5 @tanstack/react-query@5.100.5 @tanstack/solid-query-devtools@5.100.5 @tanstack/solid-query-persist-client@5.100.5 @tanstack/solid-query@5.100.5 @tanstack/svelte-query-devtools@6.1.24 @tanstack/svelte-query-persist-client@6.1.24 @tanstack/svelte-query@6.1.24 @tanstack/vue-query-devtools@6.1.24 @tanstack/vue-query@5.100.5
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-25 19:25:49 +02:00
TkDodo
a53ef97f87 fix: add missing changeset 2026-04-25 19:03:12 +02:00
Cocoon-Break
672c3193db
fix(query-core): propagate AbortSignal reason in infiniteQueryBehavior fetchPage cancellation (#10476)
* fix: propagate AbortSignal reason when cancelling infinite query fetchPage (Closes #10475)

Signed-off-by: Cocoon-Break <54054995+kuishou68@users.noreply.github.com>

* add a test

---------

Signed-off-by: Cocoon-Break <54054995+kuishou68@users.noreply.github.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-04-25 19:00:45 +02:00
github-actions[bot]
55afb3e6fb
ci: Version Packages (#10581) release-2026-04-25-1556 @tanstack/angular-query-experimental@5.100.4 @tanstack/eslint-plugin-query@5.100.4 @tanstack/preact-query-devtools@5.100.4 @tanstack/preact-query-persist-client@5.100.4 @tanstack/preact-query@5.100.4 @tanstack/query-async-storage-persister@5.100.4 @tanstack/query-broadcast-client-experimental@5.100.4 @tanstack/query-core@5.100.4 @tanstack/query-devtools@5.100.4 @tanstack/query-persist-client-core@5.100.4 @tanstack/query-sync-storage-persister@5.100.4 @tanstack/react-query-devtools@5.100.4 @tanstack/react-query-next-experimental@5.100.4 @tanstack/react-query-persist-client@5.100.4 @tanstack/react-query@5.100.4 @tanstack/solid-query-devtools@5.100.4 @tanstack/solid-query-persist-client@5.100.4 @tanstack/solid-query@5.100.4 @tanstack/svelte-query-devtools@6.1.23 @tanstack/svelte-query-persist-client@6.1.23 @tanstack/svelte-query@6.1.23 @tanstack/vue-query-devtools@6.1.23 @tanstack/vue-query@5.100.4
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-25 17:51:28 +02: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
github-actions[bot]
fe287cc247
ci: Version Packages (#10579) release-2026-04-25-1120 @tanstack/angular-query-experimental@5.100.3 @tanstack/eslint-plugin-query@5.100.3 @tanstack/preact-query-devtools@5.100.3 @tanstack/preact-query-persist-client@5.100.3 @tanstack/preact-query@5.100.3 @tanstack/query-async-storage-persister@5.100.3 @tanstack/query-broadcast-client-experimental@5.100.3 @tanstack/query-core@5.100.3 @tanstack/query-devtools@5.100.3 @tanstack/query-persist-client-core@5.100.3 @tanstack/query-sync-storage-persister@5.100.3 @tanstack/react-query-devtools@5.100.3 @tanstack/react-query-next-experimental@5.100.3 @tanstack/react-query-persist-client@5.100.3 @tanstack/react-query@5.100.3 @tanstack/solid-query-devtools@5.100.3 @tanstack/solid-query-persist-client@5.100.3 @tanstack/solid-query@5.100.3 @tanstack/svelte-query-devtools@6.1.22 @tanstack/svelte-query-persist-client@6.1.22 @tanstack/svelte-query@6.1.22 @tanstack/vue-query-devtools@6.1.22 @tanstack/vue-query@5.100.3
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-25 13:15:56 +02:00
Dominik Dorfmeister 🔮
f85d825e02
Feature/use suspense queries combine (#10576)
* useSuspenseQueries combine

* useSuspenseQueries combine

* ci: apply automated fixes

* fix: stale data

* ci: apply automated fixes (attempt 3/3)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-25 12:55:47 +02:00
github-actions[bot]
93b2845000
ci: Version Packages (#10575) release-2026-04-25-0945 @tanstack/angular-query-experimental@5.100.2 @tanstack/eslint-plugin-query@5.100.2 @tanstack/preact-query-devtools@5.100.2 @tanstack/preact-query-persist-client@5.100.2 @tanstack/preact-query@5.100.2 @tanstack/query-async-storage-persister@5.100.2 @tanstack/query-broadcast-client-experimental@5.100.2 @tanstack/query-core@5.100.2 @tanstack/query-devtools@5.100.2 @tanstack/query-persist-client-core@5.100.2 @tanstack/query-sync-storage-persister@5.100.2 @tanstack/react-query-devtools@5.100.2 @tanstack/react-query-next-experimental@5.100.2 @tanstack/react-query-persist-client@5.100.2 @tanstack/react-query@5.100.2 @tanstack/solid-query-devtools@5.100.2 @tanstack/solid-query-persist-client@5.100.2 @tanstack/solid-query@5.100.2 @tanstack/svelte-query-devtools@6.1.21 @tanstack/svelte-query-persist-client@6.1.21 @tanstack/svelte-query@6.1.21 @tanstack/vue-query-devtools@6.1.21 @tanstack/vue-query@5.100.2
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-25 11:40:41 +02:00
Ben Younes
ea4497e8aa
fix(query-core): stop wrapping persister generics in NoInfer (#10510)
* fix(query-core): stop wrapping persister generics in NoInfer

The `persister` field on QueryOptions was typed as
`QueryPersister<NoInfer<TQueryFnData>, NoInfer<TQueryKey>, NoInfer<TPageParam>>`
so persister could not contribute to TQueryFnData inference. When the
companion queryFn declared a parameter (e.g. `(_context) => 'test'`),
TypeScript failed to infer TQueryFnData from its return and defaulted
to `unknown`, causing a spurious overload mismatch against a
concretely-typed persister (fixes #7842).

Removing the NoInfer wrappers lets persister participate in inference.
Genuine type conflicts between persister and queryFn still surface as
errors (covered by a new negative type test in queryOptions.test-d.tsx).

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

* test(react-query): wrap negative type tests in assertType

Addresses CodeRabbit nitpick: vitest/expect-expect flagged the
genuine-conflict test as having no assertions. Wrap both calls in
assertType() so the linter sees an explicit assertion while the
`@ts-expect-error` directives continue to enforce the type mismatch.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
2026-04-25 11:37:25 +02:00
Dominik Dorfmeister 🔮
645d5d130f
ref(core): remove leftover setStateOptions (#10574) 2026-04-25 11:27:54 +02:00
kimchosule
d6a7bf3e3e
Fix/infinite query hydration 8825 (#10074)
* fix: preserve infinite query behavior during SSR hydration (#8825)

* chore: add changeset for #8825

* refactor: apply review feedback
- Remove isRejectedThenable check
- Inline behavior assignment

* refactor: remove unnecessary `any` type assertions

* refactor: store query type in Query instead of injecting behavior
- Add a type field to Query, set from the _type marker
- In Query.fetch(), apply infiniteQueryBehavior automatically when type === 'infiniteQuery'
- Remove direct behavior injection from infiniteQueryObserver, fetchInfiniteQuery, ensureInfiniteQueryData, and hydrate()
- In hydrate(), pass the _type marker instead of behavior to fix a regression where user-provided hydrate defaultOptions.queries.behavior could be overwritten
- Add regression tests for the SSR -> dehydrate -> hydrate -> refetch flow

* ci: apply automated fixes

* ref: use optional type: 'infinite' everywhere

* fix: don't send full queries into queryClient methods

* fix: let's stick with queryType as the public name

* fix: test -> it

---------

Co-authored-by: kimchosule <kimchosule1@bizbee.co.kr>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-25 11:09:35 +02:00
Wonsuk Choi
5ccd597556
test(angular-query-experimental/injectQuery): switch 'success' and 'reject' tests to '@Component' + 'render' pattern (#10572)
* test(angular-query-experimental/injectQuery): switch 'success' and 'reject' tests to '@Component' + 'render' pattern

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-25 13:37:48 +09:00
palkim
41a7ab07e7
test(query-core/utils): add tests for 'ensureQueryFn' with 'initialPromise' and 'skipToken' (#10527)
* test(query-core/utils): add tests for 'ensureQueryFn' initialPromise fallback and skipToken handling

* test(query-core/utils): use typed QueryFunctionContext in ensureQueryFn tests

Replace the `(resolved as unknown as () => Promise<...>)()` double-cast
with `resolved(context)` using a shared `QueryFunctionContext` fixture.
Per review suggestions on #10527.

---------

Co-authored-by: Wonsuk Choi <sukvvon@gmail.com>
2026-04-24 16:32:44 +09:00
github-actions[bot]
2f9527ed76
ci: Version Packages (#10568) release-2026-04-23-1827 @tanstack/react-query-devtools@5.100.1
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-23 16:20:54 +02:00
Fredrik Höglund
1bb0d23428
fix(query-core): fix hydration bugs for already resolved promises (#10444) 2026-04-23 15:54:30 +02:00
github-actions[bot]
ad517e5564
ci: Version Packages (#10567) release-2026-04-23-1319 @tanstack/angular-query-experimental@5.100.0 @tanstack/eslint-plugin-query@5.100.0 @tanstack/preact-query-devtools@5.100.0 @tanstack/preact-query-persist-client@5.100.0 @tanstack/preact-query@5.100.0 @tanstack/query-async-storage-persister@5.100.0 @tanstack/query-broadcast-client-experimental@5.100.0 @tanstack/query-core@5.100.0 @tanstack/query-devtools@5.100.0 @tanstack/query-persist-client-core@5.100.0 @tanstack/query-sync-storage-persister@5.100.0 @tanstack/react-query-devtools@5.100.0 @tanstack/react-query-next-experimental@5.100.0 @tanstack/react-query-persist-client@5.100.0 @tanstack/react-query@5.100.0 @tanstack/solid-query-devtools@5.100.0 @tanstack/solid-query-persist-client@5.100.0 @tanstack/solid-query@5.100.0 @tanstack/svelte-query-devtools@6.1.19 @tanstack/svelte-query-persist-client@6.1.19 @tanstack/svelte-query@6.1.19 @tanstack/vue-query-devtools@6.1.19 @tanstack/vue-query@5.100.0
ci: changeset release

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-23 15:15:00 +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
Aleksei Kharitonov
61b97638e3
docs(eslint/no-unstable-deps): correct 'react' package name casing in examples (#10553)
fix(docs): correct import casing in no-unstable-deps examples
2026-04-23 20:08:15 +09:00
Wonsuk Choi
e2a945e4c8
test(angular-query-experimental/injectMutation): switch 'success' and 'reset' tests to '@Component' + 'render' pattern (#10566) 2026-04-23 17:54:11 +09:00
Wonsuk Choi
65f9eeb461
test(angular-query-experimental/injectQueries): add 'readonly' modifier to component fields for consistency with other render-pattern tests (#10564) 2026-04-23 15:32:13 +09:00
Wonsuk Choi
0f339c1c92
test(angular-query-experimental/injectQueries): switch 'isRestoring' test to '@Component' + 'render' pattern (#10563) 2026-04-23 15:12:43 +09:00
Wonsuk Choi
e236194f10
test(react-query/useQuery.promise): improve stability by isolating 'queryClient' per test and switching 'queryFn' to real 'sleep' (#10562)
* test(react-query/useQuery.promise): improve stability by isolating 'queryClient' per test and switching 'queryFn' to real 'sleep'

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-23 13:44:10 +09:00
Wonsuk Choi
b1538fc6cb
test(query-persist-client-core/createPersister): lowercase 'Should' to 'should' in 'it' descriptions for consistency (#10560) 2026-04-23 10:11:00 +09:00
Jan Aagaard
7d881354ff
docs: Update the documentation for gcTime in setQueryData (#10559)
Clarified the behavior of gcTime in setQueryData.

https://bsky.app/profile/tkdodo.eu/post/3mk2z7ur7kc2m
2026-04-22 12:56:26 +02:00
Wonsuk Choi
e7de9090c8
test(angular-query-experimental/injectInfiniteQuery): switch main test to '@Component' + 'render' pattern (#10558) 2026-04-22 15:56:27 +09:00
Wonsuk Choi
0d2112c3e7
test(angular-query-experimental/injectIsMutating): switch main test to '@Component' + 'render' pattern (#10557) 2026-04-22 15:36:56 +09:00
Wonsuk Choi
f01b7ce6d3
test(angular-query-experimental/injectIsFetching): switch main test to '@Component' + 'render' pattern (#10556) 2026-04-22 14:44:53 +09:00
Wonsuk Choi
59efc40372
test(*): resolve 'require-await' warnings in test files (#10551) 2026-04-22 07:50:55 +09:00
Wonsuk Choi
cf8a765e7a
test(react-query/useQuery): rename 'throwOnError' callback parameter to 'err' to avoid 'no-shadow' with outer 'error' (#10550) 2026-04-22 02:32:50 +09:00
Wonsuk Choi
a65252663c
test(vue-query/queryClient): rename local 'queryKey' to 'key' to avoid 'no-shadow' with the 'queryKey' import (#10549) 2026-04-22 02:26:12 +09:00
Wonsuk Choi
eec2abefe5
test(query-persist-client-core/createPersister): fix typo 'persiste' to 'persist' and 'persistance' to 'persistence' (#10548) 2026-04-22 02:16:24 +09:00
Wonsuk Choi
fc8a6a9240
test(angular-query*): prefix 'it' descriptions with 'should' for consistency (#10547) 2026-04-22 01:59:06 +09:00