In the first block of this query, we will select all nodes with a name, limiting the results to one node and storing the UID in the variable u. Then, the second query block will print the details for this node, accessing it by UID:
{
var(func: has(name), first:1) {
u as uid
}
results(func: uid(u)) {
name
age
}
}
As expected, the query returns a single result.
Now, compare the results if @cascade is added to the first query block. I expect the same result:
{
var(func: has(name), first:1) @cascade {
u as uid
}
results(func: uid(u)) {
name
age
}
}
However, now all three records are returned; it appears that pagination has not been applied when @cascade was used. In Dgraph 20.07.3, the expected behaviour (one record returned) is observed, so this looks to me like a regression.