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

Function invokeWithLayer

packages/plugins/graphql/src/sdk/invoke.ts:182–200  ·  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>,
  options: GraphqlInvokeOptions = {},
)

Source from the content-addressed store, hash-verified

180// ---------------------------------------------------------------------------
181
182export const invokeWithLayer = (
183 operation: OperationBinding,
184 args: Record<string, unknown>,
185 endpoint: string,
186 resolvedHeaders: Record<string, string>,
187 resolvedQueryParams: Record<string, string>,
188 httpClientLayer: Layer.Layer<HttpClient.HttpClient>,
189 options: GraphqlInvokeOptions = {},
190) =>
191 invoke(operation, args, endpoint, resolvedHeaders, resolvedQueryParams, options).pipe(
192 Effect.provide(httpClientLayer),
193 Effect.withSpan("plugin.graphql.invoke", {
194 attributes: {
195 "plugin.graphql.endpoint": endpointForTelemetry(endpoint),
196 "plugin.graphql.operation_kind": operation.kind,
197 "plugin.graphql.field_name": operation.fieldName,
198 },
199 }),
200 );

Callers 1

plugin.tsFile · 0.90

Calls 2

endpointForTelemetryFunction · 0.85
invokeFunction · 0.50

Tested by

no test coverage detected