import type { DocumentNode, GraphQLError } from "graphql"; import type { Cache } from "../cache/index.js"; import type { WatchQueryOptions, ErrorPolicy } from "./watchQueryOptions.js"; import type { ObservableQuery } from "./ObservableQuery.js"; import type { QueryListener } from "./types.js"; import type { FetchResult } from "../link/core/index.js"; import { NetworkStatus } from "./networkStatus.js"; import type { ApolloError } from "../errors/index.js"; import type { QueryManager } from "./QueryManager.js"; export type QueryStoreValue = Pick; export declare const enum CacheWriteBehavior { FORBID = 0, OVERWRITE = 1, MERGE = 2 } export declare class QueryInfo { readonly queryId: string; listeners: Set; document: DocumentNode | null; lastRequestId: number; variables?: Record; networkStatus?: NetworkStatus; networkError?: Error | null; graphQLErrors?: ReadonlyArray; stopped: boolean; private cache; constructor(queryManager: QueryManager, queryId?: string); init(query: { document: DocumentNode; variables: Record | undefined; networkStatus?: NetworkStatus; observableQuery?: ObservableQuery; lastRequestId?: number; }): this; private dirty; private notifyTimeout?; reset(): void; resetDiff(): void; getDiff(): Cache.DiffResult; private lastDiff?; private updateLastDiff; private getDiffOptions; setDiff(diff: Cache.DiffResult | null): void; readonly observableQuery: ObservableQuery | null; private oqListener?; setObservableQuery(oq: ObservableQuery | null): void; notify(): void; private shouldNotify; stop(): void; private cancel; private lastWatch?; private updateWatch; private lastWrite?; resetLastWrite(): void; private shouldWrite; markResult(result: FetchResult, document: DocumentNode, options: Pick, cacheWriteBehavior: CacheWriteBehavior): void; markReady(): NetworkStatus; markError(error: ApolloError): ApolloError; } export declare function shouldWriteResult(result: FetchResult, errorPolicy?: ErrorPolicy): boolean; //# sourceMappingURL=QueryInfo.d.ts.map