From 7efa878f153c04f75348d65ca334ff578354ddd8 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 30 Aug 2022 21:49:40 -0400 Subject: [PATCH] *Properly pass both query and options --- src/index.ts | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/index.ts b/src/index.ts index e5a54a8..c6476c7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -159,9 +159,12 @@ export abstract class RpcQueryBase { } public run(): this { - this._promise = this._network - .processQueue() - .then(() => callModule(RPC_MODULE, this._queryType, this._query)); + this._promise = this._network.processQueue().then(() => + callModule(RPC_MODULE, this._queryType, { + query: this._query, + options: this._options, + }) + ); return this; } @@ -201,16 +204,17 @@ export class StreamingRpcQuery extends RpcQueryBase { } public run(): this { - this._promise = this._network - .processQueue() - .then(() => - connectModule( - RPC_MODULE, - this._queryType, - this._query, - this._options.streamHandler - ) - ); + this._promise = this._network.processQueue().then(() => + connectModule( + RPC_MODULE, + this._queryType, + { + query: this._query, + options: this._options, + }, + this._options.streamHandler + ) + ); return this; }