mockLink.js 685 B

12345678910111213141516171819
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var tslib_1 = require("tslib");
  4. var link_1 = require("../link");
  5. var MockLink = (function (_super) {
  6. tslib_1.__extends(MockLink, _super);
  7. function MockLink(handleRequest) {
  8. if (handleRequest === void 0) { handleRequest = function () { return null; }; }
  9. var _this = _super.call(this) || this;
  10. _this.request = handleRequest;
  11. return _this;
  12. }
  13. MockLink.prototype.request = function (operation, forward) {
  14. throw Error('should be overridden');
  15. };
  16. return MockLink;
  17. }(link_1.ApolloLink));
  18. exports.default = MockLink;
  19. //# sourceMappingURL=mockLink.js.map