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

Method _SearchResult_owner

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

Source from the content-addressed store, hash-verified

4337}
4338
4339func (ec *executionContext) _SearchResult_owner(ctx context.Context, field graphql.CollectedField, obj *model.SearchResult) (ret graphql.Marshaler) {
4340 fc, err := ec.fieldContext_SearchResult_owner(ctx, field)
4341 if err != nil {
4342 return graphql.Null
4343 }
4344 ctx = graphql.WithFieldContext(ctx, fc)
4345 defer func() {
4346 if r := recover(); r != nil {
4347 ec.Error(ctx, ec.Recover(ctx, r))
4348 ret = graphql.Null
4349 }
4350 }()
4351 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
4352 ctx = rctx // use context from middleware stack in children
4353 return obj.Owner, nil
4354 })
4355 if err != nil {
4356 ec.Error(ctx, err)
4357 return graphql.Null
4358 }
4359 if resTmp == nil {
4360 if !graphql.HasFieldError(ctx, fc) {
4361 ec.Errorf(ctx, "must not be null")
4362 }
4363 return graphql.Null
4364 }
4365 res := resTmp.(string)
4366 fc.Result = res
4367 return ec.marshalNString2string(ctx, field.Selections, res)
4368}
4369
4370func (ec *executionContext) fieldContext_SearchResult_owner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4371 fc = &graphql.FieldContext{

Callers 1

_SearchResultMethod · 0.95

Calls 2

marshalNString2stringMethod · 0.95

Tested by

no test coverage detected