⬡ GraphQL
Beginner
What are the scalar types in GraphQL?
Answer
GraphQL ships with five built-in scalar types that represent leaf values in the type system. Int is a signed 32-bit integer. Float is a signed double-precision floating-point number. String is a UTF-8 string. Boolean is true or false. ID is a unique identifier — serialized as a string but intended to identify an object (similar to a primary key). You can also define custom scalars (e.g., Date, Email, URL) for domain-specific primitive values that need validation or custom serialization logic.
Previous
What is the GraphQL Schema Definition Language (SDL)?
Next
What is an object type in GraphQL?