Something went wrong while executing query


#1

Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include 24EE:59E7:BC2DBD:1B82903:5AC51F08 when reporting this issue.

The query looks like this:

query {
          repository(owner: $organization, name: $repo) {
            pullRequests(first:100, after:$cursor, orderBy: {field: CREATED_AT, direction: ASC}) {
              edges {
                node {
                  number
                  createdAt
                  closedAt
                  commits { 
                    totalCount
                  }
                  additions
                  deletions
                  changedFiles
                  mergedAt
                }
              }
              pageInfo {
               endCursor
               hasNextPage
              }
            }
          }
          rateLimit {
            remaining
          }
        }

This problem is not specific to one specific cursor/repo. Every time when I’m paging through the pull requests, after 15-20 pages this error might happen irregularly. However, query would be successful if I run it again with the cursor that failed.


API error when fetching repository PRs
#2

Hi @StidZhang,

One of the repositories that you’re asking for is very big, which causes the query to (sometimes) time out.

The solution here is to ask for fewer than 100 and do more pagination.