Is there any quick way to get comment count of all open pull request

I have a requirement to find count of comments in all open pull request of a repository

Only way i know is to get all open pull request from a repo and iterate each pull request and perform call like this

GET /repos/:owner/:repo/pulls/:pull_number/comments

and sum up those responses, But it is too costly

I also tried with this method ( Find review comments on all PR in a repo)

GET /repos/:owner/:repo/pulls/comments

and passed state = open as query param like this

But it returns review comments of all pull requests

Any efforts will be appreciated

this should get you started

  search(query: "repo:angular/angular is:pr is:open", type: ISSUE, first: 100) {
    edges {
      node {
        ... on PullRequest {
          timelineItems(itemTypes: ISSUE_COMMENT, first:100){