Add equivalent of Dgraph's 'has' to GraphQL

Moved from GitHub dgraph/5819

Posted by MichaelJCompton:

It’s currently not possible to filter in GraphQL by if a node does or does not have a particular edge. We, should port Dgraph’s has condition to solve that.

Expect it to look like

queryUser(filter: { has: friends }) { 


  queryUser(filter: {firstName: {eq: null}}) {

please track this issue here: Tracking zero counts

Fixed by: feat(GraphQL): add has filter support by minhaj-shakeel · Pull Request #6258 · dgraph-io/dgraph · GitHub

1 Like