Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 23c99d1

Browse files
committed
Merge branch 'main' into feature/streamFn
2 parents 8af2be0 + 43049c5 commit 23c99d1

File tree

113 files changed

+581
-307
lines changed

Some content is hidden

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

113 files changed

+581
-307
lines changed

‎docs/framework/react/guides/query-cancellation.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,24 @@ return (
188188

189189
[//]: # 'Example7'
190190

191+
## `Cancel Options`
192+
193+
Cancel options are used to control the behavior of query cancellation operations.
194+
195+
```tsx
196+
// Cancel specific queries silently
197+
await queryClient.cancelQueries({ queryKey: ['posts'] }, { silent: true })
198+
```
199+
200+
A cancel options object supports the following properties:
201+
202+
- `silent?: boolean`
203+
- When set to `true`, suppresses propagation of `CancelledError` to observers (e.g., `onError` callbacks) and related notifications, and returns the retry promise instead of rejecting.
204+
- Defaults to `false`
205+
- `revert?: boolean`
206+
- When set to `true`, restores the query’s state (data and status) from immediately before the in-flight fetch, sets `fetchStatus` back to `idle`, and only throws if there was no prior data.
207+
- Defaults to `true`
208+
191209
## Limitations
192210

193211
Cancellation does not work when working with `Suspense` hooks: `useSuspenseQuery`, `useSuspenseQueries` and `useSuspenseInfiniteQuery`.

‎docs/reference/QueryClient.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,12 +403,16 @@ The `cancelQueries` method can be used to cancel outgoing queries based on their
403403
This is most useful when performing optimistic updates since you will likely need to cancel any outgoing query refetches so they don't clobber your optimistic update when they resolve.
404404

405405
```tsx
406-
await queryClient.cancelQueries({ queryKey: ['posts'], exact: true })
406+
await queryClient.cancelQueries(
407+
{ queryKey: ['posts'], exact: true },
408+
{ silent: true },
409+
)
407410
```
408411

409412
**Options**
410413

411414
- `filters?: QueryFilters`: [Query Filters](../../framework/react/guides/filters.md#query-filters)
415+
- `cancelOptions?: CancelOptions`: [Cancel Options](../../framework/react/guides/query-cancellation.md#cancel-options)
412416

413417
**Returns**
414418

‎examples/angular/auto-refetching/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@angular/compiler": "^20.0.0",
1414
"@angular/core": "^20.0.0",
1515
"@angular/platform-browser": "^20.0.0",
16-
"@tanstack/angular-query-experimental": "^5.85.6",
16+
"@tanstack/angular-query-experimental": "^5.85.9",
1717
"rxjs": "^7.8.2",
1818
"tslib": "^2.8.1",
1919
"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
@@ -13,9 +13,9 @@
1313
"@angular/compiler": "^20.0.0",
1414
"@angular/core": "^20.0.0",
1515
"@angular/platform-browser": "^20.0.0",
16-
"@tanstack/angular-query-experimental": "^5.85.6",
16+
"@tanstack/angular-query-experimental": "^5.85.9",
1717
"@tanstack/angular-query-persist-client": "^5.62.7",
18-
"@tanstack/query-async-storage-persister": "^5.85.6",
18+
"@tanstack/query-async-storage-persister": "^5.85.9",
1919
"rxjs": "^7.8.2",
2020
"tslib": "^2.8.1",
2121
"zone.js": "0.15.0"

‎examples/angular/basic/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@angular/compiler": "^20.0.0",
1414
"@angular/core": "^20.0.0",
1515
"@angular/platform-browser": "^20.0.0",
16-
"@tanstack/angular-query-experimental": "^5.85.6",
16+
"@tanstack/angular-query-experimental": "^5.85.9",
1717
"rxjs": "^7.8.2",
1818
"tslib": "^2.8.1",
1919
"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
@@ -14,8 +14,8 @@
1414
"@angular/core": "^20.0.0",
1515
"@angular/platform-browser": "^20.0.0",
1616
"@angular/router": "^20.0.0",
17-
"@tanstack/angular-query-devtools-experimental": "^5.85.6",
18-
"@tanstack/angular-query-experimental": "^5.85.6",
17+
"@tanstack/angular-query-devtools-experimental": "^5.85.9",
18+
"@tanstack/angular-query-experimental": "^5.85.9",
1919
"rxjs": "^7.8.2",
2020
"tslib": "^2.8.1",
2121
"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
@@ -13,7 +13,7 @@
1313
"@angular/compiler": "^20.0.0",
1414
"@angular/core": "^20.0.0",
1515
"@angular/platform-browser": "^20.0.0",
16-
"@tanstack/angular-query-experimental": "^5.85.6",
16+
"@tanstack/angular-query-experimental": "^5.85.9",
1717
"rxjs": "^7.8.2",
1818
"tslib": "^2.8.1",
1919
"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
@@ -14,7 +14,7 @@
1414
"@angular/core": "^20.0.0",
1515
"@angular/forms": "^20.0.0",
1616
"@angular/platform-browser": "^20.0.0",
17-
"@tanstack/angular-query-experimental": "^5.85.6",
17+
"@tanstack/angular-query-experimental": "^5.85.9",
1818
"rxjs": "^7.8.2",
1919
"tslib": "^2.8.1",
2020
"zone.js": "0.15.0"

‎examples/angular/pagination/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@angular/compiler": "^20.0.0",
1414
"@angular/core": "^20.0.0",
1515
"@angular/platform-browser": "^20.0.0",
16-
"@tanstack/angular-query-experimental": "^5.85.6",
16+
"@tanstack/angular-query-experimental": "^5.85.9",
1717
"rxjs": "^7.8.2",
1818
"tslib": "^2.8.1",
1919
"zone.js": "0.15.0"

‎examples/angular/query-options-from-a-service/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/router": "^20.0.0",
17-
"@tanstack/angular-query-experimental": "^5.85.6",
17+
"@tanstack/angular-query-experimental": "^5.85.9",
1818
"rxjs": "^7.8.2",
1919
"tslib": "^2.8.1",
2020
"zone.js": "0.15.0"

0 commit comments

Comments
 (0)