【发布时间】: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