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

Method _Query_semanticSearch

pkg/graph/generated.go:3515–3544  ·  view source on GitHub ↗
(ctx context.Context, field graphql.CollectedField)

Source from the content-addressed store, hash-verified

3513}
3514
3515func (ec *executionContext) _Query_semanticSearch(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
3516 fc, err := ec.fieldContext_Query_semanticSearch(ctx, field)
3517 if err != nil {
3518 return graphql.Null
3519 }
3520 ctx = graphql.WithFieldContext(ctx, fc)
3521 defer func() {
3522 if r := recover(); r != nil {
3523 ec.Error(ctx, ec.Recover(ctx, r))
3524 ret = graphql.Null
3525 }
3526 }()
3527 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
3528 ctx = rctx // use context from middleware stack in children
3529 return ec.resolvers.Query().SemanticSearch(rctx, fc.Args["query"].(model.QueryInput))
3530 })
3531 if err != nil {
3532 ec.Error(ctx, err)
3533 return graphql.Null
3534 }
3535 if resTmp == nil {
3536 if !graphql.HasFieldError(ctx, fc) {
3537 ec.Errorf(ctx, "must not be null")
3538 }
3539 return graphql.Null
3540 }
3541 res := resTmp.([]*model.SearchResult)
3542 fc.Result = res
3543 return ec.marshalNSearchResult2ᚕᚖgithubᚗcomᚋencoderᚑrunᚋoperatorᚋpkgᚋgraphᚋmodelᚐSearchResultᚄ(ctx, field.Selections, res)
3544}
3545
3546func (ec *executionContext) fieldContext_Query_semanticSearch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
3547 fc = &graphql.FieldContext{

Callers 1

_QueryMethod · 0.95

Tested by

no test coverage detected