UNPKG

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