Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Ground Controller Lvl 1
Message 1 of 1

GraphQL check-runs ?

Hello,

Is it possible to use GraphQL to retrieve check-runs ?

 

For example, I can request check-runs from the REST API this way:

 

curl -H "Accept: application/vnd.github.antiope-preview+json" \
-u X:Y https://api.github.com/repos/rails/rails/commits/a98b9505885d551db18d9fe354d1973b31608318/check-runs

But this GraphQL query (run from https://developer.github.com/v4/explorer/) does not seem to be possible:

 

{
  repository(owner: "rails", name: "rails") {
    defaultBranchRef {
      name
      target {
        ... on Commit {
          id
          history(first: 100) {
            nodes {
              commitUrl
              check-runs [...]
              changedFiles
            }
          }
        }
      }
    }
  }
}

Whereas a similar one, based on status, works fine:

 

{
  repository(owner: "rails", name: "rails") {
    defaultBranchRef {
      name
      target {
        ... on Commit {
          id
          history(first: 100) {
            nodes {
              commitUrl
              status {
                state
                contexts {
                  targetUrl
                }
              }
              changedFiles
            }
          }
        }
      }
    }
  }
}

Thanks for your help!