link.d.ts 1.1 KB

123456789101112131415161718
  1. import Observable from 'zen-observable-ts';
  2. import { GraphQLRequest, NextLink, Operation, RequestHandler, FetchResult } from './types';
  3. export declare function empty(): ApolloLink;
  4. export declare function from(links: ApolloLink[]): ApolloLink;
  5. export declare function split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink;
  6. export declare const concat: (first: RequestHandler | ApolloLink, second: RequestHandler | ApolloLink) => ApolloLink;
  7. export 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. }
  17. export declare function execute(link: ApolloLink, operation: GraphQLRequest): Observable<FetchResult>;
  18. //# sourceMappingURL=link.d.ts.map