import React from 'react';
import { OperationVariables, ApolloError } from '@apollo/client';
import { MutationComponentOptions } from '@apollo/client/react/components';
import { RenderableProp } from '@airbnb/lunar/lib/utils/renderElementOrFunction';
export declare type MutationProps<Data, Vars> = Omit<MutationComponentOptions<Data, Vars>, 'client'> & {
    /**
     * Render an element or a function that returns an element when an error occurs.
     * The function is passed the `ApolloError` as an argument.
     * When not defined, this defaults to `ErrorMessage`.
     */
    error?: RenderableProp<ApolloError>;
    /**
     * Render an element or a function that returns an element while loading.
     * When not defined, this defaults to `Loader`.
     */
    loading?: RenderableProp;
    /**
     * Allow graphql errors to be passed to the render function.  If this is true the render function
     * may receive partial data and is expected to be able to handle `result.error.graphQLErrors`
     */
    ignoreGraphQLErrors?: boolean;
};
/**
 * A declarative component to make GraphQL mutations.
 * Based on Apollo's [Mutation](https://www.apollographql.com/docs/react/essentials/mutations.html#props) component.
 */
export default class Mutation<Data = {}, Vars = OperationVariables> extends React.Component<MutationProps<Data, Vars>> {
    static defaultProps: {
        awaitRefetchQueries: boolean;
        ignoreGraphQLErrors: boolean;
        ignoreResults: boolean;
        variables: {};
    };
    private handleRender;
    render(): JSX.Element;
}
//# sourceMappingURL=index.d.ts.map