MalloZup

MalloZup

Graphql: accessing GitHub issue more then 100

Hi all,

I have developed in past an utils for maintaining opensource projects especially issues in GitHub.

As current limitation, the CLI can’t access more then 100 Issue. (GitHub - MalloZup/blacktango: console client for software maintainers · GitHub)

My question would be, do you know/ or have experience with the way for accessing all the issue in a project using Graphql?

Like if i would have 5000 issues, how would this work with Graphql GitHub

See my current query blacktango/lib/github/graphql.ex at master · MalloZup/blacktango · GitHub

Marked As Solved

Phillipp

Phillipp

Man are you lucky today. The GitHub GraphQL Explorer had one of my test queries from 2017 stored in my localstorage.

{
  repository (owner: "bolt", name: "bolt") {
    name
    issues (last: 5, before: "Y3Vyc29yOjIxMDI0NDc1NA==") {
      totalCount
      edges {cursor}
      nodes {
        number
        title
        comments (first: 5) {
          edges {cursor}
          nodes {
            body
          }
        }
      }
    }
  }
}

the edges {cursor} is important because they give you the IDs for the before and after params.
As you can see in the query, I get some issues and then its comments. But the comments are also limited to a specific number so you have pagination there too.
(and comments have reactions (paginated) and issues have actions (opened, closed, etc. ) (paginated too)). It really is a mess if you want to grab everything :smiley:

Also Liked

Phillipp

Phillipp

The API supports pagination.

See Repositories - GitHub Docs

Scroll down to “issues”.

LostKobrakai

LostKobrakai

I’d imagine it’s a hard limit by GitHub to limit execution time of queries. If you need more use pagination to query the rest in addition requests.

Phillipp

Phillipp

The problem with the GitHub GraphQL API is, that your rate limit is very low and they got pagination for everything. I once tried to fetch all issues/pull requests with all its comments and actions to analyze the data and give the repository a “rating” based on maintainer reaction times. It’s impossible if you want to stay inside the rate limit and the complexity of the queries is also huge since you would have to deal with multiple paginations at once if you want to use the least amount of queries.

Where Next?

Popular in Questions Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
nobody
How to bind a phoenix app to a specific ip address? could not find anything about that, nowhere, unfortunately, but for me this is quite...
New
LegitStack
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New

Other popular topics Top

Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

We're in Beta

About us Mission Statement