mirror of
https://github.com/wisplite/tether-ts.git
synced 2026-05-01 06:22:41 -05:00
forgot to build
This commit is contained in:
Vendored
+14
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user