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

5,909 commits

Author SHA1 Message Date
swandir
342c1fba38
fix: do not suspend on subsequent page loads (#531) v1.5.4 2020-06-01 22:40:30 -06:00
Daniel Schmidt
e5f0bb36c6
fix: Add error types (#525)
* Add error types

* Fix indentation
2020-06-01 22:39:12 -06:00
razh
7f3769dea2
docs: fix queries typo (#505) 2020-06-01 22:38:15 -06:00
Kamran Ayub
f6434fa74e
fix(config): Restore previous original config when ReactQueryConfigProvider is unmounted (#429)
* restore default config on cleanup

* Add test for nested configs

* Revert "restore default config on cleanup"

This reverts commit c7647a47a6.

* restore settings

* At least one failing test will pass

* Fix act warning

* Fix other test, copy suspense logic
2020-05-29 21:30:07 -06:00
David Rodriguez Fuentes
9e0e7913b1
docs: Update "Pass a falsy query key" section in README.md (#527)
Co-authored-by: David Rodriguez Fuentes <drodriguez@morningconsult.com>
2020-05-28 21:02:56 -06:00
Navin Moorthy
66f462c2f9
docs: Update useInfiniteQuery API (#519) 2020-05-26 07:34:43 -06:00
Cory House
fe02f751ee
docs: Grammer fixes (#518) 2020-05-26 07:32:51 -06:00
Cory House
2dcd7673ce
docs: Remove swr comparison point (#516) 2020-05-26 07:31:35 -06:00
Daniel Huth
a0f77121c2
fix(types): Fix error is typed as unknown (#483) (#514) v1.5.3 2020-05-26 07:28:15 -06:00
razh
4336a52a68
docs: fix resolvedData typo (#502) 2020-05-20 08:20:27 -06:00
Tanner Linsley
fe6f161009
Update README.md 2020-05-18 15:35:50 -06:00
Jack
f76c8601a3
fix: clear cache timeouts (#495) v1.5.2
* fix: clear cache timeouts

calling queryCache.clear() was empting the queries object but not tearing any of them down
this commit adds a clear method to the individual queries, which cancels timeouts and promises
queryCache.clear now loops through the queries and clears each one
I've also update the return type of queryCache.clear as it doesn't actually return anything

* fixup! fix: clear cache timeouts

Co-authored-by: Jack Ellis <jack.ellis@godaddy.com>
2020-05-16 18:48:55 -06:00
Yixuan Xu
c5b49be4c8
tests: Add test for refetchInterval (#498)
* Add test for refetchInterval
Close #405

* Trigger CI

* avoid use snapshot

Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>
2020-05-15 22:19:26 -06:00
Tanner Linsley
584932e1c4 docs: fix to query.state.updatedAt
Fixes #497
2020-05-15 15:24:51 -06:00
Tanner Linsley
80e82daedd fix: cancelQueries now uses the query.cancel method v1.5.1
fix: query.cancelQueries was renamed to query.cancelPromises
2020-05-15 15:20:43 -06:00
Tanner Linsley
3ef9c7cba1 Merge branch 'master' of https://github.com/tannerlinsley/react-query v1.5.0 2020-05-15 15:06:32 -06:00
Tanner Linsley
de633a3d2e fix: export deepIncludes 2020-05-15 15:06:29 -06:00
Jack
51375fdfb7
feat: query cache provider (#476)
* feat: query cache provider

the query cache now comes from a context, meaning users can easily override and control the cache being used inside their application

* fix: track multiple query caches

this commit does the follwing:
track all active query caches added via the provider, handles mounting/unmounting
if creating a cache, ensure we only do it once
when unmounting an internally-created cache, make sure to clear it first
setFocusHandler now loops through all of the currently-active caches

* test: add in-depth tests around query cache providers

* style: format touched files

* fixup! style: format touched files

* docs: correct readme description

Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>

Co-authored-by: Jack Ellis <jack.ellis@godaddy.com>
Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>
2020-05-15 15:04:17 -06:00
José Nunes
588d54cfc5
Add cancelQueries types and missing links in docs (#494)
* fix(Types): add queryCache.cancelQueries types

* docs: add missing links to cancelQueries
2020-05-14 18:00:43 -06:00
Henry Q. Dineen
f671595916
docs(CONTRIBUTING): fix "chnages" typo (#491) v1.4.4 2020-05-13 22:11:05 -06:00
Henry Q. Dineen
99fd14540c
perf(babelrc): enable externalHelpers option for babel-plugin-transform-async-to-promises (#490) 2020-05-13 22:10:05 -06:00
Henry Q. Dineen
11456a8f6d
chore(rollup): run terser plugin for react-query.min.mjs bundle (#488) 2020-05-13 22:05:21 -06:00
meesvandongen
794e8be3bb
chore: replace swapi.co with swapi.org (#487)
Co-authored-by: Mees van Dongen <mvandongen@ilionx.com>
2020-05-13 07:39:04 -06:00
Tanner Linsley
88031d8c0f Merge branch 'master' of https://github.com/tannerlinsley/react-query v1.4.3 2020-05-12 16:54:07 -06:00
Tanner Linsley
40460dbd06 tests: fix error boundary test 2020-05-12 16:54:02 -06:00
Ben Farr
2d7803f565
fix: falsy query key clears resolvedData in usePaginatedQuery (#482)
* Add clearOnNoQuery to usePaginatedQuery

* Change: make clearOnNoQuery the default

Co-authored-by: Ben Farr <ben.farr@marmalade.co.uk>
2020-05-12 16:45:46 -06:00
Tanner Linsley
65543e566e fix: allow suspense lifecycle callbacks without using query instances v1.4.2 2020-05-12 16:38:07 -06:00
Tanner Linsley
efd8654669 chore: update example logging 2020-05-12 16:37:23 -06:00
Tanner Linsley
7868c9ea70 Merge branch 'master' of https://github.com/tannerlinsley/react-query 2020-05-12 14:04:15 -06:00
Tanner Linsley
db2874250e Update README.md 2020-05-12 14:02:18 -06:00
Ryan Dsouza
f8bdce97c7
fix: pass generics to setQueryData and getQueryData to infer the type (#478) v1.4.1
* feat types: pass a paramter to `setQueryData` to infer the type

without this, one would have to cast the type  returned.

* implement the same for `setQueryData`

* remove unnecessary import
2020-05-12 09:34:59 -06:00
ddonchuk
eae537dcab
fix: 🐛 refetch queries type (#481)
Co-authored-by: dannying <ddonchuk@shakuro.com>
2020-05-12 09:34:12 -06:00
Tanner Linsley
840020f266 Update README.md 2020-05-12 00:21:17 -06:00
Tanner Linsley
337e1ecde5 Merge branch 'master' of https://github.com/tannerlinsley/react-query 2020-05-12 00:20:40 -06:00
Tanner Linsley
51adad2ce2 Update README.md 2020-05-12 00:20:19 -06:00
Tanner Linsley
a280d34bac
chore: Test strange test output in CI 2020-05-11 19:12:38 -06:00
Tanner Linsley
00a3ab17d4 test: Ignore weird test temporarily 2020-05-11 17:00:55 -06:00
Tanner Linsley
4855cf72c4 chore(examples): use cancelQueries in optimistic update example v1.4.0 2020-05-11 10:59:41 -06:00
Tanner Linsley
52042e95d2 feat(queryCache): add queryCache.cancelQueries method 2020-05-11 10:59:10 -06:00
Tanner Linsley
c82a82869a fix(suspense): reset query status when error is thrown in suspense
Fixes #468
2020-05-11 10:26:11 -06:00
Tanner Linsley
b02f8dd01a fix(concurrentMode): refetchOnMount now only considers non-placeholder instances v1.3.6
Fixes #465
2020-05-11 08:06:57 -06:00
Tanner Linsley
83ced96255 fix(suspense): Suspense instances now unmount properly v1.3.5 2020-05-11 08:04:02 -06:00
Andrew Razumovsky
03614d1a98
test(suspense): ensure that query instance is removed when component unmounts (#455) 2020-05-11 08:02:37 -06:00
Rohit Garg
ff5d6a7518
chore(github action): Detect broken links in documentation (#473) v1.3.4
* chore(github action): Detect broken links in documentation

* docs: update name
2020-05-09 10:21:09 -06:00
Costas Ioannou
827d5bc38a
fix(queryCache): allow throwOnError prefetchQuery option in typescript (#467) 2020-05-09 10:20:41 -06:00
Jakub Michálek
2fbb004417
docs: mention the fact that mutate can no longer be called as an event listener (#464)
Co-authored-by: Jakub Michalek <jakub.michalek@socialbakers.com>
2020-05-06 23:51:43 -06:00
allcontributors[bot]
a6c9e6384a
docs: add gargroh as a contributor (#458)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-05-06 01:02:48 -06:00
Ian Lovett
e72d84f1df
fix(typescript): changed root location of types relative to main index.js to fix import autocomplete (#452) v1.3.3 2020-05-05 12:18:51 -06:00
Tanner Linsley
d99bfa7661 chore: Change version to 0.0.0 2020-05-05 12:13:44 -06:00
Tanner Linsley
223f655567 fix: Test semantic-release! v1.3.2 2020-05-05 12:08:59 -06:00