I am trying to get from GitHub using graphQL multiple organizations & repositories data. The code i wrote below get only 1 organization & repository. I thought using variables of two Array [String!] one for Organizations & the second for Repositories. So
organization(login:"javascript") {...}
should be
organization(login:$organization) {...}
and
repository(owner:"javascript", name:"sorted-array") {...}
should be
repository(owner:$organization, name:$repository) {...}
But i couldn't find how to implement the variables into the below code.
query {
rateLimit{
cost
remaining
resetAt
}
organization(login:"javascript") {
repositories{
totalCount
}
}
repository(owner:"javascript", name:"sorted-array") {
updatedAt
branches: refs(refPrefix:"refs/heads/") {
totalCount
}
tags: refs(refPrefix:"refs/tags/") {
totalCount
}
releases {
totalCount
}
object(expression:"master") {
... on Commit {
committedDate
history {
totalCount
}
}
}
}
}
Will appreciate the help. Thanks