Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 1 of 2

Inconsistency of empty state filter between Repository.issues and Repository.pullRequests fields

Solved! Go to Solution.

I've run into this minor inconsistency in the GitHub GraphQL API v4. Consider the following query:

 

query {
  repository(owner:"octocat", name:"Hello-World") {
    allIssues: issues {
      totalCount
    }
    allPRs: pullRequests {
      totalCount
    }
    issues (states:[]) {
      totalCount
    }
    pullRequests (states:[]) {
      totalCount
    }
  }
}

 

{
  "data": {
    "repository": {
      "allIssues": {
        "totalCount": 250
      },
      "allPRs": {
        "totalCount": 249
      },
      "issues": {
        "totalCount": 0
      },
      "pullRequests": {
        "totalCount": 249
      }
    }
  }
}

 

Notice that states:[] filters out all issues, but includes all PRs.

 

This is a minor inconsistency. It'd be better if providing states:[] had the same effect on issues and PRs.

1 Reply
Solution
Community Manager
Message 2 of 2

Re: Inconsistency of empty state filter between Repository.issues and Repository.pullRequests fields

Hi @dmitshur,

 

Thanks for this feedback! We're always working to improve GitHub and the GitHub Community Forum, and we consider every suggestion we receive. I've logged your feature request in our internal feature request list. Though I can't guarantee anything or share a timeline for this, I can tell you that it's been shared with the appropriate teams for consideration.

 

Please let me know if you have any other questions.

Cheers!


Best,
AndreaG

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!