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

Function middlewareChain

packages/effect/src/graphql/GraphQLClient.ts:312–316  ·  view source on GitHub ↗
(
  context: Context.Context<never>,
  group: GraphQLGroup.GraphQLGroup<Op>,
  operation: Op
)

Source from the content-addressed store, hash-verified

310
311// Runtime tags erase middleware types; `make` requires all their identifiers.
312const middlewareChain = <Op extends GraphQL.Any>(
313 context: Context.Context<never>,
314 group: GraphQLGroup.GraphQLGroup<Op>,
315 operation: Op
316): MiddlewareChain<Op> => [...group.middlewares, ...operation.middlewares].map((tag) => Context.getUnsafe(context, tag))
317
318// Steps `schedule` only for retryable `GraphQLClientError`s. Middleware
319// errors and fatal errors end the retries before reaching it, so a custom

Callers 1

makeFunction · 0.85

Calls 2

mapMethod · 0.45
getUnsafeMethod · 0.45

Tested by

no test coverage detected