alan-turing-institute / WimbledonPlanner

Project planning for REG
MIT License
0 stars 0 forks source link

Speed up GitHub API queries #89

Closed jack89roberts closed 3 years ago

jack89roberts commented 3 years ago

At the moment make 1 request per project issue (2 if top comment has no emoji reactions). This dominates the update time currently (takes ~3 minutes on my laptop). See here for a better approach (query multiple issues in one request by using aliases, build request with python): https://stackoverflow.com/a/64267839/12336896

E.g. this is a valid request:

{
  repository(owner:"alan-turing-institute", name:"Hut23") {
    issue1: issue(number:534) {
          number
          title
          url

          reactionGroups {
            content
            users(first:5) {
                edges {
                    node {
                        login
                        name
                    }
                }
            }
            }
    }
    issue2: issue(number:768) {
          number
          title
          url

          reactionGroups {
            content
            users(first:5) {
                edges {
                    node {
                        login
                        name
                    }
                }
            }
            }
    }
  }
}
jack89roberts commented 3 years ago

fixed by #91