我一直在尝试运行一个突变来创建与两个不同类型的关系,但没有太大成功。
** 架构 **
(我已经使用“创建资源”在 DynamoDB 中创建表)
type Comment {
eventId: ID!
commentId: String!
content: String
}
type CommentConnection {
items: [Comment]
nextToken: String
}
input CreateCommentInput {
eventId: ID!
commentId: String!
content: String
}
input CreateEventInput {
id: ID!
name: String
where: String
when: String
description: String
}
input DeleteCommentInput {
eventId: ID!
}
input DeleteEventInput {
id: ID!
}
type Event {
id: ID!
name: String
where: String
when: String
description: String
comments(limit: Int, nextToken: String): CommentConnection
} …
Run Code Online (Sandbox Code Playgroud)