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 name field of type String to the User type.
type User { id: ID! name: [1] }The String! type means the name is a required string field.
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 is a non-nullable list of non-nullable Post objects.
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 query takes a non-nullable ID argument and returns a User type.
Fill all three 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] } input CreateUserInput { name: [3]! }The createUser mutation takes a non-nullable String name argument and returns a User. The input type CreateUserInput also defines a required String name field.