(_ context.Context, obj *models.Repository, after *string, before *string, first *int, last *int)
| 164 | } |
| 165 | |
| 166 | func (repoResolver) ValidLabels(_ context.Context, obj *models.Repository, after *string, before *string, first *int, last *int) (*models.LabelConnection, error) { |
| 167 | input := models.ConnectionInput{ |
| 168 | Before: before, |
| 169 | After: after, |
| 170 | First: first, |
| 171 | Last: last, |
| 172 | } |
| 173 | |
| 174 | edger := func(label common.Label, offset int) connections.Edge { |
| 175 | return models.LabelEdge{ |
| 176 | Node: label, |
| 177 | Cursor: connections.OffsetToCursor(offset), |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | conMaker := func(edges []*models.LabelEdge, nodes []common.Label, info *models.PageInfo, totalCount int) (*models.LabelConnection, error) { |
| 182 | return &models.LabelConnection{ |
| 183 | Edges: edges, |
| 184 | Nodes: nodes, |
| 185 | PageInfo: info, |
| 186 | TotalCount: totalCount, |
| 187 | }, nil |
| 188 | } |
| 189 | |
| 190 | return connections.Connection(obj.Repo.Bugs().ValidLabels(), edger, conMaker, input) |
| 191 | } |
nothing calls this directly
no test coverage detected