(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive)
| 8198 | var __DirectiveImplementors = []string{"__Directive"} |
| 8199 | |
| 8200 | func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { |
| 8201 | fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) |
| 8202 | |
| 8203 | out := graphql.NewFieldSet(fields) |
| 8204 | deferred := make(map[string]*graphql.FieldSet) |
| 8205 | for i, field := range fields { |
| 8206 | switch field.Name { |
| 8207 | case "__typename": |
| 8208 | out.Values[i] = graphql.MarshalString("__Directive") |
| 8209 | case "name": |
| 8210 | out.Values[i] = ec.___Directive_name(ctx, field, obj) |
| 8211 | if out.Values[i] == graphql.Null { |
| 8212 | out.Invalids++ |
| 8213 | } |
| 8214 | case "description": |
| 8215 | out.Values[i] = ec.___Directive_description(ctx, field, obj) |
| 8216 | case "locations": |
| 8217 | out.Values[i] = ec.___Directive_locations(ctx, field, obj) |
| 8218 | if out.Values[i] == graphql.Null { |
| 8219 | out.Invalids++ |
| 8220 | } |
| 8221 | case "args": |
| 8222 | out.Values[i] = ec.___Directive_args(ctx, field, obj) |
| 8223 | if out.Values[i] == graphql.Null { |
| 8224 | out.Invalids++ |
| 8225 | } |
| 8226 | case "isRepeatable": |
| 8227 | out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj) |
| 8228 | if out.Values[i] == graphql.Null { |
| 8229 | out.Invalids++ |
| 8230 | } |
| 8231 | default: |
| 8232 | panic("unknown field " + strconv.Quote(field.Name)) |
| 8233 | } |
| 8234 | } |
| 8235 | out.Dispatch(ctx) |
| 8236 | if out.Invalids > 0 { |
| 8237 | return graphql.Null |
| 8238 | } |
| 8239 | |
| 8240 | atomic.AddInt32(&ec.deferred, int32(len(deferred))) |
| 8241 | |
| 8242 | for label, dfs := range deferred { |
| 8243 | ec.processDeferredGroup(graphql.DeferredGroup{ |
| 8244 | Label: label, |
| 8245 | Path: graphql.GetPath(ctx), |
| 8246 | FieldSet: dfs, |
| 8247 | Context: ctx, |
| 8248 | }) |
| 8249 | } |
| 8250 | |
| 8251 | return out |
| 8252 | } |
| 8253 | |
| 8254 | var __EnumValueImplementors = []string{"__EnumValue"} |
| 8255 |
no test coverage detected