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

Method _Pipeline_id

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

Source from the content-addressed store, hash-verified

2591}
2592
2593func (ec *executionContext) _Pipeline_id(ctx context.Context, field graphql.CollectedField, obj *model.Pipeline) (ret graphql.Marshaler) {
2594 fc, err := ec.fieldContext_Pipeline_id(ctx, field)
2595 if err != nil {
2596 return graphql.Null
2597 }
2598 ctx = graphql.WithFieldContext(ctx, fc)
2599 defer func() {
2600 if r := recover(); r != nil {
2601 ec.Error(ctx, ec.Recover(ctx, r))
2602 ret = graphql.Null
2603 }
2604 }()
2605 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
2606 ctx = rctx // use context from middleware stack in children
2607 return obj.ID, nil
2608 })
2609 if err != nil {
2610 ec.Error(ctx, err)
2611 return graphql.Null
2612 }
2613 if resTmp == nil {
2614 if !graphql.HasFieldError(ctx, fc) {
2615 ec.Errorf(ctx, "must not be null")
2616 }
2617 return graphql.Null
2618 }
2619 res := resTmp.(string)
2620 fc.Result = res
2621 return ec.marshalNID2string(ctx, field.Selections, res)
2622}
2623
2624func (ec *executionContext) fieldContext_Pipeline_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2625 fc = &graphql.FieldContext{

Callers 1

_PipelineMethod · 0.95

Calls 2

marshalNID2stringMethod · 0.95

Tested by

no test coverage detected