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

Method _Pipeline_enabled

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

Source from the content-addressed store, hash-verified

2723}
2724
2725func (ec *executionContext) _Pipeline_enabled(ctx context.Context, field graphql.CollectedField, obj *model.Pipeline) (ret graphql.Marshaler) {
2726 fc, err := ec.fieldContext_Pipeline_enabled(ctx, field)
2727 if err != nil {
2728 return graphql.Null
2729 }
2730 ctx = graphql.WithFieldContext(ctx, fc)
2731 defer func() {
2732 if r := recover(); r != nil {
2733 ec.Error(ctx, ec.Recover(ctx, r))
2734 ret = graphql.Null
2735 }
2736 }()
2737 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
2738 ctx = rctx // use context from middleware stack in children
2739 return obj.Enabled, nil
2740 })
2741 if err != nil {
2742 ec.Error(ctx, err)
2743 return graphql.Null
2744 }
2745 if resTmp == nil {
2746 if !graphql.HasFieldError(ctx, fc) {
2747 ec.Errorf(ctx, "must not be null")
2748 }
2749 return graphql.Null
2750 }
2751 res := resTmp.(bool)
2752 fc.Result = res
2753 return ec.marshalNBoolean2bool(ctx, field.Selections, res)
2754}
2755
2756func (ec *executionContext) fieldContext_Pipeline_enabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2757 fc = &graphql.FieldContext{

Callers 1

_PipelineMethod · 0.95

Calls 2

marshalNBoolean2boolMethod · 0.95

Tested by

no test coverage detected