Closed pdeva03 closed 10 months ago
Hello, it is not possible to provide different response type if the mutations array. You can use the selection set in your subscription to specify the data you want to get back. In your mutation, make sure to provide a selection set that is at least a super set of the data you want your subscriptions to receive.
type Post @model { id: ID! title: String! content: String comments: [Comment] @hasMany }
type Comment @model { id: ID! content: String postCommentsId: ID! }
type Subscription { onCommentPosts(postCommentsId: ID!): Object @aws_subscribe(mutations: ["createComment", "createPost"]) }
In the mutations array, is it possible to have different response type? If so, how we can declare that?