Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 1 of 2

GraphQL: How can I fetch the list of repositories using a topic?

Solved! Go to Solution.

Hello,

It seems that "RepositoryTopic" or "repositories" do not support a "filteredBy" method or similar. Is it possible to fetch a list of repositories belonging to an organisation, featuring a predefined topic in one call?

Regards,

1 Reply
Solution
Copilot Lvl 3
Message 2 of 2

Re: GraphQL: How can I fetch the list of repositories using a topic?

 

This expression did it for me: 

 

{
  search(first: 100, type: REPOSITORY, query: "topic:golang org:google") {
    pageInfo {
      hasNextPage
      endCursor
      }
    repos: edges {
      repo: node {
        ... on Repository {
          name
          url
          id
        }
      }
    }
  }
}