MCPcopy Create free account
hub / github.com/effect-app/libs / patchDoc

Function patchDoc

packages/infra/src/ClusterCosmos.ts:458–466  ·  view source on GitHub ↗
(
    doc: A,
    resourceBody: PatchRequestBody
  )

Source from the content-addressed store, hash-verified

456 )
457
458 const patchDoc = <A extends { readonly id: string; readonly _partitionKey: string }>(
459 doc: A,
460 resourceBody: PatchRequestBody
461 ): Effect.Effect<void, unknown, never> =>
462 Effect.tryPromise(() => container.item(doc.id, doc._partitionKey).patch(resourceBody)).pipe(
463 Effect.tap(annotateItem),
464 Effect.asVoid,
465 Effect.catchIf(isNotFound, () => Effect.void)
466 )
467
468 const patchDocs = <A extends { readonly id: string; readonly _partitionKey: string }>(
469 docs: ReadonlyArray<A>,

Callers 1

patchDocsFunction · 0.85

Calls 3

patchMethod · 0.80
itemMethod · 0.80
pipeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…