ldd / gatsby-source-github-api

Pull data into Gatsby from Github API v4
MIT License
65 stars 10 forks source link

Multiple queries #38

Closed pomle closed 2 years ago

pomle commented 2 years ago

Can this library run multiple queries?

If it can not, how are you be able to fetch repo information from arbitrary chosen repos? Just trying to figure out if I am blind.

Thanks!

ldd commented 2 years ago

It depends on what you mean by multiple queries.

I do know what fetching info from many repos is supported on GraphQL:

https://github.com/octokit/request.js/issues/204

from that link:

fragment repoProperties on Repository {
  nameWithOwner
  description
}

{
  repo1: repository(owner: "ldd", name: "gatsby-source-github-api") {
    ...repoProperties
  }
  repo2: repository(owner: "octokit", name: "graphql.js") {
    ...repoProperties
  }
}
pomle commented 2 years ago

That should work. Thanks