query jobs($projectPath: ID!, $iid: ID!, $cursor: String) {
  project(fullPath: $projectPath) {
    id
    pipeline(iid: $iid) {
      id
      iid
      complete
      stages {
        nodes {
          name
        }
      }
      jobs(after: $cursor) {
        pageInfo {
          hasNextPage
          endCursor
        }
        count
        nodes {
          name
          needs {
            edges {
              node {
                name
              }
            }
          }
          stage {
            name
          }
        }
      }
    }
  }
}
