> ## Documentation Index
> Fetch the complete documentation index at: https://fastql.vachagan.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Scalars and wrappers

> Reference for built-in scalar mappings and explicit type wrappers.

FastQL maps ordinary Python annotations to built-in GraphQL scalars:

| Python  | GraphQL   |
| ------- | --------- |
| `int`   | `Int`     |
| `float` | `Float`   |
| `str`   | `String`  |
| `bool`  | `Boolean` |

`ID` is available as an explicit GraphQL scalar. `NonNull(type_)` and
`ListType(type_)` are low-level wrappers used by the internal type model and advanced
schema construction.

In decorated Python definitions, prefer annotation syntax:

```python theme={null}
required_name: str
optional_name: str | None
required_items: list[Item]
optional_items: list[Item] | None
```

Use custom scalars for domain values that require explicit parsing and serialization.
Scalar implementations must return GraphQL-compatible serialized output and raise
clear errors for invalid input.

The built-in `Upload` scalar is usable as an input type for `multipart/form-data`
file uploads, injecting an `UploadedFile` into the resolver — see
[File uploads & batching](/protocol/uploads-and-batching).
