MCPcopy Index your code
hub / github.com/TanStack/query / clear

Method clear

packages/query-core/src/mutationCache.ts:190–198  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

188 }
189
190 clear(): void {
191 notifyManager.batch(() => {
192 this.#mutations.forEach((mutation) => {
193 this.notify({ type: 'removed', mutation })
194 })
195 this.#mutations.clear()
196 this.#scopes.clear()
197 })
198 }
199
200 getAll(): Array<Mutation> {
201 return Array.from(this.#mutations)

Callers

nothing calls this directly

Calls 1

notifyMethod · 0.95

Tested by

no test coverage detected