You probably defined the input name as a non-zero string (something like type: new GraphQLNonNull(GraphQLString) when using a js server or String! In a simple graphical language).
Thus, your entry into the mutation must match, which also means a non-empty string. If you go to the following, you should work:
mutation M($name: String!) { addGroup(name:$name) { id, name } }
Also, if you define a default value just like you do, because it is an empty string.
Finally, you can refuse the requirement to be non-zero on the server.
dqc
source share