Request:
{
standConnection{
edges{
node{
planningAreas{
id
}
}
}
}
}
Models:
class PlanningArea(models.Model):
...
objects = PlanningAreaQuerySet.as_manager()
class Stand(models.Model):
...
objects = StandManager()
Types:
class BaseAccessResolverNodeTypeMixin:
@classmethod
def get_queryset(cls, queryset: BaseModelAvailableQuerySet, info: Info, **kwargs) -> BaseModelAvailableQuerySet:
return queryset.filter_available(user=info.context.request.user)
@strawberry.django.type(PlanningArea)
class PlanningAreaGqlType(BaseAccessResolverNodeTypeMixin, relay.Node):
name: auto
...
@strawberry.django.type(Stand)
class StandGqlType(BaseAccessResolverNodeTypeMixin, relay.Node):
planning_areas: list[Annotated["PlanningAreaGqlType", lazy("apps.planning_areas.gql.types")]]
...
For both models, the objects
manager was redefined and it is inherited from BaseModelAvailableQuerySet
The problem is the following: when I make a request it starts calling get_queryset
method for PlanningAreaGqlType (the old library did not have this behavior) and it fails with an error AttributeError: 'QuerySet' object has no attribute 'filter_available'
Everything is fine for the latest version of strawberry-django-plus lib
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too