There are some steps I would like to achieve:
- sort the result by facets(created_at) to get the latest predicate
- then, match the result by regular expression.
For example:
{
directors(func: regexp(name@en, /^Steven Sp.*$/)) {
name@en
director.film @facets(orderdesc:created_at)(first:1) @filter(regexp(name@en, /ryan/i)) {
name@en
}
}
}
However, from this code, I couldn’t get the expected result because it was firstly executed to match the result and then retrieve the first one.
Is there any way I could get the latest result and then math it?
Thank you for your help.