I am developing a product with strawberry_graphql and strawberry_graphql_django.
While developing, I need a pagination function, so I am using the pagination function provided by strawberry_graphql_django,
I want to add a function that returns the total number of items together.
I think it's easy to do with the following modification by using metadata defined in strawberry graphql,
The problem is that there is no way to make the values defined in self.metadata visible in the query.
Is there any way to make the metadata visible in the query?
def apply_pagination(
self,
queryset: _QS,
pagination: Optional[object] = None,
) -> _QS:
self.metadata = { "total_count": queryset.count() }
return apply(pagination, queryset)
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