small update

This commit is contained in:
2026-04-21 22:49:23 -05:00
parent 5202a7f844
commit ff47621180
3 changed files with 11 additions and 9 deletions
+5 -4
View File
@@ -14,11 +14,12 @@ export class TetherClient {
disconnect = () => {
this.websocketHandler.close();
};
subscribe = (query, callback) => {
this.subscribedQueries.set(query, callback);
subscribe = (queryName, params, callback) => {
this.subscribedQueries.set(queryName, callback);
this.websocketHandler.send(JSON.stringify({
type: 'subscribe',
query: query
location: queryName,
params: params
}));
};
unsubscribe = (query) => {
@@ -32,7 +33,7 @@ export class TetherClient {
this.websocketHandler.send(JSON.stringify({
type: 'mutation',
name: mutationName,
payload: params,
params: params,
}));
};
}