Questions tagged [github-graphql]

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

Links:

148 questions
1
vote
1 answer

How would I get the number of repositories for each user of an array?

I am trying to get the number of respositories of a few users using GitHub’s v4 API. In their explorer I found that I can query user(login: String!) however, that is only one users repositories count that I can see. Is it possible to loop though a…
user7885981
1
vote
1 answer

Update github repository description via graphql

This is the GraphQL query for GitHub's API: mutation { updateProject(input: { projectId: "MDEwOlJlcG9zaXRvcnkxMTY0ODYzMDc", body: "Testing tusting", state: OPEN }) { clientMutationId } } I'm getting this…
Golam Rabbani
  • 76
  • 1
  • 9
1
vote
1 answer

React-Apollo : Make query calls for a list of variables

Given a list of usernames and the following query to GITHUB API:- query.gql: query USER_QUERY($username:String!){ user(login: $username){ name repositories(isFork:false){ totalCount …
1
vote
1 answer

What is the use of @relayhash value in graphql JS

I am performing code review on one of the source codes. While going through a JS file (graphql.js) I found a value "@relayhash" along with some hash value as below: @relayHash 00950038252b25a368700738a31fled7 I am not sure what this relay hash value…
1
vote
1 answer

How to get all repos that contain a certain branch on Github's GraphQL API

I have many repositories and some of them contain a branch that has the same name. I want to be able to fetch all the repositories that contain a specific branch name. This is what I have so far but I can't seem to figure out how to add the…
1
vote
1 answer

How to use Github GraphQL search to return user profiles with similar name( including login and display name)?

I have this simple search query query test($name: String!) { search(query: $name, type: USER, last: 100) { edges { textMatches { fragment property highlights { text } } } userCount …
Mirrorcube
  • 13
  • 3
1
vote
1 answer

Get number of commited lines via GitHub api

The query curl -H "Accept: application/vnd.github.cloak-preview" "https://api.github.com/search/commits?q=java" returns a list of commits for Java language. How can I get a number of committed lines for every item?
Артур Гудиев
  • 1,004
  • 2
  • 10
  • 26
1
vote
2 answers

GitHub API v4 - Get contributors from specific repository

I'm trying to build a query with the GitHub API v4 (GraphQL) to get the number of contributors. At the moment I have something of the likes of query ($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { …
1
vote
1 answer

In Github API, how can one distinguish a user from an organisation?

Take the following Github URL: https://github.com/google How can I determine whether google is a user or an organization? I need to know to this for querying Github's graphql API in the correct way.
bart
  • 14,958
  • 21
  • 75
  • 105
1
vote
1 answer

How to know the new names that multiple repositories have been renamed to?

I have an application that records the names of some GitHub repositories in database. Take the following 3 repos for…
hsluoyz
  • 2,739
  • 5
  • 35
  • 59
1
vote
1 answer

Working With Rate Limits on GitHub's GraphQL API

I understand that GitHub's GraphQL API has a rate limit, which requires you to use slicing with first, last, before, after, etc. However, what if I just want a count of a particular field? For example, I don't want to get all of a user's followers,…
Parker Ziegler
  • 980
  • 6
  • 13
1
vote
2 answers

Github GraphQL API: How can I find out which fields are searchable?

When I run the query: { "query": "{user(login: \"furknyavuz\") {repositories(first: 50, isPrivate: false) {nodes {name url}}}}" } I getting the following error: { "data": null, "errors": [ { "message": "Field 'repositories' doesn't…
Furkan Yavuz
  • 1,858
  • 5
  • 30
  • 51
1
vote
2 answers

Query reactions by issue number and user

Is there a way to query reactions filtering on issue number and user? { repository(owner: "w3c", name: "webcomponents") { issue(number: 688) { title reactions(last: 100) { <--- I want to filter on user here edges { …
Jeremy Danyow
  • 26,470
  • 12
  • 87
  • 133
1
vote
1 answer

GitHub GraphQL to Read Repository Contents

I'm looking for a way to use the GitHub GraphQL to read repository contents (paths) and then provide a second query to grab the contents of the full path. I started heading down this path for the second query, and it's failing. The former is the…
Jason N. Gaylord
  • 7,910
  • 15
  • 56
  • 95
0
votes
0 answers

Get team name of users approving pull requests

I am trying to fetch the team name of the users who have approved a pull request using the GraphQL API. I am looking forward to perform this operation in a single query. I am able to get the list of reviewers who have approved the request but the…
harry1102
  • 81
  • 1
  • 2
  • 10