Questions tagged [github-graphql]

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

Links:

148 questions
42
votes
1 answer

Github graphQL OrderBy

I have a GraphQL query. I cannot understand why it is not working. { repositoryOwner(login: "Naramsim") { login repositories(first: 3, isFork: true, orderBy: {field: CREATED_AT}) { edges { node { description …
Naramsim
  • 8,059
  • 6
  • 35
  • 43
30
votes
1 answer

GitHub API v4: How can I traverse with pagination? (GraphQL)

I'm using Github API v4 to run search query. From the API documentation I can understand that the following query gives me pageInfo but I don't know how to use it to traverse. query { search(first: 100, type:USER, query:"location:usa repos:>0…
Furkan Yavuz
  • 1,858
  • 5
  • 30
  • 51
21
votes
1 answer

github graphql api, what does "clientMutationId" mean?

I saw clientMutationId field in example-strong-typing documentation. mutation { addComment(input:{clientMutationId: 1234, subjectId: "MDA6SXNzdWUyMjcyMDA2MTT=", body: "Looks good to me!"}) { clientMutationId commentEdge { node { …
Lin Du
  • 88,126
  • 95
  • 281
  • 483
17
votes
0 answers

How to get a GitHub repository's commits along with the files that were changed and the changes themselves using GraphQL

I am able to get the list of commits (with fields like commit messages, oid, commit url etc) along with the number of changedFiles, made in a repository on the master branch. However I am not able to figure out how to get any information about the…
jar
  • 2,646
  • 1
  • 22
  • 47
16
votes
2 answers

Github GraphQL - Getting a repository's list of commits

I am using GraphQL to get some data from a list of repositories using Github's GraphQL (v4) API. I want to get a list of the latest commits from a repository, no matter what is the commit's branch/tag/ref. For now I am doing the following to get the…
FTM
  • 1,887
  • 17
  • 34
12
votes
3 answers

Where the data is Storing in Graphql

I started to use graphQl with react relay. And I followed some tutorials and I can able to get and post with the help of mutations and queries. Everything works fine but my question here is, Where qraphql is saving the data and fetching that for…
10
votes
2 answers

Github GraphQL API: How can I gather specific user's repositories?

I'm trying to get repositories of user with login name "somelogin". It returns all repositories but I'm trying to get repositories owned by him only. Because new API uses GraphQL I couldn't did it. Currently I'm using: { "query": "query {…
Furkan Yavuz
  • 1,858
  • 5
  • 30
  • 51
9
votes
2 answers

Select * for Github GraphQL Search

One of the advantage of Github Search v4 (GraphQL) over v3 is that it can selectively pick the fields that we want, instead of always getting them all. However, the problem I'm facing now is how to get certain fields. I tried the online help but it…
xpt
  • 20,363
  • 37
  • 127
  • 216
8
votes
2 answers

Github GraphQL Search with Filtering

Based on my limited searching, it seems GraphQL can only support equal filtering. So, Is it possible to do Github GraphQL searching with the filtering conditions of, stars > 10 forks > 3 total commit >= 5 total issues >= 1 open issues <= 60 size…
xpt
  • 20,363
  • 37
  • 127
  • 216
8
votes
2 answers

Using GitHub API v4 GraphQL to find all open issues belonging to repositories owned by the user

Can someone please point me in the right direction for listing all open issues that are in repos owned by the user? Thanks in advance.
Will Stone
  • 4,626
  • 3
  • 21
  • 29
7
votes
2 answers

How to query all languages from GitHubs graphql

I am trying to query GitHub for information about repositories using their v4 graphql. One of the things I want to query is the breakdown of all the languages used in the repo. Or if possible, the breakdown of the languages across all of a user's…
7
votes
3 answers

github graphql query for project contributors

I want to query using GitHub Graphql api for project contributors, can anyone give me any hints how to make it? Just been trying for some time, and I guess that I am missing some small element. I'd like to get sth like…
Piotr Kaliński
  • 227
  • 1
  • 4
  • 13
6
votes
2 answers

Display more than 100 entries through GraphQL API

I have tired pagination using endCursor and hasNextPage in github grpahQL API to get more than 100 data. Query I used is: query { organization(login:"XXX") { repository(name:"XX") { pullRequests(first:100,…
Vithursa Mahendrarajah
  • 1,194
  • 2
  • 15
  • 28
6
votes
1 answer

How to create issues and labels with the Github GraphQL Api?

V3 of the Api provides a REST interface for this: POST /repos/:owner/:repo/issues { "title": "Found a bug", "body": "I'm having a problem with this.", "assignees": [ "octocat" ], "milestone": 1, "labels": [ "bug" ] }…
Jon Wood
  • 1,531
  • 14
  • 24
6
votes
0 answers

Github Graphql API Single Commit single diff

I would like to find a way to get git diff on a single file on a single commit. Now I can use this GitHub RESTful API to search a commit of all files diff. GET /repos/:owner/:repo/commits/:sha But now I would like to get a single file diff out of a…
Jerry Wang
  • 61
  • 2
1
2 3
9 10