Skip to content

Commit

Permalink
fix subDocumentt
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesca-Bit committed Jul 25, 2023
1 parent f50723a commit 50e09d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/api/core/GraphqlTableConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {}
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -447,7 +447,7 @@ class GraphqlTableConfig {
query: `
query($id: ID){
${key}(id: $id){
${fieldKeysArr.join(' \n ')}
${fieldKeysArrOpenAI.join(' \n ')}
}
}`
}
Expand Down

0 comments on commit 50e09d4

Please sign in to comment.