(_ context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int)
| 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{ |
| 91 | Before: before, |
| 92 | After: after, |
| 93 | First: first, |
| 94 | Last: last, |
| 95 | } |
| 96 | |
| 97 | edger := func(op bug.TimelineItem, offset int) connections.Edge { |
| 98 | return models.BugTimelineItemEdge{ |
| 99 | Node: op, |
| 100 | Cursor: connections.OffsetToCursor(offset), |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | conMaker := func(edges []*models.BugTimelineItemEdge, nodes []bug.TimelineItem, info *models.PageInfo, totalCount int) (*models.BugTimelineItemConnection, error) { |
| 105 | return &models.BugTimelineItemConnection{ |
| 106 | Edges: edges, |
| 107 | Nodes: nodes, |
| 108 | PageInfo: info, |
| 109 | TotalCount: totalCount, |
| 110 | }, nil |
| 111 | } |
| 112 | |
| 113 | timeline, err := obj.Timeline() |
| 114 | if err != nil { |
| 115 | return nil, err |
| 116 | } |
| 117 | |
| 118 | return connections.Connection(timeline, edger, conMaker, input) |
| 119 | } |
| 120 | |
| 121 | func (bugResolver) Actors(_ context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int) (*models.IdentityConnection, error) { |
| 122 | input := models.ConnectionInput{ |
nothing calls this directly
no test coverage detected