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

Method continue

packages/query-core/src/mutation.ts:243–252  ·  view source on GitHub ↗

* Resumes a mutation that is currently paused or was restored from a * dehydrated, still-`pending` state. * * - If this mutation has an active retryer (it paused mid-attempt, e.g. due * to the network mode or scope-based queuing), its retryer is resumed. * - Otherwise, if the mutati

()

Source from the content-addressed store, hash-verified

241 * @see {@link Mutation#execute}
242 */
243 continue(): Promise<unknown> {
244 return (
245 this.#retryer?.continue() ??
246 // continuing a mutation assumes that variables are set, mutation must have been dehydrated before.
247 // a settled mutation has no retryer to continue and must not run again
248 (this.state.status === 'pending'
249 ? this.execute(this.state.variables!)
250 : Promise.resolve())
251 )
252 }
253
254 /**
255 * Runs the mutation function for the given variables through a retryer, and

Callers 7

onFocusMethod · 0.80
onOnlineMethod · 0.80
runNextMethod · 0.80
resumePausedMutationsMethod · 0.80
retryer.test.tsxFile · 0.80
mutation.test.tsxFile · 0.80

Calls 1

executeMethod · 0.95

Tested by

no test coverage detected