Custom GraphQL Scalars in Oracle

GraphQL natively supports the following types: String, Float, Int, Boolean, and ID.

Custom scalar types are added to provide mapping for RDBMS native scalar types: Date, Timestamp, Timestamptz, JSON, Binary, Vector, DsInterval, and Yminterval.

The following table summarizes how Oracle RDBMS’s native scalar types are mapped to GraphQL’s scalar types:

Table 1 Scalar Types: Oracle Type, OSON Type, JSON

Oracle Type GraphQL Type in Oracle
(all char types) String
Integer Integer
Float Float
Number (scale=0) Integer
Number (scale>0) Number
Binary_Float Float
Binary_Double Double
Raw/Blob/Bfile Binary
Date Date
Timestamp Timestamp
Timestamp TZ Timestamptz
JSON String
ROWID/UROWID String
Boolean Boolean
Vector Vector
Interval_DS Dsinterval
Interval_YM Yminterval
Abstract Data Type String