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

Method ___Field_name

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

Source from the content-addressed store, hash-verified

5355}
5356
5357func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
5358 fc, err := ec.fieldContext___Field_name(ctx, field)
5359 if err != nil {
5360 return graphql.Null
5361 }
5362 ctx = graphql.WithFieldContext(ctx, fc)
5363 defer func() {
5364 if r := recover(); r != nil {
5365 ec.Error(ctx, ec.Recover(ctx, r))
5366 ret = graphql.Null
5367 }
5368 }()
5369 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
5370 ctx = rctx // use context from middleware stack in children
5371 return obj.Name, nil
5372 })
5373 if err != nil {
5374 ec.Error(ctx, err)
5375 return graphql.Null
5376 }
5377 if resTmp == nil {
5378 if !graphql.HasFieldError(ctx, fc) {
5379 ec.Errorf(ctx, "must not be null")
5380 }
5381 return graphql.Null
5382 }
5383 res := resTmp.(string)
5384 fc.Result = res
5385 return ec.marshalNString2string(ctx, field.Selections, res)
5386}
5387
5388func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
5389 fc = &graphql.FieldContext{

Callers 1

___FieldMethod · 0.95

Calls 2

marshalNString2stringMethod · 0.95

Tested by

no test coverage detected