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

Function invokeWithLayer

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

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

Callers 1

plugin.tsFile · 0.90

Calls 2

endpointForTelemetryFunction · 0.90
invokeFunction · 0.50

Tested by

no test coverage detected