Complete reference of all scalar types with their GraphQL mapping, MongoDB type, default values, and example usage.
| Type | GraphQL | MongoDB | Default | Example Value |
|---|
String | String | String | "" | "Hello World" |
Boolean | Boolean | Boolean | false | true |
Date | Date (custom) | Date | dayjs(new Date(-1)) | "2024-01-15T09:30:00Z" |
ID | ID | ObjectId | null | "1234567890abcdef12345678" |
Int | Int | Number | 0 | 42 |
Float | Float | Number | 0 | 3.14159 |
Upload | Upload (GraphQL Upload) | - | - | FileUpload stream |
JSON | JSON (custom) | Mixed | {} | { "key": "value" } |
Map | JSON | Map | {} | { "a": 1, "b": 2 } |
Blue types (String, Boolean, Date) are JavaScript built-ins. Purple types (ID, Int, Float, Upload, JSON) are custom Akan.js classes that need to be imported.