Repository Milestone Request in v4 GraphQL API

In the [V3 API](GET /repos/:owner/:repo/milestones) it is possible to do the following request:

GET /repos/:owner/:repo/milestones

On this endpoint, you can then perform filters on the milestones based on a provided parameters e.g. state = open , closed  or all.

What is the equivalent of this in the V4 GraphQL API i.e. retrieving only OPEN milestones on a repository?

UPDATE

After some further research, this isn’t possible yet but it will be possible after changes are made following this schema request raised in the platform community in November 2017.

1 Like

Hi @danjford Thanks for being here!

This particular question might actually be better served in our Platform Community:

https://platform.github.community/

That forum is full of people who are experts on the GraphQL API and this question might actually already be answered there. I’d highly recommend giving that a shot if you don’t see an answer come in via this forum soon. 

1 Like

Thanks, I have opened the issue there instead.

https://platform.github.community/t/repository-filtered-milestone-request/4569

1 Like

https://github.community/t5/GitHub-API-Development-and/Retrieve-open-milestones-for-a-repo/m-p/19817/thread-id/1009/highlight/false#M1010

This worked for me!