-
Notifications
You must be signed in to change notification settings - Fork 830
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
Cursor pagination profile: Link for next page in case of truncated range #1635
Comments
Hi @jelhan (and Dan!), I've obviously been absent from JSON:API for a while — life intervened To @jelhan's specific question, though, my intention was to specify option (1). That seems more useful to me -- otherwise, the truncated data would be totally inaccessible, right? -- but, if I'm missing something and (2) would be better for some reason, I'm very open to hearing the use case. |
Pushing your fixes upstream sounds great. The status of the profile is currently somehow unclear. See #1527 But I think regardless if it is considered an official profile or community profile, I think it makes sense to improve it. Happy to review merge requests related to it.
I think it would be still accessible. But the next page may not be within the original range anymore. Thinking more about it, I'm wondering if selecting a range using pagination is actually a correct pattern. It seems to overlap more with filtering than with pagination:
I would tend towards dropping support for using both |
The cursor pagination profile allows clients to combine both
page[after]
andpage[before]
to request all resources in between both cursors. These are called range pagination requests.The requested range may exceed the used page size. In that case the server returns with a truncated range.
This does not explicitly define what should be represented by the
next
link. There seems to be at least two options what thenext
link may represent in this case:The examples included in the profile, do not include
page[before]
in thenext
link. That seems to indicate that the profile intended to specify the second option. But I think it should be clarified.Pinging @ethanresnick as he wrote that profile initially. Not sure if it is still owned / maintained by him or by page editors. The status of that profile is unclear to me. See also #1527 in that regard.
The text was updated successfully, but these errors were encountered: