• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dgraph-io / dgraph / 5575371473
66%

Build:
DEFAULT BRANCH: main
Ran 17 Jul 2023 12:56PM UTC
Jobs 1
Files 250
Run time 5s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Jul 2023 12:04PM UTC coverage: 67.261% (+0.6%) from 66.644%
5575371473

push

web-flow
Feat(GraphQL): This PR allows @id field in interface to be unique across all implementing types (#8876)

Currently, @id fields in the interface are unique only in one
implementing type. But there are several use cases that require @id
field to be unique across all the implementation types. Also currently.
get a query on the interface can result in unexpected errors as we can
have multiple implementing types have the same value for that @id field.

Now we are allowing the @id field in the interface to be unique across
all the implementing types. In order to do this, we have added a new
argument interface of boolean type in the @id field.

Whenever a @id field in interface type has an interface argument set
then its value will be unique across all the implementing types. Users
will get errors if they try to add a node with such a field and there is
already a node with the same value of that field even in some other
implementing types. This is true for other scenarios like adding nested
value or while using upserts.

If the interface argument is not present or its value is false then that
field will be unique only for one implementing type. But such fields
won't be allowed in argument to get query on interface in the future,
see this PR also #7602

Example Schema,

 interface LibraryItem {
refID: String! @id // This field is unique only for one implementing
type
itemID: String! @id(interface:true) // This field will be unique over
all the implementing types inheriting this interface
}

type Book implements LibraryItem {
    title: String
    author: String
}
Related discuss Post:
https://discuss.dgraph.io/t/uniqueness-for-id-fields-on-interface/13294

Cherry picked from: #7710

164 of 164 new or added lines in 4 files covered. (100.0%)

58514 of 86995 relevant lines covered (67.26%)

2252073.04 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5575371473.1 17 Jul 2023 12:56PM UTC 0
67.26
Source Files on build 5575371473
Detailed source file information is not available for this build.
  • Back to Repo
  • a38fff0b on github
  • Prev Build on main (#5553596273)
  • Next Build on main (#5575380892)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc