-
-
Notifications
You must be signed in to change notification settings - Fork 534
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
Remove unused helpers and redundant overrides #3710
Remove unused helpers and redundant overrides #3710
Conversation
Reviewer's Guide by SourceryThis PR removes unused helper functions and a redundant method override from the HTTP and FastAPI modules. The removed code includes helper methods for parsing query parameters and request data that are now handled by base views, as well as a redundant process_result override that was identical to its parent class implementation. Updated class diagram for HTTP moduleclassDiagram
class GraphQLRequestData {
+String query
+Dict variables
+String operation_name
+Literal protocol
}
class HTTPModule {
-parse_query_params(params: Dict)
-parse_request_data(data: Mapping)
}
GraphQLRequestData --> HTTPModule
note for HTTPModule "Removed unused helper methods parse_query_params and parse_request_data"
Updated class diagram for FastAPI moduleclassDiagram
class GraphQLRouter {
+async render_graphql_ide(request: Request) HTMLResponse
+async get_context(request: Union, response: Union) Context
-async process_result(request: Request, result: ExecutionResult) GraphQLHTTPResponse
}
note for GraphQLRouter "Removed redundant process_result method override"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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 @DoctorJohn - 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
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Hi, thanks for contributing to Strawberry 🍓! We noticed that this PR is missing a So as soon as this PR is merged, a release will be made 🚀. Here's an example of Release type: patch
Description of the changes, ideally with some examples, if adding a new feature. Release type can be one of patch, minor or major. We use semver, so make sure to pick the appropriate type. If in doubt feel free to ask :) Here's the tweet text:
|
CodSpeed Performance ReportMerging #3710 will not alter performanceComparing Summary
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3710 +/- ##
===========================================
- Coverage 97.02% 63.56% -33.46%
===========================================
Files 500 496 -4
Lines 33483 32316 -1167
Branches 5593 1660 -3933
===========================================
- Hits 32486 20541 -11945
- Misses 793 11334 +10541
- Partials 204 441 +237
|
Description
I noticed these helper methods are unused and their functionality is now part of the base views. While checking the other method in the
__init__.py
file, I noticed the FastAPI view needlessly overrides theprocess_result
which is already defined in the exact same way by the async base view class.Types of Changes