File tree Expand file tree Collapse file tree 3 files changed +27
-22
lines changed Expand file tree Collapse file tree 3 files changed +27
-22
lines changed Original file line number Diff line number Diff line change 1
1
CHANGELOG
2
2
=========
3
3
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
+
4
30
0.256.1 - 2024-12-23
5
31
--------------------
6
32
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
[tool .poetry ]
2
2
name = " strawberry-graphql"
3
3
packages = [ { include = " strawberry" } ]
4
- version = " 0.256.1 "
4
+ version = " 0.257.0 "
5
5
description = " A library for creating GraphQL APIs"
6
6
authors = [
" Patrick Arminio <[email protected] >" ]
7
7
license = " MIT"
You can’t perform that action at this time.
0 commit comments