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

5,005 commits

Author SHA1 Message Date
Tanner Linsley
65841a6ec0 release: v4.17.1 2022-11-26 00:12:29 +00:00
Aleksandr Semenov
379297a74b
fix(vue-query): export proper useQuery return type (#4513) v4.17.1
* fix(vue-query): export useQuery return type

* fix(vue-query): export useInfiniteQuery return type

* fix(vue-query): re-export UseQueryDefinedReturnType

Co-authored-by: Aleksandr Semenov <juvs@ecwid.com>
Co-authored-by: Damian Osipiuk <osipiukd+git@gmail.com>
2022-11-26 01:03:12 +01:00
Gustavo Lima
1e998d34b0
docs: fix typo in parallel-queries.md (#4529) 2022-11-21 22:25:04 +01:00
Michal Tecza
b79f45806c
test: stabilize some useQuery and useInfiniteQuery tests (#4526)
* test: stabilize the test for overriding the cursor in the fetchNextPage callback

* test: stabilize the test for error when a selector throws

* style: apply formatting

* test: stabilize the test for variables in a query function
2022-11-20 15:55:14 +01:00
Michal Tecza
d37594a99a
test: stabilize useQuery tests (#4525)
* test: stabilize the test for onSettled callback

* test: stabilize the test re-renders when tracking but not using props

* test: stabilize the test for onSuccess callback on disabled query

* test: stabilize the test for online/offline scenario
2022-11-19 19:01:40 +01:00
airman5573
899773a486
docs: Add a missing closing bracket (#4509) 2022-11-15 00:21:21 +01:00
Tanner Linsley
0c27968989 release: v4.17.0 2022-11-14 00:36:37 +00:00
Damian Osipiuk
c2447a9fd0
feat(vue-query): client persister (#4469) v4.17.0
* feat: vue-query client persister

* fix: change devtools link to tanstack query

* chore: update repository in package.json

* docs: persister example

* feat: propagate isRestoring trough queryClient

* fix: useIsFetching allow refs as args

* fix: allow ref args for useIsMutating

* test: add test for isRestoring

* chore: fix formatting

* fix(vue-query): suspense unsubscribe from watch

* feat: persistent useQueries

* chore: examples formatting

* test: persister

* chore: fix lint errors

* chore: fix weird lint errors
2022-11-14 01:32:51 +01:00
Tanner Linsley
9009b0d4f1 release: v4.16.1 2022-11-13 19:04:23 +00:00
Naymi
9584a6a6a6
fix(vue-query): useQueries options allow empty array (#4505) v4.16.1 2022-11-13 19:12:44 +01:00
Dante
f65e7af10f
test: add useQueries with suspense tests (#4502)
* test: add useQueries with suspense tests

shouldn't unmount before all promises fetched
should suspend all queries in parallel - global configuration

* fix should suspend all queries in parallel - global configuration - remove query suspense option

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2022-11-13 10:33:18 +01:00
Tanner Linsley
409a684534 release: v4.16.0 2022-11-13 07:59:54 +00:00
Stefan Djokovic
d99d94e524
feat(devtools): add 'copy' button in devtools (#4468) v4.16.0
* feat(devtools): add copy object data explorer

* fix: address code comments

* fix: add logs to investigate iframe copy issue

* feat: add checkmark on copy

* add: error state

* add: test

* fix: test import

* fix: layouts and use superjson

* fix: test comment

* fix: typing and onclick only on nocopy

* prettier

* fix: test error react17

* fix: format test

* fix: test copy and add await

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2022-11-13 08:55:01 +01:00
Tanner Linsley
1883be39db release: v4.15.1 2022-11-13 07:54:27 +00:00
Dominik Dorfmeister
32b3aac537
fix: lock dependency of @tanstack/match-sorter-utils to 8.1.1 (#4501) v4.15.1
because the newer versions have trouble with esm and webpack4

RELEASE_ALL
2022-11-13 08:50:11 +01:00
Tanner Linsley
2bcc2a9280 release: v4.15.0 2022-11-12 07:32:04 +00:00
Dominik Dorfmeister
9d9aea5fb1
feat(react-query): suspense for useQueries (#4498) v4.15.0
* feat: suspense for useQueries

* generics for fetchOptimistic

* tests: useQueries suspense
2022-11-12 07:59:35 +01:00
Tanner Linsley
41e2af25e8 release: v4.14.8 2022-11-11 20:13:06 +00:00
Minami
d5bf345d98
fix(react-query-devtools): unset padding for resetting after closed (#4477) v4.14.8
* fix(devtools): unset padding for resetting after closed

* fix(devtools): restore inline padding styles after closed

* fix(devtools): undo unnecessary style tag

* fix(devtools): add test
2022-11-11 21:09:12 +01:00
SeanBarker182
54f16f69ff
docs: Adds a missing square bracket (#4488) 2022-11-11 13:06:07 +01:00
Tanner Linsley
f079297ff8 release: v4.14.7 2022-11-11 11:57:38 +00:00
Eliya Cohen
82adc95c24
fix(eslint-plugin-query): run exhaustive dep check on referenced query key (#4480) v4.14.7
* run exhaustive dep check on referenced query key

* fix various eslint issues
2022-11-11 12:53:15 +01:00
Abdullah Al Sadi
67ddf17b65
docs: Update disabling-queries.md (#4472)
fix a typo
2022-11-11 09:59:24 +01:00
Damian Osipiuk
58f3cec654
docs(vue-query): vue2, nuxt3 examples (#4384) 2022-11-11 09:58:57 +01:00
Tanner Linsley
3c1959d4a8 release: v4.14.6 2022-11-11 08:48:45 +00:00
Eliya Cohen
933cd410ae
fix(eslint-plugin): false positive for factory functions (#4497) v4.14.6
* fix false positive for factory functions

* add more test

* lint fix

* format

* remove unnecessary conditional

* empty commit (flaky test)

* empty commit (flaky test)
2022-11-11 09:43:30 +01:00
Minami
fa681126f9
docs(guides/prefetching): prefer object syntax (#4492) 2022-11-09 15:59:53 +01:00
Bennett Dams
b421e74ca2
docs(eslint-plugin-query): Prefer dev install (#4489)
This change adds the CLI flags to install the ESLint plugin as a dev dependency instead of a normal dependency.
2022-11-09 11:23:49 +01:00
Daniel Reinoso
74e0ee2ca2
docs: typo in "immutable" (#4486)
Fix typo in updates-from-mutation-responses.md
2022-11-08 15:46:07 +01:00
Dominik Dorfmeister
1f441b1427
docs: immutability 2022-11-08 12:07:27 +01:00
Dominik Dorfmeister
60f460f1af
docs: immutability 2022-11-08 12:06:29 +01:00
allcontributors[bot]
350aba5202
add balazsmatepetro as a contributor for code (#4482)
* update README.md [skip ci]

* update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-11-08 11:40:59 +01:00
Dominik Dorfmeister
a0a8ada275 chore: fix allcontributors 2022-11-08 10:51:52 +01:00
박찬혁
6a6e2c1a68
docs: fix suspense link (#4481) 2022-11-08 08:06:02 +01:00
Tanner Linsley
c27dd7a2a6 release: v4.14.5 2022-11-06 15:46:01 +00:00
Michal Tecza
c45c1bfc4c
fix(query-core): make isRefetching false when fetching next/previous page in an infinite query (#4465) v4.14.5
* fix: make isRefetching false when fetching next/previous page in an infinite query

* Update packages/query-core/src/infiniteQueryObserver.ts

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

* Apply suggestions from code review

* prettier

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2022-11-06 16:40:33 +01:00
Dominik Dorfmeister
4861200630
refactor(core): derive meta from options (#4463)
this simplifies code because we don't need to pass meta around manually; we can keep the same public interface with a getter
2022-11-06 16:26:34 +01:00
Michal Tecza
71144c7ed1
test: stabilize the test for notifying query cache when a query becomes stale (#4466)
* test: stabilize the test for notifying query cache when a query becomes stale

* test: stabilize the test for notifying query cache when a query becomes stale - attempt#2

* test: stabilize the test persisting data when enabled is changed to false

* test: stabilize the test for rendering with selected data

* test: stabilize the test for notifying query cache when a query becomes stale - attempt#3 (thanks TkDodo)

* test: stabilize the test for keeping the previous data when keepPreviousData is set
2022-11-06 16:13:01 +01:00
Tanner Linsley
97d9c131b5 release: v4.14.4 2022-11-05 18:39:07 +00:00
Eliya Cohen
fefb9518e5
fix(eslint-plugin): omit generics/types from dependencies (#4462) v4.14.4
* remove test only

* omit type identifiers from check
2022-11-05 19:29:22 +01:00
Dominik Dorfmeister
fc743a99ca
docs: link angular query (#4461) 2022-11-05 09:36:00 +01:00
Tanner Linsley
ade0757344 release: v4.14.3 2022-11-04 15:26:46 +00:00
Eliya Cohen
fd4938ec65
fix(eslint-plugin-query): get identifiers from unary, chain, and ts-non-null expressions (#4448) v4.14.3
* fix unary expression

* fix chain expression

* fix ts non null expression

* format

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2022-11-04 15:35:46 +01:00
Eliya Cohen
17c642d537
fix(eslint-plugin-query): handle first argument reference edge case (#4451) 2022-11-04 15:30:30 +01:00
Eliya Cohen
292cc54546
fix(eslint-plugin-query): change lint urls to the website (#4449) 2022-11-04 15:29:14 +01:00
Dominik Dorfmeister
c1b35596a4 chore: fix malformed json 2022-11-04 09:55:00 +01:00
Taylor Lodge
57ab5f6d29
docs(guides): correct typo (#4452) 2022-11-04 06:49:52 +01:00
Dimitri Mitropoulos
6cfbbedb40
docs(guides) some more minor fixes (#4446)
* makes consistent sentences

* makes query option data possible to read without horizontal scrolling

since the change to use the object syntax, a few of these fall off the codeblock at 100% zoom (whereas they didn't before).

* moves placeholder docs after initial-query docs

upon reading though top-to-bottom, since placeholder data's docs define themselves _in terms of_ initial query data, it may make sense to introduce initial query data first

* simplifies example

if the purpose of having a return is to really highlight that this can be a function and things can be done inside it maybe adding:

```
// do any work expensive work here
```

inside the curly braces before the return would do a better job?  not sure, but this seems reasonable.  just doing `initialData: getExpensiveTodos` doesn't immediately highlight that this is a function being called (rather than an array of objects or something) so makes sense to leave the noop closure.

* moves wrapping comments to be visible without horizontal scrolling
2022-11-03 16:42:23 +01:00
Suleman Tariq
a7e067c290
docs: Update useQuery.md (#4441)
Add missing bracket for object destructuring inside useQuery hook.
2022-11-03 15:54:07 +01:00
Beverly Cheak
af75ac82e9
docs: typo in mutations.md (#4436) 2022-11-03 07:11:58 +01:00