File tree Expand file tree Collapse file tree 3 files changed +71
-66
lines changed
Expand file tree Collapse file tree 3 files changed +71
-66
lines changed Original file line number Diff line number Diff line change 11CHANGELOG
22=========
33
4+ 0.260.2 - 2025-02-13
5+ --------------------
6+
7+ This release fixes an issue where directives with input types using snake_case
8+ would not be printed in the schema.
9+
10+ For example, the following:
11+
12+ ``` python
13+ @strawberry.input
14+ class FooInput :
15+ hello: str
16+ hello_world: str
17+
18+
19+ @strawberry.schema_directive (locations = [Location.FIELD_DEFINITION ])
20+ class FooDirective :
21+ input : FooInput
22+
23+
24+ @strawberry.type
25+ class Query :
26+ @strawberry.field (
27+ directives = [
28+ FooDirective(input = FooInput(hello = " hello" , hello_world = " hello world" )),
29+ ]
30+ )
31+ def foo (self , info ) -> str : ...
32+ ```
33+
34+ Would previously print as:
35+
36+ ``` graphql
37+ directive @fooDirective (
38+ input : FooInput !
39+ optionalInput : FooInput
40+ ) on FIELD_DEFINITION
41+
42+ type Query {
43+ foo : String ! @fooDirective (input : { hello : " hello" })
44+ }
45+
46+ input FooInput {
47+ hello : String !
48+ hello_world : String !
49+ }
50+ ```
51+
52+ Now it will be correctly printed as :
53+
54+ ```graphql
55+ directive @fooDirective (
56+ input : FooInput !
57+ optionalInput : FooInput
58+ ) on FIELD_DEFINITION
59+
60+ type Query {
61+ foo : String !
62+ @fooDirective (input : { hello : " hello" , helloWorld : " hello world" })
63+ }
64+
65+ input FooInput {
66+ hello : String !
67+ hello_world : String !
68+ }
69+ ```
70+
71+ Contributed by [Thiago Bellini Ribeiro ](https ://github .com /bellini666 ) via [PR #3780](https://github.com/strawberry-graphql/strawberry/pull/3780/)
72+
73+
4740.260.1 - 2025-02-13
575--------------------
676
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " strawberry-graphql"
33packages = [ { include = " strawberry" } ]
4- version = " 0.260.1 "
4+ version = " 0.260.2 "
55description = " A library for creating GraphQL APIs"
66authors = [
" Patrick Arminio <[email protected] >" ]
77license = " MIT"
You can’t perform that action at this time.
0 commit comments