+1 for this feature.
My usecase is reported in Passing Sorting Criteria to Custom DQL - #3 by jdgamble555
In short, I’d like to pass custom filtering or sorting criteria to a DQL query.
POST http://localhost:8080/query
Content-Type: application/dql
query q($p : string = "Person.firstName", $terms: string = "Harry", $orderby: string = "Person.lastName") {
queryPersonCustom(func: anyofterms($p, $terms), orderasc: $orderby) {
id : uid
firstName : Person.firstName
lastName : Person.lastName
}
}