Skip to content

Commit 70be7b5

Browse files
authored
Merge branch 'main' into main
2 parents df75cbc + 4bf169e commit 70be7b5

File tree

91 files changed

+237
-200
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+237
-200
lines changed

docs/framework/react/guides/query-keys.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ id: query-keys
33
title: Query Keys
44
---
55

6-
At its core, TanStack Query manages query caching for you based on query keys. Query keys have to be an Array at the top level, and can be as simple as an Array with a single string, or as complex as an array of many strings and nested objects. As long as the query key is serializable, and **unique to the query's data**, you can use it!
6+
At its core, TanStack Query manages query caching for you based on query keys. Query keys have to be an Array at the top level, and can be as simple as an Array with a single string, or as complex as an array of many strings and nested objects. As long as the query key is serializable using `JSON.stringify`, and **unique to the query's data**, you can use it!
77

88
## Simple Query Keys
99

docs/framework/react/plugins/persistQueryClient.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,12 @@ ReactDOM.createRoot(rootElement).render(
214214

215215
- `persistOptions: PersistQueryClientOptions`
216216
- all [options](#options) you can pass to [persistQueryClient](#persistqueryclient) minus the QueryClient itself
217-
- `onSuccess?: () => Promise<unknown> | unknown`
217+
- `onSuccess?: () => Promise<void> | void`
218218
- optional
219219
- will be called when the initial restore is finished
220220
- can be used to [resumePausedMutations](../../../../reference/QueryClient.md#queryclientresumepausedmutations)
221221
- if a Promise is returned, it will be awaited; restoring is seen as ongoing until then
222-
- `onError?: () => Promise<unknown> | unknown`
222+
- `onError?: () => Promise<void> | void`
223223
- optional
224224
- will be called when an error is thrown during restoration
225225
- if a Promise is returned, it will be awaited

docs/framework/react/reference/useMutation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ mutate(variables, {
6868
- This function will fire before the mutation function is fired and is passed the same variables the mutation function would receive
6969
- Useful to perform optimistic updates to a resource in hopes that the mutation succeeds
7070
- The value returned from this function will be passed to both the `onError` and `onSettled` functions in the event of a mutation failure and can be useful for rolling back optimistic updates.
71-
- `onSuccess: (data: TData, variables: TVariables, context: TContext) => Promise<unknown> | unknown`
71+
- `onSuccess: (data: TData, variables: TVariables, context: TContext) => Promise<void> | void`
7272
- Optional
7373
- This function will fire when the mutation is successful and will be passed the mutation's result.
7474
- If a promise is returned, it will be awaited and resolved before proceeding
75-
- `onError: (err: TError, variables: TVariables, context?: TContext) => Promise<unknown> | unknown`
75+
- `onError: (err: TError, variables: TVariables, context?: TContext) => Promise<void> | void`
7676
- Optional
7777
- This function will fire if the mutation encounters an error and will be passed the error.
7878
- If a promise is returned, it will be awaited and resolved before proceeding
79-
- `onSettled: (data: TData, error: TError, variables: TVariables, context?: TContext) => Promise<unknown> | unknown`
79+
- `onSettled: (data: TData, error: TError, variables: TVariables, context?: TContext) => Promise<void> | void`
8080
- Optional
8181
- This function will fire when the mutation is either successfully fetched or encounters an error and be passed either the data or error
8282
- If a promise is returned, it will be awaited and resolved before proceeding

docs/reference/MutationCache.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@ Its available methods are:
2828

2929
**Options**
3030

31-
- `onError?: (error: unknown, variables: unknown, context: unknown, mutation: Mutation) => Promise<unknown> | unknown`
31+
- `onError?: (error: unknown, variables: unknown, context: unknown, mutation: Mutation) => Promise<void> | void`
3232
- Optional
3333
- This function will be called if some mutation encounters an error.
3434
- If you return a Promise from it, it will be awaited
35-
- `onSuccess?: (data: unknown, variables: unknown, context: unknown, mutation: Mutation) => Promise<unknown> | unknown`
35+
- `onSuccess?: (data: unknown, variables: unknown, context: unknown, mutation: Mutation) => Promise<void> | void`
3636
- Optional
3737
- This function will be called if some mutation is successful.
3838
- If you return a Promise from it, it will be awaited
39-
- `onSettled?: (data: unknown | undefined, error: unknown | null, variables: unknown, context: unknown, mutation: Mutation) => Promise<unknown> | unknown`
39+
- `onSettled?: (data: unknown | undefined, error: unknown | null, variables: unknown, context: unknown, mutation: Mutation) => Promise<void> | void`
4040
- Optional
4141
- This function will be called if some mutation is settled (either successful or errored).
4242
- If you return a Promise from it, it will be awaited
43-
- `onMutate?: (variables: unknown, mutation: Mutation) => Promise<unknown> | unknown`
43+
- `onMutate?: (variables: unknown, mutation: Mutation) => Promise<void> | void`
4444
- Optional
4545
- This function will be called before some mutation executes.
4646
- If you return a Promise from it, it will be awaited

examples/angular/auto-refetching/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@angular/core": "^20.0.0",
1515
"@angular/platform-browser": "^20.0.0",
1616
"@angular/platform-browser-dynamic": "^20.0.0",
17-
"@tanstack/angular-query-experimental": "^5.79.0",
17+
"@tanstack/angular-query-experimental": "^5.79.2",
1818
"rxjs": "^7.8.2",
1919
"tslib": "^2.8.1",
2020
"zone.js": "0.15.0"

examples/angular/basic-persister/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
"@angular/core": "^20.0.0",
1515
"@angular/platform-browser": "^20.0.0",
1616
"@angular/platform-browser-dynamic": "^20.0.0",
17-
"@tanstack/angular-query-experimental": "^5.79.0",
17+
"@tanstack/angular-query-experimental": "^5.79.2",
1818
"@tanstack/angular-query-persist-client": "^5.62.7",
19-
"@tanstack/query-sync-storage-persister": "^5.79.0",
19+
"@tanstack/query-sync-storage-persister": "^5.79.2",
2020
"rxjs": "^7.8.2",
2121
"tslib": "^2.8.1",
2222
"zone.js": "0.15.0"

examples/angular/basic/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@angular/core": "^20.0.0",
1515
"@angular/platform-browser": "^20.0.0",
1616
"@angular/platform-browser-dynamic": "^20.0.0",
17-
"@tanstack/angular-query-experimental": "^5.79.0",
17+
"@tanstack/angular-query-experimental": "^5.79.2",
1818
"rxjs": "^7.8.2",
1919
"tslib": "^2.8.1",
2020
"zone.js": "0.15.0"

examples/angular/devtools-panel/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"@angular/platform-browser": "^20.0.0",
1616
"@angular/platform-browser-dynamic": "^20.0.0",
1717
"@angular/router": "^20.0.0",
18-
"@tanstack/angular-query-devtools-experimental": "^5.79.0",
19-
"@tanstack/angular-query-experimental": "^5.79.0",
18+
"@tanstack/angular-query-devtools-experimental": "^5.79.2",
19+
"@tanstack/angular-query-experimental": "^5.79.2",
2020
"rxjs": "^7.8.2",
2121
"tslib": "^2.8.1",
2222
"zone.js": "0.15.0"

examples/angular/infinite-query-with-max-pages/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@angular/core": "^20.0.0",
1515
"@angular/platform-browser": "^20.0.0",
1616
"@angular/platform-browser-dynamic": "^20.0.0",
17-
"@tanstack/angular-query-experimental": "^5.79.0",
17+
"@tanstack/angular-query-experimental": "^5.79.2",
1818
"rxjs": "^7.8.2",
1919
"tslib": "^2.8.1",
2020
"zone.js": "0.15.0"

examples/angular/optimistic-updates/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@angular/forms": "^20.0.0",
1616
"@angular/platform-browser": "^20.0.0",
1717
"@angular/platform-browser-dynamic": "^20.0.0",
18-
"@tanstack/angular-query-experimental": "^5.79.0",
18+
"@tanstack/angular-query-experimental": "^5.79.2",
1919
"rxjs": "^7.8.2",
2020
"tslib": "^2.8.1",
2121
"zone.js": "0.15.0"

0 commit comments

Comments
 (0)