Query for existing objects using a smaller packet size
This should fix the second biggest contributor to #1280 (closed).
Test Plan
loading a new repository with some pull requests shows the query being split up
Migrated from D554 (view on Phabricator)