import { DocumentNode, FieldNode, FragmentDefinitionNode, GraphQLCompositeType, GraphQLField, GraphQLOutputType, GraphQLSchema, OperationDefinitionNode, OperationTypeNode } from 'graphql'; interface FieldRequestParams { readonly field: GraphQLField; readonly parentType: GraphQLCompositeType; readonly schema: GraphQLSchema; readonly selectionSet?: ReadonlyArray; readonly args?: { [argumentName: string]: unknown; }; readonly fieldNodes?: ReadonlyArray; } /** * A request for the value of one field with a specific argument set and selection set */ export declare class FieldRequest { readonly field: GraphQLField; readonly parentType: GraphQLCompositeType; readonly schema: GraphQLSchema; readonly selectionSet: ReadonlyArray; readonly args: { [argumentName: string]: any; }; readonly fieldNodes: ReadonlyArray; constructor(config: FieldRequestParams); get fieldName(): string; equals(other: FieldRequest): boolean; describe(): string; } /** * A request for a field within a selection set. This is what gives a {@link FieldRequest} a property name in the result */ export declare class FieldSelection { readonly propertyName: string; readonly fieldRequest: FieldRequest; /** * @param propertyName the name of the property the field request's value should be put in * @param fieldRequest determines the value for that property */ constructor(propertyName: string, fieldRequest: FieldRequest); equals(other: FieldSelection): boolean; } /** * A simple description of a GraphQL operation */ export declare class DistilledOperation { readonly operation: OperationTypeNode; readonly selectionSet: ReadonlyArray; constructor(operation: OperationTypeNode, selectionSet: ReadonlyArray); describe(): string; } export interface OperationDistillationParams { readonly schema: GraphQLSchema; readonly operation: OperationDefinitionNode; readonly variableValues: { readonly [name: string]: unknown; }; readonly fragments: { readonly [fragmentName: string]: FragmentDefinitionNode; }; readonly includeTypenameFields?: boolean; } /** * Creates a simplified description of an operation definition */ export declare function distillOperation(params: OperationDistillationParams): DistilledOperation; /** * Creates a simplified description of an operation in a query */ export declare function distillQuery(document: DocumentNode, schema: GraphQLSchema, variableValues?: { [name: string]: any; }, operationName?: string): DistilledOperation; export declare function unwrapToCompositeType(type: GraphQLOutputType): GraphQLCompositeType | undefined; export {};