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

Function forwardDependencies

packages/effect-app/src/client/apiClientFactory.ts:220–232  ·  view source on GitHub ↗
(
        dependencies: DataDependencies.DataDependencySet | undefined,
        options?: { readonly reads?: boolean }
      )

Source from the content-addressed store, hash-verified

218 // error. Middleware-thrown failures arrive raw on the Cause already (no wrap to
219 // strip) — the `else` branch passes them through.
220 const forwardDependencies = (
221 dependencies: DataDependencies.DataDependencySet | undefined,
222 options?: { readonly reads?: boolean }
223 ) =>
224 dependencies === undefined
225 ? Effect.void
226 : Effect.gen(function*() {
227 const dependencyRecorder = yield* DataDependencies.getDataDependencyRecorder
228 if (options?.reads) {
229 yield* Effect.forEach(dependencies.reads, dependencyRecorder.read, { discard: true })
230 }
231 yield* Effect.forEach(dependencies.writes, dependencyRecorder.write, { discard: true })
232 })
233
234 const unwrapCommand = (eff: Effect.Effect<any, any, any>): Effect.Effect<any, any, any> =>
235 eff.pipe(

Callers 2

unwrapCommandFunction · 0.85
unwrapQueryFunction · 0.85

Calls 1

forEachMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…