Avatar for the strawberry-graphql user
strawberry-graphql
strawberry-sqlalchemy
BlogDocsChangelog

Support async sessions in strawberry_sqlalchemy_mapper

#53Merged
Comparing
mattalbr:async_session_factory
(
dfeef2f
) with
main
(
9746996
)
CodSpeed Performance Gauge
0%
Improvements
0
Regressions
0
Untouched
1
New
0
Dropped
0
Ignored
0

Benchmarks

Passed

test_hello_world
tests/benchmarks/test_empty_benchmark.py::test_hello_world
CodSpeed Performance Gauge
0%
18.7 µs
18.6 µs

Commits

Click on a commit to change the comparison range
Base
main
9746996
+1%
Support async sessions in strawberry_sqlalchemy_mapper and deprecate sync. I left a note in the loader's __init__, but to duplicate that here: Making blocking database calls from within an async function (the resolver) has catastrophic performance implications. Not only will all resolvers be effectively serialized, any other coroutines waiting on the event loop (e.g. concurrent requests in a web server), will be blocked as well, grinding your entire service to a halt. There's no reason for us to support a foot bazooka, hence the deprecation.
f5442e1
2 years ago
by mattalbr
0%
Add assertion to make mypy happy.
e2ace34
2 years ago
by mattalbr
0%
Manage session in a context manager.
d215e2d
2 years ago
by mattalbr
0%
Fix type annotation for asynciterator.
a2b2dcf
2 years ago
by mattalbr
-1%
More rigorous typing with AsyncContextManager.
af8fe7a
2 years ago
by mattalbr
+1%
Remove deprecation warning for sync bind.
b0eea33
2 years ago
by mattalbr
0%
Remove deprecation notice from RELEASE.md.
ebfc1e6
2 years ago
by mattalbr
0%
Update RELEASE.md with example usage
dfeef2f
2 years ago
by mattalbr
© 2025 CodSpeed Technology
Home Terms Privacy Docs