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

Method _ModelDeployment_cpu

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

Source from the content-addressed store, hash-verified

1689}
1690
1691func (ec *executionContext) _ModelDeployment_cpu(ctx context.Context, field graphql.CollectedField, obj *model.ModelDeployment) (ret graphql.Marshaler) {
1692 fc, err := ec.fieldContext_ModelDeployment_cpu(ctx, field)
1693 if err != nil {
1694 return graphql.Null
1695 }
1696 ctx = graphql.WithFieldContext(ctx, fc)
1697 defer func() {
1698 if r := recover(); r != nil {
1699 ec.Error(ctx, ec.Recover(ctx, r))
1700 ret = graphql.Null
1701 }
1702 }()
1703 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1704 ctx = rctx // use context from middleware stack in children
1705 return obj.CPU, nil
1706 })
1707 if err != nil {
1708 ec.Error(ctx, err)
1709 return graphql.Null
1710 }
1711 if resTmp == nil {
1712 if !graphql.HasFieldError(ctx, fc) {
1713 ec.Errorf(ctx, "must not be null")
1714 }
1715 return graphql.Null
1716 }
1717 res := resTmp.(string)
1718 fc.Result = res
1719 return ec.marshalNString2string(ctx, field.Selections, res)
1720}
1721
1722func (ec *executionContext) fieldContext_ModelDeployment_cpu(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1723 fc = &graphql.FieldContext{

Callers 1

_ModelDeploymentMethod · 0.95

Tested by

no test coverage detected