import type { GraphQLSchema, DocumentNode, ParseOptions } from 'graphql'; import type { IMocks } from '@graphql-tools/mock'; import type { IResolvers } from '@graphql-tools/utils'; import type { ApolloConfig, ValueOrPromise, GraphQLExecutor, ApolloConfigInput } from 'apollo-server-types'; import type { GraphQLServerOptions as GraphQLOptions, PersistedQueryOptions } from './graphqlOptions'; import type { ApolloServerPlugin } from 'apollo-server-plugin-base'; import type { GraphQLSchemaModule } from '@apollographql/apollo-tools'; export type { GraphQLSchemaModule }; export { KeyValueCache } from 'apollo-server-caching'; export declare type Context = T; export declare type ContextFunction = (context: FunctionParams) => ValueOrPromise>; export declare type PluginDefinition = ApolloServerPlugin | (() => ApolloServerPlugin); declare type BaseConfig = Pick, 'formatError' | 'debug' | 'rootValue' | 'validationRules' | 'executor' | 'formatResponse' | 'fieldResolver' | 'dataSources' | 'cache' | 'logger'>; export declare type Unsubscriber = () => void; export declare type SchemaChangeCallback = (apiSchema: GraphQLSchema) => void; export declare type GraphQLServiceConfig = { schema: GraphQLSchema; executor: GraphQLExecutor | null; }; export interface GatewayInterface { load(options: { apollo: ApolloConfig; }): Promise; onSchemaChange?(callback: SchemaChangeCallback): Unsubscriber; onSchemaLoadOrUpdate?(callback: (schemaContext: { apiSchema: GraphQLSchema; coreSupergraphSdl: string; }) => void): Unsubscriber; stop(): Promise; } export interface GraphQLService extends GatewayInterface { } export interface Config extends BaseConfig { modules?: GraphQLSchemaModule[]; typeDefs?: DocumentNode | Array | string | Array; parseOptions?: ParseOptions; resolvers?: IResolvers | Array; schema?: GraphQLSchema; context?: Context | ContextFunction; introspection?: boolean; mocks?: boolean | IMocks; mockEntireSchema?: boolean; plugins?: PluginDefinition[]; persistedQueries?: PersistedQueryOptions | false; gateway?: GatewayInterface; experimental_approximateDocumentStoreMiB?: number; stopOnTerminationSignals?: boolean; apollo?: ApolloConfigInput; __testing_nodeEnv__?: string | undefined; } //# sourceMappingURL=types.d.ts.map