linkUtils.d.ts 1.0 KB

12345678910111213141516171819
  1. import Observable from 'zen-observable-ts';
  2. import { GraphQLRequest, Operation } from './types';
  3. import { ApolloLink } from './link';
  4. import { getOperationName } from 'apollo-utilities';
  5. export { getOperationName };
  6. export declare function validateOperation(operation: GraphQLRequest): GraphQLRequest;
  7. export declare class LinkError extends Error {
  8. link: ApolloLink;
  9. constructor(message?: string, link?: ApolloLink);
  10. }
  11. export declare function isTerminating(link: ApolloLink): boolean;
  12. export declare function toPromise<R>(observable: Observable<R>): Promise<R>;
  13. export declare const makePromise: typeof toPromise;
  14. export declare function fromPromise<T>(promise: Promise<T>): Observable<T>;
  15. export declare function fromError<T>(errorValue: any): Observable<T>;
  16. export declare function transformOperation(operation: GraphQLRequest): GraphQLRequest;
  17. export declare function createOperation(starting: any, operation: GraphQLRequest): Operation;
  18. export declare function getKey(operation: GraphQLRequest): string;
  19. //# sourceMappingURL=linkUtils.d.ts.map