Closed bellini666 closed 5 months ago
This pull request addresses issue #562 by ensuring that the optimizer calls the type's get_queryset
method for nested lists and connections. The changes include modifications to the optimizer logic in strawberry_django/optimizer.py
, the addition of a new test in tests/test_optimizer.py
, and an update to the GraphQL schema in tests/projects/schema.py
.
Files | Changes |
---|---|
tests/test_optimizer.py strawberry_django/optimizer.py |
Enhanced the optimizer to call the type's get_queryset for nested lists/connections and added corresponding tests to validate this behavior. |
Attention: Patch coverage is 75.00000%
with 3 lines
in your changes missing coverage. Please review.
Project coverage is 89.00%. Comparing base (
1023674
) to head (2f85416
).
Files | Patch % | Lines |
---|---|---|
strawberry_django/optimizer.py | 75.00% | 3 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Fix #562
Summary by Sourcery
This pull request fixes an issue where the optimizer was not calling the type's
get_queryset
method for nested lists and connections. It also refactors the optimizer to use_default_manager
for prefetching whenprefetch_custom_queryset
is enabled. Additionally, a new test is added to ensure the correct behavior.get_queryset
method for nested lists and connections._default_manager
for prefetching whenprefetch_custom_queryset
is enabled, otherwise use_base_manager
.get_queryset
method for nested lists and connections.