UNPKG

1.15 kBTypeScriptView Raw
1import Observable from 'zen-observable-ts';
2import { GraphQLRequest, NextLink, Operation, RequestHandler, FetchResult } from './types';
3export declare function empty(): ApolloLink;
4export declare function from(links: ApolloLink[]): ApolloLink;
5export declare function split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink;
6export declare const concat: (first: RequestHandler | ApolloLink, second: RequestHandler | ApolloLink) => ApolloLink;
7export declare class ApolloLink {
8 static empty: typeof empty;
9 static from: typeof from;
10 static split: typeof split;
11 static execute: typeof execute;
12 constructor(request?: RequestHandler);
13 split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink;
14 concat(next: ApolloLink | RequestHandler): ApolloLink;
15 request(operation: Operation, forward?: NextLink): Observable<FetchResult> | null;
16}
17export declare function execute(link: ApolloLink, operation: GraphQLRequest): Observable<FetchResult>;
18//# sourceMappingURL=link.d.ts.map
\No newline at end of file