Closed patrick91 closed 2 months ago
This pull request improves the multipart subscriptions code by addressing the status code handling in the streaming response and adding a test case to verify the status code. It also includes a TODO comment for potential future refactoring.
Change | Details | Files |
---|---|---|
Ensure a default status code for multipart responses |
|
strawberry/fastapi/router.py strawberry/asgi/__init__.py |
Add test case for multipart subscription status code |
|
tests/http/test_multipart_subscription.py |
Add TODO comment for potential refactoring |
|
strawberry/fastapi/router.py |
Thanks for adding the RELEASE.md
file!
Here's a preview of the changelog:
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.
Here's the tweet text:
🆕 Release (next) is out! Thanks to @patrick91 for the PR 👏
Get it here 👉 https://strawberry.rocks/release/(next)
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 96.79%. Comparing base (
98b8563
) to head (c98c4c3
). Report is 1 commits behind head on main.
Comparing fix/multipart
(c98c4c3) with main
(98b8563)
✅ 15
untouched benchmarks
~I should probably also fix GET multiparts~
EDIT: that works already
Summary by Sourcery
Improve the multipart subscription handling by ensuring a default HTTP 200 OK status code is used when not explicitly set, and update tests to verify this behavior.
Bug Fixes:
Tests: