MCPcopy Index your code
hub / github.com/git-bug/git-bug / _Bug

Method _Bug

api/graphql/graph/bug.generated.go:1581–1862  ·  view source on GitHub ↗
(ctx context.Context, sel ast.SelectionSet, obj models.BugWrapper)

Source from the content-addressed store, hash-verified

1579var bugImplementors = []string{"Bug", "Authored"}
1580
1581func (ec *executionContext) _Bug(ctx context.Context, sel ast.SelectionSet, obj models.BugWrapper) graphql.Marshaler {
1582 fields := graphql.CollectFields(ec.OperationContext, sel, bugImplementors)
1583
1584 out := graphql.NewFieldSet(fields)
1585 deferred := make(map[string]*graphql.FieldSet)
1586 for i, field := range fields {
1587 switch field.Name {
1588 case "__typename":
1589 out.Values[i] = graphql.MarshalString("Bug")
1590 case "id":
1591 out.Values[i] = ec._Bug_id(ctx, field, obj)
1592 if out.Values[i] == graphql.Null {
1593 atomic.AddUint32(&out.Invalids, 1)
1594 }
1595 case "humanId":
1596 field := field
1597
1598 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
1599 defer func() {
1600 if r := recover(); r != nil {
1601 ec.Error(ctx, ec.Recover(ctx, r))
1602 }
1603 }()
1604 res = ec._Bug_humanId(ctx, field, obj)
1605 if res == graphql.Null {
1606 atomic.AddUint32(&fs.Invalids, 1)
1607 }
1608 return res
1609 }
1610
1611 if field.Deferrable != nil {
1612 dfs, ok := deferred[field.Deferrable.Label]
1613 di := 0
1614 if ok {
1615 dfs.AddField(field)
1616 di = len(dfs.Values) - 1
1617 } else {
1618 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
1619 deferred[field.Deferrable.Label] = dfs
1620 }
1621 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
1622 return innerFunc(ctx, dfs)
1623 })
1624
1625 // don't run the out.Concurrently() call below
1626 out.Values[i] = graphql.Null
1627 continue
1628 }
1629
1630 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
1631 case "status":
1632 out.Values[i] = ec._Bug_status(ctx, field, obj)
1633 if out.Values[i] == graphql.Null {
1634 atomic.AddUint32(&out.Invalids, 1)
1635 }
1636 case "title":
1637 out.Values[i] = ec._Bug_title(ctx, field, obj)
1638 if out.Values[i] == graphql.Null {

Calls 15

_Bug_idMethod · 0.95
_Bug_humanIdMethod · 0.95
_Bug_statusMethod · 0.95
_Bug_titleMethod · 0.95
_Bug_labelsMethod · 0.95
_Bug_authorMethod · 0.95
_Bug_createdAtMethod · 0.95
_Bug_lastEditMethod · 0.95
_Bug_actorsMethod · 0.95
_Bug_participantsMethod · 0.95
_Bug_commentsMethod · 0.95
_Bug_timelineMethod · 0.95

Tested by

no test coverage detected