Bump strawberry-graphql[fastapi] from 0.239.2 to 0.240.2
Bumps strawberry-graphql[fastapi] from 0.239.2 to 0.240.2.
Release notes
Sourced from strawberry-graphql[fastapi]'s releases.
🍓 0.240.2This 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.1This release adds support for Python 3.13 (which will be out soon!)
Releases contributed by
@patrick91
via #3510
🍓 0.240.0This 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
Changelog
Sourced from strawberry-graphql[fastapi]'s changelog.
0.240.2 - 2024-09-11
This release updates how we check for GraphQL core's version to remove a dependency on the
packaging
package.Contributed by Nicholas Bollweg via [PR #3622](strawberry-graphql/strawberry#3622)
0.240.1 - 2024-09-11
This release adds support for Python 3.13 (which will be out soon!)
Contributed by Patrick Arminio via [PR #3510](strawberry-graphql/strawberry#3510)
0.240.0 - 2024-09-10
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") </tr></table>
... (truncated)
Commits
-
c4bf3f8
Release🍓 0.240.2 -
22bd2fc
use graphql's built-in version object (#3622) -
a1f3275
Remove TWEET.md -
0d2f2ed
Release🍓 0.240.1 -
29fa91d
Test on 3.13 (#3510) -
4ada2cc
Remove TWEET.md -
82fe27c
Release🍓 0.240.0 -
0dcf23d
Support subscriptions extensions (#3554) -
fc25e04
[pre-commit.ci] pre-commit autoupdate (#3553) - See full diff in compare view