import { GraphQLError } from 'graphql';
import { createGraphQLError } from '@graphql-tools/utils';
import type { YogaLogger } from './logger.js';
import type { ResultProcessorInput } from './plugins/types.js';
import type { YogaMaskedErrorOpts } from './types.js';
export { createGraphQLError };
declare module 'graphql' {
    interface GraphQLHTTPErrorExtensions {
        spec?: boolean;
        status?: number;
        headers?: Record<string, string>;
    }
    interface GraphQLErrorExtensions {
        http?: GraphQLHTTPErrorExtensions;
        unexpected?: boolean;
    }
}
export declare function isGraphQLError(val: unknown): val is GraphQLError;
export declare function isOriginalGraphQLError(val: unknown): val is GraphQLError & {
    originalError: GraphQLError;
};
export declare function handleError(error: unknown, maskedErrorsOpts: YogaMaskedErrorOpts | null, logger: YogaLogger): GraphQLError[];
export declare function getResponseInitByRespectingErrors(result: ResultProcessorInput, headers?: Record<string, string>, isApplicationJson?: boolean): {
    status: number;
    headers: Record<string, string>;
};
