2

I am exploring Github's graphQL API, and I am new to this. In the below use case, I am trying to fetch the repos which are of Java and their owners are from the location "London". I have tried multiple filters, like the one below and none has worked - is there any way that I can achieve what I am tryna do?

query MyQuery {
  search(query: "language:java user:location=London" type: REPOSITORY, first: 10) {
    nodes {
      ... on Repository {
        name
        owner {
          ... on User{
            name
            email
            location
          }
        }
      }
    }
  }
}

1 Answers1

1

According to the GitHub API documentation, when you are searching based on location, the qualifier should be location:LOCATION. The corrected query was tested using GitHub Explorer.

query MyQuery {
  search(query: "language:java location=London" type: REPOSITORY, first: 10) {
    nodes {
      ... on Repository {
        name
        owner {
          ... on User{
            name
            email
            location
          }
        }
      }
    }
  }
}