Show Repositories with matching Topic name?


#1

I’d like to query for repositories in my org that have certain topics. Not sure if this is currently possible.

This is my current query, which is fine for showing me topics in all repos, but I’d like to return only repos with specific topics.

Thanks

query {
  organization(login:"my_org") {
     repositories(first: 100) {
       nodes {
         repositoryTopics(first: 5) {
           edges {
             node {
              topic {
                name
              } 
             }
           }
         }
       }
     }
   }
}

#2

Hi @IanWhitney!

I’m not sure there’s a fantastic way to do this using ‘first class’ GraphQL primitives, you’ll probably have to drop down to using GitHub search to do this. We expose a top level query that allows you to do this:

query {
	search(type: REPOSITORY, query: "topic:node org:nodejs", first: 10) {
    edges{
      node {
        ... on Repository {
          url
        }
      }
    }
  }
}

I hope this is helpful! Let me know if you have any more questions.


#3

what if i want to filter with multiple topics , query looks like scalar right ?
this is how my query looks like right now.
schema stitching