Question about schema design - string literal object vs node object

I think we might have figure it out. The key is that we now realize the uid_in function. I’m trying to understand if we also need that filter on the reverse edge; if we do, the query doesn’t return what we expect.

{

   var(func: eq(contract.name, "TheContract2"))  {
      myId as uid
   }  

   find(func: eq(company.name, "Alpha")) @recurse {
       company.name
       company.hasProject @filter(uid_in(project.hasContract, uid(myId)))
       ~company.hasProject
       project.name
       project.hasContract
       contract.name
   }
}

Is this the approach you’d recommend for this case?

Thank you!

1 Like