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

Function buildConfig

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

Source from the content-addressed store, hash-verified

877// no longer takes one.
878const makeGraphqlExtension = (ctx: PluginCtx<GraphqlStore>) => {
879 const buildConfig = (input: GraphqlAddIntegrationInput): GraphqlIntegrationConfig =>
880 GraphqlIntegrationConfig.make({
881 endpoint: input.endpoint,
882 name: input.name?.trim() || slugFromEndpoint(input.endpoint),
883 ...(input.headers !== undefined ? { headers: input.headers } : {}),
884 ...(input.queryParams !== undefined ? { queryParams: input.queryParams } : {}),
885 authenticationTemplate: input.authenticationTemplate
886 ? normalizeGraphqlAuthMethods(input.authenticationTemplate)
887 : [],
888 });
889
890 /** Register the integration in the catalog. Registering an integration is a
891 * 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