From 6e120cec395d93c11637c4f559d156a436c85fec Mon Sep 17 00:00:00 2001 From: Jonathan Bennetts Date: Thu, 21 Apr 2022 15:50:20 +0100 Subject: [PATCH 1/2] Fixed pagination issue --- packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts b/packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts index 3b86ec9f95cc2..25281a26727ba 100644 --- a/packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts +++ b/packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts @@ -126,7 +126,11 @@ export async function quickBooksApiRequestAllItems( const maxResults = 1000; const returnData: IDataObject[] = []; - const maxCount = await getCount.call(this, method, endpoint, qs); + const maxCountQuery = { + query: `SELECT COUNT(*) FROM ${resource}`, + } as IDataObject; + + const maxCount = await getCount.call(this, method, endpoint, maxCountQuery); const originalQuery = qs.query as string; From 659695c9b33eca01e40048eef5d19577234955c0 Mon Sep 17 00:00:00 2001 From: Jonathan Bennetts Date: Thu, 21 Apr 2022 15:50:50 +0100 Subject: [PATCH 2/2] Removed unused import --- packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts b/packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts index 25281a26727ba..4d51f43c9dbd9 100644 --- a/packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts +++ b/packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts @@ -7,7 +7,6 @@ import { IDataObject, ILoadOptionsFunctions, INodeExecutionData, - INodeProperties, INodePropertyOptions, NodeApiError, } from 'n8n-workflow';