⬡ GraphQL
Beginner
What is the GraphQL Schema Definition Language (SDL)?
Answer
The Schema Definition Language (SDL) is the syntax used to define a GraphQL schema — the contract that describes all types, fields, queries, and mutations available in an API. Example: type User { id: ID! name: String! email: String posts: [Post] }. The schema is language-agnostic and human-readable. It defines the root operation types (Query, Mutation, Subscription) and all custom types. The SDL is central to a schema-first approach where the schema is designed before implementation, and it enables powerful tooling like introspection and code generation.