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

Method _Storage_name

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

Source from the content-addressed store, hash-verified

4645}
4646
4647func (ec *executionContext) _Storage_name(ctx context.Context, field graphql.CollectedField, obj *model.Storage) (ret graphql.Marshaler) {
4648 fc, err := ec.fieldContext_Storage_name(ctx, field)
4649 if err != nil {
4650 return graphql.Null
4651 }
4652 ctx = graphql.WithFieldContext(ctx, fc)
4653 defer func() {
4654 if r := recover(); r != nil {
4655 ec.Error(ctx, ec.Recover(ctx, r))
4656 ret = graphql.Null
4657 }
4658 }()
4659 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
4660 ctx = rctx // use context from middleware stack in children
4661 return obj.Name, nil
4662 })
4663 if err != nil {
4664 ec.Error(ctx, err)
4665 return graphql.Null
4666 }
4667 if resTmp == nil {
4668 if !graphql.HasFieldError(ctx, fc) {
4669 ec.Errorf(ctx, "must not be null")
4670 }
4671 return graphql.Null
4672 }
4673 res := resTmp.(string)
4674 fc.Result = res
4675 return ec.marshalNString2string(ctx, field.Selections, res)
4676}
4677
4678func (ec *executionContext) fieldContext_Storage_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4679 fc = &graphql.FieldContext{

Callers 1

_StorageMethod · 0.95

Calls 2

marshalNString2stringMethod · 0.95

Tested by

no test coverage detected