UNPKG

apollo-client

Version:
30 lines (29 loc) 1.25 kB
import { QueryManager } from '../core/QueryManager'; import { FetchType, QueryListener } from '../core/types'; import { ObservableQuery } from '../core/ObservableQuery'; import { WatchQueryOptions } from '../core/watchQueryOptions'; export declare class QueryScheduler<TCacheShape> { inFlightQueries: { [queryId: string]: WatchQueryOptions; }; registeredQueries: { [queryId: string]: WatchQueryOptions; }; intervalQueries: { [interval: number]: string[]; }; queryManager: QueryManager<TCacheShape>; private pollingTimers; private ssrMode; constructor({ queryManager, ssrMode, }: { queryManager: QueryManager<TCacheShape>; ssrMode?: boolean; }); checkInFlight(queryId: string): boolean; fetchQuery<T>(queryId: string, options: WatchQueryOptions, fetchType: FetchType): Promise<{}>; startPollingQuery<T>(options: WatchQueryOptions, queryId: string, listener?: QueryListener): string; stopPollingQuery(queryId: string): void; fetchQueriesOnInterval<T>(interval: number): void; addQueryOnInterval<T>(queryId: string, queryOptions: WatchQueryOptions): void; registerPollingQuery<T>(queryOptions: WatchQueryOptions): ObservableQuery<T>; }