Assuming this, I think Han Solo shouldn’t be in the result. Even if he is in the movie.
Yeah, cuz when I mentioned “About the second block - I think there is a difference when using cascade. I don’t remember well. If not so, nevermind.” I wasn’t sure in which way it would fail. So fixing it bellow.
{
Luke as var(func:eq(name, "Luke Skywalker")) {
A as ~starring
}
B as var(func:uid(A)) @cascade {
Leia as starring @filter(eq(name, "Princess Leia"))
}
films(func: uid(B)) {
uid
name
starring @filter(uid(Luke,Leia))
{
uid
name
}
}
}
Result
{
"data": {
"films": [
{
"uid": "0x272f",
"name": "Return of the Jedi",
"starring": [
{
"uid": "0x272b",
"name": "Princess Leia"
},
{
"uid": "0x2731",
"name": "Luke Skywalker"
}
]
},
{
"uid": "0x2734",
"name": "A New Hope",
"starring": [
{
"uid": "0x272b",
"name": "Princess Leia"
},
{
"uid": "0x2731",
"name": "Luke Skywalker"
}
]
}
]
}