torchbox / wagtail-grapple

A Wagtail app that makes building GraphQL endpoints a breeze!
https://wagtail-grapple.readthedocs.io/en/latest/
Other
151 stars 57 forks source link

It's not always clear the some results are paginated. #383

Open dopry opened 4 months ago

dopry commented 4 months ago

When querying sites { pages {} } grapple enforces a hard limit on the number of responses returned. When you get a response there is not indication that there are more pages to be fetched or that there was a default limit applied. I feel like we should update these interfaces to have some indication of total count, etc.

zerolab commented 4 months ago

For ref: https://graphql.org/learn/pagination/, even though it is aimed at cursor pagination. Something like


{
  pages {}
  pagesInfo {
    total: 123
    page: 1,
    hasNextPage: true,
    perPage: 20
  }
}
``