MCPcopy
hub / github.com/TanStack/query / cancel

Function cancel

packages/query-core/src/retryer.ts:87–94  ·  view source on GitHub ↗
(cancelOptions?: CancelOptions)

Source from the content-addressed store, hash-verified

85 (thenable.status as Thenable<TData>['status']) !== 'pending'
86
87 const cancel = (cancelOptions?: CancelOptions): void => {
88 if (!isResolved()) {
89 const error = new CancelledError(cancelOptions) as TError
90 reject(error)
91
92 config.onCancel?.(error)
93 }
94 }
95 const cancelRetry = () => {
96 isRetryCancelled = true
97 }

Callers

nothing calls this directly

Calls 2

isResolvedFunction · 0.85
rejectFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…