Custom Scalar Types

In addition to the GraphQL standard data types, GraphQLize supports the following scalar types for creating type-safe GraphQL schemas.

UUID

A field whose value is UUID.

Database TypeColumn Type
PostgresUUID
MySQLYet to support

Long

The long data type is a 64-bit two's complement integer (java.lang.Long).

Database TypeColumn Type(s)
Postgresbigint,int8,bigserial,serial8
MySQLINT UNSIGNED,BIGINT

BigInteger

The long data type is a 64-bit two's complement integer (java.lang.Long).

Database TypeColumn Type(s)
MySQLBIGINT UNSIGNED

BigDecimal

An arbitrary-precision signed decimal number (java.math.BigDecimal)

Database TypeColumn Type(s)
Postgresnumeric, decimal
MySQLnumeric, decimal

Date

A date without a time-zone in the ISO-8601 calendar system, such as 2007-12-03 (java.time.LocalDate).

Database TypeColumn Type(s)
Postgresdate
MySQLDATE

Time

A time without a time-zone in the ISO-8601 calendar system, such as 10:15:30 (java.time.LocalTime).

Database TypeColumn Type(s)
Postgrestime, time without time zone
MySQLTIME

TimeWithTimeZone

A time with an offset from UTC/Greenwich in the ISO-8601 calendar system, such as 10:15:30+01:00 (java.time.OffsetTime).

Database TypeColumn Type(s)
Postgrestimetz, time with time zone

DateTime

A date-time without a time-zone in the ISO-8601 calendar system, such as 2007-12-03T10:15:30 (java.time.LocalDateTime).

Database TypeColumn Type(s)
Postgrestimestamp, timestamp without time zone
MySQLDATETIME, TIMESTAMP

DateTimeWithTimeZone

A date-time with an offset from UTC/Greenwich in the ISO-8601 calendar system, such as 2007-12-03T10:15:30+01:00 (java.time.OffsetDateTime).

Database TypeColumn Type(s)
Postgrestimestamptz, timestamp with time zone