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
}
}
}
}
}
}
}
New contributor