import type { Logger } from '@apollo/utils.logger'; import type { IExecutableSchemaDefinition } from '@graphql-tools/schema'; import type { DocumentNode, ExecutionArgs, FormattedExecutionResult, GraphQLFieldResolver, GraphQLFormattedError, GraphQLSchema, ParseOptions, ValidationRule } from 'graphql'; import type { KeyValueCache } from '@apollo/utils.keyvaluecache'; import type { GatewayInterface } from '@apollo/server-gateway-interface'; import type { ApolloServerPlugin } from './plugins.js'; import type { BaseContext, LegacyExperimentalExecuteIncrementally } from './index.js'; import type { GraphQLExperimentalIncrementalExecutionResultsAlpha2, GraphQLExperimentalIncrementalExecutionResultsAlpha9 } from '../incrementalDeliveryPolyfill.js'; import type { ValidationOptions } from '../ApolloServer.js'; export type DocumentStore = KeyValueCache; export interface ApolloConfigInput { key?: string; graphRef?: string; graphId?: string; graphVariant?: string; } export interface ApolloConfig { key?: string; keyHash?: string; graphRef?: string; } export interface PersistedQueryOptions { cache?: KeyValueCache; ttl?: number | null; } export interface CSRFPreventionOptions { requestHeaders?: string[]; } interface ApolloServerOptionsBase { formatError?: (formattedError: GraphQLFormattedError, error: unknown) => GraphQLFormattedError; rootValue?: ((parsedQuery: DocumentNode) => unknown) | unknown; validationRules?: Array; fieldResolver?: GraphQLFieldResolver; cache?: KeyValueCache | 'bounded'; includeStacktraceInErrorResponses?: boolean; logger?: Logger; allowBatchedHttpRequests?: boolean; stringifyResult?: (value: FormattedExecutionResult) => string | Promise; introspection?: boolean; maxRecursiveSelections?: boolean | number; hideSchemaDetailsFromClientErrors?: boolean; plugins?: ApolloServerPlugin[]; persistedQueries?: PersistedQueryOptions | false; stopOnTerminationSignals?: boolean; apollo?: ApolloConfigInput; nodeEnv?: string; documentStore?: DocumentStore | null; dangerouslyDisableValidation?: boolean; validationOptions?: ValidationOptions; csrfPrevention?: CSRFPreventionOptions | boolean; parseOptions?: ParseOptions; executionOptions?: ExecutionArgs['options']; status400ForVariableCoercionErrors?: boolean; legacyExperimentalExecuteIncrementally?: LegacyExperimentalExecuteIncrementally; __testing_incrementalExecutionResults?: GraphQLExperimentalIncrementalExecutionResultsAlpha2 | GraphQLExperimentalIncrementalExecutionResultsAlpha9; } export interface ApolloServerOptionsWithGateway extends ApolloServerOptionsBase { gateway: GatewayInterface; schema?: undefined; typeDefs?: undefined; resolvers?: undefined; } export interface ApolloServerOptionsWithSchema extends ApolloServerOptionsBase { schema: GraphQLSchema; gateway?: undefined; typeDefs?: undefined; resolvers?: undefined; } export interface ApolloServerOptionsWithTypeDefs extends ApolloServerOptionsBase { typeDefs: IExecutableSchemaDefinition['typeDefs']; resolvers?: IExecutableSchemaDefinition['resolvers']; gateway?: undefined; schema?: undefined; } export type ApolloServerOptionsWithStaticSchema = ApolloServerOptionsWithSchema | ApolloServerOptionsWithTypeDefs; export type ApolloServerOptions = ApolloServerOptionsWithGateway | ApolloServerOptionsWithStaticSchema; export {}; //# sourceMappingURL=constructor.d.ts.map