graphql-python / graphql-python/graphene-django

Page No base pagination djangoFilterConnectField

Open
#1,297 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4.4k
Forks
760
PR merge metrics
No merged PRs in 30d

Description

i am consfused a lot about the implementation of page no based pagination in grahene_django and relay .
the default implementation cursor based which works well for infinite scroll but i need to implement traditional page no base .

i have tried creating a custom pagination field on the connection as
`
class CountableConnectionBase(relay.Connection):
class Meta:
abstract = True

pagination = graphene.Field(PaginationType, n=graphene.Int())

def resolve_pagination(self, info, *args, **kwargs):

print(self.page_info.__dir__(), kwargs, args, info)
`

but the kwargs is empty and has no atributes like offset ,first .

i think i am doing it wrong . there might be a better solution . but documention is very sparse and doesnt provide abd clue about implemting it

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.