List org repos ordered by STARGAZERS not working


#1

Hey guys, how are you?

This query is not listing repos ordered by stargazers number:

 {
  organization(login: "tsuru") {
    repositories(first: 50, orderBy: {field: STARGAZERS, direction: DESC}) {
      nodes {
        name
        stargazers {
          totalCount
        }
      }
    }
  }
}

The results were:

{
  "name": "tsuru-dashboard",
  "stargazers": {
    "totalCount": 95
  }
},
{
  "name": "homebrew-tsuru",
  "stargazers": {
    "totalCount": 9
  }
},
{
  "name": "now",
  "stargazers": {
    "totalCount": 83
  }
}

The now repo should be listed above homebrew-tsuru? Or I’m missing something?

The docs says:

STARGAZERS

Order repositories by number of stargazers


#2

:wave: @arturfsousa ,

This def. looks like a bug to me, thanks for reporting this!

I’ve opened an internal issue and assigned to the appropriate team. We’ll let you know when we have more information!