kowainik / github-graphql

🕸️ GraphQL bindings to GitHub API
https://kowainik.github.io/projects/github-graphql
Mozilla Public License 2.0
7 stars 0 forks source link

Add `OrderNumber` constructor to `OrderField` #33

Closed chshersh closed 3 years ago

chshersh commented 3 years ago

So we can fetch the latest milestone using the following query:

query { 
  repository(owner: "kowainik", name: "hit-on") {
    milestones(last: 1, orderBy: {field: NUMBER, direction: DESC}) {
      nodes {
        title
      }
    }
  }
}
chshersh commented 3 years ago

Currently we have only IssueOrderField. But, I think, PRs and Milestones can have different fields...

https://github.com/kowainik/github-graphql/blob/5ffa6fc31631bc0e2f9b5b071e340cb49002c009/src/GitHub/GraphQL.hs#L253-L260