How to get the following query to work? I need to get the region uid under “workflow” to use as a variable for the location region. It doesn’t work as nothing is returned. If I hard code a location it works but wondering why the variable propagation doesn’t work here with the “reg” variable.
I also tried it with uid(val(reg)) and produces the same result.
{
invoices(func: type(invoice), first: 5000) @cascade {
purchase_orders {
workflows: ~purchase_orders @filter(type(workflow)) {
reg as regions
locations {
regions @filter(uid(reg))
location_uid: uid
location: location.name
}
}
}
}
}