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

Function invokeWithLayer

packages/plugins/graphql/src/sdk/invoke.ts:149–166  ·  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

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

Callers 1

plugin.tsFile · 0.90

Calls 1

endpointForTelemetryFunction · 0.85

Tested by

no test coverage detected