1

I'm attempting to use the GitHub GraphQL API to query filtered items in ProjectV2 based on their state. Here's what I have so far, but I'd like to filter items in Issues or Pull Requests with a state of CLOSED or MERGED, or based on their milestone. Any help would be greatly appreciated.

query getProject($projectOwnerName: String!, $projectNumber: Int!) {
                organization(login: $projectOwnerName) {
                    projectV2(number: $projectNumber) {
                        items(first:10) {
                            pageInfo {
                                endCursor
                                hasNextPage
                                hasPreviousPage
                                startCursor
                            }
                            totalCount
                            nodes {
                                content {
                                    ... on Issue {
                                        title
                                        url
                                        state
                                    }
                                    ... on PullRequest {
                                        title
                                        url
                                        state
                                    }
                                }
                            }
                        }
                    }
                }
            }

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.