Was there a change to generated queries with @id directives in v20.11.1?

While upgrading to v20.11.1 some of my existing queries failed. Specifically, queries for entities that use the @id directive. Sorry if this has been already posted, I did search the forums thoroughly tho…


interface Person {
    id: ID!

    "The person's email"
    email: String! @id

type Contact implements Person {

Prior to v20.11.1, dgraph would create queryPerson with both id and email parameter options. But only id is available in v.20.11.1

This is the PR in v20.11.1 that changed the behavior you’re seeing with @id on interface types. The PR description also describes the issue and why this change was made:

OK, thanks. That definitely explains it!

On a side note, I was thinking perhaps this was intentional before I posted. So I searched for “@id directive” and “breaking” in the forums, with no joy. I didn’t think to check github commits (as bugs and other convos are now in these forums).

Is there a reliable place to get breaking changes every time a major release is tagged?

Usually, we clearly mark breaking changes in the release notes: Dgraph v20.11.1 - (Tenacious T’Challa - 1) release. I feel that we weren’t clear at all about this particular change in v20.11.1. (For example, see the release notes for v20.11.0 for BREAKING changes listed at the top)

I’m sure we brought in this change to fix a bug here. @pawan can chime in here.

Right I see that now. I was searching for “Breaking” and since that wasn’t in the description I missed it. I see the Github issue had [Breaking] in the title, but it didn’t get copied over to the release notes.

You’re right. I’ve just updated the release notes so it’s clear that this is a breaking change as you’ve found out the surprising way.

Hi @matthewmcneely, this change was required to fix a bug that was reported hence it went into the patch release. You can read more about the bug that is being fixed in this post @id directive and interfaces - #3 by jcsrb.

It is a breaking change as mentioned in the PR and we should have done a better job at mentioning this in the release notes. Thanks for bringing this to our notice and we’ll make sure to take care of this in the future. In the meantime, you can still get your queries to work by changing them to a
queryPerson(filter: email: { in: ["foo@bar.com"] }) type of query.

2 posts were split to a new topic: Uniqueness for @id fields on interface

We have added support in master branch for @id fields in interface that are unique across all the implementing types.