(ctx context.Context, field graphql.CollectedField)
| 3513 | } |
| 3514 | |
| 3515 | func (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 | |
| 3546 | func (ec *executionContext) fieldContext_Query_semanticSearch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { |
| 3547 | fc = &graphql.FieldContext{ |
no test coverage detected