Scalars
The fundamental building-block in the type system. Standard GraphQLScalarTypes: 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.toStringand deserialized withUri.parse - Date: Uses the
DateTimeDart 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:coreserialized 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.