GraphQL Open Pull Requests Only

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.

Ah! Never mind - I fell upon the answer

I’ve changed it to

pullRequests(last:100, state: OPEN)