(_ context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int)
| 55 | } |
| 56 | |
| 57 | func (bugResolver) Operations(_ context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int) (*models.OperationConnection, error) { |
| 58 | input := models.ConnectionInput{ |
| 59 | Before: before, |
| 60 | After: after, |
| 61 | First: first, |
| 62 | Last: last, |
| 63 | } |
| 64 | |
| 65 | edger := func(op dag.Operation, offset int) connections.Edge { |
| 66 | return models.OperationEdge{ |
| 67 | Node: op, |
| 68 | Cursor: connections.OffsetToCursor(offset), |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | conMaker := func(edges []*models.OperationEdge, nodes []dag.Operation, info *models.PageInfo, totalCount int) (*models.OperationConnection, error) { |
| 73 | return &models.OperationConnection{ |
| 74 | Edges: edges, |
| 75 | Nodes: nodes, |
| 76 | PageInfo: info, |
| 77 | TotalCount: totalCount, |
| 78 | }, nil |
| 79 | } |
| 80 | |
| 81 | ops, err := obj.Operations() |
| 82 | if err != nil { |
| 83 | return nil, err |
| 84 | } |
| 85 | |
| 86 | return connections.Connection(ops, edger, conMaker, input) |
| 87 | } |
| 88 | |
| 89 | func (bugResolver) Timeline(_ context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int) (*models.BugTimelineItemConnection, error) { |
| 90 | input := models.ConnectionInput{ |
nothing calls this directly
no test coverage detected