MCPcopy Create free account
hub / github.com/SvelteStack/svelte-query / remove

Method remove

src/queryCore/core/queryCache.ts:120–134  ·  view source on GitHub ↗
(query: Query<any, any, any, any>)

Source from the content-addressed store, hash-verified

118 }
119
120 remove(query: Query<any, any, any, any>): void {
121 const queryInMap = this.queriesMap[query.queryHash]
122
123 if (queryInMap) {
124 query.destroy()
125
126 this.queries = this.queries.filter(x => x !== query)
127
128 if (queryInMap === query) {
129 delete this.queriesMap[query.queryHash]
130 }
131
132 this.notify({ type: 'queryRemoved', query })
133 }
134 }
135
136 clear(): void {
137 notifyManager.batch(() => {

Callers 6

clearMethod · 0.95
removeQueriesMethod · 0.45
optionalRemoveMethod · 0.45
removeObserverMethod · 0.45
broadcastQueryClientFunction · 0.45
setActiveLinkFunction · 0.45

Calls 2

notifyMethod · 0.95
destroyMethod · 0.45

Tested by

no test coverage detected