sapling icon indicating copy to clipboard operation
sapling copied to clipboard

ISL: gh: Field 'mergeQueueEntry' doesn't exist on type 'PullRequest'

Open xEtherealx opened this issue 1 year ago • 5 comments
trafficstars

I'm seeing the error gh: Field 'mergeQueueEntry' doesn't exist on type 'PullRequest' when viewing ISL.

I think this is because my enterprise GH version (3.10) doesn't support this field, as it looks to be introduced in 3.12. I saw similar issues filed to the GH pull requests extension, and they worked around it somehow -- I'm guessing by using different/legacy query fields.

Failed to fetch Diffs
Command failed with exit code 1: gh api graphql -f searchQuery=repo:... is:pr author:@me -F numToFetch=50 --hostname github.robot.car -f query= query YourPullRequestsQuery($searchQuery: String!, $numToFetch: Int!) { search(query: $searchQuery, type: ISSUE, first: $numToFetch) { nodes { ... on PullRequest { __typename number title body state isDraft url reviewDecision comments { totalCount } mergeQueueEntry { estimatedTimeToMerge } commits(last: 1) { nodes { commit { statusCheckRollup { state } } } } } } } } gh: Field 'mergeQueueEntry' doesn't exist on type 'PullRequest' {"errors":[{"path":["query YourPullRequestsQuery","search","nodes","... on PullRequest","mergeQueueEntry"],"extensions":{"code":"undefinedField","typeName":"PullRequest","fieldName":"mergeQueueEntry"},"locations":[{"line":17,"column":9}],"message":"Field 'mergeQueueEntry' doesn't exist on type 'PullRequest'"}]}
Error: Command failed with exit code 1: gh api graphql -f searchQuery=repo:... is:pr author:@me -F numToFetch=50 --hostname github.robot.car -f query=
    query YourPullRequestsQuery($searchQuery: String!, $numToFetch: Int!) {
  search(query: $searchQuery, type: ISSUE, first: $numToFetch) {
    nodes {
      ... on PullRequest {
        __typename
        number
        title
        body
        state
        isDraft
        url
        reviewDecision
        comments {
          totalCount
        }
        mergeQueueEntry {
          estimatedTimeToMerge
        }
        commits(last: 1) {
          nodes {
            commit {
              statusCheckRollup {
                state
              }
            }
          }
        }
      }
    }
  }
}
    
gh: Field 'mergeQueueEntry' doesn't exist on type 'PullRequest'
{"errors":[{"path":["query YourPullRequestsQuery","search","nodes","... on PullRequest","mergeQueueEntry"],"extensions":{"code":"undefinedField","typeName":"PullRequest","fieldName":"mergeQueueEntry"},"locations":[{"line":17,"column":9}],"message":"Field 'mergeQueueEntry' doesn't exist on type 'PullRequest'"}]}
    at makeError (/home/russ.brennan/.vscode-server/extensions/node_modules/execa/lib/error.js:60:11)
    at /home/russ.brennan/.vscode-server/extensions/node_modules/execa/index.js:118:26
    at process.stdout (node:internal/process/task_queues:95:5)
    at allSummaries (/home/russ.brennan/.vscode-server/extensions/isl-server/src/github/queryGraphQL.ts:42:12)
    at /home/russ.brennan/.vscode-server/extensions/isl-server/src/github/githubCodeReviewProvider.ts:78:15

xEtherealx avatar Jun 19 '24 21:06 xEtherealx

I’m seeing this as well.

skrud avatar Jun 26 '24 01:06 skrud

+1 I am seeing in on GHE3.7 and 3.9. Could we please have a workaround if not able to upgrading GHE version?

luyiyang16 avatar Jul 05 '24 17:07 luyiyang16

I'm also seeing this, and it's not possible for me to upgrade GHE.

zhuhan1 avatar Jul 24 '24 19:07 zhuhan1

Same issue as https://github.com/facebook/sapling/issues/830. I can try and contribute a fix for this

alex-statsig avatar Jul 25 '24 04:07 alex-statsig

The attached PR is now in sapling-scm VS Code extension version 0.1.54 release, please let me know if this fix works for folks using GHE affected by this!

evangrayk avatar Jul 25 '24 19:07 evangrayk