Skip to content

Type mapping ​

How each database's column types become GraphQL types. A column that is NOT NULL is non-null (Int!); in inputs, it's required unless the database fills it in.

GraphQLPostgreSQLMySQL / MariaDBSQL ServerMongoDB
Intsmallint, integertinyint, smallint, mediumint, inttinyint, smallint, intintegers
Floatreal, double precisionfloat, double, realreal, floatnumbers with decimals
Booleanbooleanboolean, tinyint(1)bitbooleans
DateTimedate, timestamp, timestamptzdate, datetime, timestampdate, datetime, datetime2, smalldatetime, datetimeoffsetdates
JSONjson, jsonbjson (MySQL)—objects, arrays, mixed types
ID———ObjectIds
Stringeverything elseeverything elseeverything elsestrings, Decimal128, Long

Why bigint is a String ​

bigint, numeric and decimal values can exceed what a JavaScript number holds exactly, so drivers return them as strings and the API keeps them that way. A bigserial key is therefore id: String!, and a filter on it takes strings: { id: { eq: "42" } }.

Arrays ​

PostgreSQL arrays become lists of their element type, such as [String]. They can be filtered with isNull only, and can't be ordered by.

DateTime ​

Values are serialized as ISO 8601 strings in UTC (2026-10-16T13:45:00.000Z), and inputs accept any ISO 8601 string.

JSON ​

Any JSON value, stored and returned as is. JSON fields can be filtered with isNull only, and can't be ordered by.

Released under the MIT License.