-
Notifications
You must be signed in to change notification settings - Fork 320
Document behavior when both first
and last
are specified for pagination
#1055
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
Comments
I'm not aware of such practices. Can you explain and point us to existing resources about this?
Also in the PageInfo section:
I think we could indeed reject this combination entirely because supporting this can only lead to strange results and inefficient data fetching for database engines. I'll discuss that with the rest of the team. |
@cocet33000 we've discussed this. Indeed if we find We are okay to document this choice, but could you clarify what you are referring to by common GraphQL practices? The spec does not suggest the request should be rejected, but only that clients shouldn't do this. It would be good to hear also how you came across this and how it worked out from a user perspective. |
Thank you so much for your prompt response. https://relay.dev/graphql/connections.htm#sec-Pagination-algorithm Personally, I would.
is also a good idea. I support it. Please consider this. |
Thanks for the additional feedback. We have considered it, but prefer more lenient handling, which works in more cases, unless of course there is a good reason to reject, and so far I don't see any. If the client has specified |
first
and last
are specified for pagination
Thanks!! May I ask another question? I will create a new question if needed. The relay specification states the following.
It is also stated that “Object” is defined in the “Type System” section of the GraphQL specification. In fact, the framework already creates a Connection with edge and pageInfo according to the specification. I would like to add totalCount fields as in this example, can I extend an existing Connection to use it? I would like to know if you have such a method or idea. Thank you for your thoughtful response to my immature question. |
@cocet33000 please review #920 on the topic of having a |
Hello! I have a question about GraphQL cursor-based pagination.
Current situation
Request
※ T18z (O_3), T185 (O_9)
ScrollSubrange Object at Controller
Implicitly first and afeter values are selected
Issues
What I've checked
I've looked through official docs, source code, and forums, but found no explanation of this behavior. If I've missed any information, please let me know!
Suggestions
Points for discussion
I'd love to hear your thoughts and ideas!
The text was updated successfully, but these errors were encountered: