-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
Analog for more? field for Keyset pagination, but for backward direction #334
Comments
Actually, I think you are correct. Given that |
|
However, it will only be "wrong" in the very rare case that the thing you are asking for has been removed i.e |
with #255 issue resolved actually we can detect this case, because we will look up the record before doing the rest of the request. If it isn't there then we'll know and be able to say that there isn't a previous page. |
Alright, so my plan is to fix this after #255 and to make "fetch" style (where we look up the record by its primary key keyset and load any relevant aggregates/calculations) the only method. |
Alright, I think perhaps this is all that is left to get ash-project/ash_graphql#36 going? |
Actually, I didn't get how |
🤔 I've just realized two things.
|
i.e flip |
I think for now, the relay specification required for |
Is your feature request related to a problem? Please describe.
GraphQL Relay specification has 2 fields to describe cursor position:
hasNextPage
andhasPreviousPage
. First returnstrue
if there is a next page, second returnstrue
if there is a previous page.Ash.Page.Keyset
have implementation only for the first field (it is calledmore?
), but not for the second one.Describe the solution you'd like
Add another field to Keyset record which will behave in a similar way with
more?
, but for the backward paginagion direction.Describe alternatives you've considered
But it is possible that it's working only because of some issue (like #333), or can break on the some set of conditions
Express the feature either with a change to resource syntax, or with a change to the resource interface
For example
Additional context
Discussion of ash-project/ash_graphql#36
The text was updated successfully, but these errors were encountered: