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

Method runNext

packages/query-core/src/mutationCache.ts:213–224  ·  view source on GitHub ↗

@internal

(mutation: Mutation<any, any, any, any>)

Source from the content-addressed store, hash-verified

211
212 /** @internal */
213 runNext(mutation: Mutation<any, any, any, any>): Promise<unknown> {
214 const scope = scopeFor(mutation)
215 if (typeof scope === 'string') {
216 const foundMutation = this.#scopes
217 .get(scope)
218 ?.find((m) => m !== mutation && m.state.isPaused)
219
220 return foundMutation?.continue() ?? Promise.resolve()
221 } else {
222 return Promise.resolve()
223 }
224 }
225
226 /**
227 * Removes all mutations from the cache.

Callers 1

executeMethod · 0.80

Calls 4

scopeForFunction · 0.85
getMethod · 0.80
continueMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected