Relaxing pagination limits


#1

Hi there!

I have a few GraphQL use cases where I’m querying collections of collections. For example, I’m grabbing all the branches for all the repositories in order to figure out which repositories are deployable, or I’m grabbing all the pull requests for an organization and displaying them in chat. In both of these cases, it’s hard to predict whether a specific query will fall within the current 30 item limit.

I tried to figure out a way to construct a GraphQL query to retrieve this data. You can request data with multiple cursors, but it’s not obvious how you could actually use those cursors to build a single structure. I think you’d have to get a collection, grab all its IDs, and then query each items collections individually (basically using the same number of requests as the REST API).

Could you relax the pagination limits and/or remove them for Github Enterprise customers? That would result in much simpler client code for me.

Thanks!

  • Morgan

#2

Hey Morgan!

For now, we’re planning to keep the limits relatively low to protect our underlying infrastructure while we’re in Early Access. As we get more confident, we’ll take a look at the limits we chose and see if we can’t raise them. At this point, though, the best way is to do what you said: make the request for 30, get the cursor, and make another request.