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

Method Actors

api/graphql/resolvers/bug.go:121–151  ·  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

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{
123 Before: before,
124 After: after,
125 First: first,
126 Last: last,
127 }
128
129 edger := func(actor models.IdentityWrapper, offset int) connections.Edge {
130 return models.IdentityEdge{
131 Node: actor,
132 Cursor: connections.OffsetToCursor(offset),
133 }
134 }
135
136 conMaker := func(edges []*models.IdentityEdge, nodes []models.IdentityWrapper, info *models.PageInfo, totalCount int) (*models.IdentityConnection, error) {
137 return &models.IdentityConnection{
138 Edges: edges,
139 Nodes: nodes,
140 PageInfo: info,
141 TotalCount: totalCount,
142 }, nil
143 }
144
145 actors, err := obj.Actors()
146 if err != nil {
147 return nil, err
148 }
149
150 return connections.Connection(actors, edger, conMaker, input)
151}
152
153func (bugResolver) Participants(_ context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int) (*models.IdentityConnection, error) {
154 input := models.ConnectionInput{

Callers

nothing calls this directly

Calls 3

OffsetToCursorFunction · 0.92
ConnectionFunction · 0.92
ActorsMethod · 0.65

Tested by

no test coverage detected