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

Function destroy

packages/lit-query/src/controllers/BaseController.ts:104–121  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102 }
103
104 destroy(): void {
105 if (this.destroyed) {
106 return
107 }
108
109 this.destroyed = true
110 this.connected = false
111 this.connectionAttempt += 1
112 this.clearContextClient()
113 this.queryClientResolutionState = this.explicitClient
114 ? 'bound'
115 : 'pre-connect'
116 this.onDisconnected()
117
118 if ('removeController' in this.host) {
119 this.host.removeController(this)
120 }
121 }
122
123 protected tryGetQueryClient(): QueryClient | undefined {
124 return this.explicitClient ?? this.contextClient

Callers

nothing calls this directly

Calls 2

onDisconnectedMethod · 0.45
removeControllerMethod · 0.45

Tested by

no test coverage detected