Complete the code to define a GraphQL type for a User with an ID field.
type User { id: [1] }The ID! type is used for unique identifiers and the exclamation mark means it is required.
Complete the code to add a required name field of type String to the User type.
type User { name: [1] }The String! type means the name field is a required string.
Fix the error in the schema by completing the field type for posts as a list of Post types.
type User { posts: [[1]] }The posts field should be a list of Post objects, so the type is [Post].
Fill both blanks to define a Query type with a user field that takes an ID argument and returns a User.
type Query { user(id: [1]): [2] }The user field takes a required ID argument (ID!) and returns a User type.
Fill both blanks to define a Mutation type with a createUser field that takes a name argument and returns a User.
type Mutation { createUser(name: [1]): [2] }The createUser mutation takes a required name argument (String!) and returns a User. The ID! option is a distractor here and not used in the blanks.