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

Method _SearchResult_chunkID

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

Source from the content-addressed store, hash-verified

4161}
4162
4163func (ec *executionContext) _SearchResult_chunkID(ctx context.Context, field graphql.CollectedField, obj *model.SearchResult) (ret graphql.Marshaler) {
4164 fc, err := ec.fieldContext_SearchResult_chunkID(ctx, field)
4165 if err != nil {
4166 return graphql.Null
4167 }
4168 ctx = graphql.WithFieldContext(ctx, fc)
4169 defer func() {
4170 if r := recover(); r != nil {
4171 ec.Error(ctx, ec.Recover(ctx, r))
4172 ret = graphql.Null
4173 }
4174 }()
4175 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
4176 ctx = rctx // use context from middleware stack in children
4177 return obj.ChunkID, nil
4178 })
4179 if err != nil {
4180 ec.Error(ctx, err)
4181 return graphql.Null
4182 }
4183 if resTmp == nil {
4184 if !graphql.HasFieldError(ctx, fc) {
4185 ec.Errorf(ctx, "must not be null")
4186 }
4187 return graphql.Null
4188 }
4189 res := resTmp.(int)
4190 fc.Result = res
4191 return ec.marshalNInt2int(ctx, field.Selections, res)
4192}
4193
4194func (ec *executionContext) fieldContext_SearchResult_chunkID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4195 fc = &graphql.FieldContext{

Callers 1

_SearchResultMethod · 0.95

Calls 2

marshalNInt2intMethod · 0.95

Tested by

no test coverage detected