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

5,264 commits

Author SHA1 Message Date
Tanner Linsley
2f8da6aeb3 release: v4.35.3 v4.35.3 2023-09-13 06:30:09 +00:00
Mateusz Burzyński
88a8b30b73
fix: avoid reverting state to a fetching one (#5997)
* fix: avoid reverting state to a fetching one

* Update packages/query-core/src/tests/query.test.tsx

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-09-13 08:22:47 +02:00
Tanner Linsley
4eae428bbe release: v5.0.0-beta.25 v5.0.0-beta.25 2023-09-12 08:52:59 +00:00
Dominik Dorfmeister
3f057a2477
feat(types): validate queryOptions (#5991)
* feat: validate queryOptions

* chore: "disable" test because of upstream issue
2023-09-12 10:46:53 +02:00
Tanner Linsley
1833366714 release: v5.0.0-beta.24 v5.0.0-beta.24 2023-09-10 18:35:21 +00:00
Alex Liu
6d159a73b4
fix(vue-query): reduce unnecessary type flexibility on QueryClient options (#5986) 2023-09-10 20:28:00 +02:00
Favourite Jome
4d859e9ab1
docs: Update dependent-queries.md (#5963)
* Update dependent-queries.md

This is to show how the useQueries hook can also be dependent

* Update dependent-queries.md

* Update dependent-queries.md

* Update docs/react/guides/dependent-queries.md

Thanks

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

* Update docs/react/guides/dependent-queries.md

This makes things easy, sometimes I forget we have the select option 😅

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

* Update dependent-queries.md

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-09-08 14:28:23 +02:00
Tanner Linsley
6a14854207 release: v5.0.0-beta.23 v5.0.0-beta.23 2023-09-08 12:13:12 +00:00
Dominik Dorfmeister
45ef8f8c6b
feat: suspense error handling (#5979)
only hard errors are thrown to ErrorBoundaries
2023-09-08 14:08:27 +02:00
Dominik Dorfmeister
6ac08b4a00
chore: Merge remote-tracking branch 'origin/main' into beta (#5974)
Merge remote-tracking branch 'origin/main' into beta
2023-09-07 14:00:09 +02:00
Damian Osipiuk
79632e3d2f
Merge remote-tracking branch 'origin/main' into beta 2023-09-07 11:37:32 +02:00
Alex Liu
515803f5fa
perf(vue-query): avoid unnecessary deep watch in suspense (#5919) v4.35.2
Co-authored-by: Damian Osipiuk <osipiukd+git@gmail.com>
2023-09-07 10:20:05 +02:00
Alex Liu
423bcf07cd
refactor(query-core): remove queryKey check in production environment (#5969) 2023-09-07 10:15:15 +02:00
Alex Liu
29c9b18832
refactor(vue-query): reduce code duplication (#5908)
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2023-09-07 10:14:18 +02:00
Tanner Linsley
2e9b426541 release: v4.35.1 v4.35.1 2023-09-07 08:10:20 +00:00
Alex Liu
35a4dd7a7a
fix(vue-query): ensure built-in types are not being unwrapped in queryFn context (#5954)
* fix(vue-query): ensure built-in types are not being unwrapped

* chore: prettier

* feat(vue-query): rename `Builtin` to `UnwrapLeaf` and add mor leaf
2023-09-07 10:06:51 +02:00
Tanner Linsley
4185c51e6c release: v4.35.0 v4.35.0 2023-09-07 08:06:18 +00:00
zhong666
d11280ea27
feat(vue-query): useQuery support ref args (#5027)
* feat(vue-query): useQuery support ref args

* fix: format

* chore: remove `queryFn` as `MaybeRef`

* Revert "chore: remove `queryFn` as `MaybeRef`"

This reverts commit d2a2d6c8a7.
2023-09-07 10:02:52 +02:00
Alex Liu
716c5d8b09
chore(query-core): add deprecated hint for isDataEqual (#5962) 2023-09-05 18:45:05 +02:00
Jonghyeon Ko
ef5125f68b
docs: update suspensive-react-query.md (#5961) 2023-09-05 15:35:34 +02:00
Heloi Neto
dfad1cf192
docs: fix typo in optimistic-updates.md (#5960) 2023-09-05 14:14:03 +02:00
Vince Fulco--Bighire.tools
84cd232e81
docs: Update queries.md (#5958)
Fixed some grammar and spacing
2023-09-05 11:40:16 +02:00
Dominik Dorfmeister
201735927f chore: prepare possibility to have rc releases 2023-09-03 10:56:32 +02:00
Tanner Linsley
ea48ce85e6 release: v4.34.4 v4.34.4 2023-09-01 19:15:50 +00:00
Alex Liu
150da8a42e
fix(vue-query): ensure the queryFn parameter has the correct type (#5935)
Co-authored-by: Damian Osipiuk <osipiukd+git@gmail.com>
2023-09-01 21:13:04 +02:00
Prateek Parashar
96b844e22e
docs: Removed LayoutData type from "Using prefetchQuery" example (#5934)
There's no need to have a return type `LayoutData` on the `load()` function in the example `export async function load(): LayoutData {}`, because svelte is able to infer the return type itself. In fact, you actually get a warning from typescript if you use it :- "Return type annotation circularly references itself."

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-09-01 14:16:02 +02:00
Tanner Linsley
737110d6b7 release: v4.34.3 v4.34.3 2023-09-01 05:46:08 +00:00
Mark Brockhoff
cbda68de92
fix(vue-query): Make query options watchers sync (#5929)
* fix: make watcher for queryOptions sync to reflect changes to them immediately

* fix: make option watchers sync for other composibles

* test: improve test for dependent queries

* test: update test to check for dependent query to be called with the correct key

* docs: fix example to use queryKey instead of reactive variable

* test: resolve mock queryFn

* test: keep fetch status checks in test for dependent queries

---------

Co-authored-by: Damian Osipiuk <osipiukd+git@gmail.com>
2023-09-01 07:43:02 +02:00
Lachlan Collins
744e5eadd4
chore: Update Nx dependencies (#5941) 2023-09-01 10:00:02 +10:00
Fabien
1c2171755b
doc(react-query): useInifiniteQuery fetching state and fetchNextPage … (#5933)
* doc(react-query): useInifiniteQuery fetching state and fetchNextPage guidance

* Correct sentence
2023-08-31 14:54:33 +02:00
Damian Osipiuk
98c0803ff8
docs(vue-query): fix migration guide link, add injectionContext section (#5936) 2023-08-30 23:56:18 +02:00
Tanner Linsley
395a9a1378 release: v5.0.0-beta.22 v5.0.0-beta.22 2023-08-30 08:20:03 +00:00
Eduardo San Martin Morote
a0fae505d9
feat(vue-query): support injectable contexts (#5886)
* feat(vue-query): support injectable contexts

This feature requires Vue 3.3.0, which has been out for a while now. It
allows using vue-query APIs in places where it is valid to use them but
currently throws an error.

- `hasInjectionContext()`: https://github.com/vuejs/core/pull/8111
- `app.runWithContext()`: https://github.com/vuejs/core/pull/7451

* refactor: add dev warning for effectScope

* fix: add memory leak warnings, fix tests

* chore: bump vue-demi

* chore: bump vue version in integrations

---------

Co-authored-by: Damian Osipiuk <osipiukd+git@gmail.com>
2023-08-30 10:11:28 +02:00
Tanner Linsley
a496b3d74f release: v5.0.0-beta.21 v5.0.0-beta.21 2023-08-29 15:38:37 +00:00
Aadit Olkar
f97742ef36
feat(solid-query-persist-client): Solid.js implementation of client persistence (#5858)
* added solid-query-persist-client package

* isRestoring context

* convert persistence logic to solid

* modify tests for Solid

* modify test for increased reactivity

* fix Provider

* fix jest for Solid

* add isRestoring logic

* prettier + lint

* make fixes to pass tests

* change testing to vitest

* add isRestoring check

* update test

* fix staleTime test

* add unsubscribe condition

* formatting

* update createBaseQuery to refetch after hydration

* refetch on hydration

* formatting and build test fix

* T[] -> Array<T>

* changed useQueryClient to return a signal

* keep queryClient reactive, without breaking API
2023-08-29 11:31:45 -04:00
Tanner Linsley
35f23929a8 release: v4.34.2 v4.34.2 2023-08-29 08:59:34 +00:00
Dominik Dorfmeister
280682e9a9
fix(query-broadcast-client): allow passing all broadcast-channel options (#5925)
* fix(query-broadcast-client): allow passing in type for the channel

allowed values are: 'native', 'idb', 'localstorage', 'node'

* fix(query-broadcast-client): allow passing all broadcast-channel options

* docs: options
2023-08-29 10:56:52 +02:00
rliljest
8cedf5c302
docs: update suspense.md (#5923)
* docs: update suspense.md

Fixes https://github.com/TanStack/query/issues/5920

* Update docs/react/guides/suspense.md

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-08-29 10:07:03 +02:00
Tanner Linsley
34f1e8c960 release: v4.34.1 v4.34.1 2023-08-28 08:33:06 +00:00
justsaul
1f09400d1f
fix(eslint-plugin-query): provide missing peerDependencies (#5917)
* fix(eslint-plugin-query): provide missing peerDependencies

* Update packages/eslint-plugin-query/package.json

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

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-08-28 10:30:41 +02:00
Tanner Linsley
6d0538a032 release: v5.0.0-beta.20 v5.0.0-beta.20 2023-08-25 20:46:40 +00:00
Alex Liu
5e958af2d4
perf(vue-query): reduce unnecessary computed() in useIsFetching (#5905)
* perf(vue-query): reduce unnecessary `computed()`

* chore: rename function

* refactor: use `watchSyncEffect` instead of `watchEffect`
2023-08-25 22:42:32 +02:00
Peter Mouland
78d473db42
docs(use-queries): fix documented examples (#5902) 2023-08-25 14:11:09 +02:00
Ho Chan Lee
857ecd91b6
docs(migrating-to-react-query-4): update description of refetchactive--refetchinactive (#5904) 2023-08-24 16:22:18 +02:00
Tanner Linsley
845751180d release: v4.34.0 v4.34.0 2023-08-23 07:43:38 +00:00
Alex Liu
1858966fb9
feat(vue-query): support invoke in vue runWithContext() (#5703)
* feat: support invoke in vue `runWithContext()`

* chore: run prettier

* feat(vue-qury): add a second parameter to inject to avoid vue warning

* test: update test

* fix: add warning about potential memory leak

---------

Co-authored-by: Damian Osipiuk <osipiukd+git@gmail.com>
2023-08-23 09:40:53 +02:00
Dominik Dorfmeister
13b17ee45d
chore(eslint): set array-type lint rule to generic (#5899)
* chore(eslint): set array-type lint rule to generic

* chore: fix prettier
2023-08-22 14:18:01 +02:00
Tanner Linsley
770d454fef release: v5.0.0-beta.19 v5.0.0-beta.19 2023-08-21 06:40:12 +00:00
ecyrbe
94d6b6bdf3
fix(infinite query): fix inferrence issue (#5892)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-08-21 08:32:15 +02:00
Tanner Linsley
4a907932ae release: v5.0.0-beta.18 v5.0.0-beta.18 2023-08-20 06:45:25 +00:00