From fd625a7420605879683705f167edd1f023337f67 Mon Sep 17 00:00:00 2001 From: wisplite Date: Wed, 8 Apr 2026 15:08:00 -0500 Subject: [PATCH] =?UTF-8?q?forgot=20to=20build=20=F0=9F=AB=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dist/index.js b/dist/index.js index ca330e4..5c597fd 100644 --- a/dist/index.js +++ b/dist/index.js @@ -32,9 +32,23 @@ export class TetherClient { }; subscribe = (query, callback) => { this.subscribedQueries.set(query, callback); + if (!this.ws) { + throw new Error('Not connected to Tether'); + } + this.ws.send(JSON.stringify({ + type: 'subscribe', + query: query + })); }; unsubscribe = (query) => { this.subscribedQueries.delete(query); + if (!this.ws) { + throw new Error('Not connected to Tether'); + } + this.ws.send(JSON.stringify({ + type: 'unsubscribe', + query: query + })); }; sendMutation = (mutationName, params) => { if (!this.ws) {