Odoo GraphQL Subscription using Node, Express JS for Sample
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.

29 lines
1000 B

4 months ago
'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