diff --git a/src/orm/hasura.js b/src/orm/hasura.js index 51ef44e..fb7cd61 100644 --- a/src/orm/hasura.js +++ b/src/orm/hasura.js @@ -433,7 +433,7 @@ class Hasura { return unsub; // Unsubscribe } - async subscribeToMore(parameters, callback, settings = {}) { + async queryAndSubscribe(parameters, callback, settings = {}) { settings = __.mergeDeep( { skipFirst: true, diff --git a/tests/subscription.js b/tests/subscription.js index e116ab3..d5078e9 100644 --- a/tests/subscription.js +++ b/tests/subscription.js @@ -244,7 +244,7 @@ test.serial('subscribe to more returns unsub', (t) => { const orm = t.context.orm; return new Promise(async (resolve) => { - const unsub = await orm.subscribeToMore( + const unsub = await orm.queryAndSubscribe( { _om_test: {}, }, @@ -265,7 +265,7 @@ test.serial('subscribe to more works', (t) => { const orm = t.context.orm; return new Promise(async (resolve) => { - const unsub = await orm.subscribeToMore( + const unsub = await orm.queryAndSubscribe( { _om_test: {}, }, @@ -300,7 +300,7 @@ test.serial('subscribe to more skipFirst', (t) => { const orm = t.context.orm; return new Promise(async (resolve) => { - const unsub = await orm.subscribeToMore( + const unsub = await orm.queryAndSubscribe( { _om_test: {}, },