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

Function buildRequest

packages/effect/src/graphql/GraphQLClient.ts:358–368  ·  view source on GitHub ↗
(variables: GraphQL.Variables<Op> | undefined, options: CallOptions | undefined)

Source from the content-addressed store, hash-verified

356 )
357
358 const buildRequest = (variables: GraphQL.Variables<Op> | undefined, options: CallOptions | undefined) =>
359 encodeVariables(variables).pipe(
360 Effect.map((encoded): GraphQLRequest => ({
361 kind: operation.kind,
362 query: operation.document,
363 operationName: operation.name,
364 variables: encoded,
365 headers: Headers.fromInput(options?.headers),
366 urlParams: options?.urlParams === undefined ? UrlParams.empty : UrlParams.fromInput(options.urlParams)
367 }))
368 )
369
370 const decodeResponse = ({ body, ...metadata }: {
371 readonly body: unknown

Callers 2

subscriptionMethodFunction · 0.85
methodFunction · 0.85

Calls 3

encodeVariablesFunction · 0.85
pipeMethod · 0.65
mapMethod · 0.45

Tested by

no test coverage detected