"Something went wrong" when ordering Pull Requests by UPDATED_AT, DESC

I’m listing pull requests along with some related information contained in TimelineItems. It works fine when requesting normally, but when adding orderBy:{field: UPDATED_AT, direction:DESC} , I get this error: 

{
  "errors": [
    {
      "message": "Something went wrong while executing your query. Please include `EA9E:7DC3:3EE2A2:97BB75:5CB6189E` when reporting this issue."
    }
  ]
}

I’ve included a reproduction case using facebook/react, which consistently fails. Removing the orderBy argument makes the call succeed.

query Github_PullRequests($name: String!, $owner: String!) {
  rateLimit {
    limit
    cost
    remaining
    resetAt
  }
  repository(owner: $owner, name: $name) {
    name
    pullRequests(first: 10, orderBy:{field: UPDATED_AT, direction:DESC}) {
      nodes {
        url
        number
        title
        body
        state
        headRefOid
        baseRefOid
        createdAt
        closedAt
        timelineItems(first: 50) {
          updatedAt
          nodes {
            __typename
						... on IssueComment{
              id
              body
							createdAt
            }
            ... on PullRequestCommit{
              id
              commit{
                oid
                message
              }
            }
            ... on PullRequestReview{
              id
              body
              state
              author{
                ... on User{
                  email
                }
              }
              comments(first:50){
                nodes{
                  id
                  body
                  author{...on User {email}}
                }
                pageInfo { endCursor }
              }

            }
          }
        }
      }
      pageInfo {
        hasNextPage
        endCursor
      }
      totalCount
    }
  }
}

vars:

{"owner": "facebook", "name": "react"}

Thanks for reaching out.

My apologies for not responding sooner. It looks like this problem has been fixed in the intervening time.

Let us know if you have more questions though!

Hi, thanks for the reply but unfortunately the repro case I provided (with facebook/react) still shows the same behaviour - failing when

orderBy:{field: UPDATED_AT, direction:DESC}

 is provided but succeeding when it’s omitted.

Hmmmmm … I’m not sure what it was I did now :man_facepalming:

I noticed that omitting the entire orderBy parameter causes the query to work, but also specifying direction: ASC allows the query to work as well. I’ll pass it to the developers and see what they say.

1 Like

Thanks again for the report. It does appear to be a bug and I’ve passed along all the information to the developers. Unfortunately, I can’t make any promises on when it will be addressed, but the right people have the ball :grinning:

Thanks very much for following up!