Lookup users by login


#1

Hi,

I’m relatively certain that this is currently not possible, but I figured I’d ask. Given a user login, I would like to retrieve their starred repositories. I can easily see how to do that for the viewer, but for any arbitrary user, it seems like that is currently not possible, because I can only get a reference to a RepositoryOwner?


#2

Hi @nambrot!

Unfortunately right now there is no way to get an arbitrary user in a GraphQL query. I’d recommend posting a schema request in Add your schema requests and we can take a look at adding that.

Cheers,
Brooks Swinnerton


#4

(sorry—I just saw the timestamp on this. Not sure why this was at the top of my read list)


#5

:wave: I believe this is now possible with a query like this:

query {
  user(login:"bswinnerton") {
    starredRepositories(first:30) {
      edges {
        node {
          name
          owner {
            login
          }
        }
      }
    }
  }
}