import { SelectionNode as GraphQLJSSelectionNode } from 'graphql';
export declare type ResponsePath = (string | number)[];
export interface QueryPlan {
    kind: 'QueryPlan';
    node?: PlanNode;
}
export declare type PlanNode = SequenceNode | ParallelNode | FetchNode | FlattenNode;
export interface SequenceNode {
    kind: 'Sequence';
    nodes: PlanNode[];
}
export interface ParallelNode {
    kind: 'Parallel';
    nodes: PlanNode[];
}
export interface FetchNode {
    kind: 'Fetch';
    serviceName: string;
    variableUsages?: string[];
    requires?: QueryPlanSelectionNode[];
    operation: string;
}
export interface FlattenNode {
    kind: 'Flatten';
    path: ResponsePath;
    node: PlanNode;
}
export declare type QueryPlanSelectionNode = QueryPlanFieldNode | QueryPlanInlineFragmentNode;
export interface QueryPlanFieldNode {
    readonly kind: 'Field';
    readonly alias?: string;
    readonly name: string;
    readonly selections?: QueryPlanSelectionNode[];
}
export interface QueryPlanInlineFragmentNode {
    readonly kind: 'InlineFragment';
    readonly typeCondition?: string;
    readonly selections: QueryPlanSelectionNode[];
}
export declare function serializeQueryPlan(queryPlan: QueryPlan): string;
export declare function getResponseName(node: QueryPlanFieldNode): string;
export declare const trimSelectionNodes: (selections: readonly GraphQLJSSelectionNode[]) => QueryPlanSelectionNode[];
//# sourceMappingURL=QueryPlan.d.ts.map