Support for cursor based pagination
See original GitHub issueHi,
how can I use cursor based pagination (page=page, per_page=…) with your library ? I can’t modify the mongo request using something like this:
def resolve_users(self, info):
return list(UserModel.objects.find({...}).sort(...).limit(limit))
because then I get 'QuerySet' object has no attribute 'find'
Please provide information regarding this functionality or implement this feature.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8
Top Results From Across the Web
Evolving API Pagination at Slack
Cursor -based pagination works by returning a pointer to a specific item in the dataset. On subsequent requests, the server returns results after...
Read more >Cursor-based pagination - Apollo GraphQL Docs
Relay-style cursor pagination. The InMemoryCache field policy API allows for any conceivable style of pagination, even though some of the simpler approaches ...
Read more >How to Implement Cursor Pagination Like a Pro - Medium
If offset pagination is an array, then cursor pagination is a linked list. Where offset grabs records based on where they are located...
Read more >Secret scanning's REST API endpoints now support cursor ...
GitHub Advanced Security customers can now use cursors to paginate over alert results they retrieve via the repository and organization level ...
Read more >A deep dive into cursor-based pagination in MongoDB
Instead of skipping results to move across pages, cursor-based pagination lets us use a record as a pointer (this is called the cursor)...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, thank you very much, you really helped me a lot. I think I can close this issue now. 😉
I don’t have a great answer for you for flask / 404s; typically in GraphQL rather than setting a HTTP response code you’ll populate the errors dict, and I’d imagine the flask mutations wouldn’t be so far from the other examples.
For sorting, you can use
order_by
to sort:good luck!