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

Method _SearchResult_endIndex

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

Source from the content-addressed store, hash-verified

4469}
4470
4471func (ec *executionContext) _SearchResult_endIndex(ctx context.Context, field graphql.CollectedField, obj *model.SearchResult) (ret graphql.Marshaler) {
4472 fc, err := ec.fieldContext_SearchResult_endIndex(ctx, field)
4473 if err != nil {
4474 return graphql.Null
4475 }
4476 ctx = graphql.WithFieldContext(ctx, fc)
4477 defer func() {
4478 if r := recover(); r != nil {
4479 ec.Error(ctx, ec.Recover(ctx, r))
4480 ret = graphql.Null
4481 }
4482 }()
4483 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
4484 ctx = rctx // use context from middleware stack in children
4485 return obj.EndIndex, nil
4486 })
4487 if err != nil {
4488 ec.Error(ctx, err)
4489 return graphql.Null
4490 }
4491 if resTmp == nil {
4492 if !graphql.HasFieldError(ctx, fc) {
4493 ec.Errorf(ctx, "must not be null")
4494 }
4495 return graphql.Null
4496 }
4497 res := resTmp.(int)
4498 fc.Result = res
4499 return ec.marshalNInt2int(ctx, field.Selections, res)
4500}
4501
4502func (ec *executionContext) fieldContext_SearchResult_endIndex(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4503 fc = &graphql.FieldContext{

Callers 1

_SearchResultMethod · 0.95

Calls 2

marshalNInt2intMethod · 0.95

Tested by

no test coverage detected