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

Function make

packages/effect/src/graphql/GraphQLClient.ts:274–290  ·  view source on GitHub ↗
(
  group: GraphQLGroup.GraphQLGroup<Ops>,
  options?: {
    readonly subscriptionRetry?: Schedule.Schedule<unknown, GraphQLClientError> | undefined
  } | undefined
)

Source from the content-addressed store, hash-verified

272 * @since 4.0.0
273 */
274export const make = <Ops extends GraphQL.Any>(
275 group: GraphQLGroup.GraphQLGroup<Ops>,
276 options?: {
277 readonly subscriptionRetry?: Schedule.Schedule<unknown, GraphQLClientError> | undefined
278 } | undefined
279): Effect.Effect<
280 GraphQLClient<Ops>,
281 never,
282 GraphQLProtocol | GraphQLMiddleware.Identifier<GraphQL.Middleware<Ops>>
283> =>
284 Effect.gen(function*() {
285 const protocol = yield* GraphQLProtocol
286 const context = yield* Effect.context<never>()
287 const retryPolicy = retryableOnly(options?.subscriptionRetry ?? defaultSubscriptionRetry)
288 return fromGroup(group, (operation) =>
289 makeMethod(operation, middlewareChain(context, group, operation), protocol, retryPolicy))
290 })
291
292// Type boundary: a mapping over the operations cannot prove the mapped type's
293// name/kind relationship.

Callers

nothing calls this directly

Calls 5

retryableOnlyFunction · 0.85
makeMethodFunction · 0.85
middlewareChainFunction · 0.85
contextMethod · 0.80
fromGroupFunction · 0.70

Tested by

no test coverage detected