juniorGraphQL
What are the default Scalar types in GraphQL?
Updated Apr 28, 2026
Short answer
Scalars are the primitive leaf values of a GraphQL query. The defaults are Int, Float, String, Boolean, and ID.
Deep explanation
A GraphQL query must resolve to scalar types at the lowest level. Int is a 32-bit integer. Float is a double-precision float. String is UTF-8. Boolean is true/false. ID represents a unique identifier, serialized as a String but indicating it shouldn't be parsed as human-readable.
Real-world example
Defining the raw data points of a database record in the API schema.
Common mistakes
- Trying to select fields inside a Scalar type (e.g., asking for `name { first }` when `name` is a String).
Follow-up questions
- Can you create custom scalars?