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

GraphQL Open Pull Requests Only

Solved! Go to Solution.

Hi,

 

I'm a little new to graphQL I'm trying to pull all open pull requests for a specific repo, but I'm not sure how I can change my query below to only get open pull requests, if that's even possible. 

 

My query is as follows;

 

{
    repository(owner: "midnite81", name:"midnite.uk"){
        url
        pullRequests(last:100){
            nodes {
                number
                url
                state
                author {
                    avatarUrl
                    login
                    resourcePath
                    url
                }
                reviews(last:100) {
                    nodes {
                        author {
                            login
                        }
                        state
                    }
                }
            }
        }
    }
}

Any advice would be welcome. Thanks.

1 Reply
Highlighted
Solution
Ground Controller Lvl 1
Message 2 of 2

Re: GraphQL Open Pull Requests Only

Ah! Never mind - I fell upon the answer

 

I've changed it to

pullRequests(last:100, state: OPEN)