Skip to content

Commit 358a308

Browse files
committed
Release 🍓 0.289.8
1 parent e4f3417 commit 358a308

File tree

3 files changed

+33
-28
lines changed

3 files changed

+33
-28
lines changed

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,38 @@
11
CHANGELOG
22
=========
33

4+
0.289.8 - 2026-01-27
5+
--------------------
6+
7+
This release adds `UploadDefinition` to `strawberry.file_uploads`, which can be
8+
used with `scalar_overrides` to map framework-specific upload types to the
9+
`Upload` scalar. This enables proper type checking with mypy/pyright when using
10+
file uploads.
11+
12+
Example usage with Starlette/FastAPI:
13+
14+
```python
15+
from starlette.datastructures import UploadFile
16+
from strawberry.file_uploads import UploadDefinition
17+
18+
schema = strawberry.Schema(
19+
query=Query, mutation=Mutation, scalar_overrides={UploadFile: UploadDefinition}
20+
)
21+
22+
23+
@strawberry.type
24+
class Mutation:
25+
@strawberry.mutation
26+
async def read_file(self, file: UploadFile) -> str:
27+
return (await file.read()).decode("utf-8")
28+
```
29+
30+
With this configuration, the `file` parameter is correctly typed as `UploadFile`,
31+
giving you proper IDE autocomplete and type checking.
32+
33+
Contributed by [Patrick Arminio](https://github.com/patrick91) via [PR #4175](https://github.com/strawberry-graphql/strawberry/pull/4175/)
34+
35+
436
0.289.7 - 2026-01-26
537
--------------------
638

RELEASE.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "strawberry-graphql"
3-
version = "0.289.7"
3+
version = "0.289.8"
44
description = "A library for creating GraphQL APIs"
55
authors = [{ name = "Patrick Arminio", email = "[email protected]" }]
66
license = { text = "MIT" }

0 commit comments

Comments
 (0)