Nullable @id field

Can we also think of @id fields that could be nullable? Merging two systems together and I want to add the other systems guid as a @id but thej it requires all inputs to have the @id of the guid even if it didn’t come from the old system. So I would like to do:

type Contact {
  id: ID
  guid: String @id
}
type User {
  id: ID
  username: String! @id
  guid: String @id
}
1 Like

Hi @amaster507, we will discuss this also with the team while making @id fields mutable. Thanks.

1 Like

Support for nullable @id fields has been merged to master branch and will be avaliable in 21.07 release.
PR:Feat(GRAPHQL): This PR allows updatable and nullable @id fields. by JatinDevDG · Pull Request #7736 · dgraph-io/dgraph · GitHub

2 Likes