Complete the code to define a GraphQL query field named 'user'.
type Query { user(id: ID!): [1] }The 'user' query returns a User type object, so the correct return type is User.
Complete the code to define a GraphQL mutation field named 'addUser'.
type Mutation { addUser(input: AddUserInput!): [1] }The 'addUser' mutation returns the newly created User object.
Fix the error in the GraphQL schema by completing the type definition for 'Post'.
type Post { id: ID! title: String! author: [1] }The 'author' field should reference the User type to link the post to its author.
Fill both blanks to complete the GraphQL query for fetching posts with their authors.
query { posts { id title author { [1] [2] } } }The author object should include id and name fields to identify the author.
Fill all three blanks to complete the GraphQL mutation for updating a user's email.
mutation { updateUser(id: [1], input: { email: [2] }) { [3] } }The mutation requires the user ID as a string, the new email as a string, and requests the updated email field in the response.