Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jdgamble555 opened this issue Aug 26, 2022 · 2 comments
Labels
area/graphql Issues related to GraphQL support on Dgraph. community Issue or PR created by the community. kind/feature Something completely new we should consider.

Comments

@jdgamble555
Copy link

jdgamble555 commented Aug 26, 2022

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.

@MichelDiz MichelDiz added the area/graphql Issues related to GraphQL support on Dgraph. label Aug 26, 2022
@MichelDiz MichelDiz added kind/feature Something completely new we should consider. and removed feature request labels Sep 9, 2022
@MichelDiz MichelDiz added the community Issue or PR created by the community. label Oct 24, 2022
@jdgamble555
Copy link
Author

@MichelDiz - You can close this, as my other github posts covers it.

@rderbier
Copy link
Member

rderbier commented Jan 4, 2023

covered in #8179

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/graphql Issues related to GraphQL support on Dgraph. community Issue or PR created by the community. kind/feature Something completely new we should consider.
Development

No branches or pull requests

3 participants