(ctx context.Context, sel ast.SelectionSet, obj *model.Course)
| 3045 | var courseImplementors = []string{"Course"} |
| 3046 | |
| 3047 | func (ec *executionContext) _Course(ctx context.Context, sel ast.SelectionSet, obj *model.Course) graphql.Marshaler { |
| 3048 | fields := graphql.CollectFields(ec.OperationContext, sel, courseImplementors) |
| 3049 | out := graphql.NewFieldSet(fields) |
| 3050 | var invalids uint32 |
| 3051 | for i, field := range fields { |
| 3052 | switch field.Name { |
| 3053 | case "__typename": |
| 3054 | out.Values[i] = graphql.MarshalString("Course") |
| 3055 | case "id": |
| 3056 | |
| 3057 | out.Values[i] = ec._Course_id(ctx, field, obj) |
| 3058 | |
| 3059 | if out.Values[i] == graphql.Null { |
| 3060 | atomic.AddUint32(&invalids, 1) |
| 3061 | } |
| 3062 | case "name": |
| 3063 | |
| 3064 | out.Values[i] = ec._Course_name(ctx, field, obj) |
| 3065 | |
| 3066 | if out.Values[i] == graphql.Null { |
| 3067 | atomic.AddUint32(&invalids, 1) |
| 3068 | } |
| 3069 | case "description": |
| 3070 | |
| 3071 | out.Values[i] = ec._Course_description(ctx, field, obj) |
| 3072 | |
| 3073 | case "category": |
| 3074 | field := field |
| 3075 | |
| 3076 | innerFunc := func(ctx context.Context) (res graphql.Marshaler) { |
| 3077 | defer func() { |
| 3078 | if r := recover(); r != nil { |
| 3079 | ec.Error(ctx, ec.Recover(ctx, r)) |
| 3080 | } |
| 3081 | }() |
| 3082 | res = ec._Course_category(ctx, field, obj) |
| 3083 | if res == graphql.Null { |
| 3084 | atomic.AddUint32(&invalids, 1) |
| 3085 | } |
| 3086 | return res |
| 3087 | } |
| 3088 | |
| 3089 | out.Concurrently(i, func() graphql.Marshaler { |
| 3090 | return innerFunc(ctx) |
| 3091 | |
| 3092 | }) |
| 3093 | default: |
| 3094 | panic("unknown field " + strconv.Quote(field.Name)) |
| 3095 | } |
| 3096 | } |
| 3097 | out.Dispatch() |
| 3098 | if invalids > 0 { |
| 3099 | return graphql.Null |
| 3100 | } |
| 3101 | return out |
| 3102 | } |
| 3103 | |
| 3104 | var mutationImplementors = []string{"Mutation"} |
no test coverage detected