【发布时间】:2020-12-25 22:12:09
【问题描述】:
下面显示的是 graphql Schema。
@auth(rules: [{ allow: owner,operations: [create, delete ] ,ownerField: "user"}])
{
id: ID!
videoKey: String!
videoThumbnailKey :String!
videoTitle:String!
videoDescription:String!
channelName:String!
videoLikes: Int
videoDislikes: Int
comments: [Comment] @connection(keyName: "byVideo", fields: ["id"])
user: String
}
type Comment @model
@auth(rules: [{ allow: owner,operations: [create,delete] ,ownerField: "user"}])
@key(name: "byVideo", fields: ["videoID", "comment"]) {
id: ID!
videoID: ID!
comment: String!
video: Video @connection(fields: ["videoID"])
user: String
}
type LikedVideos @model
{
id:ID!
video:[Video]@connection
}
这是列出视频的查询
这些就是结果
这是获取视频的查询
这些就是结果
所有这些都可以正常工作,但是当我尝试删除它时出现错误。 这是变异查询
这是我得到的错误响应
【问题讨论】:
标签: amazon-web-services amazon-dynamodb aws-amplify aws-appsync