MCPcopy Create free account
hub / github.com/devfullcycle/goexpert / ___Field

Method ___Field

13-GraphQL/graph/generated/generated.go:3338–3391  ·  view source on GitHub ↗
(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field)

Source from the content-addressed store, hash-verified

3336var __FieldImplementors = []string{"__Field"}
3337
3338func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler {
3339 fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors)
3340 out := graphql.NewFieldSet(fields)
3341 var invalids uint32
3342 for i, field := range fields {
3343 switch field.Name {
3344 case "__typename":
3345 out.Values[i] = graphql.MarshalString("__Field")
3346 case "name":
3347
3348 out.Values[i] = ec.___Field_name(ctx, field, obj)
3349
3350 if out.Values[i] == graphql.Null {
3351 invalids++
3352 }
3353 case "description":
3354
3355 out.Values[i] = ec.___Field_description(ctx, field, obj)
3356
3357 case "args":
3358
3359 out.Values[i] = ec.___Field_args(ctx, field, obj)
3360
3361 if out.Values[i] == graphql.Null {
3362 invalids++
3363 }
3364 case "type":
3365
3366 out.Values[i] = ec.___Field_type(ctx, field, obj)
3367
3368 if out.Values[i] == graphql.Null {
3369 invalids++
3370 }
3371 case "isDeprecated":
3372
3373 out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)
3374
3375 if out.Values[i] == graphql.Null {
3376 invalids++
3377 }
3378 case "deprecationReason":
3379
3380 out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)
3381
3382 default:
3383 panic("unknown field " + strconv.Quote(field.Name))
3384 }
3385 }
3386 out.Dispatch()
3387 if invalids > 0 {
3388 return graphql.Null
3389 }
3390 return out
3391}
3392
3393var __InputValueImplementors = []string{"__InputValue"}
3394

Calls 7

___Field_nameMethod · 0.95
___Field_descriptionMethod · 0.95
___Field_argsMethod · 0.95
___Field_typeMethod · 0.95
___Field_isDeprecatedMethod · 0.95
DispatchMethod · 0.65

Tested by

no test coverage detected