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

Function makeGrouped

repos/effect/packages/effect/src/RequestResolver.ts:279–288  ·  view source on GitHub ↗
(options: {
  readonly key: (entry: Request.Entry<A>) => K
  readonly resolver: (entries: NonEmptyArray<Request.Entry<A>>, key: K) => Effect.Effect<void, Request.Error<A>>
})

Source from the content-addressed store, hash-verified

277 * }
278 * })
279 * })
280 *
281 * const program = Effect.all([
282 * Effect.request<GetUserByRole>(GetUserByRole({ role: "admin", id: 1 }), UserByRoleResolver),
283 * Effect.request<GetUserByRole>(GetUserByRole({ role: "admin", id: 2 }), UserByRoleResolver)
284 * ] as const, { concurrency: "unbounded" })
285 * const result = await Effect.runPromise(program)
286 *
287 * batches // => [["admin", 2]]
288 * result // => ["User 1 with role admin", "User 2 with role admin"]
289 * ```
290 *
291 * @category constructors

Callers

nothing calls this directly

Calls 2

hashGroupKeyFunction · 0.85
makeWithFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…