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

Method ___InputValue_name

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

Source from the content-addressed store, hash-verified

5645}
5646
5647func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
5648 fc, err := ec.fieldContext___InputValue_name(ctx, field)
5649 if err != nil {
5650 return graphql.Null
5651 }
5652 ctx = graphql.WithFieldContext(ctx, fc)
5653 defer func() {
5654 if r := recover(); r != nil {
5655 ec.Error(ctx, ec.Recover(ctx, r))
5656 ret = graphql.Null
5657 }
5658 }()
5659 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
5660 ctx = rctx // use context from middleware stack in children
5661 return obj.Name, nil
5662 })
5663 if err != nil {
5664 ec.Error(ctx, err)
5665 return graphql.Null
5666 }
5667 if resTmp == nil {
5668 if !graphql.HasFieldError(ctx, fc) {
5669 ec.Errorf(ctx, "must not be null")
5670 }
5671 return graphql.Null
5672 }
5673 res := resTmp.(string)
5674 fc.Result = res
5675 return ec.marshalNString2string(ctx, field.Selections, res)
5676}
5677
5678func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
5679 fc = &graphql.FieldContext{

Callers 1

___InputValueMethod · 0.95

Calls 2

marshalNString2stringMethod · 0.95

Tested by

no test coverage detected