How to find nodes with a scalar predicate having values found during traversal

Not sure, but maybe something similar to this:


{
  var(func: eq(user.name, "Siddharth")) {
    user.block {
    cat as  block.category
    city as block.city
    }
  }
    var(func: uid(city)) {
    ~block.city @filter(uid(cat){
      ~user.block{
       users as uid
     }
   }
 }
  getOtherUsers(func: uid(users)) {
    uid
    user.name
  }
}