You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1000 B
28 lines
1000 B
'use strict'; |
|
|
|
Object.defineProperty(exports, '__esModule', { value: true }); |
|
|
|
var tslib = require('tslib'); |
|
var subscriptionsTransportWs = require('subscriptions-transport-ws'); |
|
var core = require('../core'); |
|
|
|
var WebSocketLink = (function (_super) { |
|
tslib.__extends(WebSocketLink, _super); |
|
function WebSocketLink(paramsOrClient) { |
|
var _this = _super.call(this) || this; |
|
if (paramsOrClient instanceof subscriptionsTransportWs.SubscriptionClient) { |
|
_this.subscriptionClient = paramsOrClient; |
|
} |
|
else { |
|
_this.subscriptionClient = new subscriptionsTransportWs.SubscriptionClient(paramsOrClient.uri, paramsOrClient.options, paramsOrClient.webSocketImpl); |
|
} |
|
return _this; |
|
} |
|
WebSocketLink.prototype.request = function (operation) { |
|
return this.subscriptionClient.request(operation); |
|
}; |
|
return WebSocketLink; |
|
}(core.ApolloLink)); |
|
|
|
exports.WebSocketLink = WebSocketLink; |
|
//# sourceMappingURL=ws.cjs.map
|
|
|