Closed
Description
https://discuss.dgraph.io/t/composite-id-fields/13337
https://discuss.dgraph.io/t/support-multiple-unique-fields-in-dgraph-graphql/8512/15
There are 1000 links in the DGraph forum for this, but basically:
type Bar @unique(user, date) {
user: String!
date: String!
}
We need this SQL equivalent: ALTER TABLE `Bar` ADD UNIQUE `unique_index`(`user`, `date`);
We need unique values based on two fields at the same time. There are 1000 use cases for this, but it is a necessity in any mature database. There are only work arounds in CERTAIN situations.
J
UPDATE: This issue is already covered in this issue. Just refer there.