apollo-angular
Version:
Use your GraphQL data in your Angular app, with the Apollo Client
17 lines (16 loc) • 910 B
TypeScript
import { Observable, SchedulerAction, SchedulerLike, Subscription } from 'rxjs';
import { NgZone } from '@angular/core';
import type { ApolloClient } from '@apollo/client';
import { Apollo } from './apollo';
/**
* Like RxJS's `fromPromise()`, but starts the promise only when the observable is subscribed to.
*/
export declare function fromLazyPromise<T>(promiseFn: () => Promise<T>): Observable<T>;
export declare function useMutationLoading<T>(source: Observable<ApolloClient.MutateResult<T>>, enabled: boolean): Observable<Apollo.MutateResult<T>>;
export declare class ZoneScheduler implements SchedulerLike {
private readonly zone;
constructor(zone: NgZone);
readonly now: () => number;
schedule<T>(work: (this: SchedulerAction<T>, state?: T) => void, delay?: number, state?: T): Subscription;
}
export declare function wrapWithZone<T>(obs: Observable<T>, ngZone: NgZone): Observable<T>;