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

4,997 commits

Author SHA1 Message Date
Emmanuel DEMEY
b384c4e26f
docs: add missing useQueryClient to the documentation (#6322) 2023-11-07 10:12:37 +01:00
Tanner Linsley
b5c0d76ea0 release: v5.8.0 v5.8.0 2023-11-07 08:45:42 +00:00
Damian Osipiuk
634b6dac32
feat(vue-query): component based vue devtools - Vue3 only (#6255) 2023-11-07 09:41:53 +01:00
Tanner Linsley
9b19eaa9c9 release: v5.7.4 v5.7.4 2023-11-07 04:30:11 +00:00
Aryan Deora
60bd38ca6c
fix(query-devtools): Add styleNonce prop to devtools components (#6320) 2023-11-06 23:27:00 -05:00
Tanner Linsley
4445d72b47 release: v5.7.3 v5.7.3 2023-11-06 20:59:06 +00:00
Damian Osipiuk
7699dd3f18
fix(vue-query): queryClient overloads compat with queryOptions (#6319) 2023-11-06 21:57:15 +01:00
Marty Powell
e31087cf9f
docs: fix link to community Query Key Factory Package (#6316) 2023-11-06 14:23:37 +01:00
Bennett Dams
43e2656752
docs(paginated-queries): Add import statements (#6315) 2023-11-06 14:22:43 +01:00
Tanner Linsley
603a346d4f release: v5.7.2 v5.7.2 2023-11-05 15:34:51 +00:00
Dominik Dorfmeister
6ee06719ae
fix(types): remove suspense from defaultOptions (#6301)
we don't want to be able to set `suspense: true` globally like this anymore: React has `useSuspenseQuery` and other frameworks don't need it either
2023-11-05 16:19:29 +01:00
callmedukey
ecdd927c84
docs: Update devtools.md (#5950)
installing it as a regular dependency doesn't work during development with next 13 app dir. Import trace errors thrown all around.
2023-11-05 15:55:01 +01:00
Tanner Linsley
f484d7e708 release: v5.7.1 v5.7.1 2023-11-05 11:04:58 +00:00
Maciej Baruch
e4138ecda1
fix(react-query): non continuous suspense with useSuspenseQueries (#6298) (#6303)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-11-05 12:01:34 +01:00
Lachlan Collins
fe49dd3523
docs: Fix svelte playground example reactivity (#6311)
* docs: Fix svelte playground example reactivity

* Rename next-js-app to react-next

* Update pnpm lock

* Fix prettier
2023-11-05 16:35:32 +11:00
cje
d90dc8f754
docs: changed import path in react prefetching example (#6307) 2023-11-04 17:11:58 +01:00
Tanner Linsley
b98f5469b9 release: v5.7.0 v5.7.0 2023-11-04 15:40:21 +00:00
GLabat
8a86182c7e
feat(react-query): better error in development mode to identify bad useQuery calls (#6288)
* refactor(query-core): export isPlainObject

* refactor(useBaseQuery): dev error in case of bad argument

Mainly for project without TS. This helps tracking bad signature when migrating from v4 to v5.

* refactor(useQueryClient): dev error in case of bad queryClient

Mainly for project without TS. Make sure the queryClient passed as parameter is really a query. With the change of signature introduced by v5, queryOptions from useQuery could end up as queryClient due to how useBaseQuery works.

* revert: "refactor(useQueryClient): dev error in case of bad queryClient"

This reverts commit 9bedf21782.

* refactor(useQuery): manual test to avoid export from query-core.

* refactor(useQuery test): TS ignore invalid call

---------

Co-authored-by: Guillaume Labat <guillaume.labat+git@imagino.com>
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-11-04 16:35:05 +01:00
Tanner Linsley
196cced55f release: v5.6.1 v5.6.1 2023-11-04 11:35:45 +00:00
softgrip
291f4ec77f
fix(svelte-query): Add try/catch to getIsRestoringContext (#6193)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2023-11-04 22:32:49 +11:00
Tanner Linsley
4a298156af release: v5.6.0 v5.6.0 2023-11-04 08:32:03 +00:00
Li-Lun Lin
d77d9d852a
feat(eslint-plugin): add no-rest-destructuring rule (#6265) (#6302)
* feat(eslint-plugin): add no-rest-destructuring rule (#6265)

* chore: format test case code

* test: add null array element testcase

* test: add non-tanstack-query hooks testcase

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-11-04 09:29:48 +01:00
George Flinn
47449b73c6
docs: Update eslint-plugin-query.md (#6306)
TK Mentioned that the docs would be easier to change if the recommended config was above the alternative config.
2023-11-04 07:38:33 +01:00
Balázs Máté Petró
b3c7dbae48
fix(codemod): improve the keep previous data codemod (#6283)
* chore(codemod): add named examples to the `keep-previous-data` codemod, because these were missing

* chore(codemod): remove the unnecessary `return` statement

* feat(codemod): cover the `setQueryDefaults` method usages on the `QueryClient` instance with the codemod

For further details see: https://github.com/TanStack/query/pull/6196#discussion_r1377371519

* chore(codemod): rename the `isKeepPreviousDataInUse` to `shouldAddKeepPreviousDataImport`

The new name describes better the purpose of this variable.

* feat(codemod): cover the `QueryClient` class instantiations with the codemod

For further details see: https://github.com/TanStack/query/pull/6196#discussion_r1377371519

* chore(codemod): fix `eslint` issues within the `keep-previous-data` codemod

* chore(codemod): fix the `prettier` issues within the `keep-previous-data` codemod README file

* chore(codemod): turn off the `sort-imports` ESLint rule in case of the codemods

Since the codemods might not respect the import order, it's easier to turn off the `sort-imports` ESLint rule.

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-11-03 17:01:41 +01:00
Balázs Máté Petró
41e093885d
fix(codemod): add the packageName parameter to the locateImports function (#6285)
It's necessary, because before this change the above-mentioned function was looking for imports from the `react-query` package, but the package was renamed in the version 4 release. In case of the older codemods the `react-query` is still a valid package name, but for the current and future codemods we have to locate imports from the `@tanstack/react-query` package.
2023-11-03 16:42:09 +01:00
taisei-13046
7153c5732a
docs: fix isPending boolean about dependent queries (#6294)
Co-authored-by: 安井大晟 <taisei_yasui@yasui-taiseiMacBook-Air.local>
2023-11-03 10:21:25 +01:00
Dnyaneshwar Ware
20bd90585a
docs: add information about error while retry attempts (#6276)
- I noticed this while I was trying to use useQuery and trying to capture the error property.
I think this is something which can be added as extra information for those who will be using it for first time.
2023-11-01 08:26:08 +01:00
Dana Woodman
17661f6e37
Simplify load method, fix syntax highlighting (#5844)
* Simplify load method, fix syntax highlighting

SvelteKit now automatically infers the type of an exported load method, so no need to manually define it.

Also, Github has an ongoing issue with the Svelte syntax highlighting so using `html` is a good fallback.

* Change back to using svelte for code blocks

---------

Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2023-11-01 11:03:16 +10:00
Balázs Máté Petró
d4c9f420b3
feat: placeholderData codemod (#6196)
* feat(codemod): add initial implementation of the `placeholderData` codemod

* chore(codemod): remove the parameter from the `placeholderData` function examples

It was a request by @TkDodo, since in `v4` the `placeholderData` function didn't have a parameter.

For further details see: https://github.com/TanStack/query/pull/6196#discussion_r1366618334

* chore(codemod): add an example where the `placeholderData` property is not a function

It was a request by @TkDodo, see: https://github.com/TanStack/query/pull/6196#discussion_r1366618334

* refactor(codemod): transform the usage only when the `keepPreviousData` has value `true`

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-10-31 11:25:40 +01:00
Sander Goossens
2760f75bec
docs: Update typescript.md for registering types (#6272)
To ensure comprehensive documentation, I have included the import declaration to ensure that everyone is aware that the import is necessary for the module augmentation to function properly.

If you omit the import, you will overwrite the entire react-query declaration.
2023-10-31 10:35:40 +01:00
Agilan
a320b43010
chore: Update GitHub Actions workflows (#6203)
* chore: clean up github action workflows

* chore: remove ci-v3.yml

* fix: add rc branch back to branches list in ci.yml

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2023-10-30 14:44:51 +01:00
Tanner Linsley
7cb82a7268 release: v5.5.0 v5.5.0 2023-10-30 13:37:52 +00:00
Kenta Iwasaki
e3a5974ba2
feat: support nextjs v14 (#6259) 2023-10-30 14:29:10 +01:00
Tanner Linsley
e4e893056b release: v5.4.3 v5.4.3 2023-10-29 13:35:52 +00:00
Jonghyeon Ko
ca0fd8ff51
chore: update node in .codesandbox/ci.json (#6263) 2023-10-29 14:26:15 +01:00
HYUNGU KANG
b67107114c
fix(query-core): ensureQueryData should not call fetchQuery for queries with falsy data (#6261)
* fix(query-core): ensureQueryData call fetchQuery when the query actually does not exist

* fix: all the returned data covered by the test case to be falsy values

---------

Co-authored-by: goo <goo@tossbank.com>
2023-10-29 14:25:09 +01:00
Damian Osipiuk
7a9d2d080c
chore: add v4 branch to release scripts (#6247) 2023-10-26 10:17:47 +02:00
Tanner Linsley
0938492553 release: v5.4.2 v5.4.2 2023-10-25 23:03:29 +00:00
Aryan Deora
e2a3ebdf9d
fix(query-devtools): Inherit font size from parent instead of root (#6246)
This change allows setting a custom font size for the query devtools. The value is inherited from it's parent container
2023-10-25 18:59:24 -04:00
Tanner Linsley
23f19fa661 release: v5.4.1 v5.4.1 2023-10-25 13:51:37 +00:00
Damian Osipiuk
ffc7dc79db
perf(vue-query): remove redundant type wrappers (#6243) 2023-10-25 15:49:44 +02:00
Tanner Linsley
1e57af0af8 release: v5.4.0 v5.4.0 2023-10-25 12:53:29 +00:00
robin labat
59e1417f66
feat(vue-query): expose queryOptions utility for vue wrapper (#6227)
Co-authored-by: LABAT Robin <robin.labat@airbus.com>
2023-10-25 14:49:43 +02:00
Tanner Linsley
ce1305c27e release: v5.3.0 v5.3.0 2023-10-24 20:06:35 +00:00
ottomated
d157a456b9
feat(svelte-query): Add queryOptions (#6211)
* Add queryOptions

* remove datatag

* move StoreOrVal to the outermost layer

* fix fails

---------

Co-authored-by: Ottomated <otto@ludwigstreampc>
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2023-10-25 07:02:50 +11:00
Tanner Linsley
8906dac488 release: v5.2.1 v5.2.1 2023-10-24 15:15:57 +00:00
Aryan Deora
81edf3b282
fix(solid-query): Export useMutationState hook (#6233) 2023-10-24 11:11:29 -04:00
Tanner Linsley
8dd21dd618 release: v5.2.0 v5.2.0 2023-10-24 04:29:13 +00:00
Brenley Dueck
ac41f24017
feat(solid-query): Add useMutationState (#6230)
Adds `useMutationState` hook to `@tanstack/solid-query`. Will enable users to perform optimistic updates in a more intuitive fashion!
2023-10-24 00:25:11 -04:00
Tanner Linsley
a0c6d59d8a release: v5.1.0 v5.1.0 2023-10-23 16:25:08 +00:00