import { DataProxy } from "apollo-cache"; import { FetchResult } from "apollo-link"; import { MutationOptions } from "../mutations"; import { ApolloErrorWithUserInput, Options, ReturnData, Variables } from "./types"; declare type MutationUpdaterFn> = (proxy: DataProxy, mutationResult: FetchResult) => void; export interface BaseMutationHookOptions extends Omit, "update"> { update?: MutationUpdaterFn; } export declare type MutationFn = (variables?: TVariables, options?: BaseMutationHookOptions) => Promise; export interface MutationResult { called: boolean; data: TData["data"] | null; error: ApolloErrorWithUserInput | null; loading: boolean; } export declare const mutationFactory: , TOptions extends Options>(mutation: T) => (variables?: TVariables | undefined, options?: TOptions | undefined) => [MutationFn, TVariables>, MutationResult>]; export {};