MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / invokeWithLayer

Function invokeWithLayer

packages/plugins/graphql/src/sdk/invoke.ts:151–168  ·  view source on GitHub ↗
(
  operation: OperationBinding,
  args: Record<string, unknown>,
  endpoint: string,
  resolvedHeaders: Record<string, string>,
  resolvedQueryParams: Record<string, string>,
  httpClientLayer: Layer.Layer<HttpClient.HttpClient>,
)

Source from the content-addressed store, hash-verified

149// ---------------------------------------------------------------------------
150
151export const invokeWithLayer = (
152 operation: OperationBinding,
153 args: Record<string, unknown>,
154 endpoint: string,
155 resolvedHeaders: Record<string, string>,
156 resolvedQueryParams: Record<string, string>,
157 httpClientLayer: Layer.Layer<HttpClient.HttpClient>,
158) =>
159 invoke(operation, args, endpoint, resolvedHeaders, resolvedQueryParams).pipe(
160 Effect.provide(httpClientLayer),
161 Effect.withSpan("plugin.graphql.invoke", {
162 attributes: {
163 "plugin.graphql.endpoint": endpointForTelemetry(endpoint),
164 "plugin.graphql.operation_kind": operation.kind,
165 "plugin.graphql.field_name": operation.fieldName,
166 },
167 }),
168 );

Callers 1

plugin.tsFile · 0.90

Calls 2

invokeFunction · 0.85
endpointForTelemetryFunction · 0.85

Tested by

no test coverage detected