Using uid_in when the uid is not known in advance but rather another predicate is known

According to the documentation, uid_in cannot accept a variable as the value for uid.

Is there a way, in a single call to dgraph (multiple queries, one network call), to find the relevant node using a different predicate, for example @filter(eq(name,"Bob")) then filter other nodes based on the uid of Bob. Or must I always do two calls to DGraph in order to fetch the nodes that have Bob in one of their recursive relations?

Hi @kesor, very timely post indeed. The support for variable inside uid_in is a heavily requested feature and currently being worked on. While this is still WIP have you tried looking at cascade directive if that solves your issue?

2 Likes