Questions tagged [github-graphql]

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

Links:

148 questions
6
votes
2 answers

Github Graphql Filter issues by Milestone

I'm wrestling with Github's graphql api (while learning graphql) trying to get it to list all issues in a certain milestone. I can't figure out how to do that from the API docs. I can query issues and see what milestone they're in (sorry, names…
Eddy R.
  • 1,089
  • 7
  • 12
6
votes
2 answers

How to get Readme.MD from Github Graphql API?

The v3 has a specific API for retrieving the readme.md file. But in the new V4 GraphQL, there is no such field in the Repository Object. Does anyone know how to retrieve the readme file? Thanks!
user5435999
  • 113
  • 4
  • 10
6
votes
1 answer

valid GitHub api v4 query keeps returning error "Problems parsing JSON"

Here is an example of a cURL query to the GitHub api v4 that keeps returning an error: curl -H "Authorization: bearer token" -X POST -d " \ { \ \"query\": \"query { repositoryOwner(login: \"brianzelip\") { id } }\" \ } \ "…
Brian Zelip
  • 2,909
  • 4
  • 33
  • 45
5
votes
4 answers

How can I check if Dependabot is enabled for a Repo using Github APIs?

I've gone through Github Rest API v3 and Github GraphQL API v4 but I'm unable to find a resource/endpoint to check if dependabot is enabled via the API? I've gone through loads of documentation but was unable to find anything helpful. Could someone…
5
votes
2 answers

Get info about several repositories from Github Graphql API in a single call

I am trying to create a query to Github GraphQL API that receive a list of repos as a parameter, and returns the info of those repositories in a single API call, does anyone know how to do that? Something like this (I know this doesn't work) query…
5
votes
1 answer

GitHub GraphQL fetch repositories that are not archived

Is there a way to fetch only the repos that are not archived? { user(login: "SrikanthBandaru") { id email isHireable name repositories(first: 100) { # fetch only the repos that are not archived edges { node { …
Testaccount
  • 2,755
  • 3
  • 22
  • 27
5
votes
1 answer

How to query review requests by user, using Github's v4 GraphQL API?

Given a user's id, I want to get all pull requests where they are a requested reviewer. The following won't work as it only allows me to get pull requests opened by that user: query { node(id: "$user") { ... on User { pullRequests(first:…
liszt
  • 1,139
  • 1
  • 9
  • 17
5
votes
2 answers

Can I list Github's public repositories using GraphQL?

I am trying to list public repositories in Github using GraphQL as it allows me to choose exactly which information from an Object I want. Using REST I could list public repositories simply by making requests to https://api.github.com/repositories.…
FTM
  • 1,887
  • 17
  • 34
4
votes
1 answer

ApolloClient v3 fetchMore with nested query results

I'm using ApolloClient 3 the GitHub GraphQL API to retrieve all releases from a repo. This is what the query looks like: query ($owner: String!, $name: String!, $first: Int, $after: String, $before: String) { repository(owner: $owner, name: $name)…
donovantc
  • 151
  • 2
  • 10
4
votes
1 answer

Github GraphQL API v.4.0 cursor misworks

I am trying to fetch list of all repositories from Github to do some analysis on it. I have started my job with their v3.0 API which is a Restful one and then when I needed more info like star count, migrated from v3.0 to v4.0 which is provided as…
ConductedClever
  • 4,175
  • 2
  • 35
  • 69
4
votes
1 answer

Get GitHub Repository Insights via GitHub GraphQL API (v4)

I want to obtain information about the number of times my projects have been viewed, cloned and where the traffic came from (individually). I can currently view this Traffic information by clicking on the Insights button of the repository (via the…
nopassport1
  • 1,821
  • 1
  • 25
  • 53
4
votes
1 answer

How can we list all the branches in a repo using github graphQL api?

I am trying to check if a branch already exists in repo for that first I need to get all the open branches present. query searhbranches { repositoryOwner(login: "username"){ repository(name: "config-replica"){ name [branches]…
4
votes
1 answer

GitHub GraphQL Query - Count PR reviews by user for a given month

I am attempting to use GitHub's GraphQL interface to query for the number of PR's reviewed within a GitHub repo during a specific month. Ideally, I would like to only pull comments and reviews that took place within a specific time frame. …
terrywb
  • 3,740
  • 3
  • 25
  • 50
4
votes
1 answer

Can the GitHub GraphQL API create files in a repository?

The v3 API allowed for the creation of files but I can't seem to find a way to do this with the v4 GraphQL API. Is it currently possible?
RayB
  • 2,096
  • 3
  • 24
  • 42
4
votes
0 answers

How can I determine when a user unstarred a repo using the GitHub GraphQL API?

Using the GitHub GraphQL API, I can construct a timeline of when users starred any repo: query { repository(owner:"danvk", name:"source-map-explorer") { stargazers(first:100) { edges { starredAt node { login …
danvk
  • 15,863
  • 5
  • 72
  • 116
1
2
3
9 10