So I have the following block of code that returns me list of PR with their mergeability status such as ‘MERGEABLE’, ‘CONFLICTING’, etc. I want to understand if there is anyway to filter inline by mergeablestate. I can filter the result obtained after this using js or anything else. I wanted to understand for any way to do it directly in graphql script. Looked up the docs could not find a way
{
repository(owner: "fireship-io", name: "git-sticker") {
pullRequests(first: 1, states: [OPEN]) {
nodes {
id
number
changedFiles
deletions
mergeable
author {
url
}
}
}
}
}
I tried
pullRequests(first: 1, states: [OPEN], mergeable: [MERGEABLE))
But got an error saying mergeable is not a valid argument for pullRequests.