Skip to content
This repository was archived by the owner on Jul 8, 2023. It is now read-only.
This repository was archived by the owner on Jul 8, 2023. It is now read-only.

Getting totalCount for paginated results #190

@stoicsleuth

Description

@stoicsleuth

I am using the offset based pagination in our queries using strawberry-django-plus as stated below -

    results: List[ResultNode] = gql.django.field(
           permission_classes=[IsAuthenticated],
           pagination=True,
     )

However, this does not give us the total count of items after filters applied, which we need in order to show in our table pagination.
Is there any better way of achieving this apart from overriding gql.django.field and adding a totalCount attribute to the results?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions