[Bug] API V4(GraphQL): topRepositories on specific User includes my own repositories

Hi Community,

I found a little bug. This query returns not only repositories Yehuda Katz contributed to but also my own repositories which Yehuda, unfortunately, didn’t any contributions.

Thank you

{
  rateLimit {
    cost
    resetAt
    remaining
  }
  user(login: "wycats") {
    name
    topRepositories(first: 100, orderBy: {field: STARGAZERS, direction: DESC}) {
      edges {
        node {
          nameWithOwner
        }
      }
    }
  }
}

{
  "data": {
    "rateLimit": {
      "cost": 1,
      "resetAt": "2019-09-13T20:05:52Z",
      "remaining": 4990
    },
    "user": {
      "name": "Yehuda Katz",
      "topRepositories": {
        "edges": [
          {
            "node": {
              "nameWithOwner": "nushell/nushell"
            }
          },
          {
            "node": {
              "nameWithOwner": "glimmerjs/glimmer-vm"
            }
          },
          .....
          {
            "node": {
              "nameWithOwner": "defly/tweereal"
            }
          },
          {
            "node": {
              "nameWithOwner": "defly/extension-starter-lite"
            }
          },
         ......
        ]
      }
    }
  }
}
1 Like

Thanks for reaching out about this behavior @defly.

It definitely appears to be a bug at least according to the documentation. I’ve reported the issue to the developers. Unfortunately, I can’t give any timeline on when this will get resolved, but the right people have been notified.

Let us know if you have more questions.

1 Like