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

Method _StorageDeployment_cpu

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

Source from the content-addressed store, hash-verified

4870}
4871
4872func (ec *executionContext) _StorageDeployment_cpu(ctx context.Context, field graphql.CollectedField, obj *model.StorageDeployment) (ret graphql.Marshaler) {
4873 fc, err := ec.fieldContext_StorageDeployment_cpu(ctx, field)
4874 if err != nil {
4875 return graphql.Null
4876 }
4877 ctx = graphql.WithFieldContext(ctx, fc)
4878 defer func() {
4879 if r := recover(); r != nil {
4880 ec.Error(ctx, ec.Recover(ctx, r))
4881 ret = graphql.Null
4882 }
4883 }()
4884 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
4885 ctx = rctx // use context from middleware stack in children
4886 return obj.CPU, nil
4887 })
4888 if err != nil {
4889 ec.Error(ctx, err)
4890 return graphql.Null
4891 }
4892 if resTmp == nil {
4893 if !graphql.HasFieldError(ctx, fc) {
4894 ec.Errorf(ctx, "must not be null")
4895 }
4896 return graphql.Null
4897 }
4898 res := resTmp.(string)
4899 fc.Result = res
4900 return ec.marshalNString2string(ctx, field.Selections, res)
4901}
4902
4903func (ec *executionContext) fieldContext_StorageDeployment_cpu(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4904 fc = &graphql.FieldContext{

Callers 1

_StorageDeploymentMethod · 0.95

Tested by

no test coverage detected