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

Function subscriptionMethod

packages/effect/src/graphql/GraphQLClient.ts:434–439  ·  view source on GitHub ↗
(...[variables, options]: Args<GraphQL.Variables<Op>, CallOptions<R2>>)

Source from the content-addressed store, hash-verified

432
433 if (operation.kind === "subscription") {
434 const subscriptionMethod = <R2 = never>(...[variables, options]: Args<GraphQL.Variables<Op>, CallOptions<R2>>) =>
435 Stream.unwrap(Effect.map(buildRequest(variables, options), (request) => subscribe(0, request))).pipe(
436 Stream.mapEffect(decodeStrict),
437 Stream.retry(retryPolicy),
438 Stream.provideContext(callContext(options))
439 )
440 return Object.assign(subscriptionMethod, { operation })
441 }
442

Callers

nothing calls this directly

Calls 6

buildRequestFunction · 0.85
callContextFunction · 0.85
subscribeFunction · 0.70
pipeMethod · 0.65
mapMethod · 0.45
retryMethod · 0.45

Tested by

no test coverage detected