Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Ground Controller Lvl 1
Message 1 of 2

How to filter issues between two dates in Github v4 GraphQL api

Hi, I am trying to run the below query to get the issues between two dates.

I am able to filter by using a since date but an `until` date is not supported. How do get the issues between two dates say 2019-08-25T00:00:00.000+05:30 and 2019-09-25T00:00:00.000+05:30?

{
  organization(login: "abc") {
    repository(name: "xyz") {
      issues(first: 100, after: null, filterBy: {since: "2019-08-25T00:00:00.000+05:30", states: OPEN}) {
        edges {
          node {
            number
            id
            reactions(first: 50, after: null, orderBy: {field: CREATED_AT, direction: DESC}) {
              edges {
                node {
                  id
                }
              }
              pageInfo {
                hasNextPage
                endCursor
              }
            }
          }
        }
        pageInfo {
          hasNextPage
          endCursor
        }
      }
    }
  }
}

1 Reply
Community Manager
Message 2 of 2

Re: How to filter issues between two dates in Github v4 GraphQL api

Since GraphQL doesn't support filtering or ordering natively in the query language, you'll have to filter the records you get back in the response using whatever language utilities you're using.

 

I hope that helps. Let us know if you have more questions.