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

Method ___Field_isDeprecated

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

Source from the content-addressed store, hash-verified

5560}
5561
5562func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
5563 fc, err := ec.fieldContext___Field_isDeprecated(ctx, field)
5564 if err != nil {
5565 return graphql.Null
5566 }
5567 ctx = graphql.WithFieldContext(ctx, fc)
5568 defer func() {
5569 if r := recover(); r != nil {
5570 ec.Error(ctx, ec.Recover(ctx, r))
5571 ret = graphql.Null
5572 }
5573 }()
5574 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
5575 ctx = rctx // use context from middleware stack in children
5576 return obj.IsDeprecated(), nil
5577 })
5578 if err != nil {
5579 ec.Error(ctx, err)
5580 return graphql.Null
5581 }
5582 if resTmp == nil {
5583 if !graphql.HasFieldError(ctx, fc) {
5584 ec.Errorf(ctx, "must not be null")
5585 }
5586 return graphql.Null
5587 }
5588 res := resTmp.(bool)
5589 fc.Result = res
5590 return ec.marshalNBoolean2bool(ctx, field.Selections, res)
5591}
5592
5593func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
5594 fc = &graphql.FieldContext{

Callers 1

___FieldMethod · 0.95

Tested by

no test coverage detected