strawberry-graphql / strawberry-django

Strawberry GraphQL Django extension
MIT License
391 stars 115 forks source link

`DjangoOptimizerExtension` can't hand `order_with_respect_to` tuples with using `OrderedModel` #536

Open Eraldo opened 1 month ago

Eraldo commented 1 month ago

Describe the Bug

When a Django model has the order_with_respect_to property set to a tuple of fields, the DjangoOptimizerExtension throws the following error:

"message": "maximum recursion depth exceeded in comparison",

Update: Only happens if the model inherits from: OrderedModel: https://github.com/django-ordered-model/django-ordered-model

Reproduction: https://github.com/Eraldo/strawberry-django-optimizer-infinite-recursion-mre

System Information

Upvote & Fund

Fund with Polar