MCPcopy Create free account
hub / github.com/git-bug/git-bug / Timeline

Method Timeline

api/graphql/resolvers/bug.go:89–119  ·  view source on GitHub ↗
(_ context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int)

Source from the content-addressed store, hash-verified

87}
88
89func (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
121func (bugResolver) Actors(_ context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int) (*models.IdentityConnection, error) {
122 input := models.ConnectionInput{

Callers

nothing calls this directly

Calls 3

OffsetToCursorFunction · 0.92
ConnectionFunction · 0.92
TimelineMethod · 0.65

Tested by

no test coverage detected