I am in a an appsync environment that has been in production for a while. This is not the first mutation or even mutation taking an array of objects in the project. Yet what has worked for other such cases does not work for this one.
I dimly recall that sometimes a 'complex' argument like an array of objects or even scalars only got past the parse when turned to an input type. LeaderboardEventType below is an enum.
type LeaderboardEventScores {
event: LeaderboardEventType!
score: String!
}
type LeaderboardConfigScores {
id: ID!
scores: [LeaderboardEventScores]!
}
input LeaderboardConfigScoresInput {
id: ID!
scores: [LeaderboardEventScores]!
}
While the type definition above works in the parser the input definition exactly like it does not. I don't see at all why not. And neither of them works to define the argument of my mutation. Nor does adding an inner ! for the input work. Nor does just taking the body of the input with a comma after ID! as mutation arguments. But what really has my goat is that I cannot define such an input. Why not?