I am attempting to use GitHub's GraphQL interface to query for the number of PR's reviewed within a GitHub repo during a specific month.
Ideally, I would like to only pull comments and reviews that took place within a specific time frame. Ultimately, I would like to group my results on a user by user basis.
userA 10 reviews during month
userB 6 reviews during month
userC 4 reviews during month
Here is the query that I have created so far.
{
repository(owner: "DSpace", name: "DSpace") {
pullRequests(last: 50) {
nodes {
state
resourcePath
comments (last: 100) {
nodes {
author {
login
}
}
}
reviews(last: 100) {
nodes {
state
author {
login
}
}
}
}
}
}
}
I suspect that I will need to iterate over all pull requests and then filter reviews/comments that fall within a specific date range.
When I look at the GitHub GraphDB schema, the "reviews" and "comments" objects do not seem to be filterable by date. I see that the available filters are first, last, author, and state. Is there some way to express such a filter in the GraphDB query language?
I see that GraphQL provides a way to filter by boolean properties with @include and @skip. Is there a way to pass expressions to these constructs?