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.
There are 1000 links in the DGraph forum for this, but basically:
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