fix(modules-sdk): Select all should send undefined instead of an empty array (#6982)

This commit is contained in:
Adrien de Peretti
2024-04-06 21:37:22 +02:00
committed by GitHub
parent 81ea044f31
commit 528ef4ca90
5 changed files with 32 additions and 9 deletions

View File

@@ -28,4 +28,20 @@ describe("Remote query", () => {
},
})
})
it("should properly handle fields and relations transformation for top level entity", () => {
const expand = {
fields: ["*"],
}
const result = RemoteQuery.getAllFieldsAndRelations(expand)
expect(result).toEqual({
select: undefined,
relations: [],
args: {
"": undefined,
},
})
})
})