Complete the code to define a mutation that takes an input argument named 'name'.
type Mutation { createUser(name: [1]): User }The input argument 'name' should be a non-nullable string, so we use String!.
Complete the mutation argument to accept an input object called 'UserInput'.
type Mutation { addUser(input: [1]): User }Input objects are used as arguments with a type name ending with 'Input' and usually non-nullable.
Fix the error in the mutation argument type to correctly accept a list of IDs.
type Mutation { deleteUsers(ids: [1]): Boolean }To accept a list of non-null IDs, use [ID!]. This means a list where each ID is required.
Fill both blanks to define a mutation that takes a required input object and returns a non-nullable User.
type Mutation { updateUser(input: [1]): [2] }The input argument should be a required input object UserInput!, and the mutation returns a non-nullable User!.
Fill all three blanks to define a mutation with an optional string argument 'email', a required boolean 'active', and returns a User.
type Mutation { setUserStatus(email: [1], active: [2]): [3] }The 'email' argument is optional, so just String. The 'active' argument is required, so Boolean!. The mutation returns a User type.