Open History to see the last commit
1---
2id: CancelOptions
3title: CancelOptions
4---
5β
6<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7β
8Defined in: [packages/query-core/src/types.ts:2396](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L2396)
9β
10Options for cancelling an in-flight fetch, e.g. via `query.cancel()`.
11They are carried on the [CancelledError](../classes/CancelledError.md) that the cancelled fetch rejects with.
12β
13## Properties
14β
15| Property | Type | Description |
16| ------ | ------ | ------ |
17| <a id="property-revert"></a> `revert?` | `boolean` | If `true`, the query goes back to the state it had before the fetch started, instead of getting the cancellation error. |
18| <a id="property-silent"></a> `silent?` | `boolean` | If `true`, the cancellation error isn't surfaced, e.g. because another fetch replaces the cancelled one. |