I’m sorry to hear you’re having trouble getting started with our GraphQL API - this is feedback that we hear often, and something that we want to improve. In the long run, we’re hoping that the documentation around our GraphQL setup will be so good that it’s easier to get started compared to v3! Unfortunately, REST got a bit of a head start, and we’re still playing some catch-up on the GraphQL side.
Regarding the question here, I think our GraphQL API is in a place to answer some of those questions, but maybe not all of them.
If you’re looking at an individual Repository, you can use
PullRequestConnection) to get a list of Pull Requests for that repository. That connection allows you to filter by certain things, such as states, labels and
Once you get to the list of
PullRequest objects, you can get various fields: https://developer.github.com/v4/reference/object/pullrequest/ and connections to commits and other data.
You can also use the GitHub Search via GraphQL, which allows you to use the same search criteria that you would use on github.com. Documentation for that can be found under the
search connection here: https://developer.github.com/v4/reference/query/. This may allow you more fine-grained filtering by branch name and other factors.
I hope this has been at least a bit helpful! If there’s anything in particular that I missed, please follow up and I or somebody else will do our best to help. If you find anything missing in the various objects I’ve linked to, let me know and I’ll record it as an official schema request.