【问题标题】:How can I update a graphql entry?如何更新 graphql 条目?
【发布时间】:2019-11-08 00:02:40
【问题描述】:

我的架构如下:

type User @model {
  id: ID!
  firstName: String!
  lastName: String!
  locations: [Location]
}

type Location @model {
  id: ID!
  listOfPictures: [String]
  address: String!
  owner: User
}

目前我对位置和用户都有条目。我的位置的条目都是空的。 我想更新我的 ID 为“1234”的位置之一,以将字段“所有者”设置为 ID 为“5678”的用户。

正确的语法是什么?我必须在 Appsync 控制台中输入什么内容?

此外,我如何更新 ID 为“abc”模型的用户的“位置”字段,以将位置数组添加到 ID 为“def”的位置? 谢谢。

【问题讨论】:

    标签: reactjs graphql aws-appsync


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 2019-06-26
      • 2021-06-15
      • 2020-06-29
      • 2012-03-28
      • 2018-04-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多