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

Function buildConfig

packages/plugins/graphql/src/sdk/plugin.ts:634–643  ·  view source on GitHub ↗
(input: GraphqlAddIntegrationInput)

Source from the content-addressed store, hash-verified

632// no longer takes one.
633const makeGraphqlExtension = (ctx: PluginCtx<GraphqlStore>) => {
634 const buildConfig = (input: GraphqlAddIntegrationInput): GraphqlIntegrationConfig =>
635 GraphqlIntegrationConfig.make({
636 endpoint: input.endpoint,
637 name: input.name?.trim() || slugFromEndpoint(input.endpoint),
638 ...(input.headers !== undefined ? { headers: input.headers } : {}),
639 ...(input.queryParams !== undefined ? { queryParams: input.queryParams } : {}),
640 authenticationTemplate: input.authenticationTemplate
641 ? normalizeGraphqlAuthMethods(input.authenticationTemplate)
642 : [],
643 });
644
645 /** Register the integration in the catalog. Registering an integration is a
646 * catalog statement ("we use this GraphQL endpoint now") and MUST NOT make a

Callers 1

Calls 2

slugFromEndpointFunction · 0.85

Tested by

no test coverage detected