import { SubscriptionClient } from "subscriptions-transport-ws";
import { ApolloLink } from "@apollo/client/link/core";
export class WebSocketLink extends ApolloLink {
    subscriptionClient;
    constructor(paramsOrClient) {
        super();
        if (paramsOrClient instanceof SubscriptionClient) {
            this.subscriptionClient = paramsOrClient;
        }
        else {
            this.subscriptionClient = new SubscriptionClient(paramsOrClient.uri, paramsOrClient.options, paramsOrClient.webSocketImpl);
        }
    }
    request(operation) {
        return this.subscriptionClient.request(operation);
    }
}
//# sourceMappingURL=index.js.map
