Skip to content

Releases: strawberry-graphql/strawberry

🍓 0.240.4

13 Sep 14:50
Compare
Choose a tag to compare

This release fixes how we check for multipart subscriptions to be
in line with the latest changes in the spec.

Releases contributed by @patrick91 via #3627

🍓 0.240.3

12 Sep 20:07
Compare
Choose a tag to compare

This release fixes an issue that prevented extensions to receive the result from
the execution context when executing operations in async.

Releases contributed by @nrbnlulu via #3629

🍓 0.240.2

11 Sep 19:39
Compare
Choose a tag to compare

This release updates how we check for GraphQL core's version to remove a
dependency on the packaging package.

Releases contributed by @bollwyvl via #3622

🍓 0.240.1

11 Sep 19:14
Compare
Choose a tag to compare

This release adds support for Python 3.13 (which will be out soon!)

Releases contributed by @patrick91 via #3510

🍓 0.240.0

10 Sep 20:16
Compare
Choose a tag to compare

This release adds support for schema-extensions in subscriptions.

Here's a small example of how to use them (they work the same way as query and
mutation extensions):

import asyncio
from typing import AsyncIterator

import strawberry
from strawberry.extensions.base_extension import SchemaExtension


@strawberry.type
class Subscription:
    @strawberry.subscription
    async def notifications(self, info: strawberry.Info) -> AsyncIterator[str]:
        for _ in range(3):
            yield "Hello"


class MyExtension(SchemaExtension):
    async def on_operation(self):
        # This would run when the subscription starts
        print("Subscription started")
        yield
        # The subscription has ended
        print("Subscription ended")


schema = strawberry.Schema(
    query=Query, subscription=Subscription, extensions=[MyExtension]
)

Releases contributed by @nrbnlulu via #3554

🍓 0.239.2

03 Sep 10:24
Compare
Choose a tag to compare

This release fixes a TypeError on Python 3.8 due to us using a
asyncio.Queue[Tuple[bool, Any]](1) instead of asyncio.Queue(1).

Releases contributed by @szokeasaurusrex via #3615

🍓 0.239.1

02 Sep 15:56
Compare
Choose a tag to compare

This release fixes an issue with the http multipart subscription where the
status code would be returned as None, instead of 200.

We also took the opportunity to update the internals to better support
additional protocols in future.

Releases contributed by @patrick91 via #3610

🍓 0.239.0

31 Aug 11:13
Compare
Choose a tag to compare

This release adds support for multipart subscriptions in almost all1 of our
http integrations!

Multipart subcriptions
are a new protocol from Apollo GraphQL, built on the
Incremental Delivery over HTTP spec,
which is also used for @defer and @stream.

The main advantage of this protocol is that when using the Apollo Client
libraries you don't need to install any additional dependency, but in future
this feature should make it easier for us to implement @defer and @stream

Also, this means that you don't need to use Django Channels for subscription,
since this protocol is based on HTTP we don't need to use websockets.

Releases contributed by @patrick91 via #3076

  1. Flask, Chalice and the sync Django integration don't support this.

🍓 0.238.1

30 Aug 22:32
Compare
Choose a tag to compare

Fix an issue where StrawberryResolver.is_async was returning False for a
function decorated with asgiref's @sync_to_async.

The root cause is that in python >= 3.12 coroutine functions are market using
inspect.markcoroutinefunction, which should be checked with
inspect.iscoroutinefunction instead of asyncio.iscoroutinefunction

Releases contributed by @shmoon-kr via #3599

🍓 0.238.0

30 Aug 21:35
Compare
Choose a tag to compare

This release removes the integration of Starlite, as it
has been deprecated since 11 May 2024.

If you are using Starlite, please consider migrating to Litestar (https://litestar.dev) or another alternative.

Releases contributed by @patrick91 via #3609