MichelDiz commented :
Is this the desirable result?
{
"data": {
"withFilter": [
{
"carName": "Porsche",
"carStat": [
{
"uid": "0x2716",
"statName": "Speed"
}
],
"count(carStat)": 1,
"carContract": [
{
"contractID": "222",
"contractGroup": {
"groupName": "SpeedGroup",
"groupStat": {
"uid": "0x2716",
"statName": "Speed"
}
}
}
]
}
]
}
}
Use this query
{
origin as var(func: Type(Car), first: 1) #@filter(eq(carName, "Porsche"))
{
S as carStat @filter(eq(statName, "Speed"))
}
withFilter(func: uid(origin)) {
carName
carStat @filter(eq(statName, "Speed")) {
uid
statName
}
count(carStat) @filter(eq(statName, "Speed"))
carContract {
contractID
contractGroup {
groupName
groupStat @filter(uid(S)) {
uid
statName
}
}
}
}
}
This issue is related to this Promise a nested block (under construction - I'm still working in the use case)