-
-
Notifications
You must be signed in to change notification settings - Fork 128
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
Added missing unpacking of strawberry.LazyType to optimzer.py #670
Added missing unpacking of strawberry.LazyType to optimzer.py #670
Conversation
Reviewer's Guide by SourceryThe PR fixes a bug in the query optimizer where LazyType was not being properly unpacked when handling PaginatedResponse. The implementation adds a check to unpack LazyType using resolve_type() before processing, similar to the existing implementation in _get_model_hints_from_connection. Class diagram for LazyType unpacking in optimizer.pyclassDiagram
class optimizer {
+_get_model_hints_from_paginated()
}
class LazyType {
+resolve_type()
}
optimizer --> LazyType : uses
note for optimizer "Added LazyType unpacking using resolve_type() in _get_model_hints_from_paginated"
File-Level Changes
Possibly linked issues
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 @NT-Timm - I've reviewed your changes - here's some feedback:
Overall Comments:
- Please add tests to verify the LazyType unpacking behavior for PaginatedResponse handling to prevent future regressions.
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.
…h DjangoOptimizerExtension enabled.
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.
Ty! :)
The query optimizer doesn't properly unpack LazyType on PaginatedRespone handling.
This fixes it the same way _get_model_hints_from_connection does it.
Types of Changes
Checklist
Summary by Sourcery
Bug Fixes: