Fetching Issue by its issuenumber


#1

There is no documentation either in the graphql docs or the early access site,
Therefore i am asking it here
But how to fetch an issue by its ownername, reponame and its issue number.
something like

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

Has Something like this been implemented yet?


#2

:wave: Hi @prijindal,

Unfortunately right now we don’t have a way to get an issue by its number on a repository. I’d recommend that you add the request to Add your schema requests and we can try to work it into the schema.

Cheers,
Brooks Swinnerton


#3

@prijindal use number and not issuenumber:

Query:

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

Output:

{
  "data": {
    "repository": {
      "issue": {
        "number": 1,
        "title": "Crack::ParseError: Invalid JSON string when we expect NotFound"
      }
    }
  }
}

Getting PR by global ID fails ("Something went wrong while executing your query")
#4

Thank you for adding this