Skip to content

Releases: strawberry-graphql/strawberry

🍓 0.262.1

06 Mar 20:18
Compare
Choose a tag to compare

This release updates the handling of the Django graphql/graphiql.html template, if provided; it will now receive the current request as context.

Releases contributed by @sersorrel via #3800

🍓 0.262.0

04 Mar 14:51
Compare
Choose a tag to compare

This release adds support for exporting schema created by a callable:

strawberry export-schema package.module:create_schema

when

def create_schema():
    return strawberry.Schema(query=Query)

Releases contributed by @alexey-pelykh via #3797

🍓 0.261.1

27 Feb 16:38
Compare
Choose a tag to compare

This release updates the Python version requirement to use ⁠python >= 3.9 instead of ⁠^3.9 to avoid conflicts with other projects that use ⁠>= 3.x

Releases contributed by @PaleNeutron via #3789

🍓 0.261.0

27 Feb 12:39
Compare
Choose a tag to compare

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

27 Feb 12:18
Compare
Choose a tag to compare

This release adds support for Datadog ddtrace v3.0.0 in the DatadogTracingExtension

Releases contributed by @jonfinerty via #3794

🍓 0.260.3

27 Feb 12:01
Compare
Choose a tag to compare

This release fixes the issue that some subscription resolvers were not canceled if a client unexpectedly disconnected.

Releases contributed by @jakub-bacic via #3778

🍓 0.260.2

13 Feb 16:10
Compare
Choose a tag to compare

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

13 Feb 12:19
Compare
Choose a tag to compare

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

🍓 0.260.0

12 Feb 17:42
Compare
Choose a tag to compare

Support aliases (TypeVar passthrough) in get_specialized_type_var_map.

Releases contributed by @alexey-pelykh via #3766

🍓 0.259.1

12 Feb 17:36
Compare
Choose a tag to compare

This release adjusts the context_getter attribute from the fastapi GraphQLRouter
to accept an async callables.

Releases contributed by @alexey-pelykh via #3763