From 50e09d47a2bac16e4e6a7cbdf97d681198deda23 Mon Sep 17 00:00:00 2001 From: Francesca-Bit Date: Tue, 25 Jul 2023 15:49:19 +0200 Subject: [PATCH] fix subDocumentt --- src/api/core/GraphqlTableConfig.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/core/GraphqlTableConfig.ts b/src/api/core/GraphqlTableConfig.ts index 23903ac..2c2fa25 100644 --- a/src/api/core/GraphqlTableConfig.ts +++ b/src/api/core/GraphqlTableConfig.ts @@ -369,7 +369,7 @@ class GraphqlTableConfig { if (itemObj && itemObj.type === 'OBJECT') { const fieldsKeys = Object.keys(itemObj.fields || {}) const fieldKeysArr: string[] = [] - const fieldKeysArrOpenAI = [] + const fieldKeysArrOpenAI: string[] = [] if (!advancedSearchObj[key]) { advancedSearchObj[key] = {} } @@ -406,8 +406,8 @@ class GraphqlTableConfig { tmpSubfield.push('_id') } fieldKeysArrOpenAI.push(`${fieldKey}{ - ${tmpSubfield.join(' \n ') - }`) + ${tmpSubfield.join(' \n ')} + }`) // this could be a list too const advField = JSON.parse(JSON.stringify(advancedSearchMatchType.OBJECT)) advField.label = fieldKey @@ -447,7 +447,7 @@ class GraphqlTableConfig { query: ` query($id: ID){ ${key}(id: $id){ - ${fieldKeysArr.join(' \n ')} + ${fieldKeysArrOpenAI.join(' \n ')} } }` }