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

Method optionalRemove

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

Source from the content-addressed store, hash-verified

230 }
231
232 protected override optionalRemove() {
233 if (!this.#observers.length) {
234 if (this.state.status === 'pending') {
235 this.scheduleGc()
236 } else {
237 this.#mutationCache.remove(this)
238 }
239 }
240 }
241
242 /**
243 * 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