GraphQL API returning only the first comment of review

Hi, I’m trying to build a pull request timeline using the following query.

The problem is that only the first comment for each review thread is returned.

To test this you can run this query on my repository:

https://github.com/iasemenov/testing/pull/27

With the following variables:  {"repoOwner":"iasemenov","repoName":"testing","number":27,"pageSize":100}

fragment nodeInfo on Node {
    id
}

fragment actorInfo on Actor {
    __typename
    login
    url
    avatarUrl
}

fragment userInfo on User {
    ...nodeInfo
    ...actorInfo
    name
}

fragment commentInfo on Comment {
    ...nodeInfo
    author {
        ...nodeInfo
        ...actorInfo
        ...userInfo
    }
    bodyHTML
    createdAt
}

fragment issueCommentInfo on IssueComment {
    ...commentInfo
    url
}

fragment commitHash on Commit {
    ...nodeInfo
    oid
    abbreviatedOid
}

fragment commitInfo on Commit {
    ...commitHash
    url
    author {
        name
        email
        avatarUrl
        date
    }
    messageHeadlineHTML
    messageBodyHTML
}

fragment prReviewerInfo on RequestedReviewer {
    __typename
    ... on User {
        ...userInfo
    }
}

fragment prReview on PullRequestReview {
    ...nodeInfo
    url
    author {
        ...nodeInfo
        ...actorInfo
        ...userInfo
    }
    bodyHTML
    state
    comments(first: 100) {
        nodes {
            ...prReviewCommentInfo
        }
    }
    createdAt
}

fragment prReviewCommentInfo on PullRequestReviewComment {
    __typename
    ...commentInfo
    url
    path
    commit {
        ...commitHash
    }
    position
    originalCommit {
        ...commitHash
    }
    originalPosition
    replyTo {
        ...nodeInfo
    }
}

fragment labelInfo on Label {
    ...nodeInfo
    url
    name
    color
}

fragment renamedEvent on RenamedTitleEvent {
    actor {
        ...nodeInfo
        ...actorInfo
        ...userInfo
    }
    previousTitle
    currentTitle
    createdAt
}

fragment closedEvent on ClosedEvent {
    actor {
        ...nodeInfo
        ...actorInfo
        ...userInfo
    }
    createdAt
}

fragment reopenedEvent on ReopenedEvent {
    actor {
        ...nodeInfo
        ...actorInfo
        ...userInfo
    }
    createdAt
}

fragment mergedEvent on MergedEvent {
    actor {
        ...nodeInfo
        ...actorInfo
        ...userInfo
    }
    createdAt
}

fragment assignedEvent on AssignedEvent {
    actor {
        ...nodeInfo
        ...actorInfo
        ...userInfo
    }
    createdAt
    user {
        ...userInfo
    }
}

fragment unassignedEvent on UnassignedEvent {
    actor {
        ...nodeInfo
        ...actorInfo
        ...userInfo
    }
    createdAt
    user {
        ...userInfo
    }
}

fragment labeledEvent on LabeledEvent {
    actor {
        ...nodeInfo
        ...actorInfo
        ...userInfo
    }
    createdAt
    label {
        ...labelInfo
    }
}

fragment unlabeledEvent on UnlabeledEvent {
    actor {
        ...nodeInfo
        ...actorInfo
        ...userInfo
    }
    createdAt
    label {
        ...labelInfo
    }
}

fragment reviewRequestedEvent on ReviewRequestedEvent {
    actor {
        ...nodeInfo
        ...actorInfo
        ...userInfo
    }
    createdAt
    requestedReviewer {
        ...prReviewerInfo
    }
}

fragment reviewRequestRemovedEvent on ReviewRequestRemovedEvent {
    actor {
        ...nodeInfo
        ...actorInfo
        ...userInfo
    }
    createdAt
    requestedReviewer {
        ...prReviewerInfo
    }
}

query($repoOwner: String!, $repoName: String!, $number: Int!, $pageSize: Int = 100, $cursor: String) {
    repository(owner: $repoOwner, name: $repoName) {
        pullRequest(number: $number) {
            timeline(first: $pageSize, after: $cursor) {
                pageInfo {
                    startCursor
                    hasPreviousPage
                    endCursor
                    hasNextPage
                }
                nodes {
                    __typename
                    ...commitInfo

                    ...issueCommentInfo

                    ...renamedEvent

                    ...closedEvent
                    ...reopenedEvent
                    ...mergedEvent

                    ...assignedEvent
                    ...unassignedEvent

                    ...labeledEvent
                    ...unlabeledEvent

                    ...reviewRequestedEvent
                    ...reviewRequestRemovedEvent

                    ...prReview
                }
            }
        }
    }
}

Hi @iasemenov,

Thanks for being here! AFAIK comments are basically ignored in favor of descriptions, let me do a little more digging and see if there is a way to execute this query. I’ll post back with an update soon.