Skip to content

Commit afe7eae

Browse files
committed
Merge branch 'main' into feature/defer
2 parents 9f16353 + 0c79fb7 commit afe7eae

File tree

104 files changed

+5832
-2164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+5832
-2164
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: "Strawberry Release Check Action"
2+
description: "Check that the RELEASE.md file is valid"
3+
runs:
4+
using: "docker"
5+
image: "Dockerfile"

.github/workflows/release-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
ref: "refs/pull/${{ github.event.number }}/merge"
7272

7373
- name: Release file check
74-
uses: ./.github/release-check-action
74+
uses: strawberry-graphql/strawberry/.github/release-check-action@main
7575
id: release-check
7676
if: github.event.pull_request.draft == false
7777

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.11.8
3+
rev: v0.11.13
44
hooks:
55
- id: ruff-format
66
exclude: ^tests/\w+/snapshots/

CHANGELOG.md

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

4+
0.275.2 - 2025-06-22
5+
--------------------
6+
7+
Fixes a bug that caused merged unions with duplicated entries to fail the schema validation when merging two
8+
`strawberry.union` types.
9+
10+
Contributed by [Erik Wrede](https://github.com/erikwrede) via [PR #3923](https://github.com/strawberry-graphql/strawberry/pull/3923/)
11+
12+
13+
0.275.1 - 2025-06-22
14+
--------------------
15+
16+
In this release, we updated the `aiohttp` integration to handle
17+
`aiohttp.ClientConnectionResetError`s, which can occur when a WebSocket
18+
connection is unexpectedly closed, gracefully.
19+
20+
Contributed by [Jonathan Ehwald](https://github.com/DoctorJohn) via [PR #3922](https://github.com/strawberry-graphql/strawberry/pull/3922/)
21+
22+
23+
0.275.0 - 2025-06-20
24+
--------------------
25+
26+
Adds a new CLI command `strawberry locate-definition` that allows you to find the source location of a definition in the schema.
27+
28+
```
29+
strawberry locate-definition path.to.schema:schema ObjectName
30+
```
31+
32+
```
33+
strawberry locate-definition path.to.schema:schema ObjectName.fieldName
34+
```
35+
36+
Results take the form of `path/to/file.py:line:column`, for example: `src/models/user.py:45:12`.
37+
38+
This can be used, for example, with the go to definition feature of VS Code's Relay extension (configured via the `relay.pathToLocateCommand` setting).
39+
40+
Contributed by [Sam Millar](https://github.com/millar) via [PR #3902](https://github.com/strawberry-graphql/strawberry/pull/3902/)
41+
42+
43+
0.274.3 - 2025-06-19
44+
--------------------
45+
46+
This release adds compatibility with LibCST v1.8
47+
48+
Contributed by [Patrick Arminio](https://github.com/patrick91) via [PR #3921](https://github.com/strawberry-graphql/strawberry/pull/3921/)
49+
50+
51+
0.274.2 - 2025-06-18
52+
--------------------
53+
54+
Introduces an optional operation_extensions parameter throughout the GraphQL
55+
execution flow—adding it to execution entry points and embedding it into the
56+
ExecutionContext—so custom extensions can access per-operation metadata.
57+
58+
Contributed by [Matt Gilene](https://github.com/mdgilene) via [PR #3878](https://github.com/strawberry-graphql/strawberry/pull/3878/)
59+
60+
61+
0.274.1 - 2025-06-18
62+
--------------------
63+
64+
This release fixes an issue that caused schema generation with `Maybe` to fail when using lists, such as `Maybe[List[User]]`.
65+
66+
Contributed by [Erik Wrede](https://github.com/erikwrede) via [PR #3920](https://github.com/strawberry-graphql/strawberry/pull/3920/)
67+
68+
69+
0.274.0 - 2025-06-16
70+
--------------------
71+
72+
In this release, we fixed various edge cases around operation selection in
73+
GraphQL documents. Now, operation selection works consistently across all
74+
protocols, both in documents with single and multiple operations.
75+
76+
Contributed by [Jonathan Ehwald](https://github.com/DoctorJohn) via [PR #3916](https://github.com/strawberry-graphql/strawberry/pull/3916/)
77+
78+
79+
0.273.3 - 2025-06-16
80+
--------------------
81+
82+
In this release, we updated the type hints for `subscription_protocols` across
83+
all HTTP view integrations. It's now consistently defined as `Sequence[str]`,
84+
the minimum type required by Strawberry.
85+
86+
Contributed by [Jonathan Ehwald](https://github.com/DoctorJohn) via [PR #3910](https://github.com/strawberry-graphql/strawberry/pull/3910/)
87+
88+
89+
0.273.2 - 2025-06-15
90+
--------------------
91+
92+
In this release, we replaced the usage of an undocumented AIOHTTP
93+
`MultipartReader` API with the intended public API.
94+
95+
Contributed by [Jonathan Ehwald](https://github.com/DoctorJohn) via [PR #3906](https://github.com/strawberry-graphql/strawberry/pull/3906/)
96+
97+
98+
0.273.1 - 2025-06-15
99+
--------------------
100+
101+
This release fixes that the Chalice HTTP view integration did not set
102+
appropriate content-type headers for responses, as it's recommended by the
103+
GraphQL over HTTP specification.
104+
105+
Contributed by [Jonathan Ehwald](https://github.com/DoctorJohn) via [PR #3904](https://github.com/strawberry-graphql/strawberry/pull/3904/)
106+
107+
108+
0.273.0 - 2025-06-10
109+
--------------------
110+
111+
Starting with this release, Strawberry will throw an error if one of your input
112+
types tries to inherit from one or more interfaces. This new error enforces the
113+
GraphQL specification that input types cannot implement interfaces.
114+
115+
The following code, for example, will now throw an error:
116+
117+
```python
118+
import strawberry
119+
120+
121+
@strawberry.interface
122+
class SomeInterface:
123+
some_field: str
124+
125+
126+
@strawberry.input
127+
class SomeInput(SomeInterface):
128+
another_field: int
129+
```
130+
131+
Contributed by [Ivan Gonzalez](https://github.com/scratchmex) via [PR #1254](https://github.com/strawberry-graphql/strawberry/pull/1254/)
132+
133+
134+
0.272.1 - 2025-06-10
135+
--------------------
136+
137+
This release modifies export-schema cli to include an EOF newline if --output option is provided. This allows better review in github.com for the generated schema files.
138+
139+
Contributed by [Yunkai Zhou](https://github.com/yunkaiz) via [PR #3896](https://github.com/strawberry-graphql/strawberry/pull/3896/)
140+
141+
142+
0.272.0 - 2025-06-10
143+
--------------------
144+
145+
This release features a dedicated extension to disable introspection queries.
146+
Disabling introspection queries was already possible using the
147+
`AddValidationRules` extension. However, using this new extension requires fewer
148+
steps and makes the feature more discoverable.
149+
150+
## Usage example:
151+
152+
```python
153+
import strawberry
154+
from strawberry.extensions import DisableIntrospection
155+
156+
157+
@strawberry.type
158+
class Query:
159+
@strawberry.field
160+
def hello(self) -> str:
161+
return "Hello, world!"
162+
163+
164+
schema = strawberry.Schema(
165+
Query,
166+
extensions=[
167+
DisableIntrospection(),
168+
],
169+
)
170+
```
171+
172+
Contributed by [Jonathan Ehwald](https://github.com/DoctorJohn) via [PR #3895](https://github.com/strawberry-graphql/strawberry/pull/3895/)
173+
174+
175+
0.271.2 - 2025-06-09
176+
--------------------
177+
178+
This release fixes an `AttributeError` that occurred when a fragment and an `OperationDefinitionNode` shared the same name, and the fragment appeared first in the document.
179+
180+
The following example will now work as expected:
181+
182+
```graphql
183+
fragment UserAgent on UserAgentType {
184+
id
185+
}
186+
187+
query UserAgent {
188+
userAgent {
189+
...UserAgent
190+
}
191+
}
192+
```
193+
194+
Contributed by [Arthur](https://github.com/Speedy1991) via [PR #3882](https://github.com/strawberry-graphql/strawberry/pull/3882/)
195+
196+
197+
0.271.1 - 2025-06-07
198+
--------------------
199+
200+
This Release contains fix of enum value was not working in generic container in lazy union.
201+
202+
Contributed by [Alex](https://github.com/benzolium) via [PR #3883](https://github.com/strawberry-graphql/strawberry/pull/3883/)
203+
204+
205+
0.271.0 - 2025-06-04
206+
--------------------
207+
208+
Added a new configuration option `_unsafe_disable_same_type_validation` that allows disabling the same type validation check in the schema converter. This is useful in cases where you need to have multiple type definitions with the same name in your schema.
209+
210+
Example:
211+
212+
```python
213+
@strawberry.type(name="DuplicatedType")
214+
class A:
215+
a: int
216+
217+
218+
@strawberry.type(name="DuplicatedType")
219+
class B:
220+
b: int
221+
222+
223+
schema = strawberry.Schema(
224+
query=Query,
225+
types=[A, B],
226+
config=strawberry.StrawberryConfig(_unsafe_disable_same_type_validation=True),
227+
)
228+
```
229+
230+
Note: This is an unsafe option and should be used with caution as it bypasses a safety check in the schema converter.
231+
232+
Contributed by [Asylbek](https://github.com/narmatov-asylbek) via [PR #3887](https://github.com/strawberry-graphql/strawberry/pull/3887/)
233+
234+
235+
0.270.6 - 2025-06-04
236+
--------------------
237+
238+
This release fixes that the `create_type` tool asked users to pass a `name` for
239+
fields without resolvers even when a `name` was already provided.
240+
241+
The following code now works as expected:
242+
243+
```python
244+
import strawberry
245+
from strawberry.tools import create_type
246+
247+
first_name = strawberry.field(name="firstName")
248+
Query = create_type(f"Query", [first_name])
249+
```
250+
251+
Contributed by [Jonathan Ehwald](https://github.com/DoctorJohn) via [PR #3885](https://github.com/strawberry-graphql/strawberry/pull/3885/)
252+
253+
254+
0.270.5 - 2025-06-01
255+
--------------------
256+
257+
In this release, we improved some GraphQL over WS error messages. More precise
258+
error messages are now returned if Strawberry fails to find an operation in the
259+
query document.
260+
261+
Contributed by [Jonathan Ehwald](https://github.com/DoctorJohn) via [PR #3869](https://github.com/strawberry-graphql/strawberry/pull/3869/)
262+
263+
264+
0.270.4 - 2025-05-29
265+
--------------------
266+
267+
This release fixes that the Strawberry debug server no longer supported
268+
WebSockets out of the box.
269+
270+
Contributed by [Jonathan Ehwald](https://github.com/DoctorJohn) via [PR #3872](https://github.com/strawberry-graphql/strawberry/pull/3872/)
271+
272+
273+
0.270.3 - 2025-05-29
274+
--------------------
275+
276+
This release fixes an dependency issue with the Strawberry CLI and
277+
libcst.
278+
279+
Contributed by [Jonathan Ehwald](https://github.com/DoctorJohn) via [PR #3875](https://github.com/strawberry-graphql/strawberry/pull/3875/)
280+
281+
282+
0.270.2 - 2025-05-24
283+
--------------------
284+
285+
This release resolves the issue of subscriptions started via the legacy `graphql-ws` WebSocket subprotocol getting stuck if a non-existing `operationName` was specified.
286+
287+
Contributed by [Jonathan Ehwald](https://github.com/DoctorJohn) via [PR #3858](https://github.com/strawberry-graphql/strawberry/pull/3858/)
288+
289+
290+
0.270.1 - 2025-05-22
291+
--------------------
292+
293+
Fix multipart subscriptions by always yielding the closing boundary if it's enqueued.
294+
295+
Contributed by [Roger Yang](https://github.com/RogerHYang) via [PR #3866](https://github.com/strawberry-graphql/strawberry/pull/3866/)
296+
297+
298+
0.270.0 - 2025-05-20
299+
--------------------
300+
301+
This release adds support for GraphQL over WebSocket transport protocols to the Quart integration.
302+
303+
Contributed by [Jonathan Ehwald](https://github.com/DoctorJohn) via [PR #3860](https://github.com/strawberry-graphql/strawberry/pull/3860/)
304+
305+
306+
0.269.0 - 2025-05-17
307+
--------------------
308+
309+
This release adds support for input extension (To explain and document)
310+
311+
Contributed by [Omar Marzouk](https://github.com/omarzouk) via [PR #3461](https://github.com/strawberry-graphql/strawberry/pull/3461/)
312+
313+
314+
0.268.2 - 2025-05-17
315+
--------------------
316+
317+
This release (finally) fixes support for using `ID` and `GlobalID`
318+
in the same schema.
319+
320+
Contributed by [Patrick Arminio](https://github.com/patrick91) via [PR #3859](https://github.com/strawberry-graphql/strawberry/pull/3859/)
321+
322+
323+
0.268.1 - 2025-05-12
324+
--------------------
325+
326+
This releases fixed an issue that prevented from using `ID` and `GlobalID` at the same
327+
time, like in this example:
328+
329+
```python
330+
import strawberry
331+
from strawberry.relay.types import GlobalID
332+
333+
334+
@strawberry.type
335+
class Query:
336+
@strawberry.field
337+
def hello(self, id: GlobalID) -> str:
338+
return "Hello World"
339+
340+
@strawberry.field
341+
def hello2(self, id: strawberry.ID) -> str:
342+
return "Hello World"
343+
344+
345+
schema = strawberry.Schema(
346+
Query,
347+
)
348+
```
349+
350+
Contributed by [Patrick Arminio](https://github.com/patrick91) via [PR #3855](https://github.com/strawberry-graphql/strawberry/pull/3855/)
351+
352+
4353
0.268.0 - 2025-05-10
5354
--------------------
6355

README.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,6 @@ urlpatterns = [
9393
]
9494
```
9595

96-
## WebSockets
97-
98-
To support graphql Subscriptions over WebSockets you need to provide a WebSocket
99-
enabled server. The debug server can be made to support WebSockets with these
100-
commands:
101-
102-
```shell
103-
pip install 'strawberry-graphql[debug-server]'
104-
pip install 'uvicorn[standard]'
105-
```
106-
10796
## Examples
10897

10998
* [Various examples on how to use Strawberry](https://github.com/strawberry-graphql/examples)

0 commit comments

Comments
 (0)