【问题标题】:Composite index in Dgraph?Dgraph中的复合索引?
【发布时间】:2022-02-01 00:00:29
【问题描述】:
type Species {
    name: String! @id
    animals: [Animal!]! @hasInverse(field: species)
}

type Animal {
    name: String!
    species: Species!
}

如何使动物名称在物种中独一无二?这样我就可以只允许一只名叫 Bob 的狗,但也可以允许一只同名的猫。

【问题讨论】:

    标签: graphql dgraph


    【解决方案1】:

    显然Dgraph论坛上已经有一个类似的帖子:https://discuss.dgraph.io/t/composite-id-fields/13337

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-06-01
      • 2020-06-04
      • 2014-03-23
      • 2014-07-11
      • 2020-03-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多