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

Method _HuggingFace_organization

pkg/graph/generated.go:1241–1270  ·  view source on GitHub ↗

endregion ***************************** args.gotpl ***************************** region ************************** directives.gotpl ************************** endregion ************************** directives.gotpl ************************** region **************************** field.gotpl ******

(ctx context.Context, field graphql.CollectedField, obj *model.HuggingFace)

Source from the content-addressed store, hash-verified

1239// region **************************** field.gotpl *****************************
1240
1241func (ec *executionContext) _HuggingFace_organization(ctx context.Context, field graphql.CollectedField, obj *model.HuggingFace) (ret graphql.Marshaler) {
1242 fc, err := ec.fieldContext_HuggingFace_organization(ctx, field)
1243 if err != nil {
1244 return graphql.Null
1245 }
1246 ctx = graphql.WithFieldContext(ctx, fc)
1247 defer func() {
1248 if r := recover(); r != nil {
1249 ec.Error(ctx, ec.Recover(ctx, r))
1250 ret = graphql.Null
1251 }
1252 }()
1253 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1254 ctx = rctx // use context from middleware stack in children
1255 return obj.Organization, nil
1256 })
1257 if err != nil {
1258 ec.Error(ctx, err)
1259 return graphql.Null
1260 }
1261 if resTmp == nil {
1262 if !graphql.HasFieldError(ctx, fc) {
1263 ec.Errorf(ctx, "must not be null")
1264 }
1265 return graphql.Null
1266 }
1267 res := resTmp.(string)
1268 fc.Result = res
1269 return ec.marshalNString2string(ctx, field.Selections, res)
1270}
1271
1272func (ec *executionContext) fieldContext_HuggingFace_organization(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1273 fc = &graphql.FieldContext{

Callers 1

_HuggingFaceMethod · 0.95

Tested by

no test coverage detected