Add your schema requests

schema-request

#21

Thanks for providing folks early access to GraphQL! :tada:

I would like to change gh-board
(a Kanban Board for multiple Repositories using gh-pages) to make fewer requests.

Currently, the most expensive piece is pulling the CI status for each Pull Request.
It requires pulling the commit list for each Pull Request, and then the Status of the most-recent commit.

Could List commits on a Pull Request be added? Or, just provide the Status directly on the Pull Request Object? That way it would include review status as well as Integration/WebHooks status?

Thanks again for all the hard work!

PS: How can I use the websocket(channel:UPDATED) string in GraphQL Pull Request ? I noticed it’s the channel used in github.com


#22

@joemcbride Better information about teams is definitely in the works. Once we’re exposing teams and their members via GraphQL, you should be able to use the pullRequests connection on each team member’s user. I think that’d get you what you’re looking for! Keep an eye out for that :smile:

@codenamev (and @philschatz) We’ve added a review connection to the PullRequest type, and there is a status field on the Commit type to get a commit’s CI status, but we should definitely make it easier to get the status of a Pull Request. I imagine it would make sense to expose a PullRequest’s commits. To get the status of a PR, then, you could get its first commit and then that commit’s status. Keep an eye out for that!


#23

It would be nice to have timestamps (created_at for example) Issues, PullRequests, Comments and Events.


#24

There are any intent to release access to gist objects ?


#25

My immediate goal is: Given a repo, list all repos that are part of its source’s network, for analysis. The obvious way to do this is to jump up to the source of the network, then walk all forks recursively.

To that end, I’d like a source field on repositories, like the REST API has. In its place, I am currently using many nested levels of the repo parent field, along with retry logic if isFork is still true.

I’m new to GraphQL, so maybe I’m missing something obvious, but the second part–walking all forks recursively–seems harder, because of pagination. I could use many nested levels of the repo forks field, but I am going potentially going to get back a slew of pagination cursors to manage, at many levels of the response. Combined with the need to also go deeper if my original request nesting is insufficient, this task seems harder than it ought to be. I’m not sure what to ask for in the schema to make it easier, though. Maybe an argument to forks to return all forks in the network, not just immediate forks?

Thanks!


#26

@jamsajones @unnamedd @josharian Thanks for those suggestions, folks! I’ve opened issues to track these internally too :smile:


#27

I’d like to be able to find all the issues associated to a label. It does not seem the Label GraphQL Object allows to drill down to find the associated issues. On the REST side you can do so by using GET /search/issues?q=label: endpoint. Ultimately I’d like to collect all these issues to automatically create columns in a project, where each column would list all issues associated to a label. Thanks.


#28

I’ve opened up a request to track that internally. Thanks!

I’m going to close out How to fetch issues associated to a label? in deference to this comment.


How to fetch issues associated to a label?
How to fetch issues associated to a label?
#29

Hi! loving the Graph API btw, great stuff.

I’d like to be able to get the number for a given Milestone. That way I could build a back-link as in

<a href="${repo.url}/milestone/${milestone.number}"> ${milestone.title} </a>

Or a direct URI to it would be even better!

Thanks! /Leandro


#30

That sounds doable, @ostera!

I’ve added an internal issue to track your request.

Cheers,
Brooks Swinnerton


#31

Right now there is no way of getting an issue by its issue number.
For example

query {
     repository(owner: "octokit", name: "octokit.rb") {
        issue(issuenumber: "1") {
            title
            content
        }
    }
}

#32

I may not have find the proper way but I feel like it’s impossible to retrieve the list of a user repo.

The list I’m refering to is the “Your repositories” box of the main github page or what the current REST API return on /user/repos.


#33

Wouldn’t this do it?

{
  repositoryOwner(login: "your-user") {
    repositories(first: 30) {     
      edges {
        org: node {          
          name    # and whatever else you need...       
        }
      }
    }
  }
}

#34

This would only return repos I own, I would like to retrieve all the repos I’m allowed authorized to commit to.


#35

Hi @ostera,

You should now see a milestone’s number, path and URL in the schema.

I hope this helps!


#36

@ThasLegendary,

I believe you’re looking for the contributedRepositories connection. Would this query help you get what you’re looking for?

query {
  viewer {
    contributedRepositories(first:10) {
      edges {
        repository: node {
          name
          owner { 
            login
          }
        }
      }
    }
  }
}

#37

:wave: @prijindal,

Thank you for your request! I’ve added it to an internal tracker.

Cheers,
Brooks


#38

I tried this, the only issue with this is it does not list repos I never contributed to but I have been granted access to. This is probably à corner case but I do have this use case where I need access to à repo never contributeur to.


#39

Awyiss! Thanks :pray:t3:


#40

Maybe I just still need to get my head around GraphQL, but at repository level I don’t see how I can retrieve the following fields, or at least not in an easy way like in the REST API https://developer.github.com/v3/repos/#response

  1. created_at
  2. pushed_at
  3. updated_at

ciao

Luca