I used the simple Task/User schema from the tutorial, then tried to do a mutation:
mutation Foobar($newuser: [AddUserInput!]!) {
addUser(input: $newuser) {
numUids
}
}
with a variable:
{
"newuser": {
"username": "oising",
"name": "oisin g.",
"tasks": []
}
}
This caused:
{
"errors": [
{
"message": "Internal Server Error - a panic was trapped. This indicates a bug in the GraphQL server. A stack trace was logged. Please let us know by filing an issue with the stack trace."
}
]
}
Because the variable should be an array of AddUserInput, not a single AddUserInput.
I would expect a type error, not a panic. I’m using 20.11 standalone.