import { DocumentNode, GraphQLSchema, OperationTypeNode } from 'graphql'; import { Request, Response } from 'koa'; export interface GraphQLListener { onStart?: (ctx: {}) => Omit, 'onStart'> | void; onExecute?: (ctx: { context: Context; document: DocumentNode; operation: OperationTypeNode; }) => Omit, 'onStart' | 'onExecute'> | void; onResponse?: (ctx: { response: any; context: Context; }) => Omit, 'onStart' | 'onExecute' | 'onResponse'> | void; onShutdown?: (ctx: { response: any; }) => Omit, 'onStart' | 'onExecute' | 'onResponse' | 'onShutdown'> | void; } interface FactoryArgs { schema: GraphQLSchema; listeners: GraphQLListener[]; } export type GraphQLQueryHandler = (args: { request: Request; response: Response; createContext: ({}: { operation: OperationTypeNode; }) => Context; }) => any; export declare const createGraphQLQueryHandler: ({ schema, listeners, }: FactoryArgs) => GraphQLQueryHandler; export declare const extractOriginalError: (e: Error) => Error; export {}; //# sourceMappingURL=execution.d.ts.map