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

5,975 commits

Author SHA1 Message Date
Tanner Linsley
a130369c02 Create config.yml 2020-06-11 15:13:06 -06:00
Avinash
198c97f255
docs: add avinash as a contributor (#573)
Co-authored-by: Avinash <aviesdfsdfsdnash.kumar@instarem.com>
2020-06-10 22:05:45 -06:00
Tanner Linsley
b9690d4efb
fix: force patch release 2020-06-10 10:48:54 -06:00
Benjamin Koltes
f383ae6f88
avoid using externalHelpers in prod (#568) 2020-06-10 10:48:17 -06:00
dependabot[bot]
18933a8ea9
chore(deps): bump websocket-extensions in /examples/suspense (#554)
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-10 10:45:44 -06:00
dependabot[bot]
0ac87eb541
chore(deps): bump websocket-extensions in /examples/playground (#555)
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-10 10:45:38 -06:00
dependabot[bot]
4ce329fd46
chore(deps): bump websocket-extensions in /examples/basic (#556)
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-10 10:45:33 -06:00
dependabot[bot]
023871abfb
chore(deps): bump websocket-extensions in /examples/star-wars (#557)
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-10 10:45:28 -06:00
dependabot[bot]
ab6ebfdef0
chore(deps): bump websocket-extensions in /examples/custom-hooks (#558)
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-10 10:45:22 -06:00
Tanner Linsley
55e4f75954
Delete links-test.yml 2020-06-09 16:19:39 -06:00
Avinash
cf9bd9c167
fix: remove shouldContinueRetryOnFocus on success (#563) v1.5.7
Co-authored-by: Avinash <aviesdfsdfsdnash.kumar@instarem.com>
2020-06-08 12:58:20 -06:00
Daniel Schmidt
94cdeb5a37
fix(types): ReactQueryConfigProvider error type (#560) v1.5.6
This fixes #542 by allowing the `<ReactQueryConfigProvider>` to get the generic error type.
2020-06-08 08:41:53 -06:00
Jack
4261a65fe7
fix(types): default TError type (#547)
after adding the TError generic throughout the codebase, there are now several places where typescript gets cross. QueryOptions<string> for example used to work fine, but now demands that you provide an error type. In other places it's defaulted to Error.
It seems like a logical solution to just add this default everywhere. This means we're being consistent as well as not causing a breaking change.

Co-authored-by: Jack Ellis <jack.ellis@godaddy.com>
2020-06-04 06:54:47 -06:00
Dominik Dorfmeister
b528564f20
fix(types): adapt type definition of dataOrUpdater in setQueryData (#540)
since the updater receives `T | undefined`, it is difficult to construct a `T` from that. oldData can legitimately be `undefined`, but since `getQueryData` can also return `undefined` at any point, it makes more sense to have the updater be able to return `undefined` as well, which also means that `data` itself can be `undefined`
2020-06-02 10:33:17 -06:00
Tanner Linsley
3a589bb50a Merge branch 'master' of https://github.com/tannerlinsley/react-query v1.5.5 2020-06-01 22:44:53 -06:00
Tanner Linsley
4f56c31ba5 fix: useMutation does not await non-promise
Fixes #504
2020-06-01 22:44:47 -06:00
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