It would be incredibly handy if the API had a new field which returns the number of pages to expect based on the value in the limit parameter.
For example:
Currently I can issue a query like this:
query Boards {
boards(ids: 1234567890) {
items_page(limit: 50) {
cursor
items {
id
name
column_values {
text
column {
title
}
}
}
}
}
}
The cursor value will be returned in the cursor field and I have specified a limit of 50 records in the page.
query Boards {
boards(ids: 1234567890) {
items_page(limit: 50) {
cursor
cursor_pages
items {
id
name
column_values {
text
column {
title
}
}
}
}
}
}
I am proposing a new field called cursor_pages which would return the number of pages based on the value of the limit parameter. So if my board has 1200 rows and I have set my limit at 50 rows then cursor_pages would return 24.
This would help with looping logic (specially in Power BI) so that the the loop can be fed the number of times to call next_items_page.