import { Observable } from 'rxjs'; import { NgZone } from '@angular/core'; import type { OperationVariables } from '@apollo/client'; import { ApolloClient } from '@apollo/client'; import { QueryRef } from './query-ref'; import type { EmptyObject, Flags, NamedOptions } from './types'; import * as i0 from "@angular/core"; export declare namespace Apollo { type WatchQueryOptions = ApolloClient.WatchQueryOptions; type QueryOptions = ApolloClient.QueryOptions; type QueryResult = ApolloClient.QueryResult; type MutateOptions = ApolloClient.MutateOptions & { /** * Observable starts with `{ loading: true }`. * * Disabled by default */ useMutationLoading?: boolean; }; type MutateResult = ApolloClient.MutateResult & { loading?: boolean; }; type SubscribeOptions = ApolloClient.SubscribeOptions & { useZone?: boolean; }; type SubscribeResult = ApolloClient.SubscribeResult; interface WatchFragmentOptions extends ApolloClient.WatchFragmentOptions { useZone?: boolean; } type WatchFragmentResult = ApolloClient.WatchFragmentResult; } export declare class ApolloBase { protected readonly ngZone: NgZone; protected readonly flags?: Flags; protected _client?: ApolloClient; private useMutationLoading; constructor(ngZone: NgZone, flags?: Flags, _client?: ApolloClient); watchQuery(options: Apollo.WatchQueryOptions): QueryRef; query(options: Apollo.QueryOptions): Observable>; mutate(options: Apollo.MutateOptions): Observable>; watchFragment(options: Apollo.WatchFragmentOptions): Observable>; subscribe(options: Apollo.SubscribeOptions): Observable>; /** * Get 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 map; constructor(ngZone: NgZone, apolloOptions?: ApolloClient.Options, apolloNamedOptions?: NamedOptions, flags?: Flags); /** * Create an instance of ApolloClient * @param options Options required to create ApolloClient * @param name client's name */ create(options: ApolloClient.Options, 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: ApolloClient.Options): 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: ApolloClient.Options): 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; }