GraphQL query Something went wrong

I’m running into weird edge cases executing queries via GraphQL. This is the error that I’m getting.

#Error Code: 826A:7828:D9D177:1F185B7:5F3FE9C9
{
  "errors": [
    {
      "message": "Something went wrong while executing your query. Please include `826A:7828:D9D177:1F185B7:5F3FE9C9` when reporting this issue."
    }
  ]
}

This is the query that is causing this behavior

#Failing query
{
  repository(owner: "fsprojects", name: "Paket") {
    name
    description
    owner {
      ... on Organization {
        name
      }
    }    
    createdAt
    primaryLanguage {
      name
    }
    languages(first: 1){
      totalCount
      edges{
        node{
          name
        }
      }
    }
    pullRequests(first: 1, states: [MERGED, CLOSED], after: "Y3Vyc29yOnYyOpHOCDKWog==") {
      totalCount
      edges {
        node {
          reviewRequests {
            totalCount
          }
          changedFiles
          reviews(first: 1) {
            totalCount
            pageInfo {
              hasNextPage
              endCursor
            }                
            edges {
              cursor
              node {
                comments(first: 1) {
                  totalCount
                  pageInfo {
                    hasNextPage
                    endCursor
                  }
                    edges {
                      node {
                        body
                        publishedAt
                        author {
                          login
                        }
                      }
                    }
                }
              }
            }
          }
          files(first: 1) {
            totalCount
            edges {
              node {
                path
              }
            }
          }
          author {
            login
          }
          participants(first: 1) {
            totalCount
          }
          mergeCommit {
            oid
          }
          headRefOid          
          deletions
          additions          
          title
          bodyText
          locked
          closedAt
          createdAt
          state
          number
          id
          authorAssociation
          milestone {
            id
            closedAt
            createdAt
            description
            dueOn
            state
            title
            updatedAt
            url
            issues {
              totalCount
            }
            creator {
              login
              url
              avatarUrl
              resourcePath
            }
          }
          commits(first: 1) {
            totalCount
            pageInfo {
              hasNextPage
              endCursor
            }
            edges {
              node {
                commit {
                  oid
                  pushedDate
                  messageBody
                  comments(first: 1) {
                    totalCount
                    edges {
                      node {
                        body
                        publishedAt
                        author {
                          login
                        }
                      }
                    }
                  }
                  author {
                    name
                    date
                    email
                    user {
                      login
                    }
                  }
                }
              }
            }
          }
          comments(first: 3) {
            totalCount
            edges {
              node {
                author {
                  login
                }
                publishedAt
                bodyText
                lastEditedAt
              }
            }
            pageInfo {
              hasNextPage
              endCursor
            }
          }
          author {
            login
            avatarUrl
            url
            ... on User {
              id
              email
              createdAt
            }
          }
        }
      }
      pageInfo {
        hasNextPage
        endCursor
      }
    }
  }
  rateLimit {
    limit
    cost
    remaining
    resetAt
  }
}

Im able to get this query to work by changing

comments(first: 3) {

to

comments(first: 2) {

Any insight on why this happens, and how we can avoid such errors in the future?

#Working query
{
  repository(owner: "fsprojects", name: "Paket") {
    name
    description
    owner {
      ... on Organization {
        name
      }
    }    
    createdAt
    primaryLanguage {
      name
    }
    languages(first: 1){
      totalCount
      edges{
        node{
          name
        }
      }
    }
    pullRequests(first: 1, states: [MERGED, CLOSED], after: "Y3Vyc29yOnYyOpHOCDKWog==") {
      totalCount
      edges {
        node {
          reviewRequests {
            totalCount
          }
          changedFiles
          reviews(first: 1) {
            totalCount
            pageInfo {
              hasNextPage
              endCursor
            }                
            edges {
              cursor
              node {
                comments(first: 1) {
                  totalCount
                  pageInfo {
                    hasNextPage
                    endCursor
                  }
                    edges {
                      node {
                        body
                        publishedAt
                        author {
                          login
                        }
                      }
                    }
                }
              }
            }
          }
          files(first: 1) {
            totalCount
            edges {
              node {
                path
              }
            }
          }
          author {
            login
          }
          participants(first: 1) {
            totalCount
          }
          mergeCommit {
            oid
          }
          headRefOid          
          deletions
          additions          
          title
          bodyText
          locked
          closedAt
          createdAt
          state
          number
          id
          authorAssociation
          milestone {
            id
            closedAt
            createdAt
            description
            dueOn
            state
            title
            updatedAt
            url
            issues {
              totalCount
            }
            creator {
              login
              url
              avatarUrl
              resourcePath
            }
          }
          commits(first: 1) {
            totalCount
            pageInfo {
              hasNextPage
              endCursor
            }
            edges {
              node {
                commit {
                  oid
                  pushedDate
                  messageBody
                  comments(first: 1) {
                    totalCount
                    edges {
                      node {
                        body
                        publishedAt
                        author {
                          login
                        }
                      }
                    }
                  }
                  author {
                    name
                    date
                    email
                    user {
                      login
                    }
                  }
                }
              }
            }
          }
          comments(first: 2) {
            totalCount
            edges {
              node {
                author {
                  login
                }
                publishedAt
                bodyText
                lastEditedAt
              }
            }
            pageInfo {
              hasNextPage
              endCursor
            }
          }
          author {
            login
            avatarUrl
            url
            ... on User {
              id
              email
              createdAt
            }
          }
        }
      }
      pageInfo {
        hasNextPage
        endCursor
      }
    }
  }
  rateLimit {
    limit
    cost
    remaining
    resetAt
  }
}
1 Like