BlogDocs

Support async sessions in strawberry_sqlalchemy_mapper(#53)

Merged
Merging
mattalbr:async_session_factory
(
dfeef2f
) into
main
(
9746996
)
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
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
1 year ago
by mattalbr
0%
Add assertion to make mypy happy.
e2ace34
1 year ago
by mattalbr
0%
Manage session in a context manager.
d215e2d
1 year ago
by mattalbr
0%
Fix type annotation for asynciterator.
a2b2dcf
1 year ago
by mattalbr
-1%
More rigorous typing with AsyncContextManager.
af8fe7a
1 year ago
by mattalbr
+1%
Remove deprecation warning for sync bind.
b0eea33
1 year ago
by mattalbr
0%
Remove deprecation notice from RELEASE.md.
ebfc1e6
1 year ago
by mattalbr
0%
Update RELEASE.md with example usage
dfeef2f
1 year ago
by mattalbr
ResourcesHomePricingDocsBlogGitHubChangelog