A GraphQL schema is a contract that defines the structure of the API, including all available operations, types, and relationships. It serves as the single source of truth for what data can be fetched and how.
type User {
id: ID!
name: String!
email: String!
posts: [Post!]!
}
type Query {
user(id: ID!): User
users: [User!]!
}