New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix GET requests with content_type headers #3452
Fix GET requests with content_type headers #3452
Conversation
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @vethan - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Docstrings: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3452 +/- ##
==========================================
- Coverage 96.48% 96.47% -0.01%
==========================================
Files 509 509
Lines 32717 32723 +6
Branches 5404 5404
==========================================
+ Hits 31566 31571 +5
- Misses 940 941 +1
Partials 211 211 |
CodSpeed Performance ReportMerging #3452 will degrade performances by 26.72%Comparing Summary
Benchmarks breakdown
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! interesting!
The changes look good, but could you add a test? let me know if you need any info 😊
…' into get-method-check-should-be-first
for more information, see https://pre-commit.ci
@patrick91 Test Added! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thank you!
Thanks for contributing to Strawberry! 🎉 You've been invited to join You can also request a free sticker by filling this form: https://forms.gle/dmnfQUPoY5gZbVT67 And don't forget to join our discord server: https://strawberry.rocks/discord 🔥 |
Description
Currently, if you perform a GET query while supplying the application/json header, strawberry will return a 400. By moving the method check first when parsing the query we can avoid these unneccessary 400s
Types of Changes
Issues Fixed or Closed by This PR
Checklist