Skip to content

Navigation Menu

Sign in
Sign up

Rename pagination input #2724

buddhikasranasinghe started this conversation in Ideas
Discussion options

In the pagination directive, to define how many rows should be displayed per page, we need to pass a value via the 'first' parameter. This parameter name doesn't actually convey its intended meaning. I suggest that 'limit' or 'take' would be better alternatives.

type Query {
 posts(
 "Limits number of fetched items."
 first: Int! # limit or take instead of first 
 "The offset from which items are returned."
 page: Int
 ): PostPaginator
}
You must be logged in to vote

Replies: 1 comment

Comment options

It just reflects the GraphQL documentation, which suggests a more cursor-like approach: https://graphql.org/learn/pagination/

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /