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

5,036 commits

Author SHA1 Message Date
Ian VanSchooten
9aed040364
fix(devtools): Hide devtools when closed, prevent focus (#2376) v3.17.2 2021-06-17 11:02:28 +02:00
Lucas Mesquita
29559b1a5e
docs: updating rtk-query links in Normalized Caching topic in the docs (#2378) 2021-06-17 10:59:19 +02:00
Luke Morales
772c6c4e12
fix: display devtools only in production (#2382) v3.17.1 2021-06-15 22:09:57 -06:00
Curtis Hughes
be6bfbb1bc
feat: session storage persistor (#2282) v3.17.0
LocalStoragePersistor is now integrated with WebStoragePersistor, which can take any `Storage`
2021-06-11 11:38:54 +02:00
Dotan Simha
98dd91f188
docs: Added graphql-codegen plugin to the docs (#2356) 2021-06-09 08:46:38 +02:00
Robert Jędrzejewski
856b144e35
docs(mutations): Update mutations page side effects section (#2354) 2021-06-08 11:32:23 +02:00
Tunmise Ogunniyi
f00de49fb7
docs: Update paginated-queries.md (#2345) 2021-06-07 07:58:37 +02:00
Lenz Weber
7a1382f00c
docs: Update RTK-Query information in comparison.md (#2348) 2021-06-07 07:57:45 +02:00
Dominik Dorfmeister
a5b2216be6
refactor: use react-state for one-time initialization over instance refs (#2253) 2021-06-05 12:23:00 +02:00
Prateek Surana
ff830db831
fix(devtools): fix devtools crash on rejected promises on refetch (#2344) v3.16.1
Catch the error using noop when refetching the query via devtools

fixes #2014
2021-06-05 10:53:00 +02:00
Dominik Dorfmeister
2b8d2af4d1
chore: turn on noUncheckedIndexedAccess compiler flag (#2341) 2021-06-05 10:51:46 +02:00
Piyush
0de83ae852
docs: Use higher order function (array) in code example (#2342)
* Use higher order function (array) in code example

* Add coalesce operator to prevent `undefined` value
2021-06-05 10:43:39 +02:00
Zac Hayes
976fdb7f69
docs: fix typo/outdated hook reference (#2324)
According to the link below, useQueryCache was replaced by
useQueryClient in react-query 3.

https://react-query.tanstack.com/guides/migrating-to-react-query-3#the-usequerycache-hook-has-been-replaced-by-the-usequeryclient-hook

I update the wording here using the wording in useHydrate.md as a
reference.
2021-05-30 22:53:50 +02:00
Fausto Núñez Alberro
85d14d3a7e
docs: document that setDefaultOptions overwrites previous defaults (#2321) 2021-05-30 14:33:07 +02:00
kangdaehoon
74642a3ff6
docs: add missing dependency in nextjs example (#2289) 2021-05-24 09:56:10 +02:00
Mojtaba Javan
828a5a76ae
docs: change "others" to "other" (#2305) 2021-05-24 09:53:36 +02:00
Leo
8d949e1e6d
docs: update testing (#2287) 2021-05-16 19:25:58 +02:00
Erfan Mirzapour
afc6a57ec3
docs(testing): Update example to v3 (#2265) 2021-05-11 09:46:12 +02:00
Erfan Safari
c1be9bfc75
docs: Fix example (#2254) 2021-05-09 13:26:24 +02:00
Matt Wilkinson
0edc116856
chore: node 16 warning (#2249) v3.16.0 2021-05-07 10:07:29 -06:00
Damian Osipiuk
ab27f7c664
refactor(devtools): move default theme to theme file, fix types (#2213) 2021-05-07 10:06:48 -06:00
Dominik Dorfmeister
09116e54b9
feat(queryClient): add setQueriesData utility (#2204)
* feat(queryClient): add setQueriesData utility

a function which can be used to fuzzily set queryData for multiple queries

* feat(queryClient): add setQueriesData utility

docs

* feat(queryClient): add setQueriesData utility

improve docs

* feat(queryClient): add setQueriesData utility

wrap setQueriesData in notifyManager.batch to avoid unnecessary re-renders
2021-05-07 10:04:03 -06:00
Niek Bosch
c8b3ff2153
fix: do not throw errors while a query is retrying (#2147) v3.15.3 2021-05-07 09:54:47 -06:00
Dominik Dorfmeister
3b2c4088e1
feat(useQuery) transform placeholder data with select (#2108)
* feat(useQuery): run placeholderData through select

* feat(useQuery): run placeholderData through select

add a test for placeholderDataFunction

* feat(useQuery): run placeholderData through select

fix structural sharing, in the options, we might also have the placeholderData function, but on the previous result, we have the correct result from the previous iteration, which we want to keep if possible
2021-05-07 09:52:17 -06:00
Gornyy Vladimir
c932d00322
docs(useQuery): change isFetching default to false (#2071)
* docs(useQuery): change isFetching default to false

* Update docs/src/pages/reference/useQuery.md

Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>
2021-05-07 09:51:26 -06:00
Guanghui Wang
25a0eb5e33
docs: Update initial-query-data.md (#2215) 2021-05-05 08:47:27 +02:00
Adebiyi Adedotun
8026f4badf
docs: (#2218)
* Fix typo in Mutations guide

* Update docs/src/pages/guides/mutations.md

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

* Fix typo in Placeholder Query Data guide

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2021-05-04 22:38:23 +02:00
Dominik Dorfmeister
542ad07ca8
docs: update query-key docs (#2214) 2021-04-30 11:32:46 +02:00
Dominik Dorfmeister
4083c1ef8a
fix(useQuery): make sure queryKeys are always an array at runtime when passed to the queryFn (#2200) v3.15.2 2021-04-29 22:17:38 +02:00
Dominik Dorfmeister
9686426915
chore: add prettier to pipeline checks and include .ts files (#2205) 2021-04-29 21:54:57 +02:00
Adebiyi Adedotun
7d9c9f872f
docs: Fix typo in Mutations guide (#2210) 2021-04-29 21:15:32 +02:00
Guanghui Wang
2c559dbdf0
docs: Update placeholder-query-data.md (#2212) 2021-04-29 20:45:07 +02:00
Dominik Dorfmeister
2e03a615f8
fix(types): allow returning of any promise in the mutation callbacks (#2189) v3.15.1 2021-04-28 16:16:51 -06:00
Gabriel Bull
9626c1b732
feat(persist): Added hydrate and dehydrate options to the persistQueryClient function (#2131) v3.15.0 2021-04-28 19:47:46 +02:00
Damian Osipiuk
79ad5a9ccb
feat(query): add 'getObserversCount' util (#2130) v3.14.0
* feat(query): add 'getObserversCount' util

* refactor: replace usage of private observers with getter
2021-04-28 19:44:27 +02:00
Bennett
2e8f38c1ff
docs: Add curly brackets to mutation example for TS (#2193) 2021-04-25 21:24:55 +02:00
Arihant Verma
3a13b3e761
docs(Query Filters): Correct/Make More Exact: Query Filter Object Code Snippet Comments (#2190)
1. Make comment in the code snippet for `removeQueries` more exact
2. correct comment for `refetchQueries` used for `posts` query key, to use 'posts' instead of 'post'.
2021-04-25 20:38:49 +02:00
Dominik Dorfmeister
92435c77b8
fix(types): add mutationFn to UseMutationOptions (#2182) v3.13.12 2021-04-24 09:43:37 +02:00
Fabien Mauquié
07ce2a5732
fix: focus handler typings (#2152)
Typings did not allow passing a function taking `setFocused` to addEventListener

Fixing by using the same typings as in `onlineManager.ts`, same behavior as set in #2053
2021-04-24 09:43:04 +02:00
Michaël De Boey
e49afc04a7
chore: add tests for Node 16 (#2165) 2021-04-24 09:40:22 +02:00
Ian Schmitz
64dec9eb9b
docs: fix event pooling info (#2174)
* Fix React event pooling link

* Update mutations.md
2021-04-22 19:55:02 +02:00
Georges Sempéré
da85602025
docs: add some details to staleTime documentation (#2172) 2021-04-22 19:35:19 +02:00
Or Ouziel
5f7363518a
fix(types): use MutationKey in UseMutationOptions (#2164) v3.13.11 2021-04-21 17:31:39 +02:00
Suhas R. More
6fe0033e9c
docs: added quotes to improve rediability of line (#2153) 2021-04-21 14:48:25 +02:00
Jonathon Hawkins
f1c34ef679
docs: Highlighting change of the default config key. (#2155) 2021-04-20 20:26:35 +02:00
Alexander Kachkaev
c3434575a1
fix: Add TQueryKey to QueryFunction generic type in QueryOptions, remove ensureArray from Query (#2074) v3.13.10
* Add TQueryKey to QueryFunction generic type in QueryOptions

* Fix typing in souurce

* Fix inner typings, add test

* Avoid "as unknown" hack

* Remove ensureArray
2021-04-17 11:40:48 +02:00
Brandon Bayer
de28254159
fix: useInfiniteQuery suspense bug (#2119) v3.13.9
* fix useInfiniteQuery suspense bug

* real fix

* move fix to infiniteQueryObserver
2021-04-15 10:27:51 -06:00
Fredrik Höglund
2050773711
fix(hydration): import useQueryClient directly from react-query (#2121) v3.13.8 2021-04-14 13:03:02 +02:00
Ohans Emmanuel
90308e1f9e
docs(useQuery): add the useErrorBoundary option (#2084) 2021-04-14 07:33:20 +02:00
Dominik Dorfmeister
eac52f66d3
fix(devtools): import useQueryClient directly from react-query (#2113) v3.13.7 2021-04-13 22:11:43 +02:00