(ctx context.Context, field graphql.CollectedField, obj *model.Course)
| 573 | } |
| 574 | |
| 575 | func (ec *executionContext) _Course_id(ctx context.Context, field graphql.CollectedField, obj *model.Course) (ret graphql.Marshaler) { |
| 576 | fc, err := ec.fieldContext_Course_id(ctx, field) |
| 577 | if err != nil { |
| 578 | return graphql.Null |
| 579 | } |
| 580 | ctx = graphql.WithFieldContext(ctx, fc) |
| 581 | defer func() { |
| 582 | if r := recover(); r != nil { |
| 583 | ec.Error(ctx, ec.Recover(ctx, r)) |
| 584 | ret = graphql.Null |
| 585 | } |
| 586 | }() |
| 587 | resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { |
| 588 | ctx = rctx // use context from middleware stack in children |
| 589 | return obj.ID, nil |
| 590 | }) |
| 591 | if err != nil { |
| 592 | ec.Error(ctx, err) |
| 593 | return graphql.Null |
| 594 | } |
| 595 | if resTmp == nil { |
| 596 | if !graphql.HasFieldError(ctx, fc) { |
| 597 | ec.Errorf(ctx, "must not be null") |
| 598 | } |
| 599 | return graphql.Null |
| 600 | } |
| 601 | res := resTmp.(string) |
| 602 | fc.Result = res |
| 603 | return ec.marshalNID2string(ctx, field.Selections, res) |
| 604 | } |
| 605 | |
| 606 | func (ec *executionContext) fieldContext_Course_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { |
| 607 | fc = &graphql.FieldContext{ |
no test coverage detected