-
Notifications
You must be signed in to change notification settings - Fork 58
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
Allow the use of database offsets when getting connections #20
Comments
There is an issue as a lot of databases doesn't support the backward pagination. The simplest solution would be to sort the results backward before applying the limit/offset. |
hi @solher thanks for taking your time to look into this project, appreciate it very much 👍🏻
So the example solution you gave seems about right and it would address your issue, except that current
The missing piece is actually
I can't personally commit when these changes would be made available but PRs are greatly welcomed! Hope this answers your question! TODO:
|
I'm going to work on it ;) |
Currently the
relay.ConnectionFromArray(data, args)
method only allows "software" offsets/cursor.If the client asks for the first two elements, we potentially query 10000 documents from the database before throwing away the 9998 we don't want.
It would be a good feature to allow the use of database offset methods like
LIMIT
andOFFSET
in SQL.Something like that:
The text was updated successfully, but these errors were encountered: