MCPcopy Create free account
hub / github.com/TanStack/db / wrappedMutation

Function wrappedMutation

packages/offline-transactions/tests/harness.ts:220–228  ·  view source on GitHub ↗
(
    params: OfflineMutationFnParams,
  )

Source from the content-addressed store, hash-verified

218 const leader = new FakeLeaderElection()
219
220 const wrappedMutation = async (
221 params: OfflineMutationFnParams,
222 ): Promise<any> => {
223 const currentAttempt = (attemptCounter.get(params.idempotencyKey) ?? 0) + 1
224 attemptCounter.set(params.idempotencyKey, currentAttempt)
225 const extendedParams = { ...params, attempt: currentAttempt }
226 mutationCalls.push(extendedParams)
227 return mutationFn(extendedParams)
228 }
229
230 const config: OfflineConfig = {
231 ...options.config,

Callers

nothing calls this directly

Calls 3

mutationFnFunction · 0.50
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected