Closed
Description
Hello! I have a question about GraphQL cursor-based pagination.
Current situation
- When both first and last are specified, first seems to take priority
- This behavior isn't documented anywhere (?)
Request
query {
items(
first: 6
after: "T18z"
last: 2
before: "T185"
){
edges {
node {
id
}
}
}
}
※ T18z (O_3), T185 (O_9)
ScrollSubrange Object at Controller
Implicitly first and afeter values are selected
Issues
- Potential confusion for client
- May lead to unintended results
- Differs from common GraphQL practices
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
- Prohibit simultaneous use
- Clearly document the behavior
- Implement a warning system
Points for discussion
- Is this behavior intentional?
- Should we align with common GraphQL practices?
- What would be the impact of changing this?
I'd love to hear your thoughts and ideas!