Questions tagged [github-graphql]

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

Links:

148 questions
2
votes
1 answer

GitHub v4 API query for both organizations and users

GitHub API v4 does not show the results for companies when user query is used. If I use repositoryOwner instead, it returns results for both users and companies. However, user query can return more detailed information such as biography, website,…
user1449456
  • 502
  • 1
  • 5
  • 19
2
votes
1 answer

How do I archive a repository via Githubs GraphQL API?

I found out that you can do this via the REST API, but ideally I want to stick to the GraphQL API in my program. I've been scouring the API Documentation but I am also pretty shaky and new to GraphQL so I can not seem to find a way to mutate the…
2
votes
1 answer

How Can I correctly use dynamic variables in react-apollo graphql query?

I have an apollo-wrapped component that's supposed to provide my component with response data from the github graphql v4 api. I intend to use a string(SEARCH_QUERY) from another part of the app to be used in my gql query but github keeps returning…
Fatah
  • 2,184
  • 4
  • 18
  • 39
2
votes
1 answer

GitHub GraphQL API v4 vs REST API v3

Is it possible to list all github's organizations with GitHub GraphQL API v4 like we did with REST API v3 ? Follow a limited sample call : $ curl https://api.github.com/organizations?since=32358551 [ { "login": "NxtReader", "id":…
Luca G. Soave
  • 12,271
  • 12
  • 58
  • 109
1
vote
0 answers

How to create a commit, on newly created empty repository using GitHub Graphql API

GraphQL Query I used: mutation CreateGitProfileRepo($name: String!, $description: String!, $homepageUrl: URI!) { createRepository(input: {name: $name, visibility: PUBLIC, description: $description, homepageUrl: $homepageUrl}) { …
Ritik
  • 137
  • 1
  • 12
1
vote
1 answer

See the size of the specific document in a specific branch of a repository

I want to determine the size of the file "foo" in the master branch of johndoe's "boo" repository. Any suggestion? I am using https://docs.github.com/en/graphql/overview/explorer to make the query.
1
vote
0 answers

Get Blocked Users with GitHub GraphQL

I stumbled on GitHub GraphQL today and at first glance, it seemed to me I could do more with it than I already do with their regular RESTful API. I created some Adapters in my existing application and managed to authenticate Users based on a…
user5613506
  • 286
  • 1
  • 16
1
vote
2 answers

Retrieve ALL Github issues of a specific Project using the GraphQL API

I've been trying to retrieve all GitHub issues of a specific project using their GraphQL API. The problem that i have is that i need to specify in the items a first or last param it doesn't work. Although by specifying one of these params i get only…
1
vote
2 answers

GitHub REST and GraphQL API are returning different data

I am scraping some data from GitHub. The RESTful URL to this particular PR shows that it has a merge_commit_sha value: https://api.github.com/repos/ansible/ansible/pulls/15088 However, when I try to get the same PR using GitHub GraphQL API, it shows…
Parvez M Robin
  • 154
  • 1
  • 3
  • 16
1
vote
0 answers

GitHub GraphQL API doesn't return pull requests from user with private activity settings

I have a GitHub app that is authorized to access data from my workplace's private repository. I use the GitHub GraphQL API to search for each user's recent pull requests. The pull request query works great except in the case of one user who has made…
marie2048
  • 11
  • 1
1
vote
0 answers

How do I query a GitHub Project V2 Item Order by Custom Field from GraphQL?

How do I get the order of items in a board view column from the API? I found the sortBy object in the ProjectV2 views, but I'm struggling querying the items ordered by fieldValue (position?). Would you mind helping me construct a query for the JSON…
1
vote
0 answers

GitHub App token not working for GraphQL API

I’m writing a workflow to add issues/PRs as project items to the projects beta. I was previously using a personal access token for the GraphQL API call, which worked successfully. However, using a token generated from a GitHub App does not work. The…
1
vote
1 answer

In Github's GraphQL API how to get repositories that do not have a particular repositoryTopic?

With Github's GraphQL API I recently found "Github API: Getting topics of a Github repository" that mentions you can get a count of topics: { repository(owner: "twbs", name: "bootstrap") { repositoryTopics(first: 10) { edges { …
DᴀʀᴛʜVᴀᴅᴇʀ
  • 7,681
  • 17
  • 73
  • 127
1
vote
1 answer

GitHub Graph QL Authentication via a Github App

I am just wondering, did anyone manage to authenticate into the Github GraphQL API with using a Github App and how? The purpose of this is to write a script that pulls information from Github with the GraphQL API, but uses an app for authentication…
1
vote
1 answer

How to use go-vcr with githubv4 ? - getting httpClient Transport

Looking at the set up for go-vcr // Start our recorder r, err := recorder.New("fixtures/etcd") if err != nil { log.Fatal(err) } defer r.Stop() // Make sure recorder is stopped once done with it // Create an etcd…
mcbain83
  • 492
  • 6
  • 19