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

v4 GraphQL API - filter by nested field (repos by PR status)

(GraphQL newbie alert)

Trying to query the API (v4) for all repos which contain open PRs.

I try this, but explorer doesn't like it:

{
  organization(login: "my login") {
    id
    repositories(first: 100, pullRequests_states: OPEN) {
      totalCount
      edges {
        node {
          pullRequests(first: 100, states: OPEN) {          
            nodes {
              title
              state
            }
          }
        }
      }
    }
  }
}

error states that Field 'repositories' doesn't accept argument 'pullRequests_states'.

 

I thought filtering by nested fields was a standard part of GraphQL querying?