Complete the code to define a delete mutation for removing a user by ID.
mutation DeleteUser($id: ID!) {
deleteUser(id: [1]) {
id
name
}
}The variable name used in the mutation argument must match the declared variable $id.
Complete the code to specify the return fields after deleting a post.
mutation DeletePost($postId: ID!) {
deletePost(id: $postId) {
[1]
}
}After deletion, returning the id and title helps confirm which post was deleted.
Fix the error in the delete mutation by completing the argument name correctly.
mutation RemoveComment($commentId: ID!) {
deleteComment([1]: $commentId) {
id
}
}The argument name must exactly match the expected argument in the schema, which is commentId.
Fill both blanks to complete the delete mutation and specify the return fields.
mutation DeleteProduct($[1]: ID!) { deleteProduct(id: $[2]) { id name } }
The variable name must be consistent in both the declaration and usage: productId.
Fill all three blanks to write a delete mutation for removing an order and returning its ID and status.
mutation DeleteOrder($[1]: ID!) { deleteOrder([2]: $[3]) { id status } }
orderID and orderId.id instead of the expected argument name.The variable name orderId must be consistent in declaration and usage. The argument name is orderId.