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

Method _Bug_id

api/graphql/graph/bug.generated.go:530–559  ·  view source on GitHub ↗

endregion ***************************** args.gotpl ***************************** region ************************** directives.gotpl ************************** endregion ************************** directives.gotpl ************************** region **************************** field.gotpl ******

(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper)

Source from the content-addressed store, hash-verified

528// region **************************** field.gotpl *****************************
529
530func (ec *executionContext) _Bug_id(ctx context.Context, field graphql.CollectedField, obj models.BugWrapper) (ret graphql.Marshaler) {
531 fc, err := ec.fieldContext_Bug_id(ctx, field)
532 if err != nil {
533 return graphql.Null
534 }
535 ctx = graphql.WithFieldContext(ctx, fc)
536 defer func() {
537 if r := recover(); r != nil {
538 ec.Error(ctx, ec.Recover(ctx, r))
539 ret = graphql.Null
540 }
541 }()
542 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
543 ctx = rctx // use context from middleware stack in children
544 return obj.Id(), nil
545 })
546 if err != nil {
547 ec.Error(ctx, err)
548 return graphql.Null
549 }
550 if resTmp == nil {
551 if !graphql.HasFieldError(ctx, fc) {
552 ec.Errorf(ctx, "must not be null")
553 }
554 return graphql.Null
555 }
556 res := resTmp.(entity.Id)
557 fc.Result = res
558 return ec.marshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res)
559}
560
561func (ec *executionContext) fieldContext_Bug_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
562 fc = &graphql.FieldContext{

Callers 1

_BugMethod · 0.95

Calls 5

fieldContext_Bug_idMethod · 0.95
ErrorfMethod · 0.80
IdMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected