I'm wrestling with Github's graphql api (while learning graphql) trying to get it to list all issues in a certain milestone. I can't figure out how to do that from the API docs.
I can query issues and see what milestone they're in (sorry, names redacted):
query {
repository(owner:"me", name:"repo") {
issues(last:10) {
nodes {
milestone {
id
title
}
}
}
}
}
I wish there was a way to say something like issues(milestoneID:"xyz")
, or perhaps if Issue would define a MilestoneConnection
(doesn't appear to exist).
In my reading / learning about GraphQL thus far, I haven't found a way to build arbitrary filters of fields if an explicit parameter is not defined in the schema (am I right about that?).
I guess I can query all of issues in the repository and post-process the JSON response to filter out the milestone I want, but is there a better way to do this with github + graphql?