MCPcopy Create free account
hub / github.com/Effect-TS/effect / fromGroup

Function fromGroup

packages/effect/src/graphql/GraphQLClient.ts:294–298  ·  view source on GitHub ↗
(
  group: GraphQLGroup.GraphQLGroup<Ops>,
  f: (operation: Ops) => unknown
)

Source from the content-addressed store, hash-verified

292// Type boundary: a mapping over the operations cannot prove the mapped type's
293// name/kind relationship.
294const fromGroup = <Ops extends GraphQL.Any>(
295 group: GraphQLGroup.GraphQLGroup<Ops>,
296 f: (operation: Ops) => unknown
297): GraphQLClient<Ops> =>
298 Object.fromEntries(group.operations.map((operation) => [operation.name, f(operation)])) as GraphQLClient<Ops>
299
300/**
301 * The middleware implementations an operation runs through, outermost first,

Callers 3

makeFunction · 0.70
makeTestFunction · 0.70

Calls 2

fFunction · 0.50
mapMethod · 0.45

Tested by

no test coverage detected