0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-18 19:33:22 +00:00
Commit graph

5,624 commits

Author SHA1 Message Date
Jonghyeon Ko
8d1f5429e1
test(react-query): add test case for useSuspenseQueries accept skipToken as queryFn (#8271) 2024-11-13 08:07:35 +01:00
Jonghyeon Ko
ebd4c2b4ed
test(react-query): add test case for useSuspenseInfiniteQuery accept skipToken as queryFn (#8270) 2024-11-13 08:07:00 +01:00
Jonghyeon Ko
e802711e7b
test(react-query): add test case for useSuspenseQuery accept skipToken as queryFn (#8269) 2024-11-13 08:06:15 +01:00
Jonghyeon Ko
c2b435dcd9
test(react-query): add test case for infiniteQueryOptions (#8268) 2024-11-13 08:05:42 +01:00
Jonghyeon Ko
6c9e3f318c
test(react-query): add test case for queryOptions (#8267)
* test(react-query): add test case for queryOptions

* chore: update
2024-11-13 08:05:17 +01:00
Ethan Glover
aa6d3f84df
docs: Add @tanstack/query/infinite-query-property-order link (#8285) 2024-11-13 08:03:51 +01:00
Arnoud
f56fc84159
docs(angular-query): improve examples (#8273) 2024-11-10 22:08:44 +01:00
Jonghyeon Ko
74c65cc2db
test(react-query): refactor test file structure 1 file by 1 api (#8262)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-11-08 18:11:01 +01:00
Ariel-Moroshko
7085bd11c0
docs: correct file extensions to .tsx and add type annotations (#8259)
* Fix typo: 'hydrate' to 'dehydrate' in documentation

* fix: correct file extensions to .tsx and add type annotations

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-08 14:07:07 +01:00
Tanner Linsley
8ae5aed0ba release: v5.60.1 v5.60.1 2024-11-08 10:06:49 +00:00
Gyumong
2f6c028ff8
fix(eslint-plugin-query): add Suspense query hooks to no-rest-destructuring rule (#8260)
* fix(eslint-plugin-query): add missing hooks to no-rest-destructuring rule

* test(no-rest-destructuring): add test cases for Suspense query hooks
2024-11-08 11:03:58 +01:00
Tanner Linsley
3ea6c0c875 release: v5.60.0 v5.60.0 2024-11-07 15:32:23 +00:00
Arnoud
2459701116
feat(angular-query): add withDevtools and injectDevtoolsPanel 2024-11-07 16:18:52 +01:00
Tanner Linsley
5ce9959c02 release: v5.59.20 v5.59.20 2024-11-06 14:13:37 +00:00
Dominik Dorfmeister
848df6236c fix: don't ship test files 2024-11-06 15:04:17 +01:00
Jonghyeon Ko
06e315c9ff
test(react-query): type test usePrefetchInfiniteQuery correctly (#8223)
* test(react-query): type test usePrefetchInfiniteQuery correctly

* chore: update
2024-11-04 09:47:33 +01:00
Artur Abdullin
aa92accdbd
docs(devtools): fix typo (#8248) 2024-11-04 07:38:47 +01:00
Tanner Linsley
b8bef6a5c8 release: v5.59.19 v5.59.19 2024-11-03 14:18:08 +00:00
Kae
9c93dc0642
fix(query-devtools): handle null properties for __previousQueryOptions (#8240)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-11-03 15:14:15 +01:00
CarolineClr
92defc6e42
docs(community-projects): Add Atomic CRM to the list of community projects (#8229)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-11-03 11:55:23 +01:00
Sol Lee
0f84062225
test(react-query): remove async from queryFn (#8232) 2024-11-03 11:46:49 +01:00
Tanner Linsley
1a8354f7f4 release: v5.59.18 v5.59.18 2024-11-03 09:27:34 +00:00
Dominik Dorfmeister
74f0d6aea9
fix(useQuery): don't retryOnMount when prefetchInRender is used (#8247)
otherwise, queries will not stay in error state, but immediately go into pending + fetching again; this is also shown by the fact that an additional test now failed, because it didn't reset the error boundary correctly
2024-11-03 10:24:00 +01:00
Tanner Linsley
fdc5c8eb1e release: v5.59.17 v5.59.17 2024-11-02 17:45:57 +00:00
Dominik Dorfmeister
c643635850
fix(useQueries): warn on duplicate keys (#8246) 2024-11-02 18:42:03 +01:00
Sol Lee
39a35d88cc
chore(react-query-persist-client): remove redundant setIsRestoring(true) to fix lint warning (#8213) 2024-11-02 10:56:40 +01:00
Arnoud
c61ff1e2f8
docs(angular-query): add query options from a service example (#8220) 2024-10-25 18:36:45 +02:00
Lachlan Collins
1865f0db1b
test(react-query): better query-persist-client-core import (#8212) 2024-10-24 14:21:58 +11:00
Uğurcan Emre Ataş
caf6556fce
chore(docs): update useQueryFocusAware docs (#8205)
* chore(docs): update react native useQueryFocusAware docs

* 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>
2024-10-23 15:29:30 +02:00
Tanner Linsley
820bb81ba8 release: v5.59.16 v5.59.16 2024-10-23 12:53:17 +00:00
Dominik Dorfmeister
df49fbdd63
fix(react-query): make sure promises are always finalized (#8211)
otherwise, there can be cases with multiple observers where we have listeners already, but still need to finalize
2024-10-23 14:51:27 +02:00
Haeun Nam
4fceb260d5
chore(query-core): define queryCache notify method's return type (#8191)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-10-23 12:52:04 +02:00
Jonghyeon Ko
d3e2a8ad7a
chore(react-query): remove unnecessary test file (__test__/suspense.tsx, suspense.test-d.tsx) (#8208)
* refactor(react-query): remove unnecessary test file

* chore: update
2024-10-23 11:44:17 +02:00
Ollie Chick
9d99fcb950
docs: Update disabling-queries.md (#8201) 2024-10-21 10:28:33 +02:00
Qiushi Yan
a2ea754e54
docs(react-query): fix prefetch with suspense example (#8193)
* docs: react prefetch with suspense example

* remove notifyOnChangeProps from usePrefetchQuery
2024-10-20 19:10:59 +02:00
Ariel-Moroshko
1980a11f91
docs: 'hydrate' to 'dehydrate' in documentation (#8190) 2024-10-16 14:50:54 +02:00
Tanner Linsley
0c720e1a92 release: v5.59.15 v5.59.15 2024-10-15 17:12:43 +00:00
Gwansik Kim
6c067817d9
fix(react-query): resolve overload matches error with exactOptionalPropertyTypes in queryOptions (#8186) 2024-10-15 19:09:18 +02:00
Tanner Linsley
1adaf3ff86 release: v5.59.14 v5.59.14 2024-10-15 07:20:28 +00:00
Julius Marminge
a085c92a53
fix(react-query): make queryFn optional again (#8176)
* make queryFn optional again

* more fix
2024-10-15 09:16:41 +02:00
Dominik Dorfmeister
d40985401e
fix(react-query): do not overwrite staleTime with the suspense default value if it's a function (#8174)
* fix(react-query): do not overwrite staleTime with the suspense default value if it's a function

* test: improve

* chore: fix test
2024-10-13 11:21:25 +02:00
Tanner Linsley
2649e52df5 release: v5.59.13 v5.59.13 2024-10-12 09:38:41 +00:00
Dominik Dorfmeister
5d69ad773a
fix(query-core): don't finalizeThenable of different queries (#8171)
* fix(query-core): don't finalizeThenable of different queries

if we have multiple promises in-flight, once they resolve, we need to make sure to not finalize with data / error from a different key; otherwise, we might see intermediate data of non-matching keys

* chore: extract promise tests to their own file

* test: add a test case for not resolving with intermediate data

* fix: only stop finalizing if we were previously in pending state

this makes sure we can read stale data from entries when switching to them immediately

* chore: add another test for background updates
2024-10-12 11:36:30 +02:00
Tanner Linsley
8e805fb186 release: v5.59.12 v5.59.12 2024-10-12 07:40:50 +00:00
Dominik Dorfmeister
4758303dd9
fix(query-core): move thenable-recreation into createResult (#8169)
* fix: move thenable-recreation into createResult

`updateResult` will only be called after a fetch, but when we switch between caches without a fetch, we will only call `createResult`; this fix stops `data` from the queryResult and the `thenable` to go out-of-sync; it's backwards compatible because `updateResult` also invokes `createResult`

* oops

* test: I'm sick of this flaky test

* chore: eslint reports an unused type assertion here
2024-10-12 09:36:47 +02:00
Ciarán Curley
4dfb0fc0e6
types(react-query): export QueryErrorResetBoundaryFunction (#8089)
* feat(react-query): export QueryErrorResetBoundaryFunction

Export the QueryErrorResetBoundaryFunction render prop function
signature so users don't have to write wierd types of there own

* fix: add extra functions

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-10-12 09:36:24 +02:00
Tanner Linsley
babf66f2b9 release: v5.59.11 v5.59.11 2024-10-11 18:36:13 +00:00
Gwansik Kim
a991d922e8
refactor(types): throw type error when skipToken is present in suspense query (#8082)
* refactor: handle type error when skipToken is present in suspense query

* test(react-query): add skipToken test for query hooks

* fix: merge form main

* ci: apply automated fixes

* feat(react-query): display “skipToken is not allowed” message in suspense hooks

* feat(react-query): display “skipToken is not allowed” message in suspense hooks

* feat(react-query): display “skipToken is not allowed” message in suspense hooks

* fix(react-query): update error message in useSuspenseInfiniteQuery

* test(react-query): add test case

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-10-11 20:30:05 +02:00
Tanner Linsley
c6351949d1 release: v5.59.10 v5.59.10 2024-10-11 18:24:41 +00:00
Dominik Dorfmeister
5edd617eac
fix(core): correctly gc query when suspense is used when query unmounts while it's still fetching (#8168)
* fix(core): correctly gc query when suspense is used when query unmounts while it's still fetching

the `isFetchingOptimistic` workaround was added to make sure some "thing" I don't remember anymore works in suspense; we added tests for that;

however, in the meantime, we added a minimum gcTime for suspense queries, which also solves that problem (tests still work); this makes the `isFetchingOptimistic` workaround unnecessary, and this workaround is actually what causes the unmount issue

* chore: try to stabilize a flaky test
2024-10-11 20:21:58 +02:00