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

5,165 commits

Author SHA1 Message Date
Harry
8bfa77b525
docs(react-query): fix incorrect link in documentation (#8699)
* docs(react-query): fix incorrect paths in documentation
The documentation contained incorrect file paths.
Fixed the incorrect paths to match the actual directory structure.

* docs(react-query): fixed incorrect relative path (./ -> ../)
2025-03-08 13:08:47 +01:00
Jonghyeon Ko
0511c8205d
test(query-core): use fake timers for query.test.tsx (#8727) 2025-03-08 10:51:18 +01:00
Jonghyeon Ko
4140898d48
test(query-core): add test case for queryClient.isMutating (#8726) 2025-03-08 10:30:23 +01:00
Jonghyeon Ko
887820c915
test(react-query): add test case for useQuery (#8729) 2025-03-08 10:26:39 +01:00
Raj Suhail
4fb781feef
docs: Fix community resource links in important Defaults page. (#8697)
* Fix community resource links

* Fix all the remaning community links
2025-03-08 09:47:59 +01:00
Joseph Markus
67e52cf889
docs: Fix 404 link for Query Keys in useQuery.md (#8769)
Current link takes to https://tanstack.com/query/latest/docs/framework/guides/query-keys which is a 404
2025-03-07 19:19:55 +01:00
Sina Sepahvand
d85ee752a8
docs: Update ssr.md (#8770) 2025-03-07 19:19:35 +01:00
Tanner Linsley
40543e990d release: v5.67.2 v5.67.2 2025-03-07 10:57:14 +00:00
Nicolai Calinin
c82362ec13
docs(svelte-query): add the devtools page to the svelte-query docs (#8149)
* docs(svelte-query): add the devtools page to the svelte-query docs

* docs(svelte-query): remove the angular stuff, what is skipped

---------

Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2025-03-07 21:54:04 +11:00
Robert Soriano
30d18ee6aa
fix(svelte-query): update peer deps to stable v5 version (#8359)
* fix(svelte-query,svelte-query-devtools,svelte-query-persist-client): Use stable v5 version

* dedupe

---------

Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2025-03-07 21:52:50 +11:00
renovate[bot]
f31eeda36d
chore(deps): update dependency vitest to v2.1.9 [security] (#8605)
* chore(deps): update dependency vitest to v2.1.9 [security]

* Fix coverage-istanbul version

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2025-03-07 21:52:36 +11:00
Lachlan Collins
c4cb285f2c
chore: sync CONTRIBUTING.md between projects (#8767)
Adds instructions on editing docs locally
2025-03-07 19:10:42 +11:00
Ilia Evseev
a4f3956b91
docs: Fix relative links in Advanced Server Rendering guide (#8765) 2025-03-07 14:31:43 +11:00
Kristian
24064358c0
docs(react-query): fix broken links in QueryClient docs (#8748)
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2025-03-07 14:31:26 +11:00
JiSeong Park
e67b6f670c
docs: fix Advanced Server Rendering guide link (#8762) 2025-03-07 13:47:25 +11:00
Maria José Solano
b975d89d93
docs: update links to ESLint rules (#8758) 2025-03-07 13:45:47 +11:00
renovate[bot]
8c03bd0d4b
chore(deps): update autofix-ci/action digest to 551dded (#8549)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2025-03-04 22:18:35 +11:00
Dominik Dorfmeister
161f534537
chore: ts 5.8
* chore: ts 5.8

* chore: there are no errors anymore from eslint-plugin-react-hooks

* ci: apply automated fixes

* chore: lock file

* ci: apply automated fixes

* revert: there are no errors anymore from eslint-plugin-react-hooks

* chore: revert angular examples back to ts 5.7.2

as angular doesn't support 5.8 yet

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-03-04 10:08:58 +01:00
Tanner Linsley
3ccfa6e256 release: v5.67.1 v5.67.1 2025-03-03 15:58:02 +00:00
yusheng chen
4d8c27b448
refactor(query-core): improve type safety and performance in getMutationDefaults (#8669)
- Change return type to exclude mutationKey using OmitKeyof
- Replace spread operator with Object.assign for better performance

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2025-03-03 16:52:43 +01:00
Tanner Linsley
c0f27f6921 release: v5.67.0 v5.67.0 2025-03-03 15:45:24 +00:00
Dominik Dorfmeister
1b54251845
feat(types): typed query filters (#8670)
* feat: typed query filters

* refactor: use util types to extract from dataTag

* chore: try to fix vue types with overloads

* chore: vue types

* test: from #8691

* fix: make options a MaybeRefDeep

* feat: types for filters on other queryClient methods

* fix: add a test for 8684
2025-03-03 16:42:36 +01:00
SeongMin Kim
e85df7a6c3
test(query-core): add hashKey test code (#8735)
* test: add hashKey test code

* fix: testcode
2025-03-03 16:17:03 +01:00
Arnoud
18e357c297
docs(angular-query): document angular httpclient and other data fetching solutions (#8732) 2025-03-01 22:43:55 +01:00
Jonghyeon Ko
5babd11153
test(query-core): add test case for queryClient.isFetching (#8720)
* test(query-core): add test case for queryClient.isFetching

* chore: update

* Update packages/query-core/src/__tests__/queryClient.test.tsx

* Update packages/query-core/src/__tests__/queryClient.test.tsx

* chore: use fake timers

* test(query-core): use fakeTimer for queryClient.test.tsx's all test
2025-03-01 10:19:02 +01:00
Tanner Linsley
0bd52407c3 release: v5.66.11 v5.66.11 2025-02-28 13:53:46 +00:00
Harry
2bf7ec64a6
fix(react-query): add warning when useBaseQuery is called without a queryFn (#8701)
* chore(react-query): add warning when useBaseQuery is called without a queryFn
Added a console error in development mode when useBaseQuery is called without a queryFn or default queryFn.
This helps developers avoid potential issues by ensuring at least one of them is provided.

* fix(react-query): check queryFn after applying defaultQueryOptions
Move queryFn check after defaultOptions.

* chore(react-query): add env check before console error

* chore(react-query): add env check before console error

* ci: apply automated fixes

* fix(react-query): check queryFn after defaultOptions

* Update packages/react-query/src/useBaseQuery.ts

* Update packages/react-query/src/useBaseQuery.ts

* Update packages/react-query/src/useBaseQuery.ts

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-28 14:49:13 +01:00
Jonghyeon Ko
889d871b80
test(query-core): add test case for keepPreviousData (#8719) 2025-02-28 11:35:45 +01:00
Tanner Linsley
0f7510d4b8 release: v5.66.10 v5.66.10 2025-02-28 10:11:58 +00:00
Yoomin Kang
ac4c56cd09
fix(react-query): fix type breaking when using useSuspenseQueries with spreaded queryOptions (#8709)
* fix(react-query): fix type breaking when using useSuspenseQueries with spreaded queryOptions

* test: change test title
2025-02-28 11:07:22 +01:00
renovate[bot]
74db58292e
chore(deps): update dependency solid-js to v1.9.4 [security] (#8695)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-26 01:43:18 +00:00
Simon Schick
2d26374e46
docs: Fix links in caching.md (#8693)
It seems this document was moved without adjusting the paths.
2025-02-25 11:31:07 +01:00
Suneet Tipirneni
389ac8e894
docs(vue-query): Add docs page for vue reactivity (#8170)
* add page for vue reactivity

* add to structure
2025-02-23 09:40:17 +01:00
Tanner Linsley
e474f7340c release: v5.66.9 v5.66.9 2025-02-21 13:19:52 +00:00
Yoomin Kang
f63ba16da2
fix(types): prevent type errors and improve inference for dynamic queries on useQueries and useSuspenseQueries (#8624)
* fix(react-query): prevent type errors and improve inference for dynamic queries on useQueries and useSuspenseQueries

Previously, using useQueries and useSuspenseQueries with a dynamic array of mixed queries caused type errors. This commit ensures that type errors no longer occur and that the returned data is correctly inferred (e.g., as (number | boolean | undefined)[]) instead of unknown[].

* fix(react-query): improve type inference for useQueries and useSuspenseQueries results

* fix(react-query): fix type of queries in useQueries and useSuspenseQueries

* refactor: remove meaningless depths

* test(react-query): move type only tests

* test(react-query): fix type test error

* fix(vue-query): prevent type errors and improve inference for dynamicqueries on useQueries

* fix:  prevent type errors and improve inference for dynamicqueries

* fix: solid type tests

not sure why, but compilation must run first with the current tsc version in case solid-query isn't built yet

* fix: prevent type errors and improve inference for dynamic queries

* chore: remove test

* test(react-query): fix failing type tests

* fix: fix test syntax error

* test(react-query): remove tests for result[0].data

* fix: change the result fallback to fix test fail

* rollback(angular-query-experimental): restore injectQueries

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2025-02-21 14:14:10 +01:00
Tanner Linsley
a4db9edbc4 release: v5.66.8 v5.66.8 2025-02-20 13:12:01 +00:00
Yoomin Kang
9ac54b1f80
fix(react-query): fix inferring data as | undefined when using initialData without queryFn (#8674) 2025-02-20 14:07:11 +01:00
Matan Shushan
d07a3db968
docs(angular-query): Add Optimistic Updates Example for Angular (#8439)
* feat: add optimistic updates example for Angular

- Implemented OptimisticUpdatesComponent with Angular Query for managing optimistic UI updates.
- Added TasksService to handle query and mutation logic with , , and  handlers.
- Included mock API interceptor for simulating backend responses.

* Remove comment

* add lock file

* ci: apply automated fixes

* fix build, add example to docs

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com>
2025-02-18 20:06:08 +01:00
Tanner Linsley
c1ea870b3b release: v5.66.7 v5.66.7 2025-02-18 14:00:48 +00:00
Yunyoung Jordan Choi
caf7bde5c9
refactor: Simplify useQueries (#8661)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2025-02-18 14:53:34 +01:00
Tanner Linsley
470ecb66dd release: v5.66.6 v5.66.6 2025-02-18 09:48:01 +00:00
Yoomin Kang
56183f06a2
fix(react-query): make error to be shown when using queryOptions with initialData and skipToken in queryFn inside useSuspenseQueries (#8665)
* fix(react-query): make error to be shown when using queryOptions with initialData and skipToken in queryFn inside useSuspenseQueries

* test(react-query): update the test to have a conditional skipToken
2025-02-18 10:42:42 +01:00
Tanner Linsley
044acae38b release: v5.66.5 v5.66.5 2025-02-17 15:59:44 +00:00
Yoomin Kang
9a7bfd9799
fix(react-query): fix queryOptions with initialData to work on useSuspenseQueries (#8658) 2025-02-17 16:53:38 +01:00
Tanner Linsley
0588a4620d release: v5.66.4 v5.66.4 2025-02-17 13:15:21 +00:00
Mohammad Amin Lotfi
56c24f974e
fix(devtools): force LTR direction for DevTools panel (#8656)
* fix(devtools): force LTR direction for DevTools panel

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-17 13:52:39 +01:00
Julius Marminge
6ca0eb776c
fix: no hydration when new promise comes in (#8383)
* add failing repro test

* update assertinos

* add logg

* ehm - maybe fix?

* rm -only

* make example

* upd

* ad debug logs

* more debugging

* push

* maybe???

* rm log

* revert

* fix: ?

* fix: check for pending status again

otherwise, we risk including promises that happen because of background updates (think persistQueryClient)

* fix: clear serverQueryClient between "requests"

otherwise, we are re-using the cache and the query won't be in "pending" state the second time around

* chore: remove logs

* rethrow next build error

* kick off ci again

* add `shouldRedactError` option

* pluralize

* docs

* chore: more memory

* chore: revert more memory

* don't compare statuses if they don't exist

* ci: apply automated fixes

* lint

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-17 13:52:17 +01:00
Alex Errant
bb25d06980
docs: better document throwOnError's default (#8581)
* better document `throwOnError`'s default

* delete unnecessary defaultOptions doc
2025-02-16 16:26:57 +01:00
Tanner Linsley
accccf9698 release: v5.66.3 v5.66.3 2025-02-16 12:57:25 +00:00
Kim YoungHoon
4ab455c1ad
perf(react-query): useQueries have quadratic performance in relation to the number of queries (#8641)
Co-authored-by: 김영훈/ENT ETC TL/TL <yhoon0926@nhnlink.co.kr>
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2025-02-16 13:51:48 +01:00