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

[Bug] API V4(GraphQL): Unable to reply to comments of already submitted PR reviews.

Hello forum,

I want to use the GraphQL API to reply to a pull request review comment.

It is possible if the status of the review is PENDING, when the status of the review is SUBMITTED, it is not.
When I try it over the UI, everything works fine.

 

Here is my mutation request:

 

mutation {
  addPullRequestReviewComment(
    input: {
      pullRequestReviewId: $pullRequestReviewId, 
      inReplyTo: $commentToReplyTo, 
      body: "test comment"
    }) {
        clientMutationId
        comment{
          body
     }
  }
}

 

This is the response I get:

 

{
  "data": {
    "addPullRequestReviewComment": null
  },
  "errors": [
    {
      "type": "VALIDATION",
      "path": [
        "addPullRequestReviewComment"
      ],
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "message": "Review has already been submitted."
    }
  ]
}

 

 

I hope someone can help me, thank you.

 

4 Replies
Community Manager
Message 2 of 5

Re: [Bug] API V4(GraphQL): Unable to reply to comments of already submitted PR reviews.

Hi @LionelLindt,

 

Thanks for being here! I'm able to update a submitted comment by using the `query FindReview` and `mutation UpdateReview`, here is my sample query:

 

query FindReview {
  repository(owner: "andreagriffiths11", name: "graphql-test") {
    pullRequest(number: 1) {
      reviews(first: 100) {
        edges {
          node {
            id
          }
        }
      }
    }
  }
}

mutation UpdateReview {
  updatePullRequestReview(input: {pullRequestReviewId: "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3MjI2MzYxNTA3", body: "New comment"}) {
    pullRequestReview {
      updatedAt
    }
  }
}

I hope this helps!

Thanks for being here, sharing, and keeping our community awesome!
Best,
AndreaG

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

Copilot Lvl 3
Message 3 of 5

Re: [Bug] API V4(GraphQL): Unable to reply to comments of already submitted PR reviews.

Hi @AndreaGriffiths11,

Thank you for your answer! 
Maybe I did not explain my situation clear enough. My goal is not to update a submitted PR-review comment, but to reply to one.

I hope this clarifies my problem 🙂

Community Manager
Message 4 of 5

Re: [Bug] API V4(GraphQL): Unable to reply to comments of already submitted PR reviews.

Hey @LionelLindt ,

 

Thanks for the clarification, the same method it would post a reply to the PR. Does that make sense?

Thanks for being here, sharing, and keeping our community awesome!
Best,
AndreaG

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

Copilot Lvl 3
Message 5 of 5

Re: [Bug] API V4(GraphQL): Unable to reply to comments of already submitted PR reviews.

Hey @AndreaGriffiths11,

I have tried your query but I was really not able to reply to another review comment. 😕

The image below should demonstrate and example of what I am trying to accomplish. I want to reply to another review comment, just like dhh did. And the red arrow marks, where it is possible to do over the gui.

Screenshot 2019-04-26 at 14.41.05.png