import { Headers, Request } from 'apollo-server-env'; import type { BaseContext, GraphQLExecutionResult, ValueOrPromise, WithRequired } from 'apollo-server-types'; import { default as GraphQLOptions } from './graphqlOptions'; export interface HttpQueryRequest { method: string; query: Record | Array>; options: GraphQLOptions | ((...args: Array) => ValueOrPromise); request: Pick; } interface ApolloServerHttpResponse { headers?: Record; status?: number; } interface HttpQueryResponse { graphqlResponse: string; responseInit: ApolloServerHttpResponse; } export declare class HttpQueryError extends Error { statusCode: number; isGraphQLError: boolean; headers?: { [key: string]: string; }; constructor(statusCode: number, message: string, isGraphQLError?: boolean, headers?: { [key: string]: string; }); } export declare function isHttpQueryError(e: unknown): e is HttpQueryError; export declare function throwHttpGraphQLError(statusCode: number, errors: Array, options?: Pick, extensions?: GraphQLExecutionResult['extensions'], headers?: Headers): never; export declare function runHttpQuery(handlerArguments: Array, request: HttpQueryRequest, csrfPreventionRequestHeaders?: string[] | null): Promise; export declare function processHTTPRequest(options: WithRequired, 'cache' | 'plugins'> & { context: TContext; }, httpRequest: HttpQueryRequest): Promise; export declare function cloneObject(object: T): T; export {}; //# sourceMappingURL=runHttpQuery.d.ts.map