import type { AnyFunctionMap , BaseContext , GraphQLServiceContext , GraphQLRequestContext , GraphQLRequest , GraphQLResponse , WithRequired , GraphQLFieldResolverParams , GraphQLRequestContextDidResolveSource , GraphQLRequestContextParsingDidStart , GraphQLRequestContextValidationDidStart , GraphQLRequestContextDidResolveOperation , GraphQLRequestContextDidEncounterErrors , GraphQLRequestContextResponseForOperation , GraphQLRequestContextExecutionDidStart , GraphQLRequestContextWillSendResponse , GraphQLSchemaContext , } from 'apollo-server-types' ; export { BaseContext , GraphQLServiceContext , GraphQLRequestContext , GraphQLRequest , GraphQLResponse , WithRequired , GraphQLFieldResolverParams , GraphQLRequestContextDidResolveSource , GraphQLRequestContextParsingDidStart , GraphQLRequestContextValidationDidStart , GraphQLRequestContextDidResolveOperation , GraphQLRequestContextDidEncounterErrors , GraphQLRequestContextResponseForOperation , GraphQLRequestContextExecutionDidStart , GraphQLRequestContextWillSendResponse , GraphQLSchemaContext , } ; export interface ApolloServerPlugin < TContext extends BaseContext = BaseContext > { serverWillStart ? ( service ) : Promise < GraphQLServerListener | void > ; requestDidStart ? ( requestContext ) : Promise < GraphQLRequestListener < TContext > | void > ; } export interface GraphQLServerListener { schemaDidLoadOrUpdate ? ( schemaContext ) : void ; drainServer ? ( ) : Promise < void > ; serverWillStop ? ( ) : Promise < void > ; renderLandingPage ? ( ) : Promise < LandingPage > ; } export interface LandingPage { html : string ; } export type GraphQLRequestListenerParsingDidEnd = ( err ? : Error ) => Promise < void > ; export type GraphQLRequestListenerValidationDidEnd = ( err ? : ReadonlyArray < Error > ) => Promise < void > ; export type GraphQLRequestListenerExecutionDidEnd = ( err ? : Error ) => Promise < void > ; export type GraphQLRequestListenerDidResolveField = ( error : Error | null , result ? : any ) => void ; export interface GraphQLRequestListener < TContext extends BaseContext = BaseContext > extends AnyFunctionMap { didResolveSource ? ( requestContext ) : Promise < void > ; parsingDidStart ? ( requestContext ) : Promise < GraphQLRequestListenerParsingDidEnd | void > ; validationDidStart ? ( requestContext ) : Promise < GraphQLRequestListenerValidationDidEnd | void > ; didResolveOperation ? ( requestContext ) : Promise < void > ; didEncounterErrors ? ( requestContext ) : Promise < void > ; responseForOperation ? ( requestContext ) : Promise < GraphQLResponse | null > ; executionDidStart ? ( requestContext ) : Promise < GraphQLRequestExecutionListener | void > ; willSendResponse ? ( requestContext ) : Promise < void > ; } export interface GraphQLRequestExecutionListener < TContext extends BaseContext = BaseContext > extends AnyFunctionMap { executionDidEnd ? : GraphQLRequestListenerExecutionDidEnd ; willResolveField ? ( fieldResolverParams ) : GraphQLRequestListenerDidResolveField | void ; }