Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 3

GraphQL resolved conversations

Solved! Go to Solution.

I'm trying to write a GraphQL query that will return to me the resolved / unresolved state of a pull request's conversation.  For example, let's say that a reviewer added three comments, and the original author resolves two of them.  How can I find out that there is 1 unresolved comment, and/or query for the list of resolved and unresolved comments?


I thought that the isMinimized flag might indicate the resolved state (since I also can't exactly find out how a "minimized" comment maps the UI), but when I run the query, I see that both resolved and unresolved comments have a false value for this flag.


So the question is: how can I find the resolved state of a pull request review comment?


Aside, what is the minimized state of a comment?


(I should note also that I haven't found an obvious surfacing of this information in the v3 REST API either, so that leads me to believe that this information is not available via the API.)



2 Replies
Copilot Lvl 2
Message 2 of 3

Re: GraphQL resolved conversations

The PullRequestReviewThread contains this information.  The following query works as an example.  I believe in your case you'd have to iterate through the results looking for isResolved = false.


query {
  repository(owner:"github", name:"github") {
    pullRequests(last: 50){
      nodes {
        reviewThreads(last:50) {
Copilot Lvl 3
Message 3 of 3

Re: GraphQL resolved conversations

Thanks, that's exactly what I was looking for!