chore: query graph api (#9125)

CLOSES: FRMW-2704

**What**
Re-structure the Query graph API as well as introduce dynamic typing from schemas on the filters and better handling of relation treatment for fields/filters inference

Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
This commit is contained in:
Carlos R. L. Rodrigues
2024-09-16 11:32:44 +00:00
committed by GitHub
co-authored by Adrien de Peretti
parent 3e97a64b21
commit 8829f89402
21 changed files with 2164 additions and 52 deletions
@@ -17,7 +17,7 @@ export function toRemoteJoinerQuery(
const canExpand =
typeof value === "object" &&
!["fields", "__args", "__directives"].includes(key)
!["fields", "__fields", "__args", "__directives"].includes(key) // TODO: deprecate "fields"
if (!canExpand) {
continue
@@ -65,8 +65,8 @@ export function toRemoteJoinerQuery(
)
}
if (value.fields) {
reference.fields = value.fields
if (value.__fields || value.fields) {
reference.fields = value.__fields ?? value.fields
}
if (isEntryPoint) {