-
Hi all, I want to generate the pagination and edges in the schema. Is there any place in the documentation about how to use it? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello @ovu! GraphQL does not provide details on how to implement your schema. It just provides the tools to describe what inputs you accept as part of your API, the response you return, and allows clients to select what parts of the response they want. This means there is no paging in the language itself and would just be up to you to implement it however you want. If you wanted to follow that pattern you have linked you could declare a function like so: class Hero(val name: String) {
fun friends(first: Int?, after: Int?): List<Hero> {
// Your logic to call your other APIs or DB with inputs
}
} |
Beta Was this translation helpful? Give feedback.
Hello @ovu!
GraphQL does not provide details on how to implement your schema. It just provides the tools to describe what inputs you accept as part of your API, the response you return, and allows clients to select what parts of the response they want. This means there is no paging in the language itself and would just be up to you to implement it however you want.
If you wanted to follow that pattern you have linked you could declare a function like so: