MCPcopy Create free account
hub / github.com/encoder-run/operator / _Repository_id

Method _Repository_id

pkg/graph/generated.go:3723–3752  ·  view source on GitHub ↗
(ctx context.Context, field graphql.CollectedField, obj *model.Repository)

Source from the content-addressed store, hash-verified

3721}
3722
3723func (ec *executionContext) _Repository_id(ctx context.Context, field graphql.CollectedField, obj *model.Repository) (ret graphql.Marshaler) {
3724 fc, err := ec.fieldContext_Repository_id(ctx, field)
3725 if err != nil {
3726 return graphql.Null
3727 }
3728 ctx = graphql.WithFieldContext(ctx, fc)
3729 defer func() {
3730 if r := recover(); r != nil {
3731 ec.Error(ctx, ec.Recover(ctx, r))
3732 ret = graphql.Null
3733 }
3734 }()
3735 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
3736 ctx = rctx // use context from middleware stack in children
3737 return obj.ID, nil
3738 })
3739 if err != nil {
3740 ec.Error(ctx, err)
3741 return graphql.Null
3742 }
3743 if resTmp == nil {
3744 if !graphql.HasFieldError(ctx, fc) {
3745 ec.Errorf(ctx, "must not be null")
3746 }
3747 return graphql.Null
3748 }
3749 res := resTmp.(string)
3750 fc.Result = res
3751 return ec.marshalNID2string(ctx, field.Selections, res)
3752}
3753
3754func (ec *executionContext) fieldContext_Repository_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3755 fc = &graphql.FieldContext{

Callers 1

_RepositoryMethod · 0.95

Calls 2

marshalNID2stringMethod · 0.95

Tested by

no test coverage detected