Skip to content

Commit 1e0e1ef

Browse files
committed
Release 🍓 0.257.0
1 parent 526eb82 commit 1e0e1ef

File tree

3 files changed

+27
-22
lines changed

3 files changed

+27
-22
lines changed

CHANGELOG.md

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

4+
0.257.0 - 2025-01-09
5+
--------------------
6+
7+
The common `node: Node` used to resolve relay nodes means we will be relying on
8+
is_type_of to check if the returned object is in fact a subclass of the Node
9+
interface.
10+
11+
However, integrations such as Django, SQLAlchemy and Pydantic will not return
12+
the type itself, but instead an alike object that is later resolved to the
13+
expected type.
14+
15+
In case there are more than one possible type defined for that model that is
16+
being returned, the first one that replies True to `is_type_of` check would be
17+
used in the resolution, meaning that when asking for `"PublicUser:123"`,
18+
strawberry could end up returning `"User:123"`, which can lead to security
19+
issues (such as data leakage).
20+
21+
In here we are introducing a new `strawberry.cast`, which will be used to mark
22+
an object with the already known type by us, and when asking for is_type_of that
23+
mark will be used to check instead, ensuring we will return the correct type.
24+
25+
That `cast` is already in place for the relay node resolution and pydantic.
26+
27+
Contributed by [Thiago Bellini Ribeiro](https://github.com/bellini666) via [PR #3749](https://github.com/strawberry-graphql/strawberry/pull/3749/)
28+
29+
430
0.256.1 - 2024-12-23
531
--------------------
632

RELEASE.md

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

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tool.poetry]
22
name = "strawberry-graphql"
33
packages = [ { include = "strawberry" } ]
4-
version = "0.256.1"
4+
version = "0.257.0"
55
description = "A library for creating GraphQL APIs"
66
authors = ["Patrick Arminio <patrick.arminio@gmail.com>"]
77
license = "MIT"

0 commit comments

Comments
 (0)