import { FragmentDefinitionNode, GraphQLResolveInfo, GraphQLSchema, OperationDefinitionNode } from 'graphql'; export interface OperationParams { readonly schema: GraphQLSchema; readonly operation: OperationDefinitionNode; readonly variableValues: { [name: string]: any; }; readonly fragments: { [fragmentName: string]: FragmentDefinitionNode; }; readonly context: any; } export interface FieldResolverParameters { readonly source: unknown; readonly args: unknown; readonly context: unknown; readonly info: GraphQLResolveInfo; } export interface AddOperationBasedResolversParams { readonly schema: GraphQLSchema; readonly operationResolver: (params: OperationParams) => Promise; readonly getOperationIdentifier?: (params: FieldResolverParameters) => object | undefined; } export declare class NoOperationIdentifierError extends Error { constructor(message: string); } /** * Adds resolvers to a schema that can execute a whole operation at once * @param {GraphQLSchema} schema * @param {(params: OperationParams)} resolver the callback function used to resolve one operation */ export declare function addOperationBasedResolvers({ schema, operationResolver, getOperationIdentifier, }: AddOperationBasedResolversParams): GraphQLSchema;