UNPKG

634 BTypeScriptView Raw
1import { Client, OperationContext, OperationResult, TypedDocumentNode } from '@urql/core';
2import { Getter } from 'jotai';
3declare type MutationAction<Data, Variables extends object> = {
4 variables?: Variables;
5 context?: Partial<OperationContext>;
6 callback?: (result: OperationResult<Data, Variables>) => void;
7};
8export declare function atomWithMutation<Data, Variables extends object>(createQuery: (get: Getter) => TypedDocumentNode<Data, Variables> | string, getClient?: (get: Getter) => Client): import("jotai").WritableAtom<OperationResult<Data, Variables>, MutationAction<Data, Variables>, void>;
9export {};