Complete the code to define a GraphQL query that fetches a user's name.
query GetUserName { user(id: 1) { [1] } }The field name fetches the user's name as required.
Complete the code to add an argument to fetch a user by their username.
query GetUser { user([1]: "alice") { id name } }The argument username is used to fetch a user by their username.
Fix the error in the GraphQL query to correctly fetch a list of posts with their titles.
query { posts { [1] } }titles which is not a valid field.postTitle or name which do not exist.The field title correctly fetches the title of each post.
Fill both blanks to create a mutation that adds a new user with a name and email.
mutation AddUser { addUser(name: [1], email: [2]) { id name email } }The mutation requires string values for name and email. Using quotes is necessary.
Fill all three blanks to write a query that fetches a user's id, name, and their posts' titles.
query GetUserPosts { user(id: [1]) { [2] posts { [3] } } }The user is fetched by id 1, then name and title of posts are requested.
