An object type describes one kind of entity in your domain, like a user or a post. It lists the named fields a client can ask for. Object types are the most common type in a GraphQL schema.
You define one in the Schema Definition Language (SDL) with the type keyword, a name and typed fields. A field can return a scalar like String! or another object type like User!. That is how types link: User.posts returns posts, and Post.author returns a user.
The root Query type is an object type too. Its fields are the entry points for reading data.
type User {
id: ID!
name: String!
email: String!
posts: [Post!]!
createdAt: String!
}
type Post {
id: ID!
title: String!
content: String!
author: User!
published: Boolean!
}
Rewriting in plainer words…
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.