Retrieve a set of PRs using GitHub API v4 between two dates

I’m trying to build a query that will return all PRs, that are opened or merged, and that were created between two dates (e.g. 10/1/18 to 10/31/18) using version 4 of the GitHub API. Thanks in advance!

Here is what I have so far:

{
  organization(login: "sendgrid") {
    repository(name: "sendgrid-python") {
      pullRequests(last: 50, states: [OPEN, MERGED]) {
        nodes {
          url
          createdAt
          reviews(first:10) {
            nodes {
              author {
                login
              }
            }
          }
          author {
            login
          }
          labels(first: 30) {
            edges {
              node {
                name
              }
            }
          }
        }
        pageInfo {
          endCursor
          hasNextPage
        }
      }
    }
  }
}
1 Like

Hi @thinkingserious,

Thank you for being here! Thank you for your feedback. Currently, there is no way to make that call on v4, I’ve added this information to a similar Schema Request we are tracking internally, we’ll update this thread when we have some more information.

Best,

Andrea

1 Like

Just checking in, thanks!