amazon web services – Need help writing mutation on AWS AppSync (GraphQL)
I have created this schema on GraphQL:
type Bird @model{
id: ID!
name: String!
description: String!
images: [String]
}
type Course @model{
id: ID!
name: String!
description: String!
image: String
birds: [Bird] @hasMany
}
Now I want to write the mutation for createCourse. I don’t know how to include the array of Bird object in my course.
I don’t know how to add Bird object here:
mutation MyMutation2 {
createCourse(input: {image: "", name: "", description: ""})
}
Read more here: Source link