[Bug] Filter is not working correctly when using aliases

When using this query:

query {
   queryFoo {
      mytags: tags (filter: {id: {eq: "helloworld"}}) {
         id
      }
      alltags: tags {
         id
      }
   }
}

Only the tag “helloworld” is present in the result (both in mytags and alltags), even if the Foo has multiple tags.

What version of Dgraph are you using ?

This is a known issue and was fixed in https://github.com/dgraph-io/dgraph/pull/6940 .
Did you try running the same query in the recently released 20.11 version. It should not return the same result for alltags and mytags in 20.11 .

1 Like

Hi @rajas! Thanks for the reply. I just discovered, that I’m using an old master checkout. Will do an update. Thanks!