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

Method _Model_status

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

Source from the content-addressed store, hash-verified

1503}
1504
1505func (ec *executionContext) _Model_status(ctx context.Context, field graphql.CollectedField, obj *model.Model) (ret graphql.Marshaler) {
1506 fc, err := ec.fieldContext_Model_status(ctx, field)
1507 if err != nil {
1508 return graphql.Null
1509 }
1510 ctx = graphql.WithFieldContext(ctx, fc)
1511 defer func() {
1512 if r := recover(); r != nil {
1513 ec.Error(ctx, ec.Recover(ctx, r))
1514 ret = graphql.Null
1515 }
1516 }()
1517 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1518 ctx = rctx // use context from middleware stack in children
1519 return obj.Status, nil
1520 })
1521 if err != nil {
1522 ec.Error(ctx, err)
1523 return graphql.Null
1524 }
1525 if resTmp == nil {
1526 if !graphql.HasFieldError(ctx, fc) {
1527 ec.Errorf(ctx, "must not be null")
1528 }
1529 return graphql.Null
1530 }
1531 res := resTmp.(model.ModelStatus)
1532 fc.Result = res
1533 return ec.marshalNModelStatus2githubᚗcomᚋencoderᚑrunᚋoperatorᚋpkgᚋgraphᚋmodelᚐModelStatus(ctx, field.Selections, res)
1534}
1535
1536func (ec *executionContext) fieldContext_Model_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1537 fc = &graphql.FieldContext{

Callers 1

_ModelMethod · 0.95

Tested by

no test coverage detected