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

Method _SearchResult_id

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

Source from the content-addressed store, hash-verified

4117}
4118
4119func (ec *executionContext) _SearchResult_id(ctx context.Context, field graphql.CollectedField, obj *model.SearchResult) (ret graphql.Marshaler) {
4120 fc, err := ec.fieldContext_SearchResult_id(ctx, field)
4121 if err != nil {
4122 return graphql.Null
4123 }
4124 ctx = graphql.WithFieldContext(ctx, fc)
4125 defer func() {
4126 if r := recover(); r != nil {
4127 ec.Error(ctx, ec.Recover(ctx, r))
4128 ret = graphql.Null
4129 }
4130 }()
4131 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
4132 ctx = rctx // use context from middleware stack in children
4133 return obj.ID, nil
4134 })
4135 if err != nil {
4136 ec.Error(ctx, err)
4137 return graphql.Null
4138 }
4139 if resTmp == nil {
4140 if !graphql.HasFieldError(ctx, fc) {
4141 ec.Errorf(ctx, "must not be null")
4142 }
4143 return graphql.Null
4144 }
4145 res := resTmp.(string)
4146 fc.Result = res
4147 return ec.marshalNID2string(ctx, field.Selections, res)
4148}
4149
4150func (ec *executionContext) fieldContext_SearchResult_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
4151 fc = &graphql.FieldContext{

Callers 1

_SearchResultMethod · 0.95

Calls 2

marshalNID2stringMethod · 0.95

Tested by

no test coverage detected