GraphQl V4 - Missing checks in checkSuites response

Hi there - I’m working with the graphql API to retrieve information on my pull requests on a forked repo (admin on the forked repo). I’ve enabled the Checks Preview API however the majority of the tests are not being returned. We have CircleCI, Code Climate and e2e tests that are not being returned, while a single Github App “WIP” is being returned. Here is my query:

query {
                  github {
                      viewer {
                          login,
                          name,
                          pullRequests (
                           last: 5,
                           states: [OPEN]
                          ) {
                              nodes {
                                author {
                                  login
                                },
                                canBeRebased,
                                commits (last: 1) {
                                  edges {
                                    node {
                                      commit {
                                        id,
                                        checkSuites(first: 50) {
                                          nodes {
                                            app {
                                              name
                                            },
                                            conclusion,
                                            status
                                          }
                                        }
                                      }
                                    }
                                  }
                                },
                                createdAt,
                                mergeable,
                                mergeStateStatus,
                                number,
                                repository {
                                  name,
                                  owner {
                                    login
                                  }
                                },
                                reviews (
                                  last: 1
                                ) {
                                  nodes {
                                    state
                                  }
                                },
                                title,
                                url
                              }
                          },
                          repositories(
                            affiliations: OWNER
                            first: 100
                          ) {
                            nodes {
                              name
                              url
                            }
                          }
                      }
                  }
              }`

Any help or insight would be appreciated!

It’s possible those services aren’t using the Checks API and instead are using the older status API. You may want to delve into the status field on the commit object to see if there are any entries there. Additionally, I found these instructions for enabling Checks support for CircleCI. It’s possible that the other services you’re using have a similar process.

I hope that helps!

1 Like