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

5,038 commits

Author SHA1 Message Date
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
Tanner Linsley
ce7e31eeb7 release: v5.66.2 v5.66.2 2025-02-16 10:19:40 +00:00
andy
5426e6c0a3
fix(deps): Add react-native field to package.json for Metro resolutions (#8653) 2025-02-16 11:14:28 +01:00
Arnoud
c807ee26d4
chore(angular-query): zoneless testing (#8652) 2025-02-15 13:11:15 +01:00
Martijn Gribnau
b184cd5752
docs(react-native): fix typo (#8637) 2025-02-12 16:01:46 +01:00
Frederic R.
4621e5b6b1
docs(react-native): partial revert online manager usage (#8634)
introduced a regression in the doc with PR #8633
only expo network returns an object
NetInfo returns a function
mea culpa
2025-02-11 17:25:39 +01:00
Frederic R.
5bf569b1f3
docs(react-native): online manager usage change (#8633)
resolves #8631
2025-02-11 15:55:17 +01:00
Tanner Linsley
8f9f183f11 release: v5.66.1 v5.66.1 2025-02-10 17:44:01 +00:00
Nisharg Shah
8093fc2ce5
fix(eslint-plugin-query): add name attribute for eslint config inspector (#8584)
* fix(eslint-plugin-query): add name attribute for eslint config inspector

* ci: apply automated fixes

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-10 18:40:57 +01:00
Nisharg Shah
0186c20fc7
chore(eslint-plugin-query): update FlatConfig to Config due to deprecation (#8585)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2025-02-10 18:40:12 +01:00
TkDodo
2d677aeaa9 chore: harden nx dependency 2025-02-10 17:46:01 +01:00
Arnoud
7ff544e12e
docs(angular-query): improve queryOptions code snippets (#8601) 2025-02-02 19:26:57 +01:00
Tanner Linsley
ebe996d70d release: v5.66.0 v5.66.0 2025-01-31 09:05:17 +00:00
Dominik Dorfmeister
f86eb7e099
feat(core): add client to queryFunctionContext (#8599)
* feat: add queryClient to queryFunctionContext

* fix: remove queryClient exception

closing over a queryClient should now error, as we pass the queryClient directly to the queryFunctionContext

* fix: persister

* refactor: keep private reference to cache

* chore: fix tests

* docs: QueryFunctionContext

* refactor: derive from private member

* refactor: name it `client`

* refactor: let's go with client

* chore: try skipping the cache

* chore: re-enable caching

and try to bust it by changing sharedGlobals lol
2025-01-31 10:02:56 +01:00
Alex Batalov
a507400307
docs: Add OpenAPI Qraft React to the list of community projects (#8588) 2025-01-29 13:32:24 +01:00
Tanner Linsley
7bbc86c3ff release: v5.65.1 v5.65.1 2025-01-28 08:59:52 +00:00
Oliver Joseph Ash
088ec87e6d
fix(useSuspenseQuery): throw select errors to ErrorBoundary (#8593) 2025-01-28 09:38:21 +01:00
Tanner Linsley
c6af7a5712 release: v5.65.0 v5.65.0 2025-01-27 16:19:17 +00:00
Dominik Dorfmeister
2399bb048b
feat(types): type narrowing for isPlaceholderData (#8586)
* feat(types): type narrowing for isPlaceholderData

* fix: infiniteQueryObserver types

* fix: typing issues 🤷‍♂️

* chore: add missing tsconfig.legacy.json files

* fix: run type-tests in serial
2025-01-27 17:17:34 +01:00
Dominik Dorfmeister
97f55448b8
chore: composite monorepo (#8560)
* chore: query-query, react-query and persist-core to composite setup

* fix: self contain packages by having shared configs as symlinks

* fix: add tsConfigPaths to vite config

so that tests can pick up the path aliases

* chore: set outDir, rootDir and baseUrl for all packages

* chore: make legacy tsconfig extend regular tsconfig

* fix: tsc --build

* feat: setup project references

* fix: legacy configs also need references

* fix: oops

* fix: tsup related builds

we need to turn off composite builds for tsup

* fix: set rootDir for tsup builds

so that it can include all files it needs

* fix: remove dependencies on ^build

we no longer need builds to run tests / type checks

* fix: add separate out dir for tsc

* fix: include root eslint config in globals

* refactor: create compile task to depend on

* fix: typo

* fix: dynamic alisases for vitest

* chore: try to fix knip

* fix: make compile a cacheable task

* chore: temporary disable tests against older TS versions

* fix: ts doesn't like string return types

* fix(vue-query-devtools): fix build

* fix: test types

* Revert "chore: temporary disable tests against older TS versions"

This reverts commit 10ef560eb5.

* fix: make legacy ts builds output to their own directory

* chore: remove test:types from examples as they need a build step

* chore: fix knip

* chore: remove test:types from all examples

* Revert "Revert "chore: temporary disable tests against older TS versions""

This reverts commit d6daded7da.

* fix: outputs for compile task

* chore: remove test:types from integrations

* Revert "Revert "Revert "chore: temporary disable tests against older TS versions"""

This reverts commit 79b4844785.

---------

Co-authored-by: Damian Osipiuk <osipiukd+git@gmail.com>
2025-01-27 15:58:10 +01:00
Oleksandr Danylchenko
d595e23679
docs: fix variables obtaining path (#8589) 2025-01-26 19:24:42 +01:00
Dominik Dorfmeister
061340072a
ci: bundle size preview (#8577)
* ci: bundle size preview

* chore: syntax

* fix: markdown syntax for images

* fix: use github event number over sha

* fix: fix main link

* chore: format message

* fix: make preview bundle size part of the preview step

* fix: proper links

* fix: back to github.sha

* fix: determine correct commit SHA

* ok
2025-01-25 10:51:09 +01:00
Alex Errant
12d4542f25
docs: Document staleTime's default (#8561) 2025-01-24 14:53:38 +01:00
Favour Ohanekwu
322760bf43
docs(framework): update Next.js and Svelte documentation links (#8572)
* docs(svelte): fix writable stores tutorial link

Update the Svelte stores tutorial link to the correct URL in the Svelte Query overview documentation.

The previous link to writable-stores was broken or outdated.

* docs(ssr): update Next.js documentation links to latest version

Update outdated Next.js documentation links in the SSR guide to point to
the latest App Router documentation paths, ensuring users are directed to
the most current and relevant documentation.

Links updated:
- rewrites feature
- automatic static optimization
- rewrite parameters
2025-01-23 17:50:04 +01:00
Paul Nodet
cd88c9cd64
docs: fix invalid openapi-react-query url (#8568) 2025-01-23 07:13:33 +01:00
renovate[bot]
4a0a129803
chore(deps): update dependency vite to v5.4.12 [security] (#8563)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-22 06:01:46 +00:00
Ruud Andriessen
397fcfc141
docs: prefer using satisfies instead of type cast in persistQueryClient docs (#8551) 2025-01-20 17:26:19 +01:00
Tanner Linsley
d4d246685c release: v5.64.2 v5.64.2 2025-01-19 08:45:19 +00:00