import { NetworkInterface, ObservableNetworkInterface } from './transport/networkInterface'; import { ApolloLink } from 'apollo-link-core'; import { FragmentMatcherInterface } from './data/fragmentMatcher'; import { ApolloStore, ApolloReducerConfig, Store } from './store'; import { ApolloAction } from './actions'; import { CustomResolverMap } from './data/readFromStore'; import { QueryManager } from './core/QueryManager'; import { ApolloQueryResult, ApolloExecutionResult, IdGetter } from './core/types'; import { ObservableQuery } from './core/ObservableQuery'; import { Observable } from './util/Observable'; import { WatchQueryOptions, SubscriptionOptions, MutationOptions } from './core/watchQueryOptions'; import { DataProxy, DataProxyReadQueryOptions, DataProxyReadFragmentOptions, DataProxyWriteQueryOptions, DataProxyWriteFragmentOptions } from './data/proxy'; export declare type ApolloStateSelector = (state: any) => Store; export default class ApolloClient implements DataProxy { networkInterface: NetworkInterface; store: ApolloStore; reduxRootSelector: ApolloStateSelector | null; initialState: any; queryManager: QueryManager; reducerConfig: ApolloReducerConfig; addTypename: boolean; disableNetworkFetches: boolean; dataId: IdGetter | undefined; dataIdFromObject: IdGetter | undefined; fieldWithArgs: (fieldName: string, args?: Object) => string; version: string; queryDeduplication: boolean; private devToolsHookCb; private proxy; private fragmentMatcher; private ssrMode; private subscriptionMap; constructor(options?: { networkInterface?: NetworkInterface | ObservableNetworkInterface | ApolloLink; reduxRootSelector?: ApolloStateSelector; initialState?: any; dataIdFromObject?: IdGetter; ssrMode?: boolean; ssrForceFetchDelay?: number; addTypename?: boolean; customResolvers?: CustomResolverMap; connectToDevTools?: boolean; queryDeduplication?: boolean; fragmentMatcher?: FragmentMatcherInterface; }); watchQuery(options: WatchQueryOptions): ObservableQuery; query(options: WatchQueryOptions): Promise>; mutate(options: MutationOptions): Promise>; subscribe(options: SubscriptionOptions): Observable; readQuery(options: DataProxyReadQueryOptions): T; readFragment(options: DataProxyReadFragmentOptions): T | null; writeQuery(options: DataProxyWriteQueryOptions): void; writeFragment(options: DataProxyWriteFragmentOptions): void; reducer(): (state: Store, action: ApolloAction) => Store; __actionHookForDevTools(cb: Function): void; middleware: () => (store: ApolloStore) => (next: any) => (action: any) => any; initStore(): void; resetStore(): Promise[]> | null; getInitialState(): { data: Object; }; private setStore(store); private initProxy(); }