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
Artem Malko
7101bf3c0e
fix(eslint-plugin-query): update eslint-exhaustive-deps rule description (#4760) v4.20.10 2023-01-05 14:34:35 +01:00
Nguyễn Anh Thiện
6ad74411e6
docs(guides refetchOnWindowFocus): more clear instructions for the use (#4759) 2023-01-05 11:06:08 +01:00
Tanner Linsley
d7d98a9789 release: v4.20.9 2023-01-04 08:34:17 +00:00
Scott Kyle
05a61b102d
fix(query-core): allow multiple roots to share same QueryClient (#4636) v4.20.9
* fix(query-core): allow multiple roots to share same QueryClient

If two roots shared the `QueryClient` instance, then it would never unsubscribe from online/focus manager listeners and would also forever receive duplicate events because the unsubscriber functions would get "forgotten".

These issues would be especially noticeable on React Native apps where multiple roots that share the same `QueryClient` are common.

* test(QueryClient): Add test for multiple mounts, single unmount

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-01-04 09:29:55 +01:00
Hasan
70ddaa902e
docs: Add reactotron-react-query plugin (#4744) 2023-01-03 18:45:54 +01:00
Tanner Linsley
cf1846e330
Update README.md
All contributors was out of date.
2023-01-03 09:57:32 -07:00
Aryan Deora
17afa9b787
(fix: solid-query): Revert breaking build (#4733)
This is in reference to the breaking build in solid-query.
Because client Context value is never passed into the provider
RELEASE_ALL
2023-01-01 16:50:37 +01:00
allcontributors[bot]
7d3f80386d
add Moshyfawn as a contributor for code (#4731)
* update README.md [skip ci]

* update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-12-30 22:31:37 +01:00
Damian Osipiuk
fa04a1d26b
docs(vue-query): fix vue-query imports in docs, correct section replacements (#4728) 2022-12-30 17:27:17 +01:00
Dominik Dorfmeister
afbd788af5
docs: fix reference to course 2022-12-30 11:13:04 +01:00
Tanner Linsley
934b8941ec release: v4.20.8 2022-12-30 08:37:28 +00:00
Eliya Cohen
243af3ece9
fix(eslint-plugin-query): exhaustive-deps false positives (#4725) v4.20.8 2022-12-30 09:33:31 +01:00
Damian Osipiuk
46fae940e1
docs(vue-query): migrate vue-query docs (#4710)
* docs: vue guides

* docs: vue query docs part 2

* docs: vue-query docs part 3

* docs: vue-query docs part 4

* docs: vue-query api reference

* docs: vue-query examples

* docs: fix TanStack casing
2022-12-29 09:24:43 +01:00
Bram van Leur
55001bfe92
docs(examples): Fix react-router example (#4719)
Use `queryKey` attribute to check for existing data.

Co-authored-by: Bram van Leur <bvanleur@bol.com>
2022-12-29 09:01:37 +01:00
allcontributors[bot]
f7a496fa9d
add Mamoanwar97 as a contributor for code (#4707)
* update README.md [skip ci]

* update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-12-25 19:30:52 +01:00
Tanner Linsley
499d911771 release: v4.20.7 2022-12-25 18:05:05 +00:00
Eliya Cohen
1d7ef5a165
fix(eslint-plugin): allow query key factory style (#4704) v4.20.7
* allow query key factory style

* fix conflict
2022-12-25 16:29:26 +01:00
Tanner Linsley
3c91dbdf3b release: v4.20.6 2022-12-25 12:32:36 +00:00
Eliya Cohen
2e80cf7413
fix(eslint-plugin-query): prefer object syntax should not remove generics (#4703) v4.20.6 2022-12-25 13:28:51 +01:00
Johannes Przymusinski
454482c4d1
docs(vue-query): add example for dependent queries (#4330)
* docs(examples/vue): add example for dependent queries

* docs(examples/vue): don't unwrap authorId in queryKey

* docs(examples/vue): run pnpm i

* chore: apply code formatting
2022-12-23 10:08:18 +01:00
James
32b04d2ef8
docs(vue-query): fix import path in vue installation docs (#4665)
* Fix VueQueryPlugin import path

* update second import
2022-12-21 10:02:12 +01:00
Damian Osipiuk
3cfd00c27a
docs: vue docs with refs and replacements of react docs (#4656) 2022-12-19 11:14:43 +01:00
xiaoyao
83a6d1b13b
docs: Update Overview.md (#4657)
update overview demo code
2022-12-18 13:14:11 +01:00
Damian Osipiuk
198017b75d
docs: align routing with framework switcher (#4608)
* docs: align routing with framework switcher

Co-authored-by: Aryan Deora <adeora@iu.edu>

* docs: remove angular from docs config

* docs: add doc ref redirect example

Co-authored-by: Aryan Deora <adeora@iu.edu>
2022-12-16 10:25:43 +01:00
Tanner Linsley
2e331bfc7a release: v4.20.5 2022-12-15 22:58:34 +00:00
Alex Kozack
e97c6bce68
refactor(vue-query): replace isRef with unref where possible (#4641) v4.20.5 2022-12-15 23:54:46 +01:00
zognotadog
194a2db83c
docs: update updates-from-mutation-responses.md (#4648)
Missing bracket
2022-12-15 19:24:45 +01:00
Tanner Linsley
4abce31572 release: v4.20.4 2022-12-14 19:01:15 +00:00
Aadesh Chandra
b82f05e302
refactor: disallow implicit returns (#4640) v4.20.4
close TanStack/query/issues/4607
2022-12-14 19:56:06 +01:00
Tanner Linsley
4f9557170d release: v4.20.3 2022-12-14 17:39:38 +00:00
Dominik Dorfmeister
ce1259c720
fix(query-async-storage-persister): support wider range of types (#4639) v4.20.3
* fix(query-async-storage-persister): support wider range of types

interfaces like localforage return a Promise<T> from setItem; we don't really care, as long as it's a Promise

* chore: stabilize test

set a staleTime so that we don't get an additional fetch after the component re-mounts
2022-12-14 14:58:46 +01:00
Tanner Linsley
443b5a8918 release: v4.20.2 2022-12-14 07:32:25 +00:00
Aryan Deora
2e4ca01376
refactor(solid-query): vite-plugin-solid backwards compatibility v4.20.2
RELEASE_ALL
2022-12-14 08:27:11 +01:00
Dominik Dorfmeister
22fbdaf696 chore: stabilize tests 2022-12-14 08:17:10 +01:00
Tanner Linsley
d5501ad017 release: v4.20.1 2022-12-14 07:14:19 +00:00
Eliya Cohen
d261823cc1
fix(eslint-plugin): support rule prefer-object-syntax with multi lines (#4637) v4.20.1
* fix rule prefer-object-syntax with multilines

* simplify
2022-12-14 08:10:28 +01:00
Tanner Linsley
3c9df2028c release: v4.20.0 2022-12-13 19:35:29 +00:00
Damian Osipiuk
57ecd32776
feat(vue-query): allow to pass queryClient directly in useQueries options (#4625) v4.20.0
* feat(vue-query): allow to pass queryClient directly in useQueries options

* chore: fix formatting

* fix: remove deprecation message in production

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2022-12-13 20:30:56 +01:00
Dimitri Mitropoulos
d7275d14f3
chore: remove leftover lerna config (#4632) 2022-12-13 20:05:22 +01:00
Ronald Rey
d2e9d3ea3b
docs(query-cancellation): remove more references to old cancel fn (#4631)
Apparently these were missed in a1050eb0d7.

It is confusing because the [Migration to v4 guide](https://tanstack.com/query/v4/docs/guides/migrating-to-react-query-4#the-cancel-method-on-promises-is-no-longer-supported) 
states that the `cancel` property in promises is no longer supported, but the docs for Query Cancellation seem to imply that it is.

I assume that it is not supported anymore based on the commit linked above, the migration guide and my own testing.
If that is indeed the case, let's clean this up.
2022-12-13 20:04:34 +01:00
Dominik Dorfmeister
2a370abc8c
docs(examples): prefer object syntax for examples (#4621)
* docs: make useQuery use the object syntax

* docs(examples): useTransition doesn't have a timeout option anymore

* docs(examples): prefer object syntax for queryClient methods

* docs(examples): prefer object syntax for solid examples

* docs(examples): prefer object syntax for vue examples

* docs(examples): prefer object syntax for mutation examples
2022-12-11 11:54:49 +01:00
Tanner Linsley
9b21609350 release: v4.19.1 2022-12-03 13:53:23 +00:00
Dominik Dorfmeister
6df7b6f971
fix(query-core): revert isServer check to check for window (#4592) v4.19.1
because document is not defined in react-native
additionally, we can check for `Deno` being available on the window to support the Deno runtime
2022-12-03 14:49:10 +01:00
jmlee2k
5ebc68a1d3
docs(useQuery): remove reference to setQueryData from onSuccess doc (#4585)
onSuccess ISN'T called after setQueryData since
PR #2969
2022-12-02 15:53:56 +01:00
Tanner Linsley
24ac9f9e00 release: v4.19.0 2022-12-01 20:18:31 +00:00
Gaurav Singh
34e0ad239b
feat(query-core): improve environment check to support more server runtimes (#4578) v4.19.0 2022-12-01 21:13:33 +01:00
Wojciech Słodziak
23bd5640c3
docs(examples/react): fix prefetch pagination logic when trying to quickly get to the last page (#4564)
* bugfix/pagination-example-fetch-next-page: fix basing decision whether next page should be refetched on information from two pages prior

 In the useQuery call we set "keepPreviousData", so we must make sure that for fetching the next page we don't base our logic on the data from potentially two pages away.
If user would click very fast to get to the last page we would potentially load eleventh page and that could result in an error depending on the backend implementation.

* bugfix/pagination-example-fetch-next-page: update useEffect dependency array to reflect all used variables
2022-11-30 19:42:19 +01:00
Pierre-Luc Paquin
16000b8db0
docs: Adds Using Remix to SSR guide. (#4566) 2022-11-29 21:30:17 +01:00
Allan López
f364fbbf49
docs(useInfiniteQuery): add isRefetching to returned properties docs (#4567) 2022-11-29 21:13:57 +01:00
Michal Tecza
e5786715c6
docs: fix the example for queryClient.ensureQueryData (#4572) 2022-11-29 20:29:39 +01:00