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

Method ___EnumValue_name

pkg/graph/generated.go:5187–5216  ·  view source on GitHub ↗
(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue)

Source from the content-addressed store, hash-verified

5185}
5186
5187func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
5188 fc, err := ec.fieldContext___EnumValue_name(ctx, field)
5189 if err != nil {
5190 return graphql.Null
5191 }
5192 ctx = graphql.WithFieldContext(ctx, fc)
5193 defer func() {
5194 if r := recover(); r != nil {
5195 ec.Error(ctx, ec.Recover(ctx, r))
5196 ret = graphql.Null
5197 }
5198 }()
5199 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
5200 ctx = rctx // use context from middleware stack in children
5201 return obj.Name, nil
5202 })
5203 if err != nil {
5204 ec.Error(ctx, err)
5205 return graphql.Null
5206 }
5207 if resTmp == nil {
5208 if !graphql.HasFieldError(ctx, fc) {
5209 ec.Errorf(ctx, "must not be null")
5210 }
5211 return graphql.Null
5212 }
5213 res := resTmp.(string)
5214 fc.Result = res
5215 return ec.marshalNString2string(ctx, field.Selections, res)
5216}
5217
5218func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
5219 fc = &graphql.FieldContext{

Callers 1

___EnumValueMethod · 0.95

Calls 2

marshalNString2stringMethod · 0.95

Tested by

no test coverage detected