Questions tagged [github-graphql]

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

Links:

148 questions
0
votes
1 answer

Creating Github Organization using graphql

I tried below code to create organization using my github account getting error mutation { createOrganization(input: { login: "besttestzzzz", admin: true }) { organization { id login } } } { "input": { "admin": [ "testgithubaccount"…
Bhaskar g
  • 37
  • 6
0
votes
3 answers

How to lookup GitHub usernames by emails in a single GitHub API call?

I'm trying to look up the GitHub username for a few hundred users based on their email (which I pulled from the git log). Unfortunately I can't figure out how to do this without making a single call per email. How do I look up many GitHub usernames…
Daniel Porteous
  • 5,536
  • 3
  • 25
  • 44
0
votes
2 answers

How to update github graphql headers dynamically

class GithubGraphqlService URL = "https://api.github.com/graphql".freeze attr_reader :access_token def initialize(access_token) @access_token = access_token end def client http_adapter ||=…
0
votes
0 answers

How to get page number using Github GraphQL API?

Recently I was given a test task to implement a repository list with pagination using React and Github GraphQL API. It was required to allow to skip pages (e.g. going from page №1 to page №5). I am struggling to do so, because as far as I know…
0
votes
0 answers

Github GraphQL API for popular discussions

I need to find top 5 popular discussions in the last month for a Github repo. By popular, I mean most interacted with. I am using the below java-script code which gives me the total count of comments and reactions for each discussion. But how do I…
PriyankaJ
  • 339
  • 4
  • 19
0
votes
0 answers

"INVALID_CURSOR_ARGUMENTS" from Github graphql API

I am using the following query: query myOrgRepos { organization(login: "COMPANY_NAME") { repositories(first: 100) { edges { node { name …
0
votes
1 answer

How do I get type target?.history from GitHub GraphQL on defaultBranchRef

I'm trying to get the last commit with typesaftey but can't get past the history property because it can be an empty object, {}, null, undefined, or the actual object I want, Commit. My GitHub GraphQL query is query OrgReposAgExtended_v3( …
DFBerry
  • 1,818
  • 1
  • 19
  • 37
0
votes
0 answers

Github GraphQL API - Add collaborators to cloned template repository

I am trying to create a new repository based on a template using the Github GraphQL api. I am using the mutation notation in combination with some custom variables. I know there is a 'cloneTemplateRepository' call which accepts some input. However I…
FalcoVerhagen
  • 154
  • 1
  • 8
0
votes
2 answers

How to use orderBy for graphQL

I am trying to sort reservesUSD of nested object dailyPoolSnapshots In descending order by timestamp and return it's first value (in other words, return the latest entry). I know almost nothing of GraphQL and it's documentation seems confusing and…
EndOfTheGlory
  • 309
  • 3
  • 11
0
votes
0 answers

GitHub Graphql query

How to change the default branch of a repository by using graphql api. I write the query to get the default branch but I didn’t able to find how to change with another branch. Thabkyou for the response Please help to write a query to change the…
0
votes
0 answers

How to find you last participation to a repository Graphql Github

I'm trying to build a module for my portfolio and I want to has a list with the last repository I've participate in. I'm using Github GraphQL API. I've come up with this request : query { viewer { login name …
0
votes
1 answer

What does 'isLocked' field in the Repository object refer to in GraphQL API?

The GitHub GraphQL API documentation for the Repository object shows an isLocked field, which it describes with, "Indicates if the repository has been locked or not." I can't find a reference in the GitHub documentation to "locking" a repository.…
abbo2t
  • 206
  • 2
  • 9
0
votes
1 answer

Github Automerge Failure Notification (API v4 GraphQL mutation enablePullRequestAutoMerge)

at my company we want to make use of the relatively new API feature "Automerge" (not through a UI but through an API call), However we can't seem to find any documentation of a webhook (or other asyc way) of finding out if a merge request failed and…
0
votes
1 answer

How to fetch all my repos with specific github topic using graph API

I want to fetch all the repos, that I'm owner/contributor with specific topic. I tried below this request. This returned, all my repos that I'm owner/contributor with all the topics. { viewer { repositories(first: 100) { pageInfo { …
mnvbrtn
  • 558
  • 1
  • 8
  • 27
0
votes
1 answer

is it possible to squash commits via Github API?

I've successfully implemented automatic file creation/update via Github V3 Rest API, however the only downside is that for each file I have a commit. There is a possibility to do the same for multiple files, but unfortunately it involves some…
elect
  • 6,765
  • 10
  • 53
  • 119
1 2 3
9
10