apollo-mantra
Version:
Tools for integration of apollo with Mantra
15 lines (14 loc) • 653 B
TypeScript
import { ApolloError } from './error_logger';
export interface IMutation {
context?: any;
query: any;
name?: string;
variables?: Object;
updateQueries?: any;
optimisticCallback?: (state: any, context: any) => void;
thenCallback?: (data: any, state: any, context: any) => void;
catchCallback?: (error: ApolloError, state: any, context: any) => void;
finalCallback?: (state: any, context: any) => void;
optimisticResponse?: any;
}
export default function ({context, query, name, variables, updateQueries, optimisticCallback, thenCallback, catchCallback, finalCallback, optimisticResponse}: IMutation): Promise<{}>;