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

Method Participants

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

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{
155 Before: before,
156 After: after,
157 First: first,
158 Last: last,
159 }
160
161 edger := func(participant models.IdentityWrapper, offset int) connections.Edge {
162 return models.IdentityEdge{
163 Node: participant,
164 Cursor: connections.OffsetToCursor(offset),
165 }
166 }
167
168 conMaker := func(edges []*models.IdentityEdge, nodes []models.IdentityWrapper, info *models.PageInfo, totalCount int) (*models.IdentityConnection, error) {
169 return &models.IdentityConnection{
170 Edges: edges,
171 Nodes: nodes,
172 PageInfo: info,
173 TotalCount: totalCount,
174 }, nil
175 }
176
177 participants, err := obj.Participants()
178 if err != nil {
179 return nil, err
180 }
181
182 return connections.Connection(participants, edger, conMaker, input)
183}
184
185var _ graph.BugCommentResolver = &commentResolver{}
186

Callers

nothing calls this directly

Calls 3

OffsetToCursorFunction · 0.92
ConnectionFunction · 0.92
ParticipantsMethod · 0.65

Tested by

no test coverage detected