Scalars
The fundamental building-block in the type system. Standard GraphQLScalarType
s: String, Int, Float, Boolean and ID types are already implemented and provided by Leto.
Other scalar types are also provided:
- Json: A raw JSON value with no type schema. Could be a Map<String, Json>, List<Json>, num, String, bool or null.
- Uri: Dart's Uri class, serialized using
Uri.toString
and deserialized withUri.parse
- Date: Uses the
DateTime
Dart class. Serialized as an ISO-8601 String and deserialized withDateTime.parse
. - Timestamp: Same as Date, but serialized as an UNIX timestamp.
- Time: // TODO: 1A
- Duration: // TODO: 1A
- BigInt: An arbitrarily large integer from
dart:core
serialized as a String and deserialized withBigInt.parse
. - Upload: A file upload. Following the multipart request spec.
To provide your own or support types from other packages you can use Custom Scalars.