Best Keploy code snippet using generated.___EnumValue
gql.go
Source:gql.go
...366 return arr1367}368var __EnumValueImplementors = []string{"__EnumValue"}369// nolint: gocyclo, errcheck, gas, goconst370func (ec *executionContext) ___EnumValue(sel []query.Selection, obj *introspection.EnumValue) graphql.Marshaler {371 fields := graphql.CollectFields(ec.doc, sel, __EnumValueImplementors, ec.variables)372 out := graphql.NewOrderedMap(len(fields))373 for i, field := range fields {374 out.Keys[i] = field.Alias375 switch field.Name {376 case "__typename":377 out.Values[i] = graphql.MarshalString("__EnumValue")378 case "name":379 out.Values[i] = ec.___EnumValue_name(field, obj)380 case "description":381 out.Values[i] = ec.___EnumValue_description(field, obj)382 case "isDeprecated":383 out.Values[i] = ec.___EnumValue_isDeprecated(field, obj)384 case "deprecationReason":385 out.Values[i] = ec.___EnumValue_deprecationReason(field, obj)386 default:387 panic("unknown field " + strconv.Quote(field.Name))388 }389 }390 return out391}392func (ec *executionContext) ___EnumValue_name(field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {393 res := obj.Name()394 return graphql.MarshalString(res)395}396func (ec *executionContext) ___EnumValue_description(field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {397 res := obj.Description()398 if res == nil {399 return graphql.Null400 }401 return graphql.MarshalString(*res)402}403func (ec *executionContext) ___EnumValue_isDeprecated(field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {404 res := obj.IsDeprecated()405 return graphql.MarshalBoolean(res)406}407func (ec *executionContext) ___EnumValue_deprecationReason(field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {408 res := obj.DeprecationReason()409 if res == nil {410 return graphql.Null411 }412 return graphql.MarshalString(*res)413}414var __FieldImplementors = []string{"__Field"}415// nolint: gocyclo, errcheck, gas, goconst416func (ec *executionContext) ___Field(sel []query.Selection, obj *introspection.Field) graphql.Marshaler {417 fields := graphql.CollectFields(ec.doc, sel, __FieldImplementors, ec.variables)418 out := graphql.NewOrderedMap(len(fields))419 for i, field := range fields {420 out.Keys[i] = field.Alias421 switch field.Name {422 case "__typename":423 out.Values[i] = graphql.MarshalString("__Field")424 case "name":425 out.Values[i] = ec.___Field_name(field, obj)426 case "description":427 out.Values[i] = ec.___Field_description(field, obj)428 case "args":429 out.Values[i] = ec.___Field_args(field, obj)430 case "type":431 out.Values[i] = ec.___Field_type(field, obj)432 case "isDeprecated":433 out.Values[i] = ec.___Field_isDeprecated(field, obj)434 case "deprecationReason":435 out.Values[i] = ec.___Field_deprecationReason(field, obj)436 default:437 panic("unknown field " + strconv.Quote(field.Name))438 }439 }440 return out441}442func (ec *executionContext) ___Field_name(field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {443 res := obj.Name()444 return graphql.MarshalString(res)445}446func (ec *executionContext) ___Field_description(field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {447 res := obj.Description()448 if res == nil {449 return graphql.Null450 }451 return graphql.MarshalString(*res)452}453func (ec *executionContext) ___Field_args(field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {454 res := obj.Args()455 arr1 := graphql.Array{}456 for idx1 := range res {457 arr1 = append(arr1, func() graphql.Marshaler {458 if res[idx1] == nil {459 return graphql.Null460 }461 return ec.___InputValue(field.Selections, res[idx1])462 }())463 }464 return arr1465}466func (ec *executionContext) ___Field_type(field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {467 res := obj.Type()468 if res == nil {469 return graphql.Null470 }471 return ec.___Type(field.Selections, res)472}473func (ec *executionContext) ___Field_isDeprecated(field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {474 res := obj.IsDeprecated()475 return graphql.MarshalBoolean(res)476}477func (ec *executionContext) ___Field_deprecationReason(field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {478 res := obj.DeprecationReason()479 if res == nil {480 return graphql.Null481 }482 return graphql.MarshalString(*res)483}484var __InputValueImplementors = []string{"__InputValue"}485// nolint: gocyclo, errcheck, gas, goconst486func (ec *executionContext) ___InputValue(sel []query.Selection, obj *introspection.InputValue) graphql.Marshaler {487 fields := graphql.CollectFields(ec.doc, sel, __InputValueImplementors, ec.variables)488 out := graphql.NewOrderedMap(len(fields))489 for i, field := range fields {490 out.Keys[i] = field.Alias491 switch field.Name {492 case "__typename":493 out.Values[i] = graphql.MarshalString("__InputValue")494 case "name":495 out.Values[i] = ec.___InputValue_name(field, obj)496 case "description":497 out.Values[i] = ec.___InputValue_description(field, obj)498 case "type":499 out.Values[i] = ec.___InputValue_type(field, obj)500 case "defaultValue":501 out.Values[i] = ec.___InputValue_defaultValue(field, obj)502 default:503 panic("unknown field " + strconv.Quote(field.Name))504 }505 }506 return out507}508func (ec *executionContext) ___InputValue_name(field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {509 res := obj.Name()510 return graphql.MarshalString(res)511}512func (ec *executionContext) ___InputValue_description(field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {513 res := obj.Description()514 if res == nil {515 return graphql.Null516 }517 return graphql.MarshalString(*res)518}519func (ec *executionContext) ___InputValue_type(field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {520 res := obj.Type()521 if res == nil {522 return graphql.Null523 }524 return ec.___Type(field.Selections, res)525}526func (ec *executionContext) ___InputValue_defaultValue(field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {527 res := obj.DefaultValue()528 if res == nil {529 return graphql.Null530 }531 return graphql.MarshalString(*res)532}533var __SchemaImplementors = []string{"__Schema"}534// nolint: gocyclo, errcheck, gas, goconst535func (ec *executionContext) ___Schema(sel []query.Selection, obj *introspection.Schema) graphql.Marshaler {536 fields := graphql.CollectFields(ec.doc, sel, __SchemaImplementors, ec.variables)537 out := graphql.NewOrderedMap(len(fields))538 for i, field := range fields {539 out.Keys[i] = field.Alias540 switch field.Name {541 case "__typename":542 out.Values[i] = graphql.MarshalString("__Schema")543 case "types":544 out.Values[i] = ec.___Schema_types(field, obj)545 case "queryType":546 out.Values[i] = ec.___Schema_queryType(field, obj)547 case "mutationType":548 out.Values[i] = ec.___Schema_mutationType(field, obj)549 case "subscriptionType":550 out.Values[i] = ec.___Schema_subscriptionType(field, obj)551 case "directives":552 out.Values[i] = ec.___Schema_directives(field, obj)553 default:554 panic("unknown field " + strconv.Quote(field.Name))555 }556 }557 return out558}559func (ec *executionContext) ___Schema_types(field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {560 res := obj.Types()561 arr1 := graphql.Array{}562 for idx1 := range res {563 arr1 = append(arr1, func() graphql.Marshaler {564 if res[idx1] == nil {565 return graphql.Null566 }567 return ec.___Type(field.Selections, res[idx1])568 }())569 }570 return arr1571}572func (ec *executionContext) ___Schema_queryType(field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {573 res := obj.QueryType()574 if res == nil {575 return graphql.Null576 }577 return ec.___Type(field.Selections, res)578}579func (ec *executionContext) ___Schema_mutationType(field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {580 res := obj.MutationType()581 if res == nil {582 return graphql.Null583 }584 return ec.___Type(field.Selections, res)585}586func (ec *executionContext) ___Schema_subscriptionType(field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {587 res := obj.SubscriptionType()588 if res == nil {589 return graphql.Null590 }591 return ec.___Type(field.Selections, res)592}593func (ec *executionContext) ___Schema_directives(field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {594 res := obj.Directives()595 arr1 := graphql.Array{}596 for idx1 := range res {597 arr1 = append(arr1, func() graphql.Marshaler {598 if res[idx1] == nil {599 return graphql.Null600 }601 return ec.___Directive(field.Selections, res[idx1])602 }())603 }604 return arr1605}606var __TypeImplementors = []string{"__Type"}607// nolint: gocyclo, errcheck, gas, goconst608func (ec *executionContext) ___Type(sel []query.Selection, obj *introspection.Type) graphql.Marshaler {609 fields := graphql.CollectFields(ec.doc, sel, __TypeImplementors, ec.variables)610 out := graphql.NewOrderedMap(len(fields))611 for i, field := range fields {612 out.Keys[i] = field.Alias613 switch field.Name {614 case "__typename":615 out.Values[i] = graphql.MarshalString("__Type")616 case "kind":617 out.Values[i] = ec.___Type_kind(field, obj)618 case "name":619 out.Values[i] = ec.___Type_name(field, obj)620 case "description":621 out.Values[i] = ec.___Type_description(field, obj)622 case "fields":623 out.Values[i] = ec.___Type_fields(field, obj)624 case "interfaces":625 out.Values[i] = ec.___Type_interfaces(field, obj)626 case "possibleTypes":627 out.Values[i] = ec.___Type_possibleTypes(field, obj)628 case "enumValues":629 out.Values[i] = ec.___Type_enumValues(field, obj)630 case "inputFields":631 out.Values[i] = ec.___Type_inputFields(field, obj)632 case "ofType":633 out.Values[i] = ec.___Type_ofType(field, obj)634 default:635 panic("unknown field " + strconv.Quote(field.Name))636 }637 }638 return out639}640func (ec *executionContext) ___Type_kind(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {641 res := obj.Kind()642 return graphql.MarshalString(res)643}644func (ec *executionContext) ___Type_name(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {645 res := obj.Name()646 if res == nil {647 return graphql.Null648 }649 return graphql.MarshalString(*res)650}651func (ec *executionContext) ___Type_description(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {652 res := obj.Description()653 if res == nil {654 return graphql.Null655 }656 return graphql.MarshalString(*res)657}658func (ec *executionContext) ___Type_fields(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {659 var arg0 bool660 if tmp, ok := field.Args["includeDeprecated"]; ok {661 var err error662 arg0, err = graphql.UnmarshalBoolean(tmp)663 if err != nil {664 ec.Error(err)665 return graphql.Null666 }667 }668 res := obj.Fields(arg0)669 arr1 := graphql.Array{}670 for idx1 := range res {671 arr1 = append(arr1, func() graphql.Marshaler {672 if res[idx1] == nil {673 return graphql.Null674 }675 return ec.___Field(field.Selections, res[idx1])676 }())677 }678 return arr1679}680func (ec *executionContext) ___Type_interfaces(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {681 res := obj.Interfaces()682 arr1 := graphql.Array{}683 for idx1 := range res {684 arr1 = append(arr1, func() graphql.Marshaler {685 if res[idx1] == nil {686 return graphql.Null687 }688 return ec.___Type(field.Selections, res[idx1])689 }())690 }691 return arr1692}693func (ec *executionContext) ___Type_possibleTypes(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {694 res := obj.PossibleTypes()695 arr1 := graphql.Array{}696 for idx1 := range res {697 arr1 = append(arr1, func() graphql.Marshaler {698 if res[idx1] == nil {699 return graphql.Null700 }701 return ec.___Type(field.Selections, res[idx1])702 }())703 }704 return arr1705}706func (ec *executionContext) ___Type_enumValues(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {707 var arg0 bool708 if tmp, ok := field.Args["includeDeprecated"]; ok {709 var err error710 arg0, err = graphql.UnmarshalBoolean(tmp)711 if err != nil {712 ec.Error(err)713 return graphql.Null714 }715 }716 res := obj.EnumValues(arg0)717 arr1 := graphql.Array{}718 for idx1 := range res {719 arr1 = append(arr1, func() graphql.Marshaler {720 if res[idx1] == nil {721 return graphql.Null722 }723 return ec.___EnumValue(field.Selections, res[idx1])724 }())725 }726 return arr1727}728func (ec *executionContext) ___Type_inputFields(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {729 res := obj.InputFields()730 arr1 := graphql.Array{}731 for idx1 := range res {732 arr1 = append(arr1, func() graphql.Marshaler {733 if res[idx1] == nil {734 return graphql.Null735 }736 return ec.___InputValue(field.Selections, res[idx1])737 }())...
generated.go
Source:generated.go
...245 return arr1246}247var __EnumValueImplementors = []string{"__EnumValue"}248// nolint: gocyclo, errcheck, gas, goconst249func (ec *executionContext) ___EnumValue(sel []query.Selection, obj *introspection.EnumValue) graphql.Marshaler {250 fields := graphql.CollectFields(ec.doc, sel, __EnumValueImplementors, ec.variables)251 out := graphql.NewOrderedMap(len(fields))252 for i, field := range fields {253 out.Keys[i] = field.Alias254 switch field.Name {255 case "__typename":256 out.Values[i] = graphql.MarshalString("__EnumValue")257 case "name":258 out.Values[i] = ec.___EnumValue_name(field, obj)259 case "description":260 out.Values[i] = ec.___EnumValue_description(field, obj)261 case "isDeprecated":262 out.Values[i] = ec.___EnumValue_isDeprecated(field, obj)263 case "deprecationReason":264 out.Values[i] = ec.___EnumValue_deprecationReason(field, obj)265 default:266 panic("unknown field " + strconv.Quote(field.Name))267 }268 }269 return out270}271func (ec *executionContext) ___EnumValue_name(field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {272 res := obj.Name()273 return graphql.MarshalString(res)274}275func (ec *executionContext) ___EnumValue_description(field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {276 res := obj.Description()277 if res == nil {278 return graphql.Null279 }280 return graphql.MarshalString(*res)281}282func (ec *executionContext) ___EnumValue_isDeprecated(field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {283 res := obj.IsDeprecated()284 return graphql.MarshalBoolean(res)285}286func (ec *executionContext) ___EnumValue_deprecationReason(field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {287 res := obj.DeprecationReason()288 if res == nil {289 return graphql.Null290 }291 return graphql.MarshalString(*res)292}293var __FieldImplementors = []string{"__Field"}294// nolint: gocyclo, errcheck, gas, goconst295func (ec *executionContext) ___Field(sel []query.Selection, obj *introspection.Field) graphql.Marshaler {296 fields := graphql.CollectFields(ec.doc, sel, __FieldImplementors, ec.variables)297 out := graphql.NewOrderedMap(len(fields))298 for i, field := range fields {299 out.Keys[i] = field.Alias300 switch field.Name {301 case "__typename":302 out.Values[i] = graphql.MarshalString("__Field")303 case "name":304 out.Values[i] = ec.___Field_name(field, obj)305 case "description":306 out.Values[i] = ec.___Field_description(field, obj)307 case "args":308 out.Values[i] = ec.___Field_args(field, obj)309 case "type":310 out.Values[i] = ec.___Field_type(field, obj)311 case "isDeprecated":312 out.Values[i] = ec.___Field_isDeprecated(field, obj)313 case "deprecationReason":314 out.Values[i] = ec.___Field_deprecationReason(field, obj)315 default:316 panic("unknown field " + strconv.Quote(field.Name))317 }318 }319 return out320}321func (ec *executionContext) ___Field_name(field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {322 res := obj.Name()323 return graphql.MarshalString(res)324}325func (ec *executionContext) ___Field_description(field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {326 res := obj.Description()327 if res == nil {328 return graphql.Null329 }330 return graphql.MarshalString(*res)331}332func (ec *executionContext) ___Field_args(field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {333 res := obj.Args()334 arr1 := graphql.Array{}335 for idx1 := range res {336 arr1 = append(arr1, func() graphql.Marshaler {337 if res[idx1] == nil {338 return graphql.Null339 }340 return ec.___InputValue(field.Selections, res[idx1])341 }())342 }343 return arr1344}345func (ec *executionContext) ___Field_type(field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {346 res := obj.Type()347 if res == nil {348 return graphql.Null349 }350 return ec.___Type(field.Selections, res)351}352func (ec *executionContext) ___Field_isDeprecated(field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {353 res := obj.IsDeprecated()354 return graphql.MarshalBoolean(res)355}356func (ec *executionContext) ___Field_deprecationReason(field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {357 res := obj.DeprecationReason()358 if res == nil {359 return graphql.Null360 }361 return graphql.MarshalString(*res)362}363var __InputValueImplementors = []string{"__InputValue"}364// nolint: gocyclo, errcheck, gas, goconst365func (ec *executionContext) ___InputValue(sel []query.Selection, obj *introspection.InputValue) graphql.Marshaler {366 fields := graphql.CollectFields(ec.doc, sel, __InputValueImplementors, ec.variables)367 out := graphql.NewOrderedMap(len(fields))368 for i, field := range fields {369 out.Keys[i] = field.Alias370 switch field.Name {371 case "__typename":372 out.Values[i] = graphql.MarshalString("__InputValue")373 case "name":374 out.Values[i] = ec.___InputValue_name(field, obj)375 case "description":376 out.Values[i] = ec.___InputValue_description(field, obj)377 case "type":378 out.Values[i] = ec.___InputValue_type(field, obj)379 case "defaultValue":380 out.Values[i] = ec.___InputValue_defaultValue(field, obj)381 default:382 panic("unknown field " + strconv.Quote(field.Name))383 }384 }385 return out386}387func (ec *executionContext) ___InputValue_name(field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {388 res := obj.Name()389 return graphql.MarshalString(res)390}391func (ec *executionContext) ___InputValue_description(field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {392 res := obj.Description()393 if res == nil {394 return graphql.Null395 }396 return graphql.MarshalString(*res)397}398func (ec *executionContext) ___InputValue_type(field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {399 res := obj.Type()400 if res == nil {401 return graphql.Null402 }403 return ec.___Type(field.Selections, res)404}405func (ec *executionContext) ___InputValue_defaultValue(field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {406 res := obj.DefaultValue()407 if res == nil {408 return graphql.Null409 }410 return graphql.MarshalString(*res)411}412var __SchemaImplementors = []string{"__Schema"}413// nolint: gocyclo, errcheck, gas, goconst414func (ec *executionContext) ___Schema(sel []query.Selection, obj *introspection.Schema) graphql.Marshaler {415 fields := graphql.CollectFields(ec.doc, sel, __SchemaImplementors, ec.variables)416 out := graphql.NewOrderedMap(len(fields))417 for i, field := range fields {418 out.Keys[i] = field.Alias419 switch field.Name {420 case "__typename":421 out.Values[i] = graphql.MarshalString("__Schema")422 case "types":423 out.Values[i] = ec.___Schema_types(field, obj)424 case "queryType":425 out.Values[i] = ec.___Schema_queryType(field, obj)426 case "mutationType":427 out.Values[i] = ec.___Schema_mutationType(field, obj)428 case "subscriptionType":429 out.Values[i] = ec.___Schema_subscriptionType(field, obj)430 case "directives":431 out.Values[i] = ec.___Schema_directives(field, obj)432 default:433 panic("unknown field " + strconv.Quote(field.Name))434 }435 }436 return out437}438func (ec *executionContext) ___Schema_types(field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {439 res := obj.Types()440 arr1 := graphql.Array{}441 for idx1 := range res {442 arr1 = append(arr1, func() graphql.Marshaler {443 if res[idx1] == nil {444 return graphql.Null445 }446 return ec.___Type(field.Selections, res[idx1])447 }())448 }449 return arr1450}451func (ec *executionContext) ___Schema_queryType(field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {452 res := obj.QueryType()453 if res == nil {454 return graphql.Null455 }456 return ec.___Type(field.Selections, res)457}458func (ec *executionContext) ___Schema_mutationType(field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {459 res := obj.MutationType()460 if res == nil {461 return graphql.Null462 }463 return ec.___Type(field.Selections, res)464}465func (ec *executionContext) ___Schema_subscriptionType(field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {466 res := obj.SubscriptionType()467 if res == nil {468 return graphql.Null469 }470 return ec.___Type(field.Selections, res)471}472func (ec *executionContext) ___Schema_directives(field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {473 res := obj.Directives()474 arr1 := graphql.Array{}475 for idx1 := range res {476 arr1 = append(arr1, func() graphql.Marshaler {477 if res[idx1] == nil {478 return graphql.Null479 }480 return ec.___Directive(field.Selections, res[idx1])481 }())482 }483 return arr1484}485var __TypeImplementors = []string{"__Type"}486// nolint: gocyclo, errcheck, gas, goconst487func (ec *executionContext) ___Type(sel []query.Selection, obj *introspection.Type) graphql.Marshaler {488 fields := graphql.CollectFields(ec.doc, sel, __TypeImplementors, ec.variables)489 out := graphql.NewOrderedMap(len(fields))490 for i, field := range fields {491 out.Keys[i] = field.Alias492 switch field.Name {493 case "__typename":494 out.Values[i] = graphql.MarshalString("__Type")495 case "kind":496 out.Values[i] = ec.___Type_kind(field, obj)497 case "name":498 out.Values[i] = ec.___Type_name(field, obj)499 case "description":500 out.Values[i] = ec.___Type_description(field, obj)501 case "fields":502 out.Values[i] = ec.___Type_fields(field, obj)503 case "interfaces":504 out.Values[i] = ec.___Type_interfaces(field, obj)505 case "possibleTypes":506 out.Values[i] = ec.___Type_possibleTypes(field, obj)507 case "enumValues":508 out.Values[i] = ec.___Type_enumValues(field, obj)509 case "inputFields":510 out.Values[i] = ec.___Type_inputFields(field, obj)511 case "ofType":512 out.Values[i] = ec.___Type_ofType(field, obj)513 default:514 panic("unknown field " + strconv.Quote(field.Name))515 }516 }517 return out518}519func (ec *executionContext) ___Type_kind(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {520 res := obj.Kind()521 return graphql.MarshalString(res)522}523func (ec *executionContext) ___Type_name(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {524 res := obj.Name()525 if res == nil {526 return graphql.Null527 }528 return graphql.MarshalString(*res)529}530func (ec *executionContext) ___Type_description(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {531 res := obj.Description()532 if res == nil {533 return graphql.Null534 }535 return graphql.MarshalString(*res)536}537func (ec *executionContext) ___Type_fields(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {538 var arg0 bool539 if tmp, ok := field.Args["includeDeprecated"]; ok {540 var err error541 arg0, err = graphql.UnmarshalBoolean(tmp)542 if err != nil {543 ec.Error(err)544 return graphql.Null545 }546 }547 res := obj.Fields(arg0)548 arr1 := graphql.Array{}549 for idx1 := range res {550 arr1 = append(arr1, func() graphql.Marshaler {551 if res[idx1] == nil {552 return graphql.Null553 }554 return ec.___Field(field.Selections, res[idx1])555 }())556 }557 return arr1558}559func (ec *executionContext) ___Type_interfaces(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {560 res := obj.Interfaces()561 arr1 := graphql.Array{}562 for idx1 := range res {563 arr1 = append(arr1, func() graphql.Marshaler {564 if res[idx1] == nil {565 return graphql.Null566 }567 return ec.___Type(field.Selections, res[idx1])568 }())569 }570 return arr1571}572func (ec *executionContext) ___Type_possibleTypes(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {573 res := obj.PossibleTypes()574 arr1 := graphql.Array{}575 for idx1 := range res {576 arr1 = append(arr1, func() graphql.Marshaler {577 if res[idx1] == nil {578 return graphql.Null579 }580 return ec.___Type(field.Selections, res[idx1])581 }())582 }583 return arr1584}585func (ec *executionContext) ___Type_enumValues(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {586 var arg0 bool587 if tmp, ok := field.Args["includeDeprecated"]; ok {588 var err error589 arg0, err = graphql.UnmarshalBoolean(tmp)590 if err != nil {591 ec.Error(err)592 return graphql.Null593 }594 }595 res := obj.EnumValues(arg0)596 arr1 := graphql.Array{}597 for idx1 := range res {598 arr1 = append(arr1, func() graphql.Marshaler {599 if res[idx1] == nil {600 return graphql.Null601 }602 return ec.___EnumValue(field.Selections, res[idx1])603 }())604 }605 return arr1606}607func (ec *executionContext) ___Type_inputFields(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {608 res := obj.InputFields()609 arr1 := graphql.Array{}610 for idx1 := range res {611 arr1 = append(arr1, func() graphql.Marshaler {612 if res[idx1] == nil {613 return graphql.Null614 }615 return ec.___InputValue(field.Selections, res[idx1])616 }())...
___EnumValue
Using AI Code Generation
1const (2const (3const (4const (5const (6const (7const (8const (
___EnumValue
Using AI Code Generation
1import (2func main() {3 pb := &testdata.TestAllTypes{}4 enumValue := pb.EnumValue("NestedEnum")5 fmt.Println("enumValue: ", enumValue)6}7import (8func main() {9 pb := &testdata.TestAllTypes{}10 enum := pb.Enum("NestedEnum")11 fmt.Println("enum: ", enum)12}13import (14func main() {15 pb := &testdata.TestAllTypes{}16 enumName := pb.EnumName("NestedEnum")17 fmt.Println("enumName: ", enumName)18}19import (20func main() {21 pb := &testdata.TestAllTypes{}22 enumValue := pb.EnumValue("NestedEnum")
___EnumValue
Using AI Code Generation
1import (2const (3func (e EnumType) String() string {4 return enum.EnumType(e).String()5}6func main() {7 fmt.Println("EnumType_A: ", EnumType_A.String())8 fmt.Println("EnumType_B: ", EnumType_B.String())9 fmt.Println("EnumType_C: ", EnumType_C.String())10}11const (12func (e EnumType) String() string {13 switch e {14 }15}16func (e EnumType) ___EnumValue() int32 {17 return int32(e)18}19func (e EnumType) ___EnumName() string {20 return e.String()21}22func (e EnumType) ___EnumType() string {23}24func (e EnumType) ___EnumValueFromName(name string) int32 {25 switch name {26 return int32(EnumType_A)27 return int32(EnumType_B)28 return int32(EnumType_C)29 }30}31func (e EnumType) ___EnumNameFromValue(value int32) string {32 switch EnumType(value) {33 }34}
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!