UNPKG

@graphql-mesh/serve-cli

Version:
19 lines (18 loc) 1.1 kB
import type { GatewayConfig, GatewayConfigContext } from '@graphql-mesh/serve-runtime'; import type { KeyValueCache, Logger } from '@graphql-mesh/types'; import type { GatewayCLIBuiltinPluginConfig } from './cli'; import type { ServerConfig } from './server'; export declare const defaultConfigExtensions: string[]; export declare const defaultConfigFileName = "gateway.config"; export declare function createDefaultConfigPaths(configFileName: string): string[]; export declare function loadConfig<TContext extends Record<string, any> = Record<string, any>>(opts: { quiet?: boolean; log: Logger; configPath: string | null | undefined; configFileName: string; }): Promise<Partial<GatewayConfig<TContext> & ServerConfig & GatewayCLIBuiltinPluginConfig>>; export declare function getBuiltinPluginsFromConfig(config: GatewayCLIBuiltinPluginConfig, ctx: { cache: KeyValueCache; logger: Logger; }): Promise<any[]>; export declare function getCacheInstanceFromConfig(config: GatewayCLIBuiltinPluginConfig, ctx: Pick<GatewayConfigContext, 'logger' | 'pubsub'>): Promise<KeyValueCache>;