import { BaseContext, ApolloServerOptionsWithStaticSchema } from '@apollo/server'; import { GraphQLArmorConfig } from '@escape.tech/graphql-armor-types'; import { BackendProvider, GraphweaverPlugin, Instrumentation } from '@exogee/graphweaver'; import { CorsPluginOptions } from './apollo-plugins'; import type { FastifyHttp2Options, FastifyHttp2SecureOptions, FastifyHttpOptions, FastifyHttpsOptions } from 'fastify'; export type MetadataHookParams = { context: C; metadata?: { entities: any; enums: any; }; }; export interface AdminMetadata { enabled: boolean; config?: any; /** * @deprecated This argument should not be used and will be removed in the future. Use `applyAccessControlList` instead. */ hooks?: { beforeRead?: (params: MetadataHookParams) => Promise>; afterRead?: (params: MetadataHookParams) => Promise>; }; } export interface GraphweaverConfig { adminMetadata?: AdminMetadata; apolloServerOptions?: Omit, 'schema'>; fastifyOptions?: FastifyHttp2SecureOptions | FastifyHttp2Options | FastifyHttpsOptions | FastifyHttpOptions; federationSubgraphName?: string; enableFederationTracing?: boolean; graphQLArmorOptions?: GraphQLArmorConfig; corsOptions?: CorsPluginOptions; graphqlDeduplicator?: { enabled: boolean; }; fileAutoGenerationOptions?: { typesOutputPath?: string[] | string; watchForFileChangesInPaths?: string[]; }; plugins?: GraphweaverPlugin[]; schemaDirectives?: Record; openTelemetry?: { traceProvider?: BackendProvider; instrumentations?: (Instrumentation | Instrumentation[])[]; }; } export declare const mergeConfig: (defaultConfig: T, userConfig: Partial) => T;