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

Method _Model_displayName

pkg/graph/generated.go:1461–1490  ·  view source on GitHub ↗
(ctx context.Context, field graphql.CollectedField, obj *model.Model)

Source from the content-addressed store, hash-verified

1459}
1460
1461func (ec *executionContext) _Model_displayName(ctx context.Context, field graphql.CollectedField, obj *model.Model) (ret graphql.Marshaler) {
1462 fc, err := ec.fieldContext_Model_displayName(ctx, field)
1463 if err != nil {
1464 return graphql.Null
1465 }
1466 ctx = graphql.WithFieldContext(ctx, fc)
1467 defer func() {
1468 if r := recover(); r != nil {
1469 ec.Error(ctx, ec.Recover(ctx, r))
1470 ret = graphql.Null
1471 }
1472 }()
1473 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1474 ctx = rctx // use context from middleware stack in children
1475 return obj.DisplayName, nil
1476 })
1477 if err != nil {
1478 ec.Error(ctx, err)
1479 return graphql.Null
1480 }
1481 if resTmp == nil {
1482 if !graphql.HasFieldError(ctx, fc) {
1483 ec.Errorf(ctx, "must not be null")
1484 }
1485 return graphql.Null
1486 }
1487 res := resTmp.(string)
1488 fc.Result = res
1489 return ec.marshalNString2string(ctx, field.Selections, res)
1490}
1491
1492func (ec *executionContext) fieldContext_Model_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1493 fc = &graphql.FieldContext{

Callers 1

_ModelMethod · 0.95

Calls 2

marshalNString2stringMethod · 0.95

Tested by

no test coverage detected