⬡ GraphQL
Beginner
What is an object type in GraphQL?
Answer
An object type is the most common type in GraphQL — it represents a named entity with a set of fields. Each field has a name and a return type. Example: type Post { id: ID! title: String! body: String author: User createdAt: String }. Object types can reference other object types (like author: User), enabling deeply nested queries. The two special object types are Query (entry point for reads) and Mutation (entry point for writes). Every field in an object type is ultimately resolved by a resolver function on the server.