【问题标题】:AWS AppSync GraphQL one to many relation connectionAWS AppSync GraphQL 一对多关系连接
【发布时间】:2022-11-13 07:49:25
【问题描述】:

我正在将 AWS Appsync 与 dynamoDB 一起使用,并尝试在两个架构之间创建连接课程和徽章其中一次课程可以有多个徽章列表。虽然徽章列表是静态的(不要经常更改)。我试过了,但没有用。

type Badge @model @auth(rules: [{allow: private}]) {
  id: ID!
  Name: String
}

type Course @model @auth(rules: [{allow: private}]) {
  id: ID!
  badges: [Badge] @connection
}

【问题讨论】:

    标签: amazon-web-services model graphql amazon-dynamodb aws-appsync


    【解决方案1】:

    您可以在文档中找到解决方案 here。 请确保您没有阅读旧版文档,因为不推荐使用 @connection 指令。

    希望能帮助到你!

    【讨论】:

      猜你喜欢
      • 2019-11-03
      • 2014-05-26
      • 2020-11-12
      • 2018-07-13
      • 1970-01-01
      • 2016-03-19
      • 1970-01-01
      • 2018-07-29
      • 2018-10-11
      相关资源
      最近更新 更多