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

5,014 commits

Author SHA1 Message Date
Aryan Deora
841d9f70c3
fix(solid-query): throwOnError now throws to EB where data is accessed (#7273)
* fix(solid-query): throwOnError now throws to EB where data is accessed
2024-04-13 12:10:10 -04:00
Tanner Linsley
b6567cbeb3 release: v5.30.0 v5.30.0 2024-04-13 06:17:10 +00:00
Aryan Deora
a122e7cca5
feat(solid-query): Rework internals of createBaseQuery (#7272)
* feat(solid-query): Rework internals of createBaseQuery

This change aims to simplify and enhance the internals of `createBaseQuery`.
This change is a precursor to fix a couple of pressing issues in solid-query mentioned in
#7079 
#7083 
#7173 
#7036
#6620 
#6373
PRs for which are coming soon.

A key few highlights coming with this change:
1. Removal of `mutate` and `refetch` branches in `createClientSubscriber`: We had two different ways of resolving a query resource. The `mutate` option that optimistically updated a resource proved to be a problem with error queries. A query that has `placeholder` data and fails for any reason would see a flash of blank content before yielding to the ErrorBoundary. Using `refetch` for all query resolutions gives us a nice and simple way to transition to error boundaries
2. Removal of batched calls with `notifyManager`: With the new approach we dont need to batch anything. Everything is taken care of automatically. This removes all sideEffects from solid-query as a nice plus
3. Central place to update state: The new `setStateWithReconciliation` function provides a nice and easy way to make the `reconcile` option way more powerful
4. Only accessing the `data` property now would trigger Suspense boundary. Previously any property accessed on a query would trigger the suspense boundary. This was not intentional and has been fixed now
5. Proxied `data` doesn't jump between different values in most cases
2024-04-13 02:13:07 -04:00
Arnoud
a4ad0e157a
chore(angular-query): update Analog.js Angular Vite plugin (#7261) 2024-04-11 22:57:51 +02:00
Tanner Linsley
18e13d60d9 release: v5.29.3 v5.29.3 2024-04-11 14:26:15 +00:00
Aryan Deora
020a0a3760
fix(solid-query): Correct error handling after SSR error (#7266) 2024-04-11 10:20:52 -04:00
Tanner Linsley
5ace1bc109 release: v5.29.2 v5.29.2 2024-04-11 09:22:38 +00:00
ienrum
03048e3776
fix(react-query): reorder query function declarations (#7260)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-04-11 11:17:42 +02:00
Anthony Gonzales
a9fa5f4e9b
docs: Remove references to React.FC (#7259)
React.FC was removed from the create-react-app template in
facebook/create-react-app#8177 and is no longer recommended.
2024-04-11 11:16:39 +02:00
Dominik Dorfmeister
78b594de53 chore: no idea why that fails now
> @tanstack/eslint-plugin-query@5.28.11 build /tmp/8bb98984/packages/eslint-plugin-query> vite build "--exclude=integrations/**"file:///tmp/8bb98984/node_modules/.pnpm/vite@5.2.8_@types+node@18.19.3/node_modules/vite/dist/node/cli.js:442          throw new CACError(`Unknown option \`${name.length > 1 ? `--${name}` : `-${name}`}\``);
2024-04-11 11:11:50 +02:00
Christopher Ehrlich
fca5e7df77
docs: correct useQuery status type (#7252) 2024-04-09 18:07:17 +02:00
Jonghyeon Ko
3fa532369a
types(react-query): rename useSuspenseQueries, useQueries internal type name intuitively (#7216) 2024-04-09 14:36:27 +02:00
Nick S. Khan
565a241bb6
docs: Fix typos in render-optimizations.md (#7246) 2024-04-08 22:02:20 +02:00
Tanner Linsley
b9179d36b4 release: v5.29.1 v5.29.1 2024-04-08 07:46:01 +00:00
Amine Ben hammou
39909c49b3
perf(asyncThrottle): Improve performance (#7224)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-04-08 09:42:54 +02:00
protogenesis
e03cc3acc4
docs(query): update the documentation of dependent queries in Vue section (#7243)
The documentation is confusing and not clear about how to use dependent queries in Vue. This PR updates the documentation to make it clear and easy to understand.

discussion: https://github.com/TanStack/query/discussions/7220
2024-04-08 09:32:55 +02:00
Arnoud
7487ce0512
chore: update vite and vitest (#7241) 2024-04-08 07:07:08 +02:00
Chris J. Lee
26e1a95a4a
docs: Update render-optimizations.md - (#7235)
Typo
2024-04-06 08:16:17 +02:00
Dominik Dorfmeister
e707c13ce3
docs: render optimizations (#7234)
* docs: render optimizations

* docs: further reading
2024-04-05 20:06:06 +02:00
Tanner Linsley
51dea300ff release: v5.29.0 v5.29.0 2024-04-05 17:59:45 +00:00
Dominik Dorfmeister
3c31124ddb
feat(core): memoize result of combine (#7233)
* feat(core): memoize result of combine

this PR makes sure to only re-run the combine function if the function itself changed referentially or any of the inputs changed

* docs: combine memoization

* Update docs/framework/react/reference/useQueries.md
2024-04-05 19:56:40 +02:00
Arnoud
4d37cfc733
chore(angular-query): update to angular 17.3 (#7225)
* chore(angular-query): update to angular 17.3

* remove obsolete stackblitz fix
2024-04-04 23:05:01 +02:00
Tanner Linsley
0b9f971e41 docs: fix quickstart 2024-04-02 23:21:55 -06:00
Tanner Linsley
754640a3e5
docs: migrate docs to use path-based navigation instead of route-based (#7211)
TanStack Router uses path-based navigation instead of route-based navigation, so many of the relative documentation links will be invalid after migration. This fixes that.
2024-04-02 16:46:31 -06:00
Tanner Linsley
0a2b1ba185 release: v5.28.14 v5.28.14 2024-04-02 15:25:19 +00:00
Andrew Kogut
f585bfead0
fix(react-query): useSuspenseQueries type not compatible with queryOption (#7194)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-04-02 17:20:48 +02:00
Gioele Vuaran
0123c8094d
docs: gcTime max value (#7190) 2024-04-02 17:15:08 +02:00
Tanner Linsley
9e70983cd8 release: v5.28.13 v5.28.13 2024-04-02 15:05:36 +00:00
Dominik Dorfmeister
53cdfcea9e
fix(core): do not invoke combine in constructor (#7215)
because the component might suspend, in which case we have nothing to combine
2024-04-02 17:02:16 +02:00
Tanner Linsley
a4d843aad1 release: v5.28.12 v5.28.12 2024-04-02 12:26:24 +00:00
Dominik Dorfmeister
e5bfbbe61a
fix(types): add pageParam and direction as optional to "normal" queryFn (#7212)
* fix(types): add pageParam and direction as optional to "normal" queryFn

because that's what we get when using a defaultQueryFn

* chore: remove tests that are no longer true

* chore: cleanup

* wth?
2024-04-02 14:21:56 +02:00
Tanner Linsley
3cc0c152ac release: v5.28.11 v5.28.11 2024-04-02 11:19:06 +00:00
Eliya Cohen
1e3f7915fb
fix(eslint-plugin-query): test for FunctionExpression syntax (#7213) 2024-04-02 13:17:18 +02:00
hanna
a9648ba275
docs(examples): fix spelling (#7207) 2024-04-02 10:00:56 +02:00
Jean-Baptiste Kaiser
798124da1c
fix(codemod): add support for useMutation (#7187)
* fix(codemod): add support for useMutation

* fix(codemod): add missing empty line to test fixture file

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-04-02 08:59:25 +02:00
Daniel Roe
eaf4af6938
docs: use nuxt import.meta.* properties (#7185)
* fix: opt in to `import.meta.*` properties

* Update ssr.md
2024-03-29 00:02:06 +01:00
Tanner Linsley
21bde49d38 release: v5.28.10 v5.28.10 2024-03-27 15:50:03 +00:00
Aryan Deora
ffad09d5b5
fix(query-devtools): Fix Trigger Loading Button (#7188) 2024-03-27 11:44:01 -04:00
Tanner Linsley
2330584226 release: v5.28.9 v5.28.9 2024-03-27 03:04:04 +00:00
Aryan Deora
de2f862ba5
style(query-core): Fix prettier formatting error (#7182) 2024-03-26 22:54:31 -04:00
Aryan Deora
c98a02a858
fix(solid-query): Hydrate correct queryKey on hydration (#7174) 2024-03-26 11:09:10 -04:00
Alex Liu
262794f09a
refactor(core): replace this.getQueryCache() with this.#queryCache for consistency (#7175) 2024-03-26 06:18:10 +01:00
Tanner Linsley
2389dd1e85 release: v5.28.8 v5.28.8 2024-03-25 10:33:58 +00:00
김관식
a559c48537
fix(*): infer data type correctly when conditional skipToken is passed to useQueries (#7150)
* fix(react-query): infer data type correctly when conditional skipToken is passed to useQueries

* refactor: add OmitKeyof to useQueries.test-d.tsx

* fix(*): Ensure correct data type with conditional skipToken

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-03-25 11:27:37 +01:00
Jonghyeon Ko
93ce4aed46
ci(.prettierignore): ignore **/tsconfig.vitest-temp.json (#7163) 2024-03-25 10:32:14 +01:00
Jonghyeon Ko
b48d71eb20
docs(*): update CONTRIBUTING.md (#7165)
* docs(*): update CONTRIBUTING.md

* docs(*): remove types as commit type
2024-03-25 10:31:48 +01:00
Mohamed Yamani
c4729dfee4
docs: corrected contraction to possession (#7170) 2024-03-24 14:04:42 +01:00
Jonghyeon Ko
39b2f81bc7
types: add OmitKeyof to Omit object by object's keys strictly (#7139)
* feat(*): add OmitKeyOf to validate Omitting keys

* Update packages/vue-query/src/__tests__/useQueries.types.test.ts

* Update packages/vue-query/src/__tests__/useQueries.types.test.ts

* chore(*): update OmitKeyof's type

Co-authored-by: 2-NOW <kj109888@gmail.com>

* test(query-core): add test case for OmitKeyof

* chore: update

---------

Co-authored-by: 2-NOW <kj109888@gmail.com>
2024-03-22 16:02:19 +01:00
Dominik Dorfmeister
2ddf803636 chore: fix prettier 2024-03-21 16:45:16 +01:00
Todor Andonov
e0ead7fffb
docs: add a note for mutations in the dev tools (#7136) 2024-03-21 16:40:22 +01:00