DGraph not allowing two @id directives per type

Dgraph’s documentations says a type can have more than one @id directive, so I’m using the @id directive on two fields in a type. However, when trying to deploy the schema, I get an error saying there can only be one field with the @id directive per type.

Is there another rule I’m not aware of?Screen Shot 2021-04-13 at 7.44.28 PM

Hi @d4nielhdz ,

We added support for multiple @id directives in types in 21.03. Although 21.03 has been released publicly, Dgraph Cloud (Slash GraphQL) still uses older version.

We plan to upgrade Dgraph version for Cloud (Slash GraphQL) in the coming month. The error won’t occur after the upgrade.

1 Like