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

Method optionalRemove

packages/query-core/src/mutation.ts:229–237  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

227 }
228
229 protected override optionalRemove() {
230 if (!this.#observers.length) {
231 if (this.state.status === 'pending') {
232 this.scheduleGc()
233 } else {
234 this.#mutationCache.remove(this)
235 }
236 }
237 }
238
239 /**
240 * Resumes a mutation that is currently paused or was restored from a

Callers

nothing calls this directly

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected