dgraph icon indicating copy to clipboard operation
dgraph copied to clipboard

Feature Request - GraphQL - Composite (compound) ID fields - unique / primary

Open jdgamble555 opened this issue 3 years ago • 0 comments

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

jdgamble555 avatar Aug 26 '22 00:08 jdgamble555