MCPcopy Create free account
hub / github.com/git-bug/git-bug / _LabelEdge_cursor

Method _LabelEdge_cursor

api/graphql/graph/label.generated.go:428–457  ·  view source on GitHub ↗
(ctx context.Context, field graphql.CollectedField, obj *models.LabelEdge)

Source from the content-addressed store, hash-verified

426}
427
428func (ec *executionContext) _LabelEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.LabelEdge) (ret graphql.Marshaler) {
429 fc, err := ec.fieldContext_LabelEdge_cursor(ctx, field)
430 if err != nil {
431 return graphql.Null
432 }
433 ctx = graphql.WithFieldContext(ctx, fc)
434 defer func() {
435 if r := recover(); r != nil {
436 ec.Error(ctx, ec.Recover(ctx, r))
437 ret = graphql.Null
438 }
439 }()
440 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
441 ctx = rctx // use context from middleware stack in children
442 return obj.Cursor, nil
443 })
444 if err != nil {
445 ec.Error(ctx, err)
446 return graphql.Null
447 }
448 if resTmp == nil {
449 if !graphql.HasFieldError(ctx, fc) {
450 ec.Errorf(ctx, "must not be null")
451 }
452 return graphql.Null
453 }
454 res := resTmp.(string)
455 fc.Result = res
456 return ec.marshalNString2string(ctx, field.Selections, res)
457}
458
459func (ec *executionContext) fieldContext_LabelEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
460 fc = &graphql.FieldContext{

Callers 1

_LabelEdgeMethod · 0.95

Calls 4

marshalNString2stringMethod · 0.95
ErrorfMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected