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

Method _SearchResult_path

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

Source from the content-addressed store, hash-verified

4293}
4294
4295func (ec *executionContext) _SearchResult_path(ctx context.Context, field graphql.CollectedField, obj *model.SearchResult) (ret graphql.Marshaler) {
4296 fc, err := ec.fieldContext_SearchResult_path(ctx, field)
4297 if err != nil {
4298 return graphql.Null
4299 }
4300 ctx = graphql.WithFieldContext(ctx, fc)
4301 defer func() {
4302 if r := recover(); r != nil {
4303 ec.Error(ctx, ec.Recover(ctx, r))
4304 ret = graphql.Null
4305 }
4306 }()
4307 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
4308 ctx = rctx // use context from middleware stack in children
4309 return obj.Path, nil
4310 })
4311 if err != nil {
4312 ec.Error(ctx, err)
4313 return graphql.Null
4314 }
4315 if resTmp == nil {
4316 if !graphql.HasFieldError(ctx, fc) {
4317 ec.Errorf(ctx, "must not be null")
4318 }
4319 return graphql.Null
4320 }
4321 res := resTmp.(string)
4322 fc.Result = res
4323 return ec.marshalNString2string(ctx, field.Selections, res)
4324}
4325
4326func (ec *executionContext) fieldContext_SearchResult_path(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4327 fc = &graphql.FieldContext{

Callers 1

_SearchResultMethod · 0.95

Calls 2

marshalNString2stringMethod · 0.95

Tested by

no test coverage detected