import { NgZone } from '@angular/core'; import type { QueryOptions, ApolloQueryResult, SubscriptionOptions, ApolloClientOptions, FetchResult } from '@apollo/client/core'; import { ApolloClient } from '@apollo/client/core'; import { Observable } from 'rxjs'; import { QueryRef } from './query-ref'; import { WatchQueryOptions, ExtraSubscriptionOptions, EmptyObject, NamedOptions, Flags, MutationResult, MutationOptions } from './types'; import * as i0 from "@angular/core"; export declare class ApolloBase { protected ngZone: NgZone; protected flags?: Flags; protected _client?: ApolloClient; private useInitialLoading; private useMutationLoading; constructor(ngZone: NgZone, flags?: Flags, _client?: ApolloClient); watchQuery(options: WatchQueryOptions): QueryRef; query(options: QueryOptions): Observable>; mutate(options: MutationOptions): Observable>; subscribe(options: SubscriptionOptions, extra?: ExtraSubscriptionOptions): Observable>; /** * Get an access to an instance of ApolloClient * @deprecated use `apollo.client` instead */ getClient(): ApolloClient; /** * Set a new instance of ApolloClient * Remember to clean up the store before setting a new client. * @deprecated use `apollo.client = client` instead * * @param client ApolloClient instance */ setClient(client: ApolloClient): void; /** * Get an access to an instance of ApolloClient */ get client(): ApolloClient; /** * Set a new instance of ApolloClient * Remember to clean up the store before setting a new client. * * @param client ApolloClient instance */ set client(client: ApolloClient); private ensureClient; private checkInstance; } export declare class Apollo extends ApolloBase { private _ngZone; private map; constructor(_ngZone: NgZone, apolloOptions?: ApolloClientOptions, apolloNamedOptions?: NamedOptions, flags?: Flags); /** * Create an instance of ApolloClient * @param options Options required to create ApolloClient * @param name client's name */ create(options: ApolloClientOptions, name?: string): void; /** * Use a default ApolloClient */ default(): ApolloBase; /** * Use a named ApolloClient * @param name client's name */ use(name: string): ApolloBase; /** * Create a default ApolloClient, same as `apollo.create(options)` * @param options ApolloClient's options */ createDefault(options: ApolloClientOptions): void; /** * Create a named ApolloClient, same as `apollo.create(options, name)` * @param name client's name * @param options ApolloClient's options */ createNamed(name: string, options: ApolloClientOptions): void; /** * Remember to clean up the store before removing a client * @param name client's name */ removeClient(name?: string): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }