UNPKG

774 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 constructor(httpClient: HttpClient, options: BatchOptions);
11 private createOptions;
12 private createBody;
13 private createHeaders;
14 private createBatchKey;
15 request(op: Operation): LinkObservable<FetchResult> | null;
16}
17export declare class HttpBatchLink {
18 private httpClient;
19 constructor(httpClient: HttpClient);
20 create(options: BatchOptions): HttpBatchLinkHandler;
21}