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

Method _Repository_displayName

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

Source from the content-addressed store, hash-verified

3809}
3810
3811func (ec *executionContext) _Repository_displayName(ctx context.Context, field graphql.CollectedField, obj *model.Repository) (ret graphql.Marshaler) {
3812 fc, err := ec.fieldContext_Repository_displayName(ctx, field)
3813 if err != nil {
3814 return graphql.Null
3815 }
3816 ctx = graphql.WithFieldContext(ctx, fc)
3817 defer func() {
3818 if r := recover(); r != nil {
3819 ec.Error(ctx, ec.Recover(ctx, r))
3820 ret = graphql.Null
3821 }
3822 }()
3823 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
3824 ctx = rctx // use context from middleware stack in children
3825 return obj.DisplayName, nil
3826 })
3827 if err != nil {
3828 ec.Error(ctx, err)
3829 return graphql.Null
3830 }
3831 if resTmp == nil {
3832 if !graphql.HasFieldError(ctx, fc) {
3833 ec.Errorf(ctx, "must not be null")
3834 }
3835 return graphql.Null
3836 }
3837 res := resTmp.(string)
3838 fc.Result = res
3839 return ec.marshalNString2string(ctx, field.Selections, res)
3840}
3841
3842func (ec *executionContext) fieldContext_Repository_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3843 fc = &graphql.FieldContext{

Callers 1

_RepositoryMethod · 0.95

Tested by

no test coverage detected