Skip to content

Type Mapping

Quail maps ActiveRecord column types to GraphQL types automatically:

ActiveRecordGraphQL
integerInt
bigintBigInt
float, decimalFloat
string, textString
booleanBoolean
dateISO8601Date
datetime, timeISO8601DateTime
json, jsonbJSON
id columnID

When Quail generates a GraphQL type from a resource, it inspects the model’s columns and applies this mapping to determine the field types. The id column is always mapped to the GraphQL ID type regardless of its underlying database type.

For types that don’t fit this mapping (enums, value objects, custom scalars), use computed attributes or custom types.