UNPKG

1.14 kBTypeScriptView Raw
1import { HttpHeaders } from '@angular/common/http';
2import { Operation } from '@apollo/client/core';
3export declare type HttpRequestOptions = {
4 headers?: HttpHeaders;
5 withCredentials?: boolean;
6 useMultipart?: boolean;
7};
8export declare type URIFunction = (operation: Operation) => string;
9export declare type FetchOptions = {
10 method?: string;
11 uri?: string | URIFunction;
12 includeExtensions?: boolean;
13 includeQuery?: boolean;
14};
15export declare type Options = {} & FetchOptions & HttpRequestOptions;
16export declare type Body = {
17 query?: string;
18 variables?: Record<string, any>;
19 operationName?: string;
20 extensions?: Record<string, any>;
21};
22export declare type Context = {} & FetchOptions & HttpRequestOptions;
23export declare type Request = {
24 method: string;
25 url: string;
26 body: Body | Body[];
27 options: HttpRequestOptions;
28};
29export declare type ExtractFiles = (body: Body | Body[]) => {
30 clone: Body;
31 files: Map<any, any>;
32};
33export declare type BatchOptions = {
34 batchMax?: number;
35 batchInterval?: number;
36 batchKey?: (operation: Operation) => string;
37} & Options;