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

5,266 commits

Author SHA1 Message Date
Dominik Dorfmeister
fbe3b4456e
fix: deprecate direction passed to QueryFunctionContext (#7410)
* fix: deprecate direction passed to QueryFunctionContext

* chore: fix type tests
2024-05-10 16:08:10 +02:00
Oc1S
0bb0fa397b
docs: Fix usage of removeEventListener (#7393) 2024-05-10 14:03:22 +02:00
pius712
ab126e867e
docs: fix typo (#7400) 2024-05-10 14:02:26 +02:00
Tanner Linsley
01ce023826 release: v5.35.3 v5.35.3 2024-05-07 22:22:58 +00:00
Arthur Petrie
a567ba2adf
fix(angular-query): missing exports InitialDataInfiniteOptions types (#7388)
* fix(angular-query): missing exports InitialDataInfiniteOptions types

Add missing @public js-doc comments in infinite-query-options.ts to fix type exports

* add infinite query option types to public api

---------

Co-authored-by: Arnoud de Vries <6420061+arnoud-dv@users.noreply.github.com>
2024-05-08 00:19:30 +02:00
Tanner Linsley
fd902a7246 release: v5.35.2 v5.35.2 2024-05-07 22:08:36 +00:00
Damian Osipiuk
f903af2222
fix(vue-query): ref unwrapping of QueryKey in queryOptions (#7390)
* fix(vue-query): ref unwrapping of QueryKey in queryOptions

* test: add test
2024-05-08 00:06:14 +02:00
Aryan Deora
a3785608fd
docs: Solid Query - createQuery documentation (#7386) 2024-05-06 17:38:54 -04:00
Tanner Linsley
f988e92260 release: v5.35.1 v5.35.1 2024-05-06 06:40:09 +00:00
Jonghyeon Ko
753fbacce0
fix(types): add number, symbol as safe key for OmitKeyof for strictness safely (#7164)
* types(query-core): add number, symbol as safe key for OmitKeyof  for safely

* test(query-core): add type test case for number key, symbol key

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-05-06 08:26:04 +02:00
Ikko Eltociear Ashimine
2c0dc08894
docs: update custom-client.md (#7383)
usefull -> useful
2024-05-06 07:23:35 +02:00
Tanner Linsley
413d1a1749 release: v5.35.0 v5.35.0 2024-05-05 11:54:53 +00:00
Arnoud
1b59482cad
feat(angular-query): rollup type declarations (#7380)
This has several benefits:

Fix internal resolution error
Clear API surface
IDEs will not suggest deep imports from unexpected files
2024-05-05 13:44:23 +02:00
Tanner Linsley
3d3a5039cd release: v5.34.2 v5.34.2 2024-05-05 09:45:19 +00:00
Manuel Schiller
fdb09442c0
fix(query-core): replaceEqualDeep correctly handles arrays that contain undefined (#7376)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-05-05 11:39:33 +02:00
Arnoud
32d1e82262
docs(angular-query): add jsdoc (#7379)
* fix: remove unused export
2024-05-04 22:11:36 +02:00
Shahar Har-Shuv
d03224770d
docs(angular-query): update disabling-queries.md (#7332) 2024-05-04 20:37:15 +02:00
Arnoud
10bdb08f05
docs(angular-query): update quick start and readme (#7378) 2024-05-04 20:09:55 +02:00
Tanner Linsley
3ab92bc97e release: v5.34.1 v5.34.1 2024-05-04 08:31:39 +00:00
Milan Suk
f70d404e17
fix(core): replaceDeepEqual for objects created by Object.create (#7357)
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-05-04 10:26:45 +02:00
Aryan Deora
ed12e1837e
docs: Solid Query - Add overview, ts, install sections (#7368) 2024-05-02 21:15:00 -04:00
Tanner Linsley
538e02b1d9 release: v5.34.0 v5.34.0 2024-05-02 18:07:29 +00:00
Aryan Deora
bd8ce7d8e2
feat(solid-query): Revise queryOptions implementation (#7366) 2024-05-02 14:04:33 -04:00
Tanner Linsley
9ff2c2e3ce release: v5.33.1 v5.33.1 2024-05-02 02:18:14 +00:00
Aryan Deora
a0e8f2521a
fix(solid-query): Correct types for primitives (#7363) 2024-05-01 22:14:52 -04:00
Tanner Linsley
ec837f63b2 release: v5.33.0 v5.33.0 2024-04-30 22:20:14 +00:00
Shahar Har-Shuv
8394146249
feat(angular-query): support injection in injectQuery callback (#7350)
* feat(angular-query-experimental): support injection in injectQuery callback

Before, when creating a query with injectQuery, if you injected dependencies (Like `inject(HttpClient)`) those injections would fail on subsequence changes of dependent signals. That change makes it easier to use `injectQuery` (especially together with `queryOptions` because the query can define its own dependencies.

No breaking changes, any code that worked before should work now as well.

---------

Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com>
2024-05-01 00:16:03 +02:00
Tanner Linsley
38be91f691 release: v5.32.1 v5.32.1 2024-04-30 13:39:55 +00:00
Dominik Dorfmeister
684ffbfea9
fix: trigger release
RELEASE_ALL
2024-04-30 15:35:58 +02:00
Mackie Underdown
6768a9c723
docs(createSyncStoragePersister): fix typo (#7348) 2024-04-29 17:17:32 +02:00
Anton Jeppsson
2aca521a88
fix(codemods): Use .cjs extension for CommonJS files (#7333)
* bug(codemods): rename CommonJS files to .cjs

Rename CommonJS files in codemods to distinguish them from ES module
files otherwise used in this project.
Resolve an issue occuring since package.json in codemods is removed when
publishing causing module type data to be lost.

Fix issue #7154

* Fix knip errors

* Add file extension to tests

* Update migration doc

---------

Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2024-04-25 17:06:14 +10:00
Tanner Linsley
2ffd9fbd84 release: v5.32.0 v5.32.0 2024-04-23 07:33:00 +00:00
Dominik Dorfmeister
e3240f0233
feat(core): make observers on Query a public property (#7326) 2024-04-23 09:29:43 +02:00
Dominik Dorfmeister
f025a7c2e6 chore(docs): fix prettier 2024-04-23 09:09:48 +02:00
Kushagra Mehta
b92fb043af
docs: fix pages breaking due to diff in markdown (#7321) 2024-04-22 13:16:54 +02:00
fuko
8fa82653dd
docs: fix broken internal links in the query docs (#7247)
* wip - 1

* Fix more links

* Fix one more link

* Another one

* Update a link

* Fix the broken links in the Angular docs

* Fix the broken links in the Vue docs

* Fix the Svelte links in the docs

---------

Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
2024-04-22 10:38:13 +02:00
Tanner Linsley
5b6c67f581 release: v5.31.0 v5.31.0 2024-04-22 06:43:01 +00:00
Dominik Dorfmeister
24f1d45cbd
feat: scoped mutations (#7312)
* refactor: add scope to mutationCache internally

* refactor: remove unused defaultOptions on mutation

this private field is a leftover from v4

* feat: make sure to not run mutations if there is already one running in the scope of this mutation

* feat: make sure mutations in the same scope can run in serial

* fix: find a _lot_ better way to determine if a mutation can run

* test: widen test scenario to include scopes

* fix: there is a difference between starting and continuing

when starting, we need to check the networkMode differently than when continuing, because of how offlineFirst works (can start, but can't continue)

* refactor: switch to a scope object with `id`

* feat: dehydrate and hydrate mutation scope

* fix: initiate the mutationCache with a random number

since we use the mutationId to create the default scope, and the mutationId is merely incremented, we risk colliding scopes when hydrating mutations into an existing cache. That's because the mutationId itself is never dehydrated. When a mutation gets hydrated, it gets re-built, thus getting a new id. At this point, its id and the scope can differ. That per se isn't a problem. But if a mutation was dehydrated with scope:1, it would put into the same scope with another mutation from the new cache that might also have the scope:1.

To avoid that, we can initialize the mutationId with Date.now(). It will make sure (or at least very likely) that there is no collision

In the future, we should just be able to use `Crypto.randomUUID()` to generate a unique scope, but our promised compatibility doesn't allow for using this function

* test: hydration

* test: those tests actually fail because resumePausedMutations is still wrongly implemented

* fix: simplify and fix resumePausedMutations

we can fire off all mutations at the same time - only the first one in each scope will actually fire, the others have to stay paused until their time has come. mutation.continue handles this internally.

but, we get back all the retryer promises, so resumePausedMutations will wait until the whole chain is done

* test: more tests

* refactor: scopeFor doesn't use anything of the mutationCache class

* docs: scoped mutations
2024-04-22 08:39:11 +02:00
Tanner Linsley
7368bd0f62 release: v5.30.6 v5.30.6 2024-04-18 18:54:27 +00:00
Aryan Deora
6e5a4a84ad
fix(solid-query): Allow disabled queries to be SSR'd (#7300) 2024-04-18 14:50:25 -04:00
Tanner Linsley
405135d02c release: v5.30.5 v5.30.5 2024-04-18 15:19:12 +00:00
Aryan Deora
23c4661790
fix(solid-query): Trigger refetch when query changes before hydration (#7299) 2024-04-18 11:15:23 -04:00
Aryan Deora
69d37f33bd
docs(solid-query): Add Astro Example (#7292) 2024-04-17 00:38:52 -04:00
Tanner Linsley
e197965940 release: v5.30.4 v5.30.4 2024-04-16 23:45:14 +00:00
Aryan Deora
d9473a80ec
fix(solid-query): Simplify SSR Hydration Strategy (#7291) 2024-04-16 19:41:17 -04:00
Aryan Deora
536965176f
docs(solid-query): Update SolidStart Example to RC version (#7283) 2024-04-15 16:03:29 -04:00
Naveen Yadav
727eb557ed
docs: Update spelling in devtools.md (#7269) 2024-04-15 10:59:05 +02:00
Tanner Linsley
eee8ab157e release: v5.30.3 v5.30.3 2024-04-15 04:25:51 +00:00
Aryan Deora
d384cacced
fix(solid-query): Resolve resource before unmounting query (#7279) 2024-04-15 00:22:11 -04:00
Tanner Linsley
8469951141 release: v5.30.2 v5.30.2 2024-04-14 16:21:48 +00:00