UNPKG

961 BTypeScriptView Raw
1import { HttpClient } from '@angular/common/http';
2import { ApolloLink, Observable as LinkObservable, Operation, FetchResult } from '@apollo/client/core';
3import { BatchOptions } from './types';
4import * as i0 from "@angular/core";
5export declare class HttpBatchLinkHandler extends ApolloLink {
6 private httpClient;
7 private options;
8 batcher: ApolloLink;
9 private batchInterval;
10 private batchMax;
11 private print;
12 constructor(httpClient: HttpClient, options: BatchOptions);
13 private createOptions;
14 private createBody;
15 private createHeaders;
16 private createBatchKey;
17 request(op: Operation): LinkObservable<FetchResult> | null;
18}
19export declare class HttpBatchLink {
20 private httpClient;
21 constructor(httpClient: HttpClient);
22 create(options: BatchOptions): HttpBatchLinkHandler;
23 static ɵfac: i0.ɵɵFactoryDeclaration<HttpBatchLink, never>;
24 static ɵprov: i0.ɵɵInjectableDeclaration<HttpBatchLink>;
25}