How to get number of items/pages for pagination?

Hey

Is there an API call that tells you how many items there would be in a particular query?

For example I want to run a simple script to pull all items from a particular board, I have it paginated and embedded in a loop, how do I know how many pages I need to loop through?

query test{
  boards(ids: 000000000) {
    items(limit: 25 page: 1) {
      name
      column_values {
	     title
        text
      }
    }
  }
}

Thanks

1 Like