Closed aprams closed 4 months ago
@aprams I just released https://github.com/strawberry-graphql/strawberry-django/releases/tag/v0.46.0 to fix the other issue you reported and I'm wondering if it will fix this one as well?
Please let me know as I'm currently unable to reproduce this. We even have a test case for nested prefetching with filters, and those tests are passing fine.
If the issue still exists in 0.46.0, would you be able to produce an MRE? It can be in the form of a unit test inside strawberry-django itself
Hi @bellini666, thanks for the quick response. I tried it locally, didn't work, I'll try to create a MRE as a unit test and get back to you!
@bellini666
Here we go! Took me a bit to pin down the enable_only_optimization
being the parameter that makes or breaks the test.
You can find the MRE here: https://github.com/strawberry-graphql/strawberry-django/pull/569/files (made it a PR to comment).
Our use case to turn off the only optimization is that we also use django-multitenant (https://github.com/citusdata/django-multitenant) to separate tenants. With only_optimization on, our tenant field is not automatically returned from the DB, which caused issues.
Any idea how the only optimization influences this?
Using nested pagination worked in previous versions, but seems to not work with the optimizer anymore after 0.44.0
Describe the Bug
Example query:
This used to return a nested pagination. With the DjangoOptimizerExtension on 0.44.0+, this pagination is however ignored and all users are returned.
System Information
Additional Context
enable_nested_relations_prefetch=False
does not solve this issue I couldn't find a working configuration except for downgrading to 0.43.0, happy to try any suggestions, of course!Upvote & Fund