import { NetworkStatus } from './networkStatus'; import { Observable } from '../utilities'; import { ApolloError } from '../errors'; import { QueryManager } from './QueryManager'; import { ApolloQueryResult, OperationVariables, TypedDocumentNode } from './types'; import { WatchQueryOptions, FetchMoreQueryOptions, SubscribeToMoreOptions } from './watchQueryOptions'; import { QueryInfo } from './QueryInfo'; import { MissingFieldError } from '../cache'; import { MissingTree } from '../cache/core/types/common'; export interface FetchMoreOptions { updateQuery?: (previousQueryResult: TData, options: { fetchMoreResult?: TData; variables?: TVariables; }) => TData; } export interface UpdateQueryOptions { variables?: TVariables; } export declare class ObservableQuery extends Observable> { readonly options: WatchQueryOptions; readonly queryId: string; readonly queryName?: string; get query(): TypedDocumentNode; get variables(): TVariables | undefined; private isTornDown; private queryManager; private observers; private subscriptions; private last?; private queryInfo; private concast?; private observer?; private pollingInfo?; constructor({ queryManager, queryInfo, options, }: { queryManager: QueryManager; queryInfo: QueryInfo; options: WatchQueryOptions; }); result(): Promise>; getCurrentResult(saveAsLastResult?: boolean): ApolloQueryResult; isDifferentFromLastResult(newResult: ApolloQueryResult, variables?: TVariables): boolean | undefined; private getLast; getLastResult(variablesMustMatch?: boolean): ApolloQueryResult | undefined; getLastError(variablesMustMatch?: boolean): ApolloError | undefined; resetLastResults(): void; resetQueryStoreErrors(): void; refetch(variables?: Partial): Promise>; fetchMore(fetchMoreOptions: FetchMoreQueryOptions & { updateQuery?: (previousQueryResult: TData, options: { fetchMoreResult: TFetchData; variables: TFetchVars; }) => TData; }): Promise>; subscribeToMore(options: SubscribeToMoreOptions): () => void; setOptions(newOptions: Partial>): Promise>; setVariables(variables: TVariables): Promise | void>; updateQuery(mapFn: (previousQueryResult: TData, options: Pick, "variables">) => TData): void; startPolling(pollInterval: number): void; stopPolling(): void; private applyNextFetchPolicy; private fetch; private updatePolling; private updateLastResult; reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>; private observe; private reportResult; private reportError; hasObservers(): boolean; private tearDownQuery; } export declare function reobserveCacheFirst(obsQuery: ObservableQuery): Promise>; export declare function logMissingFieldErrors(missing: MissingFieldError[] | MissingTree | undefined): void; //# sourceMappingURL=ObservableQuery.d.ts.map