Using variables with @filter and @cascade

Hey @AugustDev,

Your query works, but it can be done with just one variable, like so:

{
  foo(func: uid("0x10")) { # uid of User A
    user.groups @filter(uid(bGroups)) {
      uid
      group.items
    }
  }
  
  var(func: uid("0x13")) { # uid of User B
    ~group.members {
      bGroups as uid
    }
  }
}

Hope this answers your question!

2 Likes