How to use ___Type method of generated Package

Best Keploy code snippet using generated.___Type

gql.go

Source:gql.go Github

copy

Full Screen

...272 res := ec.introspectType(arg0)273 if res == nil {274 return graphql.Null275 }276 return ec.___Type(field.Selections, res)277}278var todoImplementors = []string{"Todo"}279// nolint: gocyclo, errcheck, gas, goconst280func (ec *executionContext) _Todo(sel []query.Selection, obj *data.Todo) graphql.Marshaler {281 fields := graphql.CollectFields(ec.doc, sel, todoImplementors, ec.variables)282 out := graphql.NewOrderedMap(len(fields))283 for i, field := range fields {284 out.Keys[i] = field.Alias285 switch field.Name {286 case "__typename":287 out.Values[i] = graphql.MarshalString("Todo")288 case "id":289 out.Values[i] = ec._Todo_id(field, obj)290 case "text":291 out.Values[i] = ec._Todo_text(field, obj)292 case "done":293 out.Values[i] = ec._Todo_done(field, obj)294 default:295 panic("unknown field " + strconv.Quote(field.Name))296 }297 }298 return out299}300func (ec *executionContext) _Todo_id(field graphql.CollectedField, obj *data.Todo) graphql.Marshaler {301 res := obj.ID302 return graphql.MarshalInt(res)303}304func (ec *executionContext) _Todo_text(field graphql.CollectedField, obj *data.Todo) graphql.Marshaler {305 res := obj.Text306 return graphql.MarshalString(res)307}308func (ec *executionContext) _Todo_done(field graphql.CollectedField, obj *data.Todo) graphql.Marshaler {309 res := obj.Done310 return graphql.MarshalBoolean(res)311}312var __DirectiveImplementors = []string{"__Directive"}313// nolint: gocyclo, errcheck, gas, goconst314func (ec *executionContext) ___Directive(sel []query.Selection, obj *introspection.Directive) graphql.Marshaler {315 fields := graphql.CollectFields(ec.doc, sel, __DirectiveImplementors, ec.variables)316 out := graphql.NewOrderedMap(len(fields))317 for i, field := range fields {318 out.Keys[i] = field.Alias319 switch field.Name {320 case "__typename":321 out.Values[i] = graphql.MarshalString("__Directive")322 case "name":323 out.Values[i] = ec.___Directive_name(field, obj)324 case "description":325 out.Values[i] = ec.___Directive_description(field, obj)326 case "locations":327 out.Values[i] = ec.___Directive_locations(field, obj)328 case "args":329 out.Values[i] = ec.___Directive_args(field, obj)330 default:331 panic("unknown field " + strconv.Quote(field.Name))332 }333 }334 return out335}336func (ec *executionContext) ___Directive_name(field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {337 res := obj.Name()338 return graphql.MarshalString(res)339}340func (ec *executionContext) ___Directive_description(field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {341 res := obj.Description()342 if res == nil {343 return graphql.Null344 }345 return graphql.MarshalString(*res)346}347func (ec *executionContext) ___Directive_locations(field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {348 res := obj.Locations()349 arr1 := graphql.Array{}350 for idx1 := range res {351 arr1 = append(arr1, func() graphql.Marshaler { return graphql.MarshalString(res[idx1]) }())352 }353 return arr1354}355func (ec *executionContext) ___Directive_args(field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {356 res := obj.Args()357 arr1 := graphql.Array{}358 for idx1 := range res {359 arr1 = append(arr1, func() graphql.Marshaler {360 if res[idx1] == nil {361 return graphql.Null362 }363 return ec.___InputValue(field.Selections, res[idx1])364 }())365 }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 }())738 }739 return arr1740}741func (ec *executionContext) ___Type_ofType(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {742 res := obj.OfType()743 if res == nil {744 return graphql.Null745 }746 return ec.___Type(field.Selections, res)747}748var parsedSchema = schema.MustParse("schema {\n query: Query\n mutation: Mutation\n}\n\nenum TodoStatus {\n SHOW_ALL\n SHOW_COMPLETED\n SHOW_ACTIVE\n}\n\ntype Query {\n todo(id: Int!): Todo\n todos(status: TodoStatus): [Todo!]!\n}\n\ntype Mutation {\n createTodo(text: String!, done: Boolean): Todo!\n updateTodos(ids: [Int!], changes: Map!): [Todo]\n deleteTodos(ids: [Int!]): [Todo]\n}\n\ntype Todo {\n id: Int!\n text: String!\n done: Boolean!\n}\n")749func (ec *executionContext) introspectSchema() *introspection.Schema {750 return introspection.WrapSchema(parsedSchema)751}752func (ec *executionContext) introspectType(name string) *introspection.Type {753 t := parsedSchema.Resolve(name)754 if t == nil {755 return nil756 }757 return introspection.WrapType(t)758}...

Full Screen

Full Screen

generated.go

Source:generated.go Github

copy

Full Screen

...168 res := ec.introspectType(arg0)169 if res == nil {170 return graphql.Null171 }172 return ec.___Type(field.Selections, res)173}174var rectangleImplementors = []string{"Rectangle", "Shape"}175// nolint: gocyclo, errcheck, gas, goconst176func (ec *executionContext) _Rectangle(sel []query.Selection, obj *Rectangle) graphql.Marshaler {177 fields := graphql.CollectFields(ec.doc, sel, rectangleImplementors, ec.variables)178 out := graphql.NewOrderedMap(len(fields))179 for i, field := range fields {180 out.Keys[i] = field.Alias181 switch field.Name {182 case "__typename":183 out.Values[i] = graphql.MarshalString("Rectangle")184 case "msg":185 out.Values[i] = ec._Rectangle_msg(field, obj)186 case "length":187 out.Values[i] = ec._Rectangle_length(field, obj)188 case "width":189 out.Values[i] = ec._Rectangle_width(field, obj)190 case "area":191 out.Values[i] = ec._Rectangle_area(field, obj)192 default:193 panic("unknown field " + strconv.Quote(field.Name))194 }195 }196 return out197}198func (ec *executionContext) _Rectangle_msg(field graphql.CollectedField, obj *Rectangle) graphql.Marshaler {199 res := obj.Msg200 return graphql.MarshalString(res)201}202func (ec *executionContext) _Rectangle_length(field graphql.CollectedField, obj *Rectangle) graphql.Marshaler {203 res := obj.Length204 return graphql.MarshalFloat(res)205}206func (ec *executionContext) _Rectangle_width(field graphql.CollectedField, obj *Rectangle) graphql.Marshaler {207 res := obj.Width208 return graphql.MarshalFloat(res)209}210func (ec *executionContext) _Rectangle_area(field graphql.CollectedField, obj *Rectangle) graphql.Marshaler {211 res := obj.Area()212 return graphql.MarshalFloat(res)213}214var __DirectiveImplementors = []string{"__Directive"}215// nolint: gocyclo, errcheck, gas, goconst216func (ec *executionContext) ___Directive(sel []query.Selection, obj *introspection.Directive) graphql.Marshaler {217 fields := graphql.CollectFields(ec.doc, sel, __DirectiveImplementors, ec.variables)218 out := graphql.NewOrderedMap(len(fields))219 for i, field := range fields {220 out.Keys[i] = field.Alias221 switch field.Name {222 case "__typename":223 out.Values[i] = graphql.MarshalString("__Directive")224 case "name":225 out.Values[i] = ec.___Directive_name(field, obj)226 case "description":227 out.Values[i] = ec.___Directive_description(field, obj)228 case "locations":229 out.Values[i] = ec.___Directive_locations(field, obj)230 case "args":231 out.Values[i] = ec.___Directive_args(field, obj)232 default:233 panic("unknown field " + strconv.Quote(field.Name))234 }235 }236 return out237}238func (ec *executionContext) ___Directive_name(field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {239 res := obj.Name()240 return graphql.MarshalString(res)241}242func (ec *executionContext) ___Directive_description(field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {243 res := obj.Description()244 if res == nil {245 return graphql.Null246 }247 return graphql.MarshalString(*res)248}249func (ec *executionContext) ___Directive_locations(field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {250 res := obj.Locations()251 arr1 := graphql.Array{}252 for idx1 := range res {253 arr1 = append(arr1, func() graphql.Marshaler { return graphql.MarshalString(res[idx1]) }())254 }255 return arr1256}257func (ec *executionContext) ___Directive_args(field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {258 res := obj.Args()259 arr1 := graphql.Array{}260 for idx1 := range res {261 arr1 = append(arr1, func() graphql.Marshaler {262 if res[idx1] == nil {263 return graphql.Null264 }265 return ec.___InputValue(field.Selections, res[idx1])266 }())267 }268 return arr1269}270var __EnumValueImplementors = []string{"__EnumValue"}271// nolint: gocyclo, errcheck, gas, goconst272func (ec *executionContext) ___EnumValue(sel []query.Selection, obj *introspection.EnumValue) graphql.Marshaler {273 fields := graphql.CollectFields(ec.doc, sel, __EnumValueImplementors, ec.variables)274 out := graphql.NewOrderedMap(len(fields))275 for i, field := range fields {276 out.Keys[i] = field.Alias277 switch field.Name {278 case "__typename":279 out.Values[i] = graphql.MarshalString("__EnumValue")280 case "name":281 out.Values[i] = ec.___EnumValue_name(field, obj)282 case "description":283 out.Values[i] = ec.___EnumValue_description(field, obj)284 case "isDeprecated":285 out.Values[i] = ec.___EnumValue_isDeprecated(field, obj)286 case "deprecationReason":287 out.Values[i] = ec.___EnumValue_deprecationReason(field, obj)288 default:289 panic("unknown field " + strconv.Quote(field.Name))290 }291 }292 return out293}294func (ec *executionContext) ___EnumValue_name(field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {295 res := obj.Name()296 return graphql.MarshalString(res)297}298func (ec *executionContext) ___EnumValue_description(field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {299 res := obj.Description()300 if res == nil {301 return graphql.Null302 }303 return graphql.MarshalString(*res)304}305func (ec *executionContext) ___EnumValue_isDeprecated(field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {306 res := obj.IsDeprecated()307 return graphql.MarshalBoolean(res)308}309func (ec *executionContext) ___EnumValue_deprecationReason(field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {310 res := obj.DeprecationReason()311 if res == nil {312 return graphql.Null313 }314 return graphql.MarshalString(*res)315}316var __FieldImplementors = []string{"__Field"}317// nolint: gocyclo, errcheck, gas, goconst318func (ec *executionContext) ___Field(sel []query.Selection, obj *introspection.Field) graphql.Marshaler {319 fields := graphql.CollectFields(ec.doc, sel, __FieldImplementors, ec.variables)320 out := graphql.NewOrderedMap(len(fields))321 for i, field := range fields {322 out.Keys[i] = field.Alias323 switch field.Name {324 case "__typename":325 out.Values[i] = graphql.MarshalString("__Field")326 case "name":327 out.Values[i] = ec.___Field_name(field, obj)328 case "description":329 out.Values[i] = ec.___Field_description(field, obj)330 case "args":331 out.Values[i] = ec.___Field_args(field, obj)332 case "type":333 out.Values[i] = ec.___Field_type(field, obj)334 case "isDeprecated":335 out.Values[i] = ec.___Field_isDeprecated(field, obj)336 case "deprecationReason":337 out.Values[i] = ec.___Field_deprecationReason(field, obj)338 default:339 panic("unknown field " + strconv.Quote(field.Name))340 }341 }342 return out343}344func (ec *executionContext) ___Field_name(field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {345 res := obj.Name()346 return graphql.MarshalString(res)347}348func (ec *executionContext) ___Field_description(field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {349 res := obj.Description()350 if res == nil {351 return graphql.Null352 }353 return graphql.MarshalString(*res)354}355func (ec *executionContext) ___Field_args(field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {356 res := obj.Args()357 arr1 := graphql.Array{}358 for idx1 := range res {359 arr1 = append(arr1, func() graphql.Marshaler {360 if res[idx1] == nil {361 return graphql.Null362 }363 return ec.___InputValue(field.Selections, res[idx1])364 }())365 }366 return arr1367}368func (ec *executionContext) ___Field_type(field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {369 res := obj.Type()370 if res == nil {371 return graphql.Null372 }373 return ec.___Type(field.Selections, res)374}375func (ec *executionContext) ___Field_isDeprecated(field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {376 res := obj.IsDeprecated()377 return graphql.MarshalBoolean(res)378}379func (ec *executionContext) ___Field_deprecationReason(field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {380 res := obj.DeprecationReason()381 if res == nil {382 return graphql.Null383 }384 return graphql.MarshalString(*res)385}386var __InputValueImplementors = []string{"__InputValue"}387// nolint: gocyclo, errcheck, gas, goconst388func (ec *executionContext) ___InputValue(sel []query.Selection, obj *introspection.InputValue) graphql.Marshaler {389 fields := graphql.CollectFields(ec.doc, sel, __InputValueImplementors, ec.variables)390 out := graphql.NewOrderedMap(len(fields))391 for i, field := range fields {392 out.Keys[i] = field.Alias393 switch field.Name {394 case "__typename":395 out.Values[i] = graphql.MarshalString("__InputValue")396 case "name":397 out.Values[i] = ec.___InputValue_name(field, obj)398 case "description":399 out.Values[i] = ec.___InputValue_description(field, obj)400 case "type":401 out.Values[i] = ec.___InputValue_type(field, obj)402 case "defaultValue":403 out.Values[i] = ec.___InputValue_defaultValue(field, obj)404 default:405 panic("unknown field " + strconv.Quote(field.Name))406 }407 }408 return out409}410func (ec *executionContext) ___InputValue_name(field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {411 res := obj.Name()412 return graphql.MarshalString(res)413}414func (ec *executionContext) ___InputValue_description(field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {415 res := obj.Description()416 if res == nil {417 return graphql.Null418 }419 return graphql.MarshalString(*res)420}421func (ec *executionContext) ___InputValue_type(field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {422 res := obj.Type()423 if res == nil {424 return graphql.Null425 }426 return ec.___Type(field.Selections, res)427}428func (ec *executionContext) ___InputValue_defaultValue(field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {429 res := obj.DefaultValue()430 if res == nil {431 return graphql.Null432 }433 return graphql.MarshalString(*res)434}435var __SchemaImplementors = []string{"__Schema"}436// nolint: gocyclo, errcheck, gas, goconst437func (ec *executionContext) ___Schema(sel []query.Selection, obj *introspection.Schema) graphql.Marshaler {438 fields := graphql.CollectFields(ec.doc, sel, __SchemaImplementors, ec.variables)439 out := graphql.NewOrderedMap(len(fields))440 for i, field := range fields {441 out.Keys[i] = field.Alias442 switch field.Name {443 case "__typename":444 out.Values[i] = graphql.MarshalString("__Schema")445 case "types":446 out.Values[i] = ec.___Schema_types(field, obj)447 case "queryType":448 out.Values[i] = ec.___Schema_queryType(field, obj)449 case "mutationType":450 out.Values[i] = ec.___Schema_mutationType(field, obj)451 case "subscriptionType":452 out.Values[i] = ec.___Schema_subscriptionType(field, obj)453 case "directives":454 out.Values[i] = ec.___Schema_directives(field, obj)455 default:456 panic("unknown field " + strconv.Quote(field.Name))457 }458 }459 return out460}461func (ec *executionContext) ___Schema_types(field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {462 res := obj.Types()463 arr1 := graphql.Array{}464 for idx1 := range res {465 arr1 = append(arr1, func() graphql.Marshaler {466 if res[idx1] == nil {467 return graphql.Null468 }469 return ec.___Type(field.Selections, res[idx1])470 }())471 }472 return arr1473}474func (ec *executionContext) ___Schema_queryType(field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {475 res := obj.QueryType()476 if res == nil {477 return graphql.Null478 }479 return ec.___Type(field.Selections, res)480}481func (ec *executionContext) ___Schema_mutationType(field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {482 res := obj.MutationType()483 if res == nil {484 return graphql.Null485 }486 return ec.___Type(field.Selections, res)487}488func (ec *executionContext) ___Schema_subscriptionType(field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {489 res := obj.SubscriptionType()490 if res == nil {491 return graphql.Null492 }493 return ec.___Type(field.Selections, res)494}495func (ec *executionContext) ___Schema_directives(field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {496 res := obj.Directives()497 arr1 := graphql.Array{}498 for idx1 := range res {499 arr1 = append(arr1, func() graphql.Marshaler {500 if res[idx1] == nil {501 return graphql.Null502 }503 return ec.___Directive(field.Selections, res[idx1])504 }())505 }506 return arr1507}508var __TypeImplementors = []string{"__Type"}509// nolint: gocyclo, errcheck, gas, goconst510func (ec *executionContext) ___Type(sel []query.Selection, obj *introspection.Type) graphql.Marshaler {511 fields := graphql.CollectFields(ec.doc, sel, __TypeImplementors, ec.variables)512 out := graphql.NewOrderedMap(len(fields))513 for i, field := range fields {514 out.Keys[i] = field.Alias515 switch field.Name {516 case "__typename":517 out.Values[i] = graphql.MarshalString("__Type")518 case "kind":519 out.Values[i] = ec.___Type_kind(field, obj)520 case "name":521 out.Values[i] = ec.___Type_name(field, obj)522 case "description":523 out.Values[i] = ec.___Type_description(field, obj)524 case "fields":525 out.Values[i] = ec.___Type_fields(field, obj)526 case "interfaces":527 out.Values[i] = ec.___Type_interfaces(field, obj)528 case "possibleTypes":529 out.Values[i] = ec.___Type_possibleTypes(field, obj)530 case "enumValues":531 out.Values[i] = ec.___Type_enumValues(field, obj)532 case "inputFields":533 out.Values[i] = ec.___Type_inputFields(field, obj)534 case "ofType":535 out.Values[i] = ec.___Type_ofType(field, obj)536 default:537 panic("unknown field " + strconv.Quote(field.Name))538 }539 }540 return out541}542func (ec *executionContext) ___Type_kind(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {543 res := obj.Kind()544 return graphql.MarshalString(res)545}546func (ec *executionContext) ___Type_name(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {547 res := obj.Name()548 if res == nil {549 return graphql.Null550 }551 return graphql.MarshalString(*res)552}553func (ec *executionContext) ___Type_description(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {554 res := obj.Description()555 if res == nil {556 return graphql.Null557 }558 return graphql.MarshalString(*res)559}560func (ec *executionContext) ___Type_fields(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {561 var arg0 bool562 if tmp, ok := field.Args["includeDeprecated"]; ok {563 var err error564 arg0, err = graphql.UnmarshalBoolean(tmp)565 if err != nil {566 ec.Error(err)567 return graphql.Null568 }569 }570 res := obj.Fields(arg0)571 arr1 := graphql.Array{}572 for idx1 := range res {573 arr1 = append(arr1, func() graphql.Marshaler {574 if res[idx1] == nil {575 return graphql.Null576 }577 return ec.___Field(field.Selections, res[idx1])578 }())579 }580 return arr1581}582func (ec *executionContext) ___Type_interfaces(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {583 res := obj.Interfaces()584 arr1 := graphql.Array{}585 for idx1 := range res {586 arr1 = append(arr1, func() graphql.Marshaler {587 if res[idx1] == nil {588 return graphql.Null589 }590 return ec.___Type(field.Selections, res[idx1])591 }())592 }593 return arr1594}595func (ec *executionContext) ___Type_possibleTypes(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {596 res := obj.PossibleTypes()597 arr1 := graphql.Array{}598 for idx1 := range res {599 arr1 = append(arr1, func() graphql.Marshaler {600 if res[idx1] == nil {601 return graphql.Null602 }603 return ec.___Type(field.Selections, res[idx1])604 }())605 }606 return arr1607}608func (ec *executionContext) ___Type_enumValues(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {609 var arg0 bool610 if tmp, ok := field.Args["includeDeprecated"]; ok {611 var err error612 arg0, err = graphql.UnmarshalBoolean(tmp)613 if err != nil {614 ec.Error(err)615 return graphql.Null616 }617 }618 res := obj.EnumValues(arg0)619 arr1 := graphql.Array{}620 for idx1 := range res {621 arr1 = append(arr1, func() graphql.Marshaler {622 if res[idx1] == nil {623 return graphql.Null624 }625 return ec.___EnumValue(field.Selections, res[idx1])626 }())627 }628 return arr1629}630func (ec *executionContext) ___Type_inputFields(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {631 res := obj.InputFields()632 arr1 := graphql.Array{}633 for idx1 := range res {634 arr1 = append(arr1, func() graphql.Marshaler {635 if res[idx1] == nil {636 return graphql.Null637 }638 return ec.___InputValue(field.Selections, res[idx1])639 }())640 }641 return arr1642}643func (ec *executionContext) ___Type_ofType(field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {644 res := obj.OfType()645 if res == nil {646 return graphql.Null647 }648 return ec.___Type(field.Selections, res)649}650func (ec *executionContext) _Shape(sel []query.Selection, obj *Shape) graphql.Marshaler {651 switch obj := (*obj).(type) {652 case nil:653 return graphql.Null654 case *Circle:655 return ec._Circle(sel, obj)656 case *Rectangle:657 return ec._Rectangle(sel, obj)658 default:659 panic(fmt.Errorf("unexpected type %T", obj))660 }661}662func (ec *executionContext) _Thing(sel []query.Selection, obj *Thing) graphql.Marshaler {...

Full Screen

Full Screen

Automation Testing Tutorials

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.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Keploy automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Most used method in

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful