We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a00f2d2 commit 7040ffaCopy full SHA for 7040ffa
api/schema/usecase_schema.py
@@ -150,7 +150,14 @@ def published_use_cases(
150
151
# Apply pagination
152
if pagination is not strawberry.UNSET:
153
- queryset = strawberry_django.pagination.apply(pagination, queryset)
+ # Get the offset and limit from pagination
154
+ offset = getattr(pagination, "offset", 0) or 0
155
+ limit = getattr(pagination, "limit", None)
156
+
157
+ if limit is not None:
158
+ queryset = queryset[offset : offset + limit]
159
+ elif offset > 0:
160
+ queryset = queryset[offset:]
161
162
return TypeUseCase.from_django_list(queryset)
163
0 commit comments