Releases: strawberry-graphql/strawberry
🍓 0.262.1
🍓 0.262.0
🍓 0.261.1
🍓 0.261.0
This release adds support for type[strawberry.UNSET]
in addition to strawberry.types.unset.UnsetType
for annotations.
@strawberry.type
class User:
name: str | None = UNSET
age: int | None | type[strawberry.UNSET] = UNSET
Releases contributed by @alexey-pelykh via #3765
🍓 0.260.4
🍓 0.260.3
🍓 0.260.2
This release fixes an issue where directives with input types using snake_case
would not be printed in the schema.
For example, the following:
@strawberry.input
class FooInput:
hello: str
hello_world: str
@strawberry.schema_directive(locations=[Location.FIELD_DEFINITION])
class FooDirective:
input: FooInput
@strawberry.type
class Query:
@strawberry.field(
directives=[
FooDirective(input=FooInput(hello="hello", hello_world="hello world")),
]
)
def foo(self, info) -> str: ...
Would previously print as:
directive @fooDirective(
input: FooInput!
optionalInput: FooInput
) on FIELD_DEFINITION
type Query {
foo: String! @fooDirective(input: { hello: "hello" })
}
input FooInput {
hello: String!
hello_world: String!
}
Now it will be correctly printed as:
directive @fooDirective(
input: FooInput!
optionalInput: FooInput
) on FIELD_DEFINITION
type Query {
foo: String!
@fooDirective(input: { hello: "hello", helloWorld: "hello world" })
}
input FooInput {
hello: String!
hello_world: String!
}
Releases contributed by @bellini666 via #3780
🍓 0.260.1
This release fixes an issue where extensions were being duplicated when custom directives were added to the schema. Previously, when user directives were present, extensions were being appended twice to the extension list, causing them to be executed multiple times during query processing.
The fix ensures that extensions are added only once and maintains their original order. Test cases have been added to validate this behavior and ensure extensions are executed exactly once.
Releases contributed by @doney-dkp via #3783