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

Method _HuggingFace_name

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

Source from the content-addressed store, hash-verified

1283}
1284
1285func (ec *executionContext) _HuggingFace_name(ctx context.Context, field graphql.CollectedField, obj *model.HuggingFace) (ret graphql.Marshaler) {
1286 fc, err := ec.fieldContext_HuggingFace_name(ctx, field)
1287 if err != nil {
1288 return graphql.Null
1289 }
1290 ctx = graphql.WithFieldContext(ctx, fc)
1291 defer func() {
1292 if r := recover(); r != nil {
1293 ec.Error(ctx, ec.Recover(ctx, r))
1294 ret = graphql.Null
1295 }
1296 }()
1297 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1298 ctx = rctx // use context from middleware stack in children
1299 return obj.Name, nil
1300 })
1301 if err != nil {
1302 ec.Error(ctx, err)
1303 return graphql.Null
1304 }
1305 if resTmp == nil {
1306 if !graphql.HasFieldError(ctx, fc) {
1307 ec.Errorf(ctx, "must not be null")
1308 }
1309 return graphql.Null
1310 }
1311 res := resTmp.(string)
1312 fc.Result = res
1313 return ec.marshalNString2string(ctx, field.Selections, res)
1314}
1315
1316func (ec *executionContext) fieldContext_HuggingFace_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1317 fc = &graphql.FieldContext{

Callers 1

_HuggingFaceMethod · 0.95

Calls 2

marshalNString2stringMethod · 0.95

Tested by

no test coverage detected