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

Method ___EnumValue_isDeprecated

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

Source from the content-addressed store, hash-verified

5270}
5271
5272func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
5273 fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field)
5274 if err != nil {
5275 return graphql.Null
5276 }
5277 ctx = graphql.WithFieldContext(ctx, fc)
5278 defer func() {
5279 if r := recover(); r != nil {
5280 ec.Error(ctx, ec.Recover(ctx, r))
5281 ret = graphql.Null
5282 }
5283 }()
5284 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
5285 ctx = rctx // use context from middleware stack in children
5286 return obj.IsDeprecated(), nil
5287 })
5288 if err != nil {
5289 ec.Error(ctx, err)
5290 return graphql.Null
5291 }
5292 if resTmp == nil {
5293 if !graphql.HasFieldError(ctx, fc) {
5294 ec.Errorf(ctx, "must not be null")
5295 }
5296 return graphql.Null
5297 }
5298 res := resTmp.(bool)
5299 fc.Result = res
5300 return ec.marshalNBoolean2bool(ctx, field.Selections, res)
5301}
5302
5303func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
5304 fc = &graphql.FieldContext{

Callers 1

___EnumValueMethod · 0.95

Tested by

no test coverage detected