GraphQL sorting search results

I am trying to send search query with following parameters

query {
 search(type: USER, query:"language:swift sort:login-asc", first: 100) {
  edges {
    node {
      ... on User {
        avatarUrl
        login
        name
        url
      }
    }
  }
}
}

The sort:login-asc part seems like no effect. If I change sort field to sort:followers-desc its working. 

V4 API doesn’t support sorting search result by name or login?

2 Likes

The GraphQL search connection is a wrapper around GitHub’s standard search functionality. Because of this, you’re only going to get the same kinds of functionality you can find searching through the web UI:

I hope that helps!

3 Likes

I would be incredibly helpful if one could orderby/sort search connections by fields (e.g., createdAt).

1 Like

Thank you.  I was also trying to find what could be used in a search.

1 Like

Could we have that a as a feature request? Being able to sort repostories through the search functionality by when they were created.