Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doubt about pagination and sorting in GraphQL #22

Open
eamigo86 opened this issue May 12, 2022 · 2 comments
Open

Doubt about pagination and sorting in GraphQL #22

eamigo86 opened this issue May 12, 2022 · 2 comments

Comments

@eamigo86
Copy link

Hi, I've been looking for an example in the doc on how to paginate and/or order the results through graphql but I can't find anything. Could you show a small illustrative example of how to do it?

Thanks

@PaulGilmartin
Copy link
Owner

Hi @eamigo86 !

Thanks for raising this. Currently, graph_wrap does not support ordering/pagination when based off of a DRF API. It does so for an tastypie based API, but I assume you are not using tastypie.

I am however working on graph_wrap v1.0.0 right now. The main "theme" of the new version is to add better support for django generic filtering. Since ordering/pagination is sort of on the lines of filtering, I think it would be a great thing to add in to the v 1.0.0 release.

Can you tell me a little more about what kind of pagination/ordering your DRF API uses? Is it for example https://www.django-rest-framework.org/api-guide/filtering/#orderingfilter?

@eamigo86
Copy link
Author

Hi @PaulGilmartin, thanks for the quick response.

Usualmente uso la paginación basada en los parámetros Limit y Offset, aunque las otras implementaciones de paginación (incluyendo las basadas en cursores) son ampliamente utilizadas. Y en cuanto al Ordering, es el mismo que comentas, el OrderingFilter que viene en DRF.

Kind regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants