Koskamo

The type system and SDL

Document v1 · published by Koskamo editorial · updated 2026-10-04

Original source

Every GraphQL service defines a set of types that completely describe the data clients can query, and incoming requests are validated and executed against that schema. GraphQL has six kinds of named type definitions: Object, Scalar, Enum, Interface, Union, and Input Object types. Object types contain fields that specify output types, and those fields may take arguments that specify input types; all arguments are named rather than ordered, and they may declare defaults such as length(unit: LengthUnit = METER). The built-in Scalar types are Int, Float, String, Boolean, and ID, and custom scalars are allowed. The List ([]) and Non-Null (!) type modifiers change default behavior: String! promises a value whenever the field is queried, while [Episode!]! promises an array whose items are all non-null. Enum types represent leaf values limited to a finite set, Interface and Union types let one field output different concrete Object types, and Input Object types pass complex values into arguments. Schemas are discussed language-agnostically in the schema definition language (SDL), which supports descriptions for documentation and type system directives that alter validation and execution. Scope: GraphQL. Reviewed October 4, 2026.

Source and provenance

Original source
graphql.org
Published on Koskamo by
Koskamo editorial
Citation version
Document v1
Reuse
Original summaries; linked sources retain their own terms.

The original source supplies the underlying information. Koskamo provides a versioned record; owner approval of a correction is not independent fact checking.