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

Method Operations

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

55}
56
57func (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
89func (bugResolver) Timeline(_ context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int) (*models.BugTimelineItemConnection, error) {
90 input := models.ConnectionInput{

Callers

nothing calls this directly

Calls 3

OffsetToCursorFunction · 0.92
ConnectionFunction · 0.92
OperationsMethod · 0.65

Tested by

no test coverage detected