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