fix(orchestration): ToRemoteJoinerHelper property building (#5130)

* fix(orchestration): ToRemoteJoinerHelper property building

* update fix
This commit is contained in:
Adrien de Peretti
2023-09-19 15:37:17 +02:00
committed by GitHub
parent d709521826
commit 02fe4d1364
2 changed files with 10 additions and 11 deletions
+2 -3
View File
@@ -7,7 +7,7 @@ export function toRemoteJoinerQuery(obj: any): RemoteJoinerQuery {
expands: [],
}
function extractRecursive(obj, parentName = "") {
function extractRecursive(obj, parentName = "", isEntryPoint = true) {
for (const key in obj) {
const value = obj[key]
@@ -21,7 +21,6 @@ export function toRemoteJoinerQuery(obj: any): RemoteJoinerQuery {
property: entityName,
}
const isEntryPoint = parentName === ""
const reference = isEntryPoint ? remoteJoinerQuery : expandObj
if (value.__args) {
@@ -47,7 +46,7 @@ export function toRemoteJoinerQuery(obj: any): RemoteJoinerQuery {
remoteJoinerQuery.expands!.push(expandObj)
}
extractRecursive(value, entityName)
extractRecursive(value, isEntryPoint ? "" : entityName, false)
}
}