MCPcopy Create free account
hub / github.com/TanStack/query / destroy

Method destroy

packages/query-core/src/query.ts:361–365  ·  view source on GitHub ↗

* Clears the query's garbage collection timeout and silently cancels any * in-flight fetch. Called by `QueryCache` when the query is removed from * the cache. * * @see Query#cancel

()

Source from the content-addressed store, hash-verified

359 * @see {@link Query#cancel}
360 */
361 destroy(): void {
362 super.destroy()
363
364 this.cancel({ silent: true })
365 }
366
367 /** @internal */
368 get resetState(): QueryState<TData, TError> {

Callers 15

resetMethod · 0.95
createQueryControllerFunction · 0.45
createQueriesControllerFunction · 0.45
createMutationControllerFunction · 0.45
useMutationStateFunction · 0.45
useIsMutatingFunction · 0.45
useIsFetchingFunction · 0.45

Calls 1

cancelMethod · 0.95

Tested by

no test coverage detected