import ApolloClient, { ApolloQueryResult, ApolloError, FetchPolicy, FetchMoreOptions, UpdateQueryOptions, FetchMoreQueryOptions, SubscribeToMoreOptions, PureQueryOptions, MutationUpdaterFn } from 'apollo-client'; export declare type OperationVariables = { [key: string]: any; }; export interface MutationOpts { variables?: TGraphQLVariables; optimisticResponse?: Object; refetchQueries?: string[] | PureQueryOptions[]; update?: MutationUpdaterFn; client?: ApolloClient; notifyOnNetworkStatusChange?: boolean; } export interface QueryOpts { ssr?: boolean; variables?: TGraphQLVariables; fetchPolicy?: FetchPolicy; pollInterval?: number; client?: ApolloClient; notifyOnNetworkStatusChange?: boolean; } export interface GraphqlQueryControls { error?: ApolloError; networkStatus: number; loading: boolean; variables: TGraphQLVariables; fetchMore: (fetchMoreOptions: FetchMoreQueryOptions & FetchMoreOptions) => Promise>; refetch: (variables?: TGraphQLVariables) => Promise>; startPolling: (pollInterval: number) => void; stopPolling: () => void; subscribeToMore: (options: SubscribeToMoreOptions) => () => void; updateQuery: (mapFn: (previousQueryResult: any, options: UpdateQueryOptions) => any) => void; } export declare type MutationFunc = (opts: MutationOpts) => Promise>; export declare type DataValue = GraphqlQueryControls & Partial; export interface DataProps { data: DataValue; } export interface MutateProps { mutate: MutationFunc; } export declare type ChildProps = TProps & Partial> & Partial>; export declare type ChildDataProps = TProps & DataProps; export declare type ChildMutateProps = TProps & MutateProps; export declare type NamedProps = TProps & { ownProps: R; }; export interface OptionProps extends Partial>, Partial> { ownProps: TProps; } export interface OperationOption { options?: QueryOpts | MutationOpts | ((props: TProps) => QueryOpts | MutationOpts); props?: (props: OptionProps) => any; skip?: boolean | ((props: any) => boolean); name?: string; withRef?: boolean; shouldResubscribe?: (props: TProps & DataProps, nextProps: TProps & DataProps) => boolean; alias?: string; }