Questions tagged [github-graphql]

Use for questions about the v4 GraphQL API of the GitHub software development platform.

Links:

148 questions
4
votes
2 answers

GitHub graphQL API multiple queries on organizations & repositories

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…
Jotta E
  • 292
  • 5
  • 14
4
votes
1 answer

Github GraphQL Repository Query, using two objects

How to use more than one objects when querying Github GraphQL? The following will break if the 2nd object is uncommented: query { repository(owner:"rails", name:"rails") { object(expression:"master") { ... on Commit { history { …
xpt
  • 20,363
  • 37
  • 127
  • 216
4
votes
2 answers

Github GraphQL Repository Query, commits totalCount

How to search for Github Repositories using GraphQL, and get its total commits count as well in return? It looks strange to me that all fields available describing Repositories contains total count of commit comments but not total count of commits.…
xpt
  • 20,363
  • 37
  • 127
  • 216
4
votes
1 answer

Github compare gives different results than GraphQL output

I am trying to compare two repositories (one is a fork of another), the official way, using compare and going back to 2017-02-11: https://github.com/bitcoin/bitcoin/compare/master@{2017-02-11}...UnitedBitcoin:master@{2017-02-11} Which returns: There…
bart
  • 14,958
  • 21
  • 75
  • 105
4
votes
1 answer

How to query pull request by number, using Github's v4 GraphQL API?

I can query the first pull request like this: query { repository(owner: "test_owner", name: "test_name") { pullRequests(first: 1) { nodes { id number title } } } } But how do I query a certain pull…
liszt
  • 1,139
  • 1
  • 9
  • 17
4
votes
1 answer

How do I query the GitHub v4 API for directory contents at a certain tag?

How do I query the GitHub API v4 for the contents of a certain directory of a repository at a certain tag? This is the best I've come up with so far: query { repository(owner:"example", name:"example") { refs(refPrefix: "tags") { } } }
aknuds1
  • 65,625
  • 67
  • 195
  • 317
3
votes
1 answer

How should I provide authentication for the Github graphql API when making client side queries?

I'm trying to make a client-side request to the GitHub graphql API using Apollo Client, but there's a 401 authentication issue I haven't been able to resolve. I've swapped out the query with one to a different API that doesn't require authentication…
tbguest
  • 51
  • 1
  • 6
3
votes
1 answer

When should you not use GitHub GraphQL API?

Much has been written about the benefits of the GitHub GraphQL API. And this is a really great technology. The only thing I can't figure out is in what situations is it still better to use the good old REST API v3?
3
votes
1 answer

In GitHub GraphQL, what is the difference between contributionCollection->totalPullRequestContributions and user->pullRequests->totalCount?

What is the difference between these two queries in GitHub GraphQL? query { user(login: "desai10") { contributionsCollection { totalPullRequestContributions } } } and query{ user(login: "desai10") { pullRequests { …
3
votes
0 answers

Github compare two commits with GraphQL?

Is it possible to compare with the Github Graph? Via their rest API, you can do something like: /repos/:owner/:repo/compare/:base...:head (docs: https://developer.github.com/v3/repos/commits/#compare-two-commits) This works with SHA's, branches,…
tknickman
  • 4,285
  • 3
  • 34
  • 47
3
votes
2 answers

curl to GitHub personal_access_token failing ONLY from my mac

I have been trying to connect to GitHub's GraphQL from a JavaScript project running locally but the connection fails. I using a personal_access_token created on GitHub, the token is correct. Strangely I have tried testing the token using a curl…
Rich
  • 970
  • 2
  • 16
  • 42
3
votes
1 answer

How to get the zipballUrl of a branch using github graphQL API?

I am trying to programmatically download a zip file of a repository which is already checked out to a specific branch. For that I need to obtain the zipballUrl of the head of the branch I specify through github graphQL API. This answer specifies…
tharinduwijewardane
  • 2,593
  • 2
  • 16
  • 28
3
votes
1 answer

How to fetch all repositories with specific topic, using GitHub GraphQL API?

I am trying to fetch all my repositories that contain topic "portfolio" using Github GraphQL API. For now, I found only how to fetch all repos on github with a specific topic, like so : { search(type: REPOSITORY, query: "topic: portfolio", last:…
VitFL
  • 106
  • 10
3
votes
0 answers

Is there a way to reply to pull-request review comments with the Github-API V4 (GraphQL)?

Goal I want to use the GraphQL API to reply to a pull request review comment. It is possible if the status of the review is PENDING, but when the status of the review is SUBMITTED, it is not possible. When I try it over the UI or the API V3 (REST),…
dellum
  • 31
  • 2
3
votes
1 answer

Github list of tag and release asset urls

I'm struggling with the github graphql interface to get the data that I need. I want to get a list of asset urls for both tags and releases. It seems that some repos produce my desired result while others produce nothing. query { …
cyberthreat
  • 179
  • 13
1 2
3
9 10