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

Method remove

packages/query-core/src/queryCache.ts:144–156  ·  view source on GitHub ↗
(query: Query<any, any, any, any>)

Source from the content-addressed store, hash-verified

142 }
143
144 remove(query: Query<any, any, any, any>): void {
145 const queryInMap = this.#queries.get(query.queryHash)
146
147 if (queryInMap) {
148 query.destroy()
149
150 if (queryInMap === query) {
151 this.#queries.delete(query.queryHash)
152 }
153
154 this.notify({ type: 'removed', query })
155 }
156 }
157
158 clear(): void {
159 notifyManager.batch(() => {

Callers 9

clearMethod · 0.95
setupDevtoolsFunction · 0.45
destroyDevtoolsFunction · 0.45
removeQueriesMethod · 0.45
optionalRemoveMethod · 0.45
optionalRemoveMethod · 0.45
broadcastQueryClientFunction · 0.45
useAppStateFunction · 0.45

Calls 3

notifyMethod · 0.95
getMethod · 0.80
destroyMethod · 0.45

Tested by

no test coverage detected