0

Im trying to change my DB engine to DGraph. Do I really need to change my aplication to use uid rather than using my current ID. I need to do a filter with multiple uid_in usages, and currently my application does this via an ID property. But it looks like I cannot use my ID property I need to use uid. But it looks like when you use uid_in function you cannot use variables. What is the most efficient way of doing something like below:

{
        SQ (func: eq(id, 10000))   {
            dgraph.type
            F as uid    
        }

  {
        Q2(func: has(id)) @filter(uid_in(edgefield, F))  {
            dgraph.type
            uid
        id
            expand(_all_) {
                id
          uid
        dgraph.type
            }
        }
    }
    }

Ben
  • 1
  • 1

1 Answers1

0

Now Dgraph latest (20.07.X) have support for uid map in the variable. e.g:

@filter(uid_in(edgefield, uid(F)))

See https://github.com/dgraph-io/dgraph/pull/5320