Complete the code to define a GraphQL type for a user with an ID field.
type User { id: [1] }The ID! type is used to uniquely identify a user and is non-nullable.
Complete the code to add a posts field to the User type representing a list of posts.
type User { posts: [1] }The [Post!] syntax means a list of non-null Post objects, modeling multiple posts related to a user.
Fix the error in the Post type by completing the author field to link back to the User type.
type Post { author: [1] }The User! type means each post must have exactly one author, linking the post to a user.
Fill both blanks to define a Comment type with an author and a post it belongs to.
type Comment { author: [1] post: [2] }Each comment has one author (User!) and belongs to one post (Post!), modeling real relationships.
Fill all three blanks to define a schema with User, Post, and Comment types showing their relationships.
type User { posts: [1] } type Post { author: [2] comments: [3] }The User has many posts ([Post!]), each Post has one author (User!) and many comments ([Comment!]), modeling real-world data relationships.