github.com/Desuuuu/genqlient@v0.5.3/internal/integration/server/gqlgen_exec.go (about) 1 // Code generated by github.com/99designs/gqlgen, DO NOT EDIT. 2 3 package server 4 5 import ( 6 "bytes" 7 "context" 8 "errors" 9 "fmt" 10 "strconv" 11 "sync" 12 "sync/atomic" 13 14 "github.com/99designs/gqlgen/graphql" 15 "github.com/99designs/gqlgen/graphql/introspection" 16 gqlparser "github.com/vektah/gqlparser/v2" 17 "github.com/vektah/gqlparser/v2/ast" 18 ) 19 20 // region ************************** generated!.gotpl ************************** 21 22 // NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface. 23 func NewExecutableSchema(cfg Config) graphql.ExecutableSchema { 24 return &executableSchema{ 25 resolvers: cfg.Resolvers, 26 directives: cfg.Directives, 27 complexity: cfg.Complexity, 28 } 29 } 30 31 type Config struct { 32 Resolvers ResolverRoot 33 Directives DirectiveRoot 34 Complexity ComplexityRoot 35 } 36 37 type ResolverRoot interface { 38 Mutation() MutationResolver 39 Query() QueryResolver 40 } 41 42 type DirectiveRoot struct { 43 } 44 45 type ComplexityRoot struct { 46 Animal struct { 47 Hair func(childComplexity int) int 48 ID func(childComplexity int) int 49 Name func(childComplexity int) int 50 Owner func(childComplexity int) int 51 Species func(childComplexity int) int 52 } 53 54 BeingsHair struct { 55 HasHair func(childComplexity int) int 56 } 57 58 Hair struct { 59 Color func(childComplexity int) int 60 } 61 62 Mutation struct { 63 CreateUser func(childComplexity int, input NewUser) int 64 } 65 66 Query struct { 67 Being func(childComplexity int, id string) int 68 Beings func(childComplexity int, ids []string) int 69 Fail func(childComplexity int) int 70 LotteryWinner func(childComplexity int, number int) int 71 Me func(childComplexity int) int 72 User func(childComplexity int, id *string) int 73 UserSearch func(childComplexity int, birthdate *string, id *string) int 74 UsersBornOn func(childComplexity int, date string) int 75 UsersBornOnDates func(childComplexity int, dates []string) int 76 } 77 78 User struct { 79 Birthdate func(childComplexity int) int 80 Friends func(childComplexity int) int 81 Hair func(childComplexity int) int 82 ID func(childComplexity int) int 83 LuckyNumber func(childComplexity int) int 84 Name func(childComplexity int) int 85 } 86 } 87 88 type MutationResolver interface { 89 CreateUser(ctx context.Context, input NewUser) (*User, error) 90 } 91 type QueryResolver interface { 92 Me(ctx context.Context) (*User, error) 93 User(ctx context.Context, id *string) (*User, error) 94 Being(ctx context.Context, id string) (Being, error) 95 Beings(ctx context.Context, ids []string) ([]Being, error) 96 LotteryWinner(ctx context.Context, number int) (Lucky, error) 97 UsersBornOn(ctx context.Context, date string) ([]*User, error) 98 UsersBornOnDates(ctx context.Context, dates []string) ([]*User, error) 99 UserSearch(ctx context.Context, birthdate *string, id *string) ([]*User, error) 100 Fail(ctx context.Context) (*bool, error) 101 } 102 103 type executableSchema struct { 104 resolvers ResolverRoot 105 directives DirectiveRoot 106 complexity ComplexityRoot 107 } 108 109 func (e *executableSchema) Schema() *ast.Schema { 110 return parsedSchema 111 } 112 113 func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) { 114 ec := executionContext{nil, e} 115 _ = ec 116 switch typeName + "." + field { 117 118 case "Animal.hair": 119 if e.complexity.Animal.Hair == nil { 120 break 121 } 122 123 return e.complexity.Animal.Hair(childComplexity), true 124 125 case "Animal.id": 126 if e.complexity.Animal.ID == nil { 127 break 128 } 129 130 return e.complexity.Animal.ID(childComplexity), true 131 132 case "Animal.name": 133 if e.complexity.Animal.Name == nil { 134 break 135 } 136 137 return e.complexity.Animal.Name(childComplexity), true 138 139 case "Animal.owner": 140 if e.complexity.Animal.Owner == nil { 141 break 142 } 143 144 return e.complexity.Animal.Owner(childComplexity), true 145 146 case "Animal.species": 147 if e.complexity.Animal.Species == nil { 148 break 149 } 150 151 return e.complexity.Animal.Species(childComplexity), true 152 153 case "BeingsHair.hasHair": 154 if e.complexity.BeingsHair.HasHair == nil { 155 break 156 } 157 158 return e.complexity.BeingsHair.HasHair(childComplexity), true 159 160 case "Hair.color": 161 if e.complexity.Hair.Color == nil { 162 break 163 } 164 165 return e.complexity.Hair.Color(childComplexity), true 166 167 case "Mutation.createUser": 168 if e.complexity.Mutation.CreateUser == nil { 169 break 170 } 171 172 args, err := ec.field_Mutation_createUser_args(context.TODO(), rawArgs) 173 if err != nil { 174 return 0, false 175 } 176 177 return e.complexity.Mutation.CreateUser(childComplexity, args["input"].(NewUser)), true 178 179 case "Query.being": 180 if e.complexity.Query.Being == nil { 181 break 182 } 183 184 args, err := ec.field_Query_being_args(context.TODO(), rawArgs) 185 if err != nil { 186 return 0, false 187 } 188 189 return e.complexity.Query.Being(childComplexity, args["id"].(string)), true 190 191 case "Query.beings": 192 if e.complexity.Query.Beings == nil { 193 break 194 } 195 196 args, err := ec.field_Query_beings_args(context.TODO(), rawArgs) 197 if err != nil { 198 return 0, false 199 } 200 201 return e.complexity.Query.Beings(childComplexity, args["ids"].([]string)), true 202 203 case "Query.fail": 204 if e.complexity.Query.Fail == nil { 205 break 206 } 207 208 return e.complexity.Query.Fail(childComplexity), true 209 210 case "Query.lotteryWinner": 211 if e.complexity.Query.LotteryWinner == nil { 212 break 213 } 214 215 args, err := ec.field_Query_lotteryWinner_args(context.TODO(), rawArgs) 216 if err != nil { 217 return 0, false 218 } 219 220 return e.complexity.Query.LotteryWinner(childComplexity, args["number"].(int)), true 221 222 case "Query.me": 223 if e.complexity.Query.Me == nil { 224 break 225 } 226 227 return e.complexity.Query.Me(childComplexity), true 228 229 case "Query.user": 230 if e.complexity.Query.User == nil { 231 break 232 } 233 234 args, err := ec.field_Query_user_args(context.TODO(), rawArgs) 235 if err != nil { 236 return 0, false 237 } 238 239 return e.complexity.Query.User(childComplexity, args["id"].(*string)), true 240 241 case "Query.userSearch": 242 if e.complexity.Query.UserSearch == nil { 243 break 244 } 245 246 args, err := ec.field_Query_userSearch_args(context.TODO(), rawArgs) 247 if err != nil { 248 return 0, false 249 } 250 251 return e.complexity.Query.UserSearch(childComplexity, args["birthdate"].(*string), args["id"].(*string)), true 252 253 case "Query.usersBornOn": 254 if e.complexity.Query.UsersBornOn == nil { 255 break 256 } 257 258 args, err := ec.field_Query_usersBornOn_args(context.TODO(), rawArgs) 259 if err != nil { 260 return 0, false 261 } 262 263 return e.complexity.Query.UsersBornOn(childComplexity, args["date"].(string)), true 264 265 case "Query.usersBornOnDates": 266 if e.complexity.Query.UsersBornOnDates == nil { 267 break 268 } 269 270 args, err := ec.field_Query_usersBornOnDates_args(context.TODO(), rawArgs) 271 if err != nil { 272 return 0, false 273 } 274 275 return e.complexity.Query.UsersBornOnDates(childComplexity, args["dates"].([]string)), true 276 277 case "User.birthdate": 278 if e.complexity.User.Birthdate == nil { 279 break 280 } 281 282 return e.complexity.User.Birthdate(childComplexity), true 283 284 case "User.friends": 285 if e.complexity.User.Friends == nil { 286 break 287 } 288 289 return e.complexity.User.Friends(childComplexity), true 290 291 case "User.hair": 292 if e.complexity.User.Hair == nil { 293 break 294 } 295 296 return e.complexity.User.Hair(childComplexity), true 297 298 case "User.id": 299 if e.complexity.User.ID == nil { 300 break 301 } 302 303 return e.complexity.User.ID(childComplexity), true 304 305 case "User.luckyNumber": 306 if e.complexity.User.LuckyNumber == nil { 307 break 308 } 309 310 return e.complexity.User.LuckyNumber(childComplexity), true 311 312 case "User.name": 313 if e.complexity.User.Name == nil { 314 break 315 } 316 317 return e.complexity.User.Name(childComplexity), true 318 319 } 320 return 0, false 321 } 322 323 func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { 324 rc := graphql.GetOperationContext(ctx) 325 ec := executionContext{rc, e} 326 first := true 327 328 switch rc.Operation.Operation { 329 case ast.Query: 330 return func(ctx context.Context) *graphql.Response { 331 if !first { 332 return nil 333 } 334 first = false 335 data := ec._Query(ctx, rc.Operation.SelectionSet) 336 var buf bytes.Buffer 337 data.MarshalGQL(&buf) 338 339 return &graphql.Response{ 340 Data: buf.Bytes(), 341 } 342 } 343 case ast.Mutation: 344 return func(ctx context.Context) *graphql.Response { 345 if !first { 346 return nil 347 } 348 first = false 349 data := ec._Mutation(ctx, rc.Operation.SelectionSet) 350 var buf bytes.Buffer 351 data.MarshalGQL(&buf) 352 353 return &graphql.Response{ 354 Data: buf.Bytes(), 355 } 356 } 357 358 default: 359 return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation")) 360 } 361 } 362 363 type executionContext struct { 364 *graphql.OperationContext 365 *executableSchema 366 } 367 368 func (ec *executionContext) introspectSchema() (*introspection.Schema, error) { 369 if ec.DisableIntrospection { 370 return nil, errors.New("introspection disabled") 371 } 372 return introspection.WrapSchema(parsedSchema), nil 373 } 374 375 func (ec *executionContext) introspectType(name string) (*introspection.Type, error) { 376 if ec.DisableIntrospection { 377 return nil, errors.New("introspection disabled") 378 } 379 return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil 380 } 381 382 var sources = []*ast.Source{ 383 {Name: "../schema.graphql", Input: `scalar Date 384 385 type Query { 386 me: User 387 user(id: ID): User 388 being(id: ID!): Being 389 beings(ids: [ID!]!): [Being]! 390 lotteryWinner(number: Int!): Lucky 391 usersBornOn(date: Date!): [User!]! 392 usersBornOnDates(dates: [Date!]!): [User!]! 393 userSearch(birthdate: Date, id: ID): [User] 394 fail: Boolean 395 } 396 397 type Mutation { 398 createUser(input: NewUser!): User! 399 } 400 401 type User implements Being & Lucky { 402 id: ID! 403 name: String! 404 luckyNumber: Int 405 hair: Hair 406 birthdate: Date 407 friends: [User!]! 408 } 409 410 input NewUser { 411 name: String! 412 } 413 414 type Hair { color: String } # silly name to confuse the name-generator 415 416 type Animal implements Being { 417 id: ID! 418 name: String! 419 species: Species! 420 owner: Being 421 hair: BeingsHair 422 } 423 424 type BeingsHair { hasHair: Boolean! } # silly name to confuse the name-generator 425 426 enum Species { 427 DOG 428 COELACANTH 429 } 430 431 interface Being { 432 id: ID! 433 name: String! 434 } 435 436 interface Lucky { 437 luckyNumber: Int 438 } 439 `, BuiltIn: false}, 440 } 441 var parsedSchema = gqlparser.MustLoadSchema(sources...) 442 443 // endregion ************************** generated!.gotpl ************************** 444 445 // region ***************************** args.gotpl ***************************** 446 447 func (ec *executionContext) field_Mutation_createUser_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 448 var err error 449 args := map[string]interface{}{} 450 var arg0 NewUser 451 if tmp, ok := rawArgs["input"]; ok { 452 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 453 arg0, err = ec.unmarshalNNewUser2githubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐNewUser(ctx, tmp) 454 if err != nil { 455 return nil, err 456 } 457 } 458 args["input"] = arg0 459 return args, nil 460 } 461 462 func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 463 var err error 464 args := map[string]interface{}{} 465 var arg0 string 466 if tmp, ok := rawArgs["name"]; ok { 467 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) 468 arg0, err = ec.unmarshalNString2string(ctx, tmp) 469 if err != nil { 470 return nil, err 471 } 472 } 473 args["name"] = arg0 474 return args, nil 475 } 476 477 func (ec *executionContext) field_Query_being_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 478 var err error 479 args := map[string]interface{}{} 480 var arg0 string 481 if tmp, ok := rawArgs["id"]; ok { 482 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) 483 arg0, err = ec.unmarshalNID2string(ctx, tmp) 484 if err != nil { 485 return nil, err 486 } 487 } 488 args["id"] = arg0 489 return args, nil 490 } 491 492 func (ec *executionContext) field_Query_beings_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 493 var err error 494 args := map[string]interface{}{} 495 var arg0 []string 496 if tmp, ok := rawArgs["ids"]; ok { 497 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ids")) 498 arg0, err = ec.unmarshalNID2ᚕstringᚄ(ctx, tmp) 499 if err != nil { 500 return nil, err 501 } 502 } 503 args["ids"] = arg0 504 return args, nil 505 } 506 507 func (ec *executionContext) field_Query_lotteryWinner_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 508 var err error 509 args := map[string]interface{}{} 510 var arg0 int 511 if tmp, ok := rawArgs["number"]; ok { 512 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("number")) 513 arg0, err = ec.unmarshalNInt2int(ctx, tmp) 514 if err != nil { 515 return nil, err 516 } 517 } 518 args["number"] = arg0 519 return args, nil 520 } 521 522 func (ec *executionContext) field_Query_userSearch_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 523 var err error 524 args := map[string]interface{}{} 525 var arg0 *string 526 if tmp, ok := rawArgs["birthdate"]; ok { 527 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("birthdate")) 528 arg0, err = ec.unmarshalODate2ᚖstring(ctx, tmp) 529 if err != nil { 530 return nil, err 531 } 532 } 533 args["birthdate"] = arg0 534 var arg1 *string 535 if tmp, ok := rawArgs["id"]; ok { 536 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) 537 arg1, err = ec.unmarshalOID2ᚖstring(ctx, tmp) 538 if err != nil { 539 return nil, err 540 } 541 } 542 args["id"] = arg1 543 return args, nil 544 } 545 546 func (ec *executionContext) field_Query_user_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 547 var err error 548 args := map[string]interface{}{} 549 var arg0 *string 550 if tmp, ok := rawArgs["id"]; ok { 551 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) 552 arg0, err = ec.unmarshalOID2ᚖstring(ctx, tmp) 553 if err != nil { 554 return nil, err 555 } 556 } 557 args["id"] = arg0 558 return args, nil 559 } 560 561 func (ec *executionContext) field_Query_usersBornOnDates_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 562 var err error 563 args := map[string]interface{}{} 564 var arg0 []string 565 if tmp, ok := rawArgs["dates"]; ok { 566 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("dates")) 567 arg0, err = ec.unmarshalNDate2ᚕstringᚄ(ctx, tmp) 568 if err != nil { 569 return nil, err 570 } 571 } 572 args["dates"] = arg0 573 return args, nil 574 } 575 576 func (ec *executionContext) field_Query_usersBornOn_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 577 var err error 578 args := map[string]interface{}{} 579 var arg0 string 580 if tmp, ok := rawArgs["date"]; ok { 581 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("date")) 582 arg0, err = ec.unmarshalNDate2string(ctx, tmp) 583 if err != nil { 584 return nil, err 585 } 586 } 587 args["date"] = arg0 588 return args, nil 589 } 590 591 func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 592 var err error 593 args := map[string]interface{}{} 594 var arg0 bool 595 if tmp, ok := rawArgs["includeDeprecated"]; ok { 596 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) 597 arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) 598 if err != nil { 599 return nil, err 600 } 601 } 602 args["includeDeprecated"] = arg0 603 return args, nil 604 } 605 606 func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 607 var err error 608 args := map[string]interface{}{} 609 var arg0 bool 610 if tmp, ok := rawArgs["includeDeprecated"]; ok { 611 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) 612 arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) 613 if err != nil { 614 return nil, err 615 } 616 } 617 args["includeDeprecated"] = arg0 618 return args, nil 619 } 620 621 // endregion ***************************** args.gotpl ***************************** 622 623 // region ************************** directives.gotpl ************************** 624 625 // endregion ************************** directives.gotpl ************************** 626 627 // region **************************** field.gotpl ***************************** 628 629 func (ec *executionContext) _Animal_id(ctx context.Context, field graphql.CollectedField, obj *Animal) (ret graphql.Marshaler) { 630 defer func() { 631 if r := recover(); r != nil { 632 ec.Error(ctx, ec.Recover(ctx, r)) 633 ret = graphql.Null 634 } 635 }() 636 fc := &graphql.FieldContext{ 637 Object: "Animal", 638 Field: field, 639 Args: nil, 640 IsMethod: false, 641 IsResolver: false, 642 } 643 644 ctx = graphql.WithFieldContext(ctx, fc) 645 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 646 ctx = rctx // use context from middleware stack in children 647 return obj.ID, nil 648 }) 649 if err != nil { 650 ec.Error(ctx, err) 651 return graphql.Null 652 } 653 if resTmp == nil { 654 if !graphql.HasFieldError(ctx, fc) { 655 ec.Errorf(ctx, "must not be null") 656 } 657 return graphql.Null 658 } 659 res := resTmp.(string) 660 fc.Result = res 661 return ec.marshalNID2string(ctx, field.Selections, res) 662 } 663 664 func (ec *executionContext) _Animal_name(ctx context.Context, field graphql.CollectedField, obj *Animal) (ret graphql.Marshaler) { 665 defer func() { 666 if r := recover(); r != nil { 667 ec.Error(ctx, ec.Recover(ctx, r)) 668 ret = graphql.Null 669 } 670 }() 671 fc := &graphql.FieldContext{ 672 Object: "Animal", 673 Field: field, 674 Args: nil, 675 IsMethod: false, 676 IsResolver: false, 677 } 678 679 ctx = graphql.WithFieldContext(ctx, fc) 680 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 681 ctx = rctx // use context from middleware stack in children 682 return obj.Name, nil 683 }) 684 if err != nil { 685 ec.Error(ctx, err) 686 return graphql.Null 687 } 688 if resTmp == nil { 689 if !graphql.HasFieldError(ctx, fc) { 690 ec.Errorf(ctx, "must not be null") 691 } 692 return graphql.Null 693 } 694 res := resTmp.(string) 695 fc.Result = res 696 return ec.marshalNString2string(ctx, field.Selections, res) 697 } 698 699 func (ec *executionContext) _Animal_species(ctx context.Context, field graphql.CollectedField, obj *Animal) (ret graphql.Marshaler) { 700 defer func() { 701 if r := recover(); r != nil { 702 ec.Error(ctx, ec.Recover(ctx, r)) 703 ret = graphql.Null 704 } 705 }() 706 fc := &graphql.FieldContext{ 707 Object: "Animal", 708 Field: field, 709 Args: nil, 710 IsMethod: false, 711 IsResolver: false, 712 } 713 714 ctx = graphql.WithFieldContext(ctx, fc) 715 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 716 ctx = rctx // use context from middleware stack in children 717 return obj.Species, nil 718 }) 719 if err != nil { 720 ec.Error(ctx, err) 721 return graphql.Null 722 } 723 if resTmp == nil { 724 if !graphql.HasFieldError(ctx, fc) { 725 ec.Errorf(ctx, "must not be null") 726 } 727 return graphql.Null 728 } 729 res := resTmp.(Species) 730 fc.Result = res 731 return ec.marshalNSpecies2githubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐSpecies(ctx, field.Selections, res) 732 } 733 734 func (ec *executionContext) _Animal_owner(ctx context.Context, field graphql.CollectedField, obj *Animal) (ret graphql.Marshaler) { 735 defer func() { 736 if r := recover(); r != nil { 737 ec.Error(ctx, ec.Recover(ctx, r)) 738 ret = graphql.Null 739 } 740 }() 741 fc := &graphql.FieldContext{ 742 Object: "Animal", 743 Field: field, 744 Args: nil, 745 IsMethod: false, 746 IsResolver: false, 747 } 748 749 ctx = graphql.WithFieldContext(ctx, fc) 750 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 751 ctx = rctx // use context from middleware stack in children 752 return obj.Owner, nil 753 }) 754 if err != nil { 755 ec.Error(ctx, err) 756 return graphql.Null 757 } 758 if resTmp == nil { 759 return graphql.Null 760 } 761 res := resTmp.(Being) 762 fc.Result = res 763 return ec.marshalOBeing2githubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐBeing(ctx, field.Selections, res) 764 } 765 766 func (ec *executionContext) _Animal_hair(ctx context.Context, field graphql.CollectedField, obj *Animal) (ret graphql.Marshaler) { 767 defer func() { 768 if r := recover(); r != nil { 769 ec.Error(ctx, ec.Recover(ctx, r)) 770 ret = graphql.Null 771 } 772 }() 773 fc := &graphql.FieldContext{ 774 Object: "Animal", 775 Field: field, 776 Args: nil, 777 IsMethod: false, 778 IsResolver: false, 779 } 780 781 ctx = graphql.WithFieldContext(ctx, fc) 782 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 783 ctx = rctx // use context from middleware stack in children 784 return obj.Hair, nil 785 }) 786 if err != nil { 787 ec.Error(ctx, err) 788 return graphql.Null 789 } 790 if resTmp == nil { 791 return graphql.Null 792 } 793 res := resTmp.(*BeingsHair) 794 fc.Result = res 795 return ec.marshalOBeingsHair2ᚖgithubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐBeingsHair(ctx, field.Selections, res) 796 } 797 798 func (ec *executionContext) _BeingsHair_hasHair(ctx context.Context, field graphql.CollectedField, obj *BeingsHair) (ret graphql.Marshaler) { 799 defer func() { 800 if r := recover(); r != nil { 801 ec.Error(ctx, ec.Recover(ctx, r)) 802 ret = graphql.Null 803 } 804 }() 805 fc := &graphql.FieldContext{ 806 Object: "BeingsHair", 807 Field: field, 808 Args: nil, 809 IsMethod: false, 810 IsResolver: false, 811 } 812 813 ctx = graphql.WithFieldContext(ctx, fc) 814 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 815 ctx = rctx // use context from middleware stack in children 816 return obj.HasHair, nil 817 }) 818 if err != nil { 819 ec.Error(ctx, err) 820 return graphql.Null 821 } 822 if resTmp == nil { 823 if !graphql.HasFieldError(ctx, fc) { 824 ec.Errorf(ctx, "must not be null") 825 } 826 return graphql.Null 827 } 828 res := resTmp.(bool) 829 fc.Result = res 830 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 831 } 832 833 func (ec *executionContext) _Hair_color(ctx context.Context, field graphql.CollectedField, obj *Hair) (ret graphql.Marshaler) { 834 defer func() { 835 if r := recover(); r != nil { 836 ec.Error(ctx, ec.Recover(ctx, r)) 837 ret = graphql.Null 838 } 839 }() 840 fc := &graphql.FieldContext{ 841 Object: "Hair", 842 Field: field, 843 Args: nil, 844 IsMethod: false, 845 IsResolver: false, 846 } 847 848 ctx = graphql.WithFieldContext(ctx, fc) 849 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 850 ctx = rctx // use context from middleware stack in children 851 return obj.Color, nil 852 }) 853 if err != nil { 854 ec.Error(ctx, err) 855 return graphql.Null 856 } 857 if resTmp == nil { 858 return graphql.Null 859 } 860 res := resTmp.(*string) 861 fc.Result = res 862 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 863 } 864 865 func (ec *executionContext) _Mutation_createUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 866 defer func() { 867 if r := recover(); r != nil { 868 ec.Error(ctx, ec.Recover(ctx, r)) 869 ret = graphql.Null 870 } 871 }() 872 fc := &graphql.FieldContext{ 873 Object: "Mutation", 874 Field: field, 875 Args: nil, 876 IsMethod: true, 877 IsResolver: true, 878 } 879 880 ctx = graphql.WithFieldContext(ctx, fc) 881 rawArgs := field.ArgumentMap(ec.Variables) 882 args, err := ec.field_Mutation_createUser_args(ctx, rawArgs) 883 if err != nil { 884 ec.Error(ctx, err) 885 return graphql.Null 886 } 887 fc.Args = args 888 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 889 ctx = rctx // use context from middleware stack in children 890 return ec.resolvers.Mutation().CreateUser(rctx, args["input"].(NewUser)) 891 }) 892 if err != nil { 893 ec.Error(ctx, err) 894 return graphql.Null 895 } 896 if resTmp == nil { 897 if !graphql.HasFieldError(ctx, fc) { 898 ec.Errorf(ctx, "must not be null") 899 } 900 return graphql.Null 901 } 902 res := resTmp.(*User) 903 fc.Result = res 904 return ec.marshalNUser2ᚖgithubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐUser(ctx, field.Selections, res) 905 } 906 907 func (ec *executionContext) _Query_me(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 908 defer func() { 909 if r := recover(); r != nil { 910 ec.Error(ctx, ec.Recover(ctx, r)) 911 ret = graphql.Null 912 } 913 }() 914 fc := &graphql.FieldContext{ 915 Object: "Query", 916 Field: field, 917 Args: nil, 918 IsMethod: true, 919 IsResolver: true, 920 } 921 922 ctx = graphql.WithFieldContext(ctx, fc) 923 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 924 ctx = rctx // use context from middleware stack in children 925 return ec.resolvers.Query().Me(rctx) 926 }) 927 if err != nil { 928 ec.Error(ctx, err) 929 return graphql.Null 930 } 931 if resTmp == nil { 932 return graphql.Null 933 } 934 res := resTmp.(*User) 935 fc.Result = res 936 return ec.marshalOUser2ᚖgithubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐUser(ctx, field.Selections, res) 937 } 938 939 func (ec *executionContext) _Query_user(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 940 defer func() { 941 if r := recover(); r != nil { 942 ec.Error(ctx, ec.Recover(ctx, r)) 943 ret = graphql.Null 944 } 945 }() 946 fc := &graphql.FieldContext{ 947 Object: "Query", 948 Field: field, 949 Args: nil, 950 IsMethod: true, 951 IsResolver: true, 952 } 953 954 ctx = graphql.WithFieldContext(ctx, fc) 955 rawArgs := field.ArgumentMap(ec.Variables) 956 args, err := ec.field_Query_user_args(ctx, rawArgs) 957 if err != nil { 958 ec.Error(ctx, err) 959 return graphql.Null 960 } 961 fc.Args = args 962 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 963 ctx = rctx // use context from middleware stack in children 964 return ec.resolvers.Query().User(rctx, args["id"].(*string)) 965 }) 966 if err != nil { 967 ec.Error(ctx, err) 968 return graphql.Null 969 } 970 if resTmp == nil { 971 return graphql.Null 972 } 973 res := resTmp.(*User) 974 fc.Result = res 975 return ec.marshalOUser2ᚖgithubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐUser(ctx, field.Selections, res) 976 } 977 978 func (ec *executionContext) _Query_being(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 979 defer func() { 980 if r := recover(); r != nil { 981 ec.Error(ctx, ec.Recover(ctx, r)) 982 ret = graphql.Null 983 } 984 }() 985 fc := &graphql.FieldContext{ 986 Object: "Query", 987 Field: field, 988 Args: nil, 989 IsMethod: true, 990 IsResolver: true, 991 } 992 993 ctx = graphql.WithFieldContext(ctx, fc) 994 rawArgs := field.ArgumentMap(ec.Variables) 995 args, err := ec.field_Query_being_args(ctx, rawArgs) 996 if err != nil { 997 ec.Error(ctx, err) 998 return graphql.Null 999 } 1000 fc.Args = args 1001 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1002 ctx = rctx // use context from middleware stack in children 1003 return ec.resolvers.Query().Being(rctx, args["id"].(string)) 1004 }) 1005 if err != nil { 1006 ec.Error(ctx, err) 1007 return graphql.Null 1008 } 1009 if resTmp == nil { 1010 return graphql.Null 1011 } 1012 res := resTmp.(Being) 1013 fc.Result = res 1014 return ec.marshalOBeing2githubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐBeing(ctx, field.Selections, res) 1015 } 1016 1017 func (ec *executionContext) _Query_beings(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1018 defer func() { 1019 if r := recover(); r != nil { 1020 ec.Error(ctx, ec.Recover(ctx, r)) 1021 ret = graphql.Null 1022 } 1023 }() 1024 fc := &graphql.FieldContext{ 1025 Object: "Query", 1026 Field: field, 1027 Args: nil, 1028 IsMethod: true, 1029 IsResolver: true, 1030 } 1031 1032 ctx = graphql.WithFieldContext(ctx, fc) 1033 rawArgs := field.ArgumentMap(ec.Variables) 1034 args, err := ec.field_Query_beings_args(ctx, rawArgs) 1035 if err != nil { 1036 ec.Error(ctx, err) 1037 return graphql.Null 1038 } 1039 fc.Args = args 1040 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1041 ctx = rctx // use context from middleware stack in children 1042 return ec.resolvers.Query().Beings(rctx, args["ids"].([]string)) 1043 }) 1044 if err != nil { 1045 ec.Error(ctx, err) 1046 return graphql.Null 1047 } 1048 if resTmp == nil { 1049 if !graphql.HasFieldError(ctx, fc) { 1050 ec.Errorf(ctx, "must not be null") 1051 } 1052 return graphql.Null 1053 } 1054 res := resTmp.([]Being) 1055 fc.Result = res 1056 return ec.marshalNBeing2ᚕgithubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐBeing(ctx, field.Selections, res) 1057 } 1058 1059 func (ec *executionContext) _Query_lotteryWinner(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1060 defer func() { 1061 if r := recover(); r != nil { 1062 ec.Error(ctx, ec.Recover(ctx, r)) 1063 ret = graphql.Null 1064 } 1065 }() 1066 fc := &graphql.FieldContext{ 1067 Object: "Query", 1068 Field: field, 1069 Args: nil, 1070 IsMethod: true, 1071 IsResolver: true, 1072 } 1073 1074 ctx = graphql.WithFieldContext(ctx, fc) 1075 rawArgs := field.ArgumentMap(ec.Variables) 1076 args, err := ec.field_Query_lotteryWinner_args(ctx, rawArgs) 1077 if err != nil { 1078 ec.Error(ctx, err) 1079 return graphql.Null 1080 } 1081 fc.Args = args 1082 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1083 ctx = rctx // use context from middleware stack in children 1084 return ec.resolvers.Query().LotteryWinner(rctx, args["number"].(int)) 1085 }) 1086 if err != nil { 1087 ec.Error(ctx, err) 1088 return graphql.Null 1089 } 1090 if resTmp == nil { 1091 return graphql.Null 1092 } 1093 res := resTmp.(Lucky) 1094 fc.Result = res 1095 return ec.marshalOLucky2githubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐLucky(ctx, field.Selections, res) 1096 } 1097 1098 func (ec *executionContext) _Query_usersBornOn(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1099 defer func() { 1100 if r := recover(); r != nil { 1101 ec.Error(ctx, ec.Recover(ctx, r)) 1102 ret = graphql.Null 1103 } 1104 }() 1105 fc := &graphql.FieldContext{ 1106 Object: "Query", 1107 Field: field, 1108 Args: nil, 1109 IsMethod: true, 1110 IsResolver: true, 1111 } 1112 1113 ctx = graphql.WithFieldContext(ctx, fc) 1114 rawArgs := field.ArgumentMap(ec.Variables) 1115 args, err := ec.field_Query_usersBornOn_args(ctx, rawArgs) 1116 if err != nil { 1117 ec.Error(ctx, err) 1118 return graphql.Null 1119 } 1120 fc.Args = args 1121 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1122 ctx = rctx // use context from middleware stack in children 1123 return ec.resolvers.Query().UsersBornOn(rctx, args["date"].(string)) 1124 }) 1125 if err != nil { 1126 ec.Error(ctx, err) 1127 return graphql.Null 1128 } 1129 if resTmp == nil { 1130 if !graphql.HasFieldError(ctx, fc) { 1131 ec.Errorf(ctx, "must not be null") 1132 } 1133 return graphql.Null 1134 } 1135 res := resTmp.([]*User) 1136 fc.Result = res 1137 return ec.marshalNUser2ᚕᚖgithubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐUserᚄ(ctx, field.Selections, res) 1138 } 1139 1140 func (ec *executionContext) _Query_usersBornOnDates(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1141 defer func() { 1142 if r := recover(); r != nil { 1143 ec.Error(ctx, ec.Recover(ctx, r)) 1144 ret = graphql.Null 1145 } 1146 }() 1147 fc := &graphql.FieldContext{ 1148 Object: "Query", 1149 Field: field, 1150 Args: nil, 1151 IsMethod: true, 1152 IsResolver: true, 1153 } 1154 1155 ctx = graphql.WithFieldContext(ctx, fc) 1156 rawArgs := field.ArgumentMap(ec.Variables) 1157 args, err := ec.field_Query_usersBornOnDates_args(ctx, rawArgs) 1158 if err != nil { 1159 ec.Error(ctx, err) 1160 return graphql.Null 1161 } 1162 fc.Args = args 1163 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1164 ctx = rctx // use context from middleware stack in children 1165 return ec.resolvers.Query().UsersBornOnDates(rctx, args["dates"].([]string)) 1166 }) 1167 if err != nil { 1168 ec.Error(ctx, err) 1169 return graphql.Null 1170 } 1171 if resTmp == nil { 1172 if !graphql.HasFieldError(ctx, fc) { 1173 ec.Errorf(ctx, "must not be null") 1174 } 1175 return graphql.Null 1176 } 1177 res := resTmp.([]*User) 1178 fc.Result = res 1179 return ec.marshalNUser2ᚕᚖgithubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐUserᚄ(ctx, field.Selections, res) 1180 } 1181 1182 func (ec *executionContext) _Query_userSearch(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1183 defer func() { 1184 if r := recover(); r != nil { 1185 ec.Error(ctx, ec.Recover(ctx, r)) 1186 ret = graphql.Null 1187 } 1188 }() 1189 fc := &graphql.FieldContext{ 1190 Object: "Query", 1191 Field: field, 1192 Args: nil, 1193 IsMethod: true, 1194 IsResolver: true, 1195 } 1196 1197 ctx = graphql.WithFieldContext(ctx, fc) 1198 rawArgs := field.ArgumentMap(ec.Variables) 1199 args, err := ec.field_Query_userSearch_args(ctx, rawArgs) 1200 if err != nil { 1201 ec.Error(ctx, err) 1202 return graphql.Null 1203 } 1204 fc.Args = args 1205 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1206 ctx = rctx // use context from middleware stack in children 1207 return ec.resolvers.Query().UserSearch(rctx, args["birthdate"].(*string), args["id"].(*string)) 1208 }) 1209 if err != nil { 1210 ec.Error(ctx, err) 1211 return graphql.Null 1212 } 1213 if resTmp == nil { 1214 return graphql.Null 1215 } 1216 res := resTmp.([]*User) 1217 fc.Result = res 1218 return ec.marshalOUser2ᚕᚖgithubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐUser(ctx, field.Selections, res) 1219 } 1220 1221 func (ec *executionContext) _Query_fail(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1222 defer func() { 1223 if r := recover(); r != nil { 1224 ec.Error(ctx, ec.Recover(ctx, r)) 1225 ret = graphql.Null 1226 } 1227 }() 1228 fc := &graphql.FieldContext{ 1229 Object: "Query", 1230 Field: field, 1231 Args: nil, 1232 IsMethod: true, 1233 IsResolver: true, 1234 } 1235 1236 ctx = graphql.WithFieldContext(ctx, fc) 1237 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1238 ctx = rctx // use context from middleware stack in children 1239 return ec.resolvers.Query().Fail(rctx) 1240 }) 1241 if err != nil { 1242 ec.Error(ctx, err) 1243 return graphql.Null 1244 } 1245 if resTmp == nil { 1246 return graphql.Null 1247 } 1248 res := resTmp.(*bool) 1249 fc.Result = res 1250 return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) 1251 } 1252 1253 func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1254 defer func() { 1255 if r := recover(); r != nil { 1256 ec.Error(ctx, ec.Recover(ctx, r)) 1257 ret = graphql.Null 1258 } 1259 }() 1260 fc := &graphql.FieldContext{ 1261 Object: "Query", 1262 Field: field, 1263 Args: nil, 1264 IsMethod: true, 1265 IsResolver: false, 1266 } 1267 1268 ctx = graphql.WithFieldContext(ctx, fc) 1269 rawArgs := field.ArgumentMap(ec.Variables) 1270 args, err := ec.field_Query___type_args(ctx, rawArgs) 1271 if err != nil { 1272 ec.Error(ctx, err) 1273 return graphql.Null 1274 } 1275 fc.Args = args 1276 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1277 ctx = rctx // use context from middleware stack in children 1278 return ec.introspectType(args["name"].(string)) 1279 }) 1280 if err != nil { 1281 ec.Error(ctx, err) 1282 return graphql.Null 1283 } 1284 if resTmp == nil { 1285 return graphql.Null 1286 } 1287 res := resTmp.(*introspection.Type) 1288 fc.Result = res 1289 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 1290 } 1291 1292 func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1293 defer func() { 1294 if r := recover(); r != nil { 1295 ec.Error(ctx, ec.Recover(ctx, r)) 1296 ret = graphql.Null 1297 } 1298 }() 1299 fc := &graphql.FieldContext{ 1300 Object: "Query", 1301 Field: field, 1302 Args: nil, 1303 IsMethod: true, 1304 IsResolver: false, 1305 } 1306 1307 ctx = graphql.WithFieldContext(ctx, fc) 1308 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1309 ctx = rctx // use context from middleware stack in children 1310 return ec.introspectSchema() 1311 }) 1312 if err != nil { 1313 ec.Error(ctx, err) 1314 return graphql.Null 1315 } 1316 if resTmp == nil { 1317 return graphql.Null 1318 } 1319 res := resTmp.(*introspection.Schema) 1320 fc.Result = res 1321 return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) 1322 } 1323 1324 func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { 1325 defer func() { 1326 if r := recover(); r != nil { 1327 ec.Error(ctx, ec.Recover(ctx, r)) 1328 ret = graphql.Null 1329 } 1330 }() 1331 fc := &graphql.FieldContext{ 1332 Object: "User", 1333 Field: field, 1334 Args: nil, 1335 IsMethod: false, 1336 IsResolver: false, 1337 } 1338 1339 ctx = graphql.WithFieldContext(ctx, fc) 1340 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1341 ctx = rctx // use context from middleware stack in children 1342 return obj.ID, nil 1343 }) 1344 if err != nil { 1345 ec.Error(ctx, err) 1346 return graphql.Null 1347 } 1348 if resTmp == nil { 1349 if !graphql.HasFieldError(ctx, fc) { 1350 ec.Errorf(ctx, "must not be null") 1351 } 1352 return graphql.Null 1353 } 1354 res := resTmp.(string) 1355 fc.Result = res 1356 return ec.marshalNID2string(ctx, field.Selections, res) 1357 } 1358 1359 func (ec *executionContext) _User_name(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { 1360 defer func() { 1361 if r := recover(); r != nil { 1362 ec.Error(ctx, ec.Recover(ctx, r)) 1363 ret = graphql.Null 1364 } 1365 }() 1366 fc := &graphql.FieldContext{ 1367 Object: "User", 1368 Field: field, 1369 Args: nil, 1370 IsMethod: false, 1371 IsResolver: false, 1372 } 1373 1374 ctx = graphql.WithFieldContext(ctx, fc) 1375 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1376 ctx = rctx // use context from middleware stack in children 1377 return obj.Name, nil 1378 }) 1379 if err != nil { 1380 ec.Error(ctx, err) 1381 return graphql.Null 1382 } 1383 if resTmp == nil { 1384 if !graphql.HasFieldError(ctx, fc) { 1385 ec.Errorf(ctx, "must not be null") 1386 } 1387 return graphql.Null 1388 } 1389 res := resTmp.(string) 1390 fc.Result = res 1391 return ec.marshalNString2string(ctx, field.Selections, res) 1392 } 1393 1394 func (ec *executionContext) _User_luckyNumber(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { 1395 defer func() { 1396 if r := recover(); r != nil { 1397 ec.Error(ctx, ec.Recover(ctx, r)) 1398 ret = graphql.Null 1399 } 1400 }() 1401 fc := &graphql.FieldContext{ 1402 Object: "User", 1403 Field: field, 1404 Args: nil, 1405 IsMethod: false, 1406 IsResolver: false, 1407 } 1408 1409 ctx = graphql.WithFieldContext(ctx, fc) 1410 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1411 ctx = rctx // use context from middleware stack in children 1412 return obj.LuckyNumber, nil 1413 }) 1414 if err != nil { 1415 ec.Error(ctx, err) 1416 return graphql.Null 1417 } 1418 if resTmp == nil { 1419 return graphql.Null 1420 } 1421 res := resTmp.(*int) 1422 fc.Result = res 1423 return ec.marshalOInt2ᚖint(ctx, field.Selections, res) 1424 } 1425 1426 func (ec *executionContext) _User_hair(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { 1427 defer func() { 1428 if r := recover(); r != nil { 1429 ec.Error(ctx, ec.Recover(ctx, r)) 1430 ret = graphql.Null 1431 } 1432 }() 1433 fc := &graphql.FieldContext{ 1434 Object: "User", 1435 Field: field, 1436 Args: nil, 1437 IsMethod: false, 1438 IsResolver: false, 1439 } 1440 1441 ctx = graphql.WithFieldContext(ctx, fc) 1442 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1443 ctx = rctx // use context from middleware stack in children 1444 return obj.Hair, nil 1445 }) 1446 if err != nil { 1447 ec.Error(ctx, err) 1448 return graphql.Null 1449 } 1450 if resTmp == nil { 1451 return graphql.Null 1452 } 1453 res := resTmp.(*Hair) 1454 fc.Result = res 1455 return ec.marshalOHair2ᚖgithubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐHair(ctx, field.Selections, res) 1456 } 1457 1458 func (ec *executionContext) _User_birthdate(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { 1459 defer func() { 1460 if r := recover(); r != nil { 1461 ec.Error(ctx, ec.Recover(ctx, r)) 1462 ret = graphql.Null 1463 } 1464 }() 1465 fc := &graphql.FieldContext{ 1466 Object: "User", 1467 Field: field, 1468 Args: nil, 1469 IsMethod: false, 1470 IsResolver: false, 1471 } 1472 1473 ctx = graphql.WithFieldContext(ctx, fc) 1474 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1475 ctx = rctx // use context from middleware stack in children 1476 return obj.Birthdate, nil 1477 }) 1478 if err != nil { 1479 ec.Error(ctx, err) 1480 return graphql.Null 1481 } 1482 if resTmp == nil { 1483 return graphql.Null 1484 } 1485 res := resTmp.(*string) 1486 fc.Result = res 1487 return ec.marshalODate2ᚖstring(ctx, field.Selections, res) 1488 } 1489 1490 func (ec *executionContext) _User_friends(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { 1491 defer func() { 1492 if r := recover(); r != nil { 1493 ec.Error(ctx, ec.Recover(ctx, r)) 1494 ret = graphql.Null 1495 } 1496 }() 1497 fc := &graphql.FieldContext{ 1498 Object: "User", 1499 Field: field, 1500 Args: nil, 1501 IsMethod: false, 1502 IsResolver: false, 1503 } 1504 1505 ctx = graphql.WithFieldContext(ctx, fc) 1506 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1507 ctx = rctx // use context from middleware stack in children 1508 return obj.Friends, nil 1509 }) 1510 if err != nil { 1511 ec.Error(ctx, err) 1512 return graphql.Null 1513 } 1514 if resTmp == nil { 1515 if !graphql.HasFieldError(ctx, fc) { 1516 ec.Errorf(ctx, "must not be null") 1517 } 1518 return graphql.Null 1519 } 1520 res := resTmp.([]*User) 1521 fc.Result = res 1522 return ec.marshalNUser2ᚕᚖgithubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐUserᚄ(ctx, field.Selections, res) 1523 } 1524 1525 func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 1526 defer func() { 1527 if r := recover(); r != nil { 1528 ec.Error(ctx, ec.Recover(ctx, r)) 1529 ret = graphql.Null 1530 } 1531 }() 1532 fc := &graphql.FieldContext{ 1533 Object: "__Directive", 1534 Field: field, 1535 Args: nil, 1536 IsMethod: false, 1537 IsResolver: false, 1538 } 1539 1540 ctx = graphql.WithFieldContext(ctx, fc) 1541 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1542 ctx = rctx // use context from middleware stack in children 1543 return obj.Name, nil 1544 }) 1545 if err != nil { 1546 ec.Error(ctx, err) 1547 return graphql.Null 1548 } 1549 if resTmp == nil { 1550 if !graphql.HasFieldError(ctx, fc) { 1551 ec.Errorf(ctx, "must not be null") 1552 } 1553 return graphql.Null 1554 } 1555 res := resTmp.(string) 1556 fc.Result = res 1557 return ec.marshalNString2string(ctx, field.Selections, res) 1558 } 1559 1560 func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 1561 defer func() { 1562 if r := recover(); r != nil { 1563 ec.Error(ctx, ec.Recover(ctx, r)) 1564 ret = graphql.Null 1565 } 1566 }() 1567 fc := &graphql.FieldContext{ 1568 Object: "__Directive", 1569 Field: field, 1570 Args: nil, 1571 IsMethod: true, 1572 IsResolver: false, 1573 } 1574 1575 ctx = graphql.WithFieldContext(ctx, fc) 1576 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1577 ctx = rctx // use context from middleware stack in children 1578 return obj.Description(), nil 1579 }) 1580 if err != nil { 1581 ec.Error(ctx, err) 1582 return graphql.Null 1583 } 1584 if resTmp == nil { 1585 return graphql.Null 1586 } 1587 res := resTmp.(*string) 1588 fc.Result = res 1589 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 1590 } 1591 1592 func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 1593 defer func() { 1594 if r := recover(); r != nil { 1595 ec.Error(ctx, ec.Recover(ctx, r)) 1596 ret = graphql.Null 1597 } 1598 }() 1599 fc := &graphql.FieldContext{ 1600 Object: "__Directive", 1601 Field: field, 1602 Args: nil, 1603 IsMethod: false, 1604 IsResolver: false, 1605 } 1606 1607 ctx = graphql.WithFieldContext(ctx, fc) 1608 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1609 ctx = rctx // use context from middleware stack in children 1610 return obj.Locations, nil 1611 }) 1612 if err != nil { 1613 ec.Error(ctx, err) 1614 return graphql.Null 1615 } 1616 if resTmp == nil { 1617 if !graphql.HasFieldError(ctx, fc) { 1618 ec.Errorf(ctx, "must not be null") 1619 } 1620 return graphql.Null 1621 } 1622 res := resTmp.([]string) 1623 fc.Result = res 1624 return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) 1625 } 1626 1627 func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 1628 defer func() { 1629 if r := recover(); r != nil { 1630 ec.Error(ctx, ec.Recover(ctx, r)) 1631 ret = graphql.Null 1632 } 1633 }() 1634 fc := &graphql.FieldContext{ 1635 Object: "__Directive", 1636 Field: field, 1637 Args: nil, 1638 IsMethod: false, 1639 IsResolver: false, 1640 } 1641 1642 ctx = graphql.WithFieldContext(ctx, fc) 1643 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1644 ctx = rctx // use context from middleware stack in children 1645 return obj.Args, nil 1646 }) 1647 if err != nil { 1648 ec.Error(ctx, err) 1649 return graphql.Null 1650 } 1651 if resTmp == nil { 1652 if !graphql.HasFieldError(ctx, fc) { 1653 ec.Errorf(ctx, "must not be null") 1654 } 1655 return graphql.Null 1656 } 1657 res := resTmp.([]introspection.InputValue) 1658 fc.Result = res 1659 return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 1660 } 1661 1662 func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 1663 defer func() { 1664 if r := recover(); r != nil { 1665 ec.Error(ctx, ec.Recover(ctx, r)) 1666 ret = graphql.Null 1667 } 1668 }() 1669 fc := &graphql.FieldContext{ 1670 Object: "__Directive", 1671 Field: field, 1672 Args: nil, 1673 IsMethod: false, 1674 IsResolver: false, 1675 } 1676 1677 ctx = graphql.WithFieldContext(ctx, fc) 1678 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1679 ctx = rctx // use context from middleware stack in children 1680 return obj.IsRepeatable, nil 1681 }) 1682 if err != nil { 1683 ec.Error(ctx, err) 1684 return graphql.Null 1685 } 1686 if resTmp == nil { 1687 if !graphql.HasFieldError(ctx, fc) { 1688 ec.Errorf(ctx, "must not be null") 1689 } 1690 return graphql.Null 1691 } 1692 res := resTmp.(bool) 1693 fc.Result = res 1694 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 1695 } 1696 1697 func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 1698 defer func() { 1699 if r := recover(); r != nil { 1700 ec.Error(ctx, ec.Recover(ctx, r)) 1701 ret = graphql.Null 1702 } 1703 }() 1704 fc := &graphql.FieldContext{ 1705 Object: "__EnumValue", 1706 Field: field, 1707 Args: nil, 1708 IsMethod: false, 1709 IsResolver: false, 1710 } 1711 1712 ctx = graphql.WithFieldContext(ctx, fc) 1713 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1714 ctx = rctx // use context from middleware stack in children 1715 return obj.Name, nil 1716 }) 1717 if err != nil { 1718 ec.Error(ctx, err) 1719 return graphql.Null 1720 } 1721 if resTmp == nil { 1722 if !graphql.HasFieldError(ctx, fc) { 1723 ec.Errorf(ctx, "must not be null") 1724 } 1725 return graphql.Null 1726 } 1727 res := resTmp.(string) 1728 fc.Result = res 1729 return ec.marshalNString2string(ctx, field.Selections, res) 1730 } 1731 1732 func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 1733 defer func() { 1734 if r := recover(); r != nil { 1735 ec.Error(ctx, ec.Recover(ctx, r)) 1736 ret = graphql.Null 1737 } 1738 }() 1739 fc := &graphql.FieldContext{ 1740 Object: "__EnumValue", 1741 Field: field, 1742 Args: nil, 1743 IsMethod: true, 1744 IsResolver: false, 1745 } 1746 1747 ctx = graphql.WithFieldContext(ctx, fc) 1748 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1749 ctx = rctx // use context from middleware stack in children 1750 return obj.Description(), nil 1751 }) 1752 if err != nil { 1753 ec.Error(ctx, err) 1754 return graphql.Null 1755 } 1756 if resTmp == nil { 1757 return graphql.Null 1758 } 1759 res := resTmp.(*string) 1760 fc.Result = res 1761 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 1762 } 1763 1764 func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 1765 defer func() { 1766 if r := recover(); r != nil { 1767 ec.Error(ctx, ec.Recover(ctx, r)) 1768 ret = graphql.Null 1769 } 1770 }() 1771 fc := &graphql.FieldContext{ 1772 Object: "__EnumValue", 1773 Field: field, 1774 Args: nil, 1775 IsMethod: true, 1776 IsResolver: false, 1777 } 1778 1779 ctx = graphql.WithFieldContext(ctx, fc) 1780 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1781 ctx = rctx // use context from middleware stack in children 1782 return obj.IsDeprecated(), nil 1783 }) 1784 if err != nil { 1785 ec.Error(ctx, err) 1786 return graphql.Null 1787 } 1788 if resTmp == nil { 1789 if !graphql.HasFieldError(ctx, fc) { 1790 ec.Errorf(ctx, "must not be null") 1791 } 1792 return graphql.Null 1793 } 1794 res := resTmp.(bool) 1795 fc.Result = res 1796 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 1797 } 1798 1799 func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 1800 defer func() { 1801 if r := recover(); r != nil { 1802 ec.Error(ctx, ec.Recover(ctx, r)) 1803 ret = graphql.Null 1804 } 1805 }() 1806 fc := &graphql.FieldContext{ 1807 Object: "__EnumValue", 1808 Field: field, 1809 Args: nil, 1810 IsMethod: true, 1811 IsResolver: false, 1812 } 1813 1814 ctx = graphql.WithFieldContext(ctx, fc) 1815 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1816 ctx = rctx // use context from middleware stack in children 1817 return obj.DeprecationReason(), nil 1818 }) 1819 if err != nil { 1820 ec.Error(ctx, err) 1821 return graphql.Null 1822 } 1823 if resTmp == nil { 1824 return graphql.Null 1825 } 1826 res := resTmp.(*string) 1827 fc.Result = res 1828 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 1829 } 1830 1831 func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 1832 defer func() { 1833 if r := recover(); r != nil { 1834 ec.Error(ctx, ec.Recover(ctx, r)) 1835 ret = graphql.Null 1836 } 1837 }() 1838 fc := &graphql.FieldContext{ 1839 Object: "__Field", 1840 Field: field, 1841 Args: nil, 1842 IsMethod: false, 1843 IsResolver: false, 1844 } 1845 1846 ctx = graphql.WithFieldContext(ctx, fc) 1847 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1848 ctx = rctx // use context from middleware stack in children 1849 return obj.Name, nil 1850 }) 1851 if err != nil { 1852 ec.Error(ctx, err) 1853 return graphql.Null 1854 } 1855 if resTmp == nil { 1856 if !graphql.HasFieldError(ctx, fc) { 1857 ec.Errorf(ctx, "must not be null") 1858 } 1859 return graphql.Null 1860 } 1861 res := resTmp.(string) 1862 fc.Result = res 1863 return ec.marshalNString2string(ctx, field.Selections, res) 1864 } 1865 1866 func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 1867 defer func() { 1868 if r := recover(); r != nil { 1869 ec.Error(ctx, ec.Recover(ctx, r)) 1870 ret = graphql.Null 1871 } 1872 }() 1873 fc := &graphql.FieldContext{ 1874 Object: "__Field", 1875 Field: field, 1876 Args: nil, 1877 IsMethod: true, 1878 IsResolver: false, 1879 } 1880 1881 ctx = graphql.WithFieldContext(ctx, fc) 1882 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1883 ctx = rctx // use context from middleware stack in children 1884 return obj.Description(), nil 1885 }) 1886 if err != nil { 1887 ec.Error(ctx, err) 1888 return graphql.Null 1889 } 1890 if resTmp == nil { 1891 return graphql.Null 1892 } 1893 res := resTmp.(*string) 1894 fc.Result = res 1895 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 1896 } 1897 1898 func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 1899 defer func() { 1900 if r := recover(); r != nil { 1901 ec.Error(ctx, ec.Recover(ctx, r)) 1902 ret = graphql.Null 1903 } 1904 }() 1905 fc := &graphql.FieldContext{ 1906 Object: "__Field", 1907 Field: field, 1908 Args: nil, 1909 IsMethod: false, 1910 IsResolver: false, 1911 } 1912 1913 ctx = graphql.WithFieldContext(ctx, fc) 1914 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1915 ctx = rctx // use context from middleware stack in children 1916 return obj.Args, nil 1917 }) 1918 if err != nil { 1919 ec.Error(ctx, err) 1920 return graphql.Null 1921 } 1922 if resTmp == nil { 1923 if !graphql.HasFieldError(ctx, fc) { 1924 ec.Errorf(ctx, "must not be null") 1925 } 1926 return graphql.Null 1927 } 1928 res := resTmp.([]introspection.InputValue) 1929 fc.Result = res 1930 return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 1931 } 1932 1933 func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 1934 defer func() { 1935 if r := recover(); r != nil { 1936 ec.Error(ctx, ec.Recover(ctx, r)) 1937 ret = graphql.Null 1938 } 1939 }() 1940 fc := &graphql.FieldContext{ 1941 Object: "__Field", 1942 Field: field, 1943 Args: nil, 1944 IsMethod: false, 1945 IsResolver: false, 1946 } 1947 1948 ctx = graphql.WithFieldContext(ctx, fc) 1949 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1950 ctx = rctx // use context from middleware stack in children 1951 return obj.Type, nil 1952 }) 1953 if err != nil { 1954 ec.Error(ctx, err) 1955 return graphql.Null 1956 } 1957 if resTmp == nil { 1958 if !graphql.HasFieldError(ctx, fc) { 1959 ec.Errorf(ctx, "must not be null") 1960 } 1961 return graphql.Null 1962 } 1963 res := resTmp.(*introspection.Type) 1964 fc.Result = res 1965 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 1966 } 1967 1968 func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 1969 defer func() { 1970 if r := recover(); r != nil { 1971 ec.Error(ctx, ec.Recover(ctx, r)) 1972 ret = graphql.Null 1973 } 1974 }() 1975 fc := &graphql.FieldContext{ 1976 Object: "__Field", 1977 Field: field, 1978 Args: nil, 1979 IsMethod: true, 1980 IsResolver: false, 1981 } 1982 1983 ctx = graphql.WithFieldContext(ctx, fc) 1984 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1985 ctx = rctx // use context from middleware stack in children 1986 return obj.IsDeprecated(), nil 1987 }) 1988 if err != nil { 1989 ec.Error(ctx, err) 1990 return graphql.Null 1991 } 1992 if resTmp == nil { 1993 if !graphql.HasFieldError(ctx, fc) { 1994 ec.Errorf(ctx, "must not be null") 1995 } 1996 return graphql.Null 1997 } 1998 res := resTmp.(bool) 1999 fc.Result = res 2000 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 2001 } 2002 2003 func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 2004 defer func() { 2005 if r := recover(); r != nil { 2006 ec.Error(ctx, ec.Recover(ctx, r)) 2007 ret = graphql.Null 2008 } 2009 }() 2010 fc := &graphql.FieldContext{ 2011 Object: "__Field", 2012 Field: field, 2013 Args: nil, 2014 IsMethod: true, 2015 IsResolver: false, 2016 } 2017 2018 ctx = graphql.WithFieldContext(ctx, fc) 2019 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2020 ctx = rctx // use context from middleware stack in children 2021 return obj.DeprecationReason(), nil 2022 }) 2023 if err != nil { 2024 ec.Error(ctx, err) 2025 return graphql.Null 2026 } 2027 if resTmp == nil { 2028 return graphql.Null 2029 } 2030 res := resTmp.(*string) 2031 fc.Result = res 2032 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 2033 } 2034 2035 func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 2036 defer func() { 2037 if r := recover(); r != nil { 2038 ec.Error(ctx, ec.Recover(ctx, r)) 2039 ret = graphql.Null 2040 } 2041 }() 2042 fc := &graphql.FieldContext{ 2043 Object: "__InputValue", 2044 Field: field, 2045 Args: nil, 2046 IsMethod: false, 2047 IsResolver: false, 2048 } 2049 2050 ctx = graphql.WithFieldContext(ctx, fc) 2051 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2052 ctx = rctx // use context from middleware stack in children 2053 return obj.Name, nil 2054 }) 2055 if err != nil { 2056 ec.Error(ctx, err) 2057 return graphql.Null 2058 } 2059 if resTmp == nil { 2060 if !graphql.HasFieldError(ctx, fc) { 2061 ec.Errorf(ctx, "must not be null") 2062 } 2063 return graphql.Null 2064 } 2065 res := resTmp.(string) 2066 fc.Result = res 2067 return ec.marshalNString2string(ctx, field.Selections, res) 2068 } 2069 2070 func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 2071 defer func() { 2072 if r := recover(); r != nil { 2073 ec.Error(ctx, ec.Recover(ctx, r)) 2074 ret = graphql.Null 2075 } 2076 }() 2077 fc := &graphql.FieldContext{ 2078 Object: "__InputValue", 2079 Field: field, 2080 Args: nil, 2081 IsMethod: true, 2082 IsResolver: false, 2083 } 2084 2085 ctx = graphql.WithFieldContext(ctx, fc) 2086 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2087 ctx = rctx // use context from middleware stack in children 2088 return obj.Description(), nil 2089 }) 2090 if err != nil { 2091 ec.Error(ctx, err) 2092 return graphql.Null 2093 } 2094 if resTmp == nil { 2095 return graphql.Null 2096 } 2097 res := resTmp.(*string) 2098 fc.Result = res 2099 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 2100 } 2101 2102 func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 2103 defer func() { 2104 if r := recover(); r != nil { 2105 ec.Error(ctx, ec.Recover(ctx, r)) 2106 ret = graphql.Null 2107 } 2108 }() 2109 fc := &graphql.FieldContext{ 2110 Object: "__InputValue", 2111 Field: field, 2112 Args: nil, 2113 IsMethod: false, 2114 IsResolver: false, 2115 } 2116 2117 ctx = graphql.WithFieldContext(ctx, fc) 2118 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2119 ctx = rctx // use context from middleware stack in children 2120 return obj.Type, nil 2121 }) 2122 if err != nil { 2123 ec.Error(ctx, err) 2124 return graphql.Null 2125 } 2126 if resTmp == nil { 2127 if !graphql.HasFieldError(ctx, fc) { 2128 ec.Errorf(ctx, "must not be null") 2129 } 2130 return graphql.Null 2131 } 2132 res := resTmp.(*introspection.Type) 2133 fc.Result = res 2134 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 2135 } 2136 2137 func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 2138 defer func() { 2139 if r := recover(); r != nil { 2140 ec.Error(ctx, ec.Recover(ctx, r)) 2141 ret = graphql.Null 2142 } 2143 }() 2144 fc := &graphql.FieldContext{ 2145 Object: "__InputValue", 2146 Field: field, 2147 Args: nil, 2148 IsMethod: false, 2149 IsResolver: false, 2150 } 2151 2152 ctx = graphql.WithFieldContext(ctx, fc) 2153 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2154 ctx = rctx // use context from middleware stack in children 2155 return obj.DefaultValue, nil 2156 }) 2157 if err != nil { 2158 ec.Error(ctx, err) 2159 return graphql.Null 2160 } 2161 if resTmp == nil { 2162 return graphql.Null 2163 } 2164 res := resTmp.(*string) 2165 fc.Result = res 2166 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 2167 } 2168 2169 func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 2170 defer func() { 2171 if r := recover(); r != nil { 2172 ec.Error(ctx, ec.Recover(ctx, r)) 2173 ret = graphql.Null 2174 } 2175 }() 2176 fc := &graphql.FieldContext{ 2177 Object: "__Schema", 2178 Field: field, 2179 Args: nil, 2180 IsMethod: true, 2181 IsResolver: false, 2182 } 2183 2184 ctx = graphql.WithFieldContext(ctx, fc) 2185 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2186 ctx = rctx // use context from middleware stack in children 2187 return obj.Description(), nil 2188 }) 2189 if err != nil { 2190 ec.Error(ctx, err) 2191 return graphql.Null 2192 } 2193 if resTmp == nil { 2194 return graphql.Null 2195 } 2196 res := resTmp.(*string) 2197 fc.Result = res 2198 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 2199 } 2200 2201 func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 2202 defer func() { 2203 if r := recover(); r != nil { 2204 ec.Error(ctx, ec.Recover(ctx, r)) 2205 ret = graphql.Null 2206 } 2207 }() 2208 fc := &graphql.FieldContext{ 2209 Object: "__Schema", 2210 Field: field, 2211 Args: nil, 2212 IsMethod: true, 2213 IsResolver: false, 2214 } 2215 2216 ctx = graphql.WithFieldContext(ctx, fc) 2217 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2218 ctx = rctx // use context from middleware stack in children 2219 return obj.Types(), nil 2220 }) 2221 if err != nil { 2222 ec.Error(ctx, err) 2223 return graphql.Null 2224 } 2225 if resTmp == nil { 2226 if !graphql.HasFieldError(ctx, fc) { 2227 ec.Errorf(ctx, "must not be null") 2228 } 2229 return graphql.Null 2230 } 2231 res := resTmp.([]introspection.Type) 2232 fc.Result = res 2233 return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 2234 } 2235 2236 func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 2237 defer func() { 2238 if r := recover(); r != nil { 2239 ec.Error(ctx, ec.Recover(ctx, r)) 2240 ret = graphql.Null 2241 } 2242 }() 2243 fc := &graphql.FieldContext{ 2244 Object: "__Schema", 2245 Field: field, 2246 Args: nil, 2247 IsMethod: true, 2248 IsResolver: false, 2249 } 2250 2251 ctx = graphql.WithFieldContext(ctx, fc) 2252 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2253 ctx = rctx // use context from middleware stack in children 2254 return obj.QueryType(), nil 2255 }) 2256 if err != nil { 2257 ec.Error(ctx, err) 2258 return graphql.Null 2259 } 2260 if resTmp == nil { 2261 if !graphql.HasFieldError(ctx, fc) { 2262 ec.Errorf(ctx, "must not be null") 2263 } 2264 return graphql.Null 2265 } 2266 res := resTmp.(*introspection.Type) 2267 fc.Result = res 2268 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 2269 } 2270 2271 func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 2272 defer func() { 2273 if r := recover(); r != nil { 2274 ec.Error(ctx, ec.Recover(ctx, r)) 2275 ret = graphql.Null 2276 } 2277 }() 2278 fc := &graphql.FieldContext{ 2279 Object: "__Schema", 2280 Field: field, 2281 Args: nil, 2282 IsMethod: true, 2283 IsResolver: false, 2284 } 2285 2286 ctx = graphql.WithFieldContext(ctx, fc) 2287 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2288 ctx = rctx // use context from middleware stack in children 2289 return obj.MutationType(), nil 2290 }) 2291 if err != nil { 2292 ec.Error(ctx, err) 2293 return graphql.Null 2294 } 2295 if resTmp == nil { 2296 return graphql.Null 2297 } 2298 res := resTmp.(*introspection.Type) 2299 fc.Result = res 2300 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 2301 } 2302 2303 func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 2304 defer func() { 2305 if r := recover(); r != nil { 2306 ec.Error(ctx, ec.Recover(ctx, r)) 2307 ret = graphql.Null 2308 } 2309 }() 2310 fc := &graphql.FieldContext{ 2311 Object: "__Schema", 2312 Field: field, 2313 Args: nil, 2314 IsMethod: true, 2315 IsResolver: false, 2316 } 2317 2318 ctx = graphql.WithFieldContext(ctx, fc) 2319 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2320 ctx = rctx // use context from middleware stack in children 2321 return obj.SubscriptionType(), nil 2322 }) 2323 if err != nil { 2324 ec.Error(ctx, err) 2325 return graphql.Null 2326 } 2327 if resTmp == nil { 2328 return graphql.Null 2329 } 2330 res := resTmp.(*introspection.Type) 2331 fc.Result = res 2332 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 2333 } 2334 2335 func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 2336 defer func() { 2337 if r := recover(); r != nil { 2338 ec.Error(ctx, ec.Recover(ctx, r)) 2339 ret = graphql.Null 2340 } 2341 }() 2342 fc := &graphql.FieldContext{ 2343 Object: "__Schema", 2344 Field: field, 2345 Args: nil, 2346 IsMethod: true, 2347 IsResolver: false, 2348 } 2349 2350 ctx = graphql.WithFieldContext(ctx, fc) 2351 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2352 ctx = rctx // use context from middleware stack in children 2353 return obj.Directives(), nil 2354 }) 2355 if err != nil { 2356 ec.Error(ctx, err) 2357 return graphql.Null 2358 } 2359 if resTmp == nil { 2360 if !graphql.HasFieldError(ctx, fc) { 2361 ec.Errorf(ctx, "must not be null") 2362 } 2363 return graphql.Null 2364 } 2365 res := resTmp.([]introspection.Directive) 2366 fc.Result = res 2367 return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) 2368 } 2369 2370 func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2371 defer func() { 2372 if r := recover(); r != nil { 2373 ec.Error(ctx, ec.Recover(ctx, r)) 2374 ret = graphql.Null 2375 } 2376 }() 2377 fc := &graphql.FieldContext{ 2378 Object: "__Type", 2379 Field: field, 2380 Args: nil, 2381 IsMethod: true, 2382 IsResolver: false, 2383 } 2384 2385 ctx = graphql.WithFieldContext(ctx, fc) 2386 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2387 ctx = rctx // use context from middleware stack in children 2388 return obj.Kind(), nil 2389 }) 2390 if err != nil { 2391 ec.Error(ctx, err) 2392 return graphql.Null 2393 } 2394 if resTmp == nil { 2395 if !graphql.HasFieldError(ctx, fc) { 2396 ec.Errorf(ctx, "must not be null") 2397 } 2398 return graphql.Null 2399 } 2400 res := resTmp.(string) 2401 fc.Result = res 2402 return ec.marshalN__TypeKind2string(ctx, field.Selections, res) 2403 } 2404 2405 func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2406 defer func() { 2407 if r := recover(); r != nil { 2408 ec.Error(ctx, ec.Recover(ctx, r)) 2409 ret = graphql.Null 2410 } 2411 }() 2412 fc := &graphql.FieldContext{ 2413 Object: "__Type", 2414 Field: field, 2415 Args: nil, 2416 IsMethod: true, 2417 IsResolver: false, 2418 } 2419 2420 ctx = graphql.WithFieldContext(ctx, fc) 2421 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2422 ctx = rctx // use context from middleware stack in children 2423 return obj.Name(), nil 2424 }) 2425 if err != nil { 2426 ec.Error(ctx, err) 2427 return graphql.Null 2428 } 2429 if resTmp == nil { 2430 return graphql.Null 2431 } 2432 res := resTmp.(*string) 2433 fc.Result = res 2434 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 2435 } 2436 2437 func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2438 defer func() { 2439 if r := recover(); r != nil { 2440 ec.Error(ctx, ec.Recover(ctx, r)) 2441 ret = graphql.Null 2442 } 2443 }() 2444 fc := &graphql.FieldContext{ 2445 Object: "__Type", 2446 Field: field, 2447 Args: nil, 2448 IsMethod: true, 2449 IsResolver: false, 2450 } 2451 2452 ctx = graphql.WithFieldContext(ctx, fc) 2453 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2454 ctx = rctx // use context from middleware stack in children 2455 return obj.Description(), nil 2456 }) 2457 if err != nil { 2458 ec.Error(ctx, err) 2459 return graphql.Null 2460 } 2461 if resTmp == nil { 2462 return graphql.Null 2463 } 2464 res := resTmp.(*string) 2465 fc.Result = res 2466 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 2467 } 2468 2469 func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2470 defer func() { 2471 if r := recover(); r != nil { 2472 ec.Error(ctx, ec.Recover(ctx, r)) 2473 ret = graphql.Null 2474 } 2475 }() 2476 fc := &graphql.FieldContext{ 2477 Object: "__Type", 2478 Field: field, 2479 Args: nil, 2480 IsMethod: true, 2481 IsResolver: false, 2482 } 2483 2484 ctx = graphql.WithFieldContext(ctx, fc) 2485 rawArgs := field.ArgumentMap(ec.Variables) 2486 args, err := ec.field___Type_fields_args(ctx, rawArgs) 2487 if err != nil { 2488 ec.Error(ctx, err) 2489 return graphql.Null 2490 } 2491 fc.Args = args 2492 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2493 ctx = rctx // use context from middleware stack in children 2494 return obj.Fields(args["includeDeprecated"].(bool)), nil 2495 }) 2496 if err != nil { 2497 ec.Error(ctx, err) 2498 return graphql.Null 2499 } 2500 if resTmp == nil { 2501 return graphql.Null 2502 } 2503 res := resTmp.([]introspection.Field) 2504 fc.Result = res 2505 return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) 2506 } 2507 2508 func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2509 defer func() { 2510 if r := recover(); r != nil { 2511 ec.Error(ctx, ec.Recover(ctx, r)) 2512 ret = graphql.Null 2513 } 2514 }() 2515 fc := &graphql.FieldContext{ 2516 Object: "__Type", 2517 Field: field, 2518 Args: nil, 2519 IsMethod: true, 2520 IsResolver: false, 2521 } 2522 2523 ctx = graphql.WithFieldContext(ctx, fc) 2524 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2525 ctx = rctx // use context from middleware stack in children 2526 return obj.Interfaces(), nil 2527 }) 2528 if err != nil { 2529 ec.Error(ctx, err) 2530 return graphql.Null 2531 } 2532 if resTmp == nil { 2533 return graphql.Null 2534 } 2535 res := resTmp.([]introspection.Type) 2536 fc.Result = res 2537 return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 2538 } 2539 2540 func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2541 defer func() { 2542 if r := recover(); r != nil { 2543 ec.Error(ctx, ec.Recover(ctx, r)) 2544 ret = graphql.Null 2545 } 2546 }() 2547 fc := &graphql.FieldContext{ 2548 Object: "__Type", 2549 Field: field, 2550 Args: nil, 2551 IsMethod: true, 2552 IsResolver: false, 2553 } 2554 2555 ctx = graphql.WithFieldContext(ctx, fc) 2556 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2557 ctx = rctx // use context from middleware stack in children 2558 return obj.PossibleTypes(), nil 2559 }) 2560 if err != nil { 2561 ec.Error(ctx, err) 2562 return graphql.Null 2563 } 2564 if resTmp == nil { 2565 return graphql.Null 2566 } 2567 res := resTmp.([]introspection.Type) 2568 fc.Result = res 2569 return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 2570 } 2571 2572 func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2573 defer func() { 2574 if r := recover(); r != nil { 2575 ec.Error(ctx, ec.Recover(ctx, r)) 2576 ret = graphql.Null 2577 } 2578 }() 2579 fc := &graphql.FieldContext{ 2580 Object: "__Type", 2581 Field: field, 2582 Args: nil, 2583 IsMethod: true, 2584 IsResolver: false, 2585 } 2586 2587 ctx = graphql.WithFieldContext(ctx, fc) 2588 rawArgs := field.ArgumentMap(ec.Variables) 2589 args, err := ec.field___Type_enumValues_args(ctx, rawArgs) 2590 if err != nil { 2591 ec.Error(ctx, err) 2592 return graphql.Null 2593 } 2594 fc.Args = args 2595 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2596 ctx = rctx // use context from middleware stack in children 2597 return obj.EnumValues(args["includeDeprecated"].(bool)), nil 2598 }) 2599 if err != nil { 2600 ec.Error(ctx, err) 2601 return graphql.Null 2602 } 2603 if resTmp == nil { 2604 return graphql.Null 2605 } 2606 res := resTmp.([]introspection.EnumValue) 2607 fc.Result = res 2608 return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) 2609 } 2610 2611 func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2612 defer func() { 2613 if r := recover(); r != nil { 2614 ec.Error(ctx, ec.Recover(ctx, r)) 2615 ret = graphql.Null 2616 } 2617 }() 2618 fc := &graphql.FieldContext{ 2619 Object: "__Type", 2620 Field: field, 2621 Args: nil, 2622 IsMethod: true, 2623 IsResolver: false, 2624 } 2625 2626 ctx = graphql.WithFieldContext(ctx, fc) 2627 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2628 ctx = rctx // use context from middleware stack in children 2629 return obj.InputFields(), nil 2630 }) 2631 if err != nil { 2632 ec.Error(ctx, err) 2633 return graphql.Null 2634 } 2635 if resTmp == nil { 2636 return graphql.Null 2637 } 2638 res := resTmp.([]introspection.InputValue) 2639 fc.Result = res 2640 return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 2641 } 2642 2643 func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2644 defer func() { 2645 if r := recover(); r != nil { 2646 ec.Error(ctx, ec.Recover(ctx, r)) 2647 ret = graphql.Null 2648 } 2649 }() 2650 fc := &graphql.FieldContext{ 2651 Object: "__Type", 2652 Field: field, 2653 Args: nil, 2654 IsMethod: true, 2655 IsResolver: false, 2656 } 2657 2658 ctx = graphql.WithFieldContext(ctx, fc) 2659 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2660 ctx = rctx // use context from middleware stack in children 2661 return obj.OfType(), nil 2662 }) 2663 if err != nil { 2664 ec.Error(ctx, err) 2665 return graphql.Null 2666 } 2667 if resTmp == nil { 2668 return graphql.Null 2669 } 2670 res := resTmp.(*introspection.Type) 2671 fc.Result = res 2672 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 2673 } 2674 2675 func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2676 defer func() { 2677 if r := recover(); r != nil { 2678 ec.Error(ctx, ec.Recover(ctx, r)) 2679 ret = graphql.Null 2680 } 2681 }() 2682 fc := &graphql.FieldContext{ 2683 Object: "__Type", 2684 Field: field, 2685 Args: nil, 2686 IsMethod: true, 2687 IsResolver: false, 2688 } 2689 2690 ctx = graphql.WithFieldContext(ctx, fc) 2691 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2692 ctx = rctx // use context from middleware stack in children 2693 return obj.SpecifiedByURL(), nil 2694 }) 2695 if err != nil { 2696 ec.Error(ctx, err) 2697 return graphql.Null 2698 } 2699 if resTmp == nil { 2700 return graphql.Null 2701 } 2702 res := resTmp.(*string) 2703 fc.Result = res 2704 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 2705 } 2706 2707 // endregion **************************** field.gotpl ***************************** 2708 2709 // region **************************** input.gotpl ***************************** 2710 2711 func (ec *executionContext) unmarshalInputNewUser(ctx context.Context, obj interface{}) (NewUser, error) { 2712 var it NewUser 2713 asMap := map[string]interface{}{} 2714 for k, v := range obj.(map[string]interface{}) { 2715 asMap[k] = v 2716 } 2717 2718 for k, v := range asMap { 2719 switch k { 2720 case "name": 2721 var err error 2722 2723 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) 2724 it.Name, err = ec.unmarshalNString2string(ctx, v) 2725 if err != nil { 2726 return it, err 2727 } 2728 } 2729 } 2730 2731 return it, nil 2732 } 2733 2734 // endregion **************************** input.gotpl ***************************** 2735 2736 // region ************************** interface.gotpl *************************** 2737 2738 func (ec *executionContext) _Being(ctx context.Context, sel ast.SelectionSet, obj Being) graphql.Marshaler { 2739 switch obj := (obj).(type) { 2740 case nil: 2741 return graphql.Null 2742 case User: 2743 return ec._User(ctx, sel, &obj) 2744 case *User: 2745 if obj == nil { 2746 return graphql.Null 2747 } 2748 return ec._User(ctx, sel, obj) 2749 case Animal: 2750 return ec._Animal(ctx, sel, &obj) 2751 case *Animal: 2752 if obj == nil { 2753 return graphql.Null 2754 } 2755 return ec._Animal(ctx, sel, obj) 2756 default: 2757 panic(fmt.Errorf("unexpected type %T", obj)) 2758 } 2759 } 2760 2761 func (ec *executionContext) _Lucky(ctx context.Context, sel ast.SelectionSet, obj Lucky) graphql.Marshaler { 2762 switch obj := (obj).(type) { 2763 case nil: 2764 return graphql.Null 2765 case User: 2766 return ec._User(ctx, sel, &obj) 2767 case *User: 2768 if obj == nil { 2769 return graphql.Null 2770 } 2771 return ec._User(ctx, sel, obj) 2772 default: 2773 panic(fmt.Errorf("unexpected type %T", obj)) 2774 } 2775 } 2776 2777 // endregion ************************** interface.gotpl *************************** 2778 2779 // region **************************** object.gotpl **************************** 2780 2781 var animalImplementors = []string{"Animal", "Being"} 2782 2783 func (ec *executionContext) _Animal(ctx context.Context, sel ast.SelectionSet, obj *Animal) graphql.Marshaler { 2784 fields := graphql.CollectFields(ec.OperationContext, sel, animalImplementors) 2785 out := graphql.NewFieldSet(fields) 2786 var invalids uint32 2787 for i, field := range fields { 2788 switch field.Name { 2789 case "__typename": 2790 out.Values[i] = graphql.MarshalString("Animal") 2791 case "id": 2792 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 2793 return ec._Animal_id(ctx, field, obj) 2794 } 2795 2796 out.Values[i] = innerFunc(ctx) 2797 2798 if out.Values[i] == graphql.Null { 2799 invalids++ 2800 } 2801 case "name": 2802 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 2803 return ec._Animal_name(ctx, field, obj) 2804 } 2805 2806 out.Values[i] = innerFunc(ctx) 2807 2808 if out.Values[i] == graphql.Null { 2809 invalids++ 2810 } 2811 case "species": 2812 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 2813 return ec._Animal_species(ctx, field, obj) 2814 } 2815 2816 out.Values[i] = innerFunc(ctx) 2817 2818 if out.Values[i] == graphql.Null { 2819 invalids++ 2820 } 2821 case "owner": 2822 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 2823 return ec._Animal_owner(ctx, field, obj) 2824 } 2825 2826 out.Values[i] = innerFunc(ctx) 2827 2828 case "hair": 2829 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 2830 return ec._Animal_hair(ctx, field, obj) 2831 } 2832 2833 out.Values[i] = innerFunc(ctx) 2834 2835 default: 2836 panic("unknown field " + strconv.Quote(field.Name)) 2837 } 2838 } 2839 out.Dispatch() 2840 if invalids > 0 { 2841 return graphql.Null 2842 } 2843 return out 2844 } 2845 2846 var beingsHairImplementors = []string{"BeingsHair"} 2847 2848 func (ec *executionContext) _BeingsHair(ctx context.Context, sel ast.SelectionSet, obj *BeingsHair) graphql.Marshaler { 2849 fields := graphql.CollectFields(ec.OperationContext, sel, beingsHairImplementors) 2850 out := graphql.NewFieldSet(fields) 2851 var invalids uint32 2852 for i, field := range fields { 2853 switch field.Name { 2854 case "__typename": 2855 out.Values[i] = graphql.MarshalString("BeingsHair") 2856 case "hasHair": 2857 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 2858 return ec._BeingsHair_hasHair(ctx, field, obj) 2859 } 2860 2861 out.Values[i] = innerFunc(ctx) 2862 2863 if out.Values[i] == graphql.Null { 2864 invalids++ 2865 } 2866 default: 2867 panic("unknown field " + strconv.Quote(field.Name)) 2868 } 2869 } 2870 out.Dispatch() 2871 if invalids > 0 { 2872 return graphql.Null 2873 } 2874 return out 2875 } 2876 2877 var hairImplementors = []string{"Hair"} 2878 2879 func (ec *executionContext) _Hair(ctx context.Context, sel ast.SelectionSet, obj *Hair) graphql.Marshaler { 2880 fields := graphql.CollectFields(ec.OperationContext, sel, hairImplementors) 2881 out := graphql.NewFieldSet(fields) 2882 var invalids uint32 2883 for i, field := range fields { 2884 switch field.Name { 2885 case "__typename": 2886 out.Values[i] = graphql.MarshalString("Hair") 2887 case "color": 2888 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 2889 return ec._Hair_color(ctx, field, obj) 2890 } 2891 2892 out.Values[i] = innerFunc(ctx) 2893 2894 default: 2895 panic("unknown field " + strconv.Quote(field.Name)) 2896 } 2897 } 2898 out.Dispatch() 2899 if invalids > 0 { 2900 return graphql.Null 2901 } 2902 return out 2903 } 2904 2905 var mutationImplementors = []string{"Mutation"} 2906 2907 func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { 2908 fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors) 2909 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ 2910 Object: "Mutation", 2911 }) 2912 2913 out := graphql.NewFieldSet(fields) 2914 var invalids uint32 2915 for i, field := range fields { 2916 innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ 2917 Object: field.Name, 2918 Field: field, 2919 }) 2920 2921 switch field.Name { 2922 case "__typename": 2923 out.Values[i] = graphql.MarshalString("Mutation") 2924 case "createUser": 2925 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 2926 return ec._Mutation_createUser(ctx, field) 2927 } 2928 2929 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, innerFunc) 2930 2931 if out.Values[i] == graphql.Null { 2932 invalids++ 2933 } 2934 default: 2935 panic("unknown field " + strconv.Quote(field.Name)) 2936 } 2937 } 2938 out.Dispatch() 2939 if invalids > 0 { 2940 return graphql.Null 2941 } 2942 return out 2943 } 2944 2945 var queryImplementors = []string{"Query"} 2946 2947 func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { 2948 fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) 2949 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ 2950 Object: "Query", 2951 }) 2952 2953 out := graphql.NewFieldSet(fields) 2954 var invalids uint32 2955 for i, field := range fields { 2956 innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ 2957 Object: field.Name, 2958 Field: field, 2959 }) 2960 2961 switch field.Name { 2962 case "__typename": 2963 out.Values[i] = graphql.MarshalString("Query") 2964 case "me": 2965 field := field 2966 2967 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 2968 defer func() { 2969 if r := recover(); r != nil { 2970 ec.Error(ctx, ec.Recover(ctx, r)) 2971 } 2972 }() 2973 res = ec._Query_me(ctx, field) 2974 return res 2975 } 2976 2977 rrm := func(ctx context.Context) graphql.Marshaler { 2978 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 2979 } 2980 2981 out.Concurrently(i, func() graphql.Marshaler { 2982 return rrm(innerCtx) 2983 }) 2984 case "user": 2985 field := field 2986 2987 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 2988 defer func() { 2989 if r := recover(); r != nil { 2990 ec.Error(ctx, ec.Recover(ctx, r)) 2991 } 2992 }() 2993 res = ec._Query_user(ctx, field) 2994 return res 2995 } 2996 2997 rrm := func(ctx context.Context) graphql.Marshaler { 2998 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 2999 } 3000 3001 out.Concurrently(i, func() graphql.Marshaler { 3002 return rrm(innerCtx) 3003 }) 3004 case "being": 3005 field := field 3006 3007 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3008 defer func() { 3009 if r := recover(); r != nil { 3010 ec.Error(ctx, ec.Recover(ctx, r)) 3011 } 3012 }() 3013 res = ec._Query_being(ctx, field) 3014 return res 3015 } 3016 3017 rrm := func(ctx context.Context) graphql.Marshaler { 3018 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 3019 } 3020 3021 out.Concurrently(i, func() graphql.Marshaler { 3022 return rrm(innerCtx) 3023 }) 3024 case "beings": 3025 field := field 3026 3027 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3028 defer func() { 3029 if r := recover(); r != nil { 3030 ec.Error(ctx, ec.Recover(ctx, r)) 3031 } 3032 }() 3033 res = ec._Query_beings(ctx, field) 3034 if res == graphql.Null { 3035 atomic.AddUint32(&invalids, 1) 3036 } 3037 return res 3038 } 3039 3040 rrm := func(ctx context.Context) graphql.Marshaler { 3041 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 3042 } 3043 3044 out.Concurrently(i, func() graphql.Marshaler { 3045 return rrm(innerCtx) 3046 }) 3047 case "lotteryWinner": 3048 field := field 3049 3050 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3051 defer func() { 3052 if r := recover(); r != nil { 3053 ec.Error(ctx, ec.Recover(ctx, r)) 3054 } 3055 }() 3056 res = ec._Query_lotteryWinner(ctx, field) 3057 return res 3058 } 3059 3060 rrm := func(ctx context.Context) graphql.Marshaler { 3061 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 3062 } 3063 3064 out.Concurrently(i, func() graphql.Marshaler { 3065 return rrm(innerCtx) 3066 }) 3067 case "usersBornOn": 3068 field := field 3069 3070 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3071 defer func() { 3072 if r := recover(); r != nil { 3073 ec.Error(ctx, ec.Recover(ctx, r)) 3074 } 3075 }() 3076 res = ec._Query_usersBornOn(ctx, field) 3077 if res == graphql.Null { 3078 atomic.AddUint32(&invalids, 1) 3079 } 3080 return res 3081 } 3082 3083 rrm := func(ctx context.Context) graphql.Marshaler { 3084 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 3085 } 3086 3087 out.Concurrently(i, func() graphql.Marshaler { 3088 return rrm(innerCtx) 3089 }) 3090 case "usersBornOnDates": 3091 field := field 3092 3093 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3094 defer func() { 3095 if r := recover(); r != nil { 3096 ec.Error(ctx, ec.Recover(ctx, r)) 3097 } 3098 }() 3099 res = ec._Query_usersBornOnDates(ctx, field) 3100 if res == graphql.Null { 3101 atomic.AddUint32(&invalids, 1) 3102 } 3103 return res 3104 } 3105 3106 rrm := func(ctx context.Context) graphql.Marshaler { 3107 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 3108 } 3109 3110 out.Concurrently(i, func() graphql.Marshaler { 3111 return rrm(innerCtx) 3112 }) 3113 case "userSearch": 3114 field := field 3115 3116 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3117 defer func() { 3118 if r := recover(); r != nil { 3119 ec.Error(ctx, ec.Recover(ctx, r)) 3120 } 3121 }() 3122 res = ec._Query_userSearch(ctx, field) 3123 return res 3124 } 3125 3126 rrm := func(ctx context.Context) graphql.Marshaler { 3127 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 3128 } 3129 3130 out.Concurrently(i, func() graphql.Marshaler { 3131 return rrm(innerCtx) 3132 }) 3133 case "fail": 3134 field := field 3135 3136 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3137 defer func() { 3138 if r := recover(); r != nil { 3139 ec.Error(ctx, ec.Recover(ctx, r)) 3140 } 3141 }() 3142 res = ec._Query_fail(ctx, field) 3143 return res 3144 } 3145 3146 rrm := func(ctx context.Context) graphql.Marshaler { 3147 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 3148 } 3149 3150 out.Concurrently(i, func() graphql.Marshaler { 3151 return rrm(innerCtx) 3152 }) 3153 case "__type": 3154 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3155 return ec._Query___type(ctx, field) 3156 } 3157 3158 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, innerFunc) 3159 3160 case "__schema": 3161 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3162 return ec._Query___schema(ctx, field) 3163 } 3164 3165 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, innerFunc) 3166 3167 default: 3168 panic("unknown field " + strconv.Quote(field.Name)) 3169 } 3170 } 3171 out.Dispatch() 3172 if invalids > 0 { 3173 return graphql.Null 3174 } 3175 return out 3176 } 3177 3178 var userImplementors = []string{"User", "Being", "Lucky"} 3179 3180 func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj *User) graphql.Marshaler { 3181 fields := graphql.CollectFields(ec.OperationContext, sel, userImplementors) 3182 out := graphql.NewFieldSet(fields) 3183 var invalids uint32 3184 for i, field := range fields { 3185 switch field.Name { 3186 case "__typename": 3187 out.Values[i] = graphql.MarshalString("User") 3188 case "id": 3189 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3190 return ec._User_id(ctx, field, obj) 3191 } 3192 3193 out.Values[i] = innerFunc(ctx) 3194 3195 if out.Values[i] == graphql.Null { 3196 invalids++ 3197 } 3198 case "name": 3199 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3200 return ec._User_name(ctx, field, obj) 3201 } 3202 3203 out.Values[i] = innerFunc(ctx) 3204 3205 if out.Values[i] == graphql.Null { 3206 invalids++ 3207 } 3208 case "luckyNumber": 3209 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3210 return ec._User_luckyNumber(ctx, field, obj) 3211 } 3212 3213 out.Values[i] = innerFunc(ctx) 3214 3215 case "hair": 3216 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3217 return ec._User_hair(ctx, field, obj) 3218 } 3219 3220 out.Values[i] = innerFunc(ctx) 3221 3222 case "birthdate": 3223 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3224 return ec._User_birthdate(ctx, field, obj) 3225 } 3226 3227 out.Values[i] = innerFunc(ctx) 3228 3229 case "friends": 3230 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3231 return ec._User_friends(ctx, field, obj) 3232 } 3233 3234 out.Values[i] = innerFunc(ctx) 3235 3236 if out.Values[i] == graphql.Null { 3237 invalids++ 3238 } 3239 default: 3240 panic("unknown field " + strconv.Quote(field.Name)) 3241 } 3242 } 3243 out.Dispatch() 3244 if invalids > 0 { 3245 return graphql.Null 3246 } 3247 return out 3248 } 3249 3250 var __DirectiveImplementors = []string{"__Directive"} 3251 3252 func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { 3253 fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) 3254 out := graphql.NewFieldSet(fields) 3255 var invalids uint32 3256 for i, field := range fields { 3257 switch field.Name { 3258 case "__typename": 3259 out.Values[i] = graphql.MarshalString("__Directive") 3260 case "name": 3261 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3262 return ec.___Directive_name(ctx, field, obj) 3263 } 3264 3265 out.Values[i] = innerFunc(ctx) 3266 3267 if out.Values[i] == graphql.Null { 3268 invalids++ 3269 } 3270 case "description": 3271 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3272 return ec.___Directive_description(ctx, field, obj) 3273 } 3274 3275 out.Values[i] = innerFunc(ctx) 3276 3277 case "locations": 3278 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3279 return ec.___Directive_locations(ctx, field, obj) 3280 } 3281 3282 out.Values[i] = innerFunc(ctx) 3283 3284 if out.Values[i] == graphql.Null { 3285 invalids++ 3286 } 3287 case "args": 3288 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3289 return ec.___Directive_args(ctx, field, obj) 3290 } 3291 3292 out.Values[i] = innerFunc(ctx) 3293 3294 if out.Values[i] == graphql.Null { 3295 invalids++ 3296 } 3297 case "isRepeatable": 3298 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3299 return ec.___Directive_isRepeatable(ctx, field, obj) 3300 } 3301 3302 out.Values[i] = innerFunc(ctx) 3303 3304 if out.Values[i] == graphql.Null { 3305 invalids++ 3306 } 3307 default: 3308 panic("unknown field " + strconv.Quote(field.Name)) 3309 } 3310 } 3311 out.Dispatch() 3312 if invalids > 0 { 3313 return graphql.Null 3314 } 3315 return out 3316 } 3317 3318 var __EnumValueImplementors = []string{"__EnumValue"} 3319 3320 func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { 3321 fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) 3322 out := graphql.NewFieldSet(fields) 3323 var invalids uint32 3324 for i, field := range fields { 3325 switch field.Name { 3326 case "__typename": 3327 out.Values[i] = graphql.MarshalString("__EnumValue") 3328 case "name": 3329 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3330 return ec.___EnumValue_name(ctx, field, obj) 3331 } 3332 3333 out.Values[i] = innerFunc(ctx) 3334 3335 if out.Values[i] == graphql.Null { 3336 invalids++ 3337 } 3338 case "description": 3339 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3340 return ec.___EnumValue_description(ctx, field, obj) 3341 } 3342 3343 out.Values[i] = innerFunc(ctx) 3344 3345 case "isDeprecated": 3346 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3347 return ec.___EnumValue_isDeprecated(ctx, field, obj) 3348 } 3349 3350 out.Values[i] = innerFunc(ctx) 3351 3352 if out.Values[i] == graphql.Null { 3353 invalids++ 3354 } 3355 case "deprecationReason": 3356 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3357 return ec.___EnumValue_deprecationReason(ctx, field, obj) 3358 } 3359 3360 out.Values[i] = innerFunc(ctx) 3361 3362 default: 3363 panic("unknown field " + strconv.Quote(field.Name)) 3364 } 3365 } 3366 out.Dispatch() 3367 if invalids > 0 { 3368 return graphql.Null 3369 } 3370 return out 3371 } 3372 3373 var __FieldImplementors = []string{"__Field"} 3374 3375 func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { 3376 fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) 3377 out := graphql.NewFieldSet(fields) 3378 var invalids uint32 3379 for i, field := range fields { 3380 switch field.Name { 3381 case "__typename": 3382 out.Values[i] = graphql.MarshalString("__Field") 3383 case "name": 3384 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3385 return ec.___Field_name(ctx, field, obj) 3386 } 3387 3388 out.Values[i] = innerFunc(ctx) 3389 3390 if out.Values[i] == graphql.Null { 3391 invalids++ 3392 } 3393 case "description": 3394 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3395 return ec.___Field_description(ctx, field, obj) 3396 } 3397 3398 out.Values[i] = innerFunc(ctx) 3399 3400 case "args": 3401 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3402 return ec.___Field_args(ctx, field, obj) 3403 } 3404 3405 out.Values[i] = innerFunc(ctx) 3406 3407 if out.Values[i] == graphql.Null { 3408 invalids++ 3409 } 3410 case "type": 3411 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3412 return ec.___Field_type(ctx, field, obj) 3413 } 3414 3415 out.Values[i] = innerFunc(ctx) 3416 3417 if out.Values[i] == graphql.Null { 3418 invalids++ 3419 } 3420 case "isDeprecated": 3421 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3422 return ec.___Field_isDeprecated(ctx, field, obj) 3423 } 3424 3425 out.Values[i] = innerFunc(ctx) 3426 3427 if out.Values[i] == graphql.Null { 3428 invalids++ 3429 } 3430 case "deprecationReason": 3431 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3432 return ec.___Field_deprecationReason(ctx, field, obj) 3433 } 3434 3435 out.Values[i] = innerFunc(ctx) 3436 3437 default: 3438 panic("unknown field " + strconv.Quote(field.Name)) 3439 } 3440 } 3441 out.Dispatch() 3442 if invalids > 0 { 3443 return graphql.Null 3444 } 3445 return out 3446 } 3447 3448 var __InputValueImplementors = []string{"__InputValue"} 3449 3450 func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { 3451 fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) 3452 out := graphql.NewFieldSet(fields) 3453 var invalids uint32 3454 for i, field := range fields { 3455 switch field.Name { 3456 case "__typename": 3457 out.Values[i] = graphql.MarshalString("__InputValue") 3458 case "name": 3459 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3460 return ec.___InputValue_name(ctx, field, obj) 3461 } 3462 3463 out.Values[i] = innerFunc(ctx) 3464 3465 if out.Values[i] == graphql.Null { 3466 invalids++ 3467 } 3468 case "description": 3469 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3470 return ec.___InputValue_description(ctx, field, obj) 3471 } 3472 3473 out.Values[i] = innerFunc(ctx) 3474 3475 case "type": 3476 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3477 return ec.___InputValue_type(ctx, field, obj) 3478 } 3479 3480 out.Values[i] = innerFunc(ctx) 3481 3482 if out.Values[i] == graphql.Null { 3483 invalids++ 3484 } 3485 case "defaultValue": 3486 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3487 return ec.___InputValue_defaultValue(ctx, field, obj) 3488 } 3489 3490 out.Values[i] = innerFunc(ctx) 3491 3492 default: 3493 panic("unknown field " + strconv.Quote(field.Name)) 3494 } 3495 } 3496 out.Dispatch() 3497 if invalids > 0 { 3498 return graphql.Null 3499 } 3500 return out 3501 } 3502 3503 var __SchemaImplementors = []string{"__Schema"} 3504 3505 func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { 3506 fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) 3507 out := graphql.NewFieldSet(fields) 3508 var invalids uint32 3509 for i, field := range fields { 3510 switch field.Name { 3511 case "__typename": 3512 out.Values[i] = graphql.MarshalString("__Schema") 3513 case "description": 3514 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3515 return ec.___Schema_description(ctx, field, obj) 3516 } 3517 3518 out.Values[i] = innerFunc(ctx) 3519 3520 case "types": 3521 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3522 return ec.___Schema_types(ctx, field, obj) 3523 } 3524 3525 out.Values[i] = innerFunc(ctx) 3526 3527 if out.Values[i] == graphql.Null { 3528 invalids++ 3529 } 3530 case "queryType": 3531 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3532 return ec.___Schema_queryType(ctx, field, obj) 3533 } 3534 3535 out.Values[i] = innerFunc(ctx) 3536 3537 if out.Values[i] == graphql.Null { 3538 invalids++ 3539 } 3540 case "mutationType": 3541 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3542 return ec.___Schema_mutationType(ctx, field, obj) 3543 } 3544 3545 out.Values[i] = innerFunc(ctx) 3546 3547 case "subscriptionType": 3548 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3549 return ec.___Schema_subscriptionType(ctx, field, obj) 3550 } 3551 3552 out.Values[i] = innerFunc(ctx) 3553 3554 case "directives": 3555 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3556 return ec.___Schema_directives(ctx, field, obj) 3557 } 3558 3559 out.Values[i] = innerFunc(ctx) 3560 3561 if out.Values[i] == graphql.Null { 3562 invalids++ 3563 } 3564 default: 3565 panic("unknown field " + strconv.Quote(field.Name)) 3566 } 3567 } 3568 out.Dispatch() 3569 if invalids > 0 { 3570 return graphql.Null 3571 } 3572 return out 3573 } 3574 3575 var __TypeImplementors = []string{"__Type"} 3576 3577 func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { 3578 fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) 3579 out := graphql.NewFieldSet(fields) 3580 var invalids uint32 3581 for i, field := range fields { 3582 switch field.Name { 3583 case "__typename": 3584 out.Values[i] = graphql.MarshalString("__Type") 3585 case "kind": 3586 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3587 return ec.___Type_kind(ctx, field, obj) 3588 } 3589 3590 out.Values[i] = innerFunc(ctx) 3591 3592 if out.Values[i] == graphql.Null { 3593 invalids++ 3594 } 3595 case "name": 3596 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3597 return ec.___Type_name(ctx, field, obj) 3598 } 3599 3600 out.Values[i] = innerFunc(ctx) 3601 3602 case "description": 3603 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3604 return ec.___Type_description(ctx, field, obj) 3605 } 3606 3607 out.Values[i] = innerFunc(ctx) 3608 3609 case "fields": 3610 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3611 return ec.___Type_fields(ctx, field, obj) 3612 } 3613 3614 out.Values[i] = innerFunc(ctx) 3615 3616 case "interfaces": 3617 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3618 return ec.___Type_interfaces(ctx, field, obj) 3619 } 3620 3621 out.Values[i] = innerFunc(ctx) 3622 3623 case "possibleTypes": 3624 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3625 return ec.___Type_possibleTypes(ctx, field, obj) 3626 } 3627 3628 out.Values[i] = innerFunc(ctx) 3629 3630 case "enumValues": 3631 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3632 return ec.___Type_enumValues(ctx, field, obj) 3633 } 3634 3635 out.Values[i] = innerFunc(ctx) 3636 3637 case "inputFields": 3638 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3639 return ec.___Type_inputFields(ctx, field, obj) 3640 } 3641 3642 out.Values[i] = innerFunc(ctx) 3643 3644 case "ofType": 3645 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3646 return ec.___Type_ofType(ctx, field, obj) 3647 } 3648 3649 out.Values[i] = innerFunc(ctx) 3650 3651 case "specifiedByURL": 3652 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3653 return ec.___Type_specifiedByURL(ctx, field, obj) 3654 } 3655 3656 out.Values[i] = innerFunc(ctx) 3657 3658 default: 3659 panic("unknown field " + strconv.Quote(field.Name)) 3660 } 3661 } 3662 out.Dispatch() 3663 if invalids > 0 { 3664 return graphql.Null 3665 } 3666 return out 3667 } 3668 3669 // endregion **************************** object.gotpl **************************** 3670 3671 // region ***************************** type.gotpl ***************************** 3672 3673 func (ec *executionContext) marshalNBeing2ᚕgithubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐBeing(ctx context.Context, sel ast.SelectionSet, v []Being) graphql.Marshaler { 3674 ret := make(graphql.Array, len(v)) 3675 var wg sync.WaitGroup 3676 isLen1 := len(v) == 1 3677 if !isLen1 { 3678 wg.Add(len(v)) 3679 } 3680 for i := range v { 3681 i := i 3682 fc := &graphql.FieldContext{ 3683 Index: &i, 3684 Result: &v[i], 3685 } 3686 ctx := graphql.WithFieldContext(ctx, fc) 3687 f := func(i int) { 3688 defer func() { 3689 if r := recover(); r != nil { 3690 ec.Error(ctx, ec.Recover(ctx, r)) 3691 ret = nil 3692 } 3693 }() 3694 if !isLen1 { 3695 defer wg.Done() 3696 } 3697 ret[i] = ec.marshalOBeing2githubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐBeing(ctx, sel, v[i]) 3698 } 3699 if isLen1 { 3700 f(i) 3701 } else { 3702 go f(i) 3703 } 3704 3705 } 3706 wg.Wait() 3707 3708 return ret 3709 } 3710 3711 func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) { 3712 res, err := graphql.UnmarshalBoolean(v) 3713 return res, graphql.ErrorOnPath(ctx, err) 3714 } 3715 3716 func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { 3717 res := graphql.MarshalBoolean(v) 3718 if res == graphql.Null { 3719 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 3720 ec.Errorf(ctx, "must not be null") 3721 } 3722 } 3723 return res 3724 } 3725 3726 func (ec *executionContext) unmarshalNDate2string(ctx context.Context, v interface{}) (string, error) { 3727 res, err := graphql.UnmarshalString(v) 3728 return res, graphql.ErrorOnPath(ctx, err) 3729 } 3730 3731 func (ec *executionContext) marshalNDate2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 3732 res := graphql.MarshalString(v) 3733 if res == graphql.Null { 3734 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 3735 ec.Errorf(ctx, "must not be null") 3736 } 3737 } 3738 return res 3739 } 3740 3741 func (ec *executionContext) unmarshalNDate2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { 3742 var vSlice []interface{} 3743 if v != nil { 3744 vSlice = graphql.CoerceList(v) 3745 } 3746 var err error 3747 res := make([]string, len(vSlice)) 3748 for i := range vSlice { 3749 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 3750 res[i], err = ec.unmarshalNDate2string(ctx, vSlice[i]) 3751 if err != nil { 3752 return nil, err 3753 } 3754 } 3755 return res, nil 3756 } 3757 3758 func (ec *executionContext) marshalNDate2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { 3759 ret := make(graphql.Array, len(v)) 3760 for i := range v { 3761 ret[i] = ec.marshalNDate2string(ctx, sel, v[i]) 3762 } 3763 3764 for _, e := range ret { 3765 if e == graphql.Null { 3766 return graphql.Null 3767 } 3768 } 3769 3770 return ret 3771 } 3772 3773 func (ec *executionContext) unmarshalNID2string(ctx context.Context, v interface{}) (string, error) { 3774 res, err := graphql.UnmarshalID(v) 3775 return res, graphql.ErrorOnPath(ctx, err) 3776 } 3777 3778 func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 3779 res := graphql.MarshalID(v) 3780 if res == graphql.Null { 3781 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 3782 ec.Errorf(ctx, "must not be null") 3783 } 3784 } 3785 return res 3786 } 3787 3788 func (ec *executionContext) unmarshalNID2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { 3789 var vSlice []interface{} 3790 if v != nil { 3791 vSlice = graphql.CoerceList(v) 3792 } 3793 var err error 3794 res := make([]string, len(vSlice)) 3795 for i := range vSlice { 3796 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 3797 res[i], err = ec.unmarshalNID2string(ctx, vSlice[i]) 3798 if err != nil { 3799 return nil, err 3800 } 3801 } 3802 return res, nil 3803 } 3804 3805 func (ec *executionContext) marshalNID2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { 3806 ret := make(graphql.Array, len(v)) 3807 for i := range v { 3808 ret[i] = ec.marshalNID2string(ctx, sel, v[i]) 3809 } 3810 3811 for _, e := range ret { 3812 if e == graphql.Null { 3813 return graphql.Null 3814 } 3815 } 3816 3817 return ret 3818 } 3819 3820 func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) { 3821 res, err := graphql.UnmarshalInt(v) 3822 return res, graphql.ErrorOnPath(ctx, err) 3823 } 3824 3825 func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { 3826 res := graphql.MarshalInt(v) 3827 if res == graphql.Null { 3828 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 3829 ec.Errorf(ctx, "must not be null") 3830 } 3831 } 3832 return res 3833 } 3834 3835 func (ec *executionContext) unmarshalNNewUser2githubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐNewUser(ctx context.Context, v interface{}) (NewUser, error) { 3836 res, err := ec.unmarshalInputNewUser(ctx, v) 3837 return res, graphql.ErrorOnPath(ctx, err) 3838 } 3839 3840 func (ec *executionContext) unmarshalNSpecies2githubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐSpecies(ctx context.Context, v interface{}) (Species, error) { 3841 var res Species 3842 err := res.UnmarshalGQL(v) 3843 return res, graphql.ErrorOnPath(ctx, err) 3844 } 3845 3846 func (ec *executionContext) marshalNSpecies2githubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐSpecies(ctx context.Context, sel ast.SelectionSet, v Species) graphql.Marshaler { 3847 return v 3848 } 3849 3850 func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) { 3851 res, err := graphql.UnmarshalString(v) 3852 return res, graphql.ErrorOnPath(ctx, err) 3853 } 3854 3855 func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 3856 res := graphql.MarshalString(v) 3857 if res == graphql.Null { 3858 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 3859 ec.Errorf(ctx, "must not be null") 3860 } 3861 } 3862 return res 3863 } 3864 3865 func (ec *executionContext) marshalNUser2githubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐUser(ctx context.Context, sel ast.SelectionSet, v User) graphql.Marshaler { 3866 return ec._User(ctx, sel, &v) 3867 } 3868 3869 func (ec *executionContext) marshalNUser2ᚕᚖgithubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐUserᚄ(ctx context.Context, sel ast.SelectionSet, v []*User) graphql.Marshaler { 3870 ret := make(graphql.Array, len(v)) 3871 var wg sync.WaitGroup 3872 isLen1 := len(v) == 1 3873 if !isLen1 { 3874 wg.Add(len(v)) 3875 } 3876 for i := range v { 3877 i := i 3878 fc := &graphql.FieldContext{ 3879 Index: &i, 3880 Result: &v[i], 3881 } 3882 ctx := graphql.WithFieldContext(ctx, fc) 3883 f := func(i int) { 3884 defer func() { 3885 if r := recover(); r != nil { 3886 ec.Error(ctx, ec.Recover(ctx, r)) 3887 ret = nil 3888 } 3889 }() 3890 if !isLen1 { 3891 defer wg.Done() 3892 } 3893 ret[i] = ec.marshalNUser2ᚖgithubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐUser(ctx, sel, v[i]) 3894 } 3895 if isLen1 { 3896 f(i) 3897 } else { 3898 go f(i) 3899 } 3900 3901 } 3902 wg.Wait() 3903 3904 for _, e := range ret { 3905 if e == graphql.Null { 3906 return graphql.Null 3907 } 3908 } 3909 3910 return ret 3911 } 3912 3913 func (ec *executionContext) marshalNUser2ᚖgithubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐUser(ctx context.Context, sel ast.SelectionSet, v *User) graphql.Marshaler { 3914 if v == nil { 3915 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 3916 ec.Errorf(ctx, "must not be null") 3917 } 3918 return graphql.Null 3919 } 3920 return ec._User(ctx, sel, v) 3921 } 3922 3923 func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler { 3924 return ec.___Directive(ctx, sel, &v) 3925 } 3926 3927 func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler { 3928 ret := make(graphql.Array, len(v)) 3929 var wg sync.WaitGroup 3930 isLen1 := len(v) == 1 3931 if !isLen1 { 3932 wg.Add(len(v)) 3933 } 3934 for i := range v { 3935 i := i 3936 fc := &graphql.FieldContext{ 3937 Index: &i, 3938 Result: &v[i], 3939 } 3940 ctx := graphql.WithFieldContext(ctx, fc) 3941 f := func(i int) { 3942 defer func() { 3943 if r := recover(); r != nil { 3944 ec.Error(ctx, ec.Recover(ctx, r)) 3945 ret = nil 3946 } 3947 }() 3948 if !isLen1 { 3949 defer wg.Done() 3950 } 3951 ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i]) 3952 } 3953 if isLen1 { 3954 f(i) 3955 } else { 3956 go f(i) 3957 } 3958 3959 } 3960 wg.Wait() 3961 3962 for _, e := range ret { 3963 if e == graphql.Null { 3964 return graphql.Null 3965 } 3966 } 3967 3968 return ret 3969 } 3970 3971 func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) { 3972 res, err := graphql.UnmarshalString(v) 3973 return res, graphql.ErrorOnPath(ctx, err) 3974 } 3975 3976 func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 3977 res := graphql.MarshalString(v) 3978 if res == graphql.Null { 3979 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 3980 ec.Errorf(ctx, "must not be null") 3981 } 3982 } 3983 return res 3984 } 3985 3986 func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { 3987 var vSlice []interface{} 3988 if v != nil { 3989 vSlice = graphql.CoerceList(v) 3990 } 3991 var err error 3992 res := make([]string, len(vSlice)) 3993 for i := range vSlice { 3994 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 3995 res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i]) 3996 if err != nil { 3997 return nil, err 3998 } 3999 } 4000 return res, nil 4001 } 4002 4003 func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { 4004 ret := make(graphql.Array, len(v)) 4005 var wg sync.WaitGroup 4006 isLen1 := len(v) == 1 4007 if !isLen1 { 4008 wg.Add(len(v)) 4009 } 4010 for i := range v { 4011 i := i 4012 fc := &graphql.FieldContext{ 4013 Index: &i, 4014 Result: &v[i], 4015 } 4016 ctx := graphql.WithFieldContext(ctx, fc) 4017 f := func(i int) { 4018 defer func() { 4019 if r := recover(); r != nil { 4020 ec.Error(ctx, ec.Recover(ctx, r)) 4021 ret = nil 4022 } 4023 }() 4024 if !isLen1 { 4025 defer wg.Done() 4026 } 4027 ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i]) 4028 } 4029 if isLen1 { 4030 f(i) 4031 } else { 4032 go f(i) 4033 } 4034 4035 } 4036 wg.Wait() 4037 4038 for _, e := range ret { 4039 if e == graphql.Null { 4040 return graphql.Null 4041 } 4042 } 4043 4044 return ret 4045 } 4046 4047 func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler { 4048 return ec.___EnumValue(ctx, sel, &v) 4049 } 4050 4051 func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler { 4052 return ec.___Field(ctx, sel, &v) 4053 } 4054 4055 func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler { 4056 return ec.___InputValue(ctx, sel, &v) 4057 } 4058 4059 func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { 4060 ret := make(graphql.Array, len(v)) 4061 var wg sync.WaitGroup 4062 isLen1 := len(v) == 1 4063 if !isLen1 { 4064 wg.Add(len(v)) 4065 } 4066 for i := range v { 4067 i := i 4068 fc := &graphql.FieldContext{ 4069 Index: &i, 4070 Result: &v[i], 4071 } 4072 ctx := graphql.WithFieldContext(ctx, fc) 4073 f := func(i int) { 4074 defer func() { 4075 if r := recover(); r != nil { 4076 ec.Error(ctx, ec.Recover(ctx, r)) 4077 ret = nil 4078 } 4079 }() 4080 if !isLen1 { 4081 defer wg.Done() 4082 } 4083 ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) 4084 } 4085 if isLen1 { 4086 f(i) 4087 } else { 4088 go f(i) 4089 } 4090 4091 } 4092 wg.Wait() 4093 4094 for _, e := range ret { 4095 if e == graphql.Null { 4096 return graphql.Null 4097 } 4098 } 4099 4100 return ret 4101 } 4102 4103 func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { 4104 return ec.___Type(ctx, sel, &v) 4105 } 4106 4107 func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { 4108 ret := make(graphql.Array, len(v)) 4109 var wg sync.WaitGroup 4110 isLen1 := len(v) == 1 4111 if !isLen1 { 4112 wg.Add(len(v)) 4113 } 4114 for i := range v { 4115 i := i 4116 fc := &graphql.FieldContext{ 4117 Index: &i, 4118 Result: &v[i], 4119 } 4120 ctx := graphql.WithFieldContext(ctx, fc) 4121 f := func(i int) { 4122 defer func() { 4123 if r := recover(); r != nil { 4124 ec.Error(ctx, ec.Recover(ctx, r)) 4125 ret = nil 4126 } 4127 }() 4128 if !isLen1 { 4129 defer wg.Done() 4130 } 4131 ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) 4132 } 4133 if isLen1 { 4134 f(i) 4135 } else { 4136 go f(i) 4137 } 4138 4139 } 4140 wg.Wait() 4141 4142 for _, e := range ret { 4143 if e == graphql.Null { 4144 return graphql.Null 4145 } 4146 } 4147 4148 return ret 4149 } 4150 4151 func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { 4152 if v == nil { 4153 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 4154 ec.Errorf(ctx, "must not be null") 4155 } 4156 return graphql.Null 4157 } 4158 return ec.___Type(ctx, sel, v) 4159 } 4160 4161 func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) { 4162 res, err := graphql.UnmarshalString(v) 4163 return res, graphql.ErrorOnPath(ctx, err) 4164 } 4165 4166 func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 4167 res := graphql.MarshalString(v) 4168 if res == graphql.Null { 4169 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 4170 ec.Errorf(ctx, "must not be null") 4171 } 4172 } 4173 return res 4174 } 4175 4176 func (ec *executionContext) marshalOBeing2githubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐBeing(ctx context.Context, sel ast.SelectionSet, v Being) graphql.Marshaler { 4177 if v == nil { 4178 return graphql.Null 4179 } 4180 return ec._Being(ctx, sel, v) 4181 } 4182 4183 func (ec *executionContext) marshalOBeingsHair2ᚖgithubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐBeingsHair(ctx context.Context, sel ast.SelectionSet, v *BeingsHair) graphql.Marshaler { 4184 if v == nil { 4185 return graphql.Null 4186 } 4187 return ec._BeingsHair(ctx, sel, v) 4188 } 4189 4190 func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) { 4191 res, err := graphql.UnmarshalBoolean(v) 4192 return res, graphql.ErrorOnPath(ctx, err) 4193 } 4194 4195 func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { 4196 res := graphql.MarshalBoolean(v) 4197 return res 4198 } 4199 4200 func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) { 4201 if v == nil { 4202 return nil, nil 4203 } 4204 res, err := graphql.UnmarshalBoolean(v) 4205 return &res, graphql.ErrorOnPath(ctx, err) 4206 } 4207 4208 func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler { 4209 if v == nil { 4210 return graphql.Null 4211 } 4212 res := graphql.MarshalBoolean(*v) 4213 return res 4214 } 4215 4216 func (ec *executionContext) unmarshalODate2ᚖstring(ctx context.Context, v interface{}) (*string, error) { 4217 if v == nil { 4218 return nil, nil 4219 } 4220 res, err := graphql.UnmarshalString(v) 4221 return &res, graphql.ErrorOnPath(ctx, err) 4222 } 4223 4224 func (ec *executionContext) marshalODate2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { 4225 if v == nil { 4226 return graphql.Null 4227 } 4228 res := graphql.MarshalString(*v) 4229 return res 4230 } 4231 4232 func (ec *executionContext) marshalOHair2ᚖgithubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐHair(ctx context.Context, sel ast.SelectionSet, v *Hair) graphql.Marshaler { 4233 if v == nil { 4234 return graphql.Null 4235 } 4236 return ec._Hair(ctx, sel, v) 4237 } 4238 4239 func (ec *executionContext) unmarshalOID2ᚖstring(ctx context.Context, v interface{}) (*string, error) { 4240 if v == nil { 4241 return nil, nil 4242 } 4243 res, err := graphql.UnmarshalID(v) 4244 return &res, graphql.ErrorOnPath(ctx, err) 4245 } 4246 4247 func (ec *executionContext) marshalOID2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { 4248 if v == nil { 4249 return graphql.Null 4250 } 4251 res := graphql.MarshalID(*v) 4252 return res 4253 } 4254 4255 func (ec *executionContext) unmarshalOInt2ᚖint(ctx context.Context, v interface{}) (*int, error) { 4256 if v == nil { 4257 return nil, nil 4258 } 4259 res, err := graphql.UnmarshalInt(v) 4260 return &res, graphql.ErrorOnPath(ctx, err) 4261 } 4262 4263 func (ec *executionContext) marshalOInt2ᚖint(ctx context.Context, sel ast.SelectionSet, v *int) graphql.Marshaler { 4264 if v == nil { 4265 return graphql.Null 4266 } 4267 res := graphql.MarshalInt(*v) 4268 return res 4269 } 4270 4271 func (ec *executionContext) marshalOLucky2githubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐLucky(ctx context.Context, sel ast.SelectionSet, v Lucky) graphql.Marshaler { 4272 if v == nil { 4273 return graphql.Null 4274 } 4275 return ec._Lucky(ctx, sel, v) 4276 } 4277 4278 func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { 4279 if v == nil { 4280 return nil, nil 4281 } 4282 res, err := graphql.UnmarshalString(v) 4283 return &res, graphql.ErrorOnPath(ctx, err) 4284 } 4285 4286 func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { 4287 if v == nil { 4288 return graphql.Null 4289 } 4290 res := graphql.MarshalString(*v) 4291 return res 4292 } 4293 4294 func (ec *executionContext) marshalOUser2ᚕᚖgithubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐUser(ctx context.Context, sel ast.SelectionSet, v []*User) graphql.Marshaler { 4295 if v == nil { 4296 return graphql.Null 4297 } 4298 ret := make(graphql.Array, len(v)) 4299 var wg sync.WaitGroup 4300 isLen1 := len(v) == 1 4301 if !isLen1 { 4302 wg.Add(len(v)) 4303 } 4304 for i := range v { 4305 i := i 4306 fc := &graphql.FieldContext{ 4307 Index: &i, 4308 Result: &v[i], 4309 } 4310 ctx := graphql.WithFieldContext(ctx, fc) 4311 f := func(i int) { 4312 defer func() { 4313 if r := recover(); r != nil { 4314 ec.Error(ctx, ec.Recover(ctx, r)) 4315 ret = nil 4316 } 4317 }() 4318 if !isLen1 { 4319 defer wg.Done() 4320 } 4321 ret[i] = ec.marshalOUser2ᚖgithubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐUser(ctx, sel, v[i]) 4322 } 4323 if isLen1 { 4324 f(i) 4325 } else { 4326 go f(i) 4327 } 4328 4329 } 4330 wg.Wait() 4331 4332 return ret 4333 } 4334 4335 func (ec *executionContext) marshalOUser2ᚖgithubᚗcomᚋKhanᚋgenqlientᚋinternalᚋintegrationᚋserverᚐUser(ctx context.Context, sel ast.SelectionSet, v *User) graphql.Marshaler { 4336 if v == nil { 4337 return graphql.Null 4338 } 4339 return ec._User(ctx, sel, v) 4340 } 4341 4342 func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler { 4343 if v == nil { 4344 return graphql.Null 4345 } 4346 ret := make(graphql.Array, len(v)) 4347 var wg sync.WaitGroup 4348 isLen1 := len(v) == 1 4349 if !isLen1 { 4350 wg.Add(len(v)) 4351 } 4352 for i := range v { 4353 i := i 4354 fc := &graphql.FieldContext{ 4355 Index: &i, 4356 Result: &v[i], 4357 } 4358 ctx := graphql.WithFieldContext(ctx, fc) 4359 f := func(i int) { 4360 defer func() { 4361 if r := recover(); r != nil { 4362 ec.Error(ctx, ec.Recover(ctx, r)) 4363 ret = nil 4364 } 4365 }() 4366 if !isLen1 { 4367 defer wg.Done() 4368 } 4369 ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i]) 4370 } 4371 if isLen1 { 4372 f(i) 4373 } else { 4374 go f(i) 4375 } 4376 4377 } 4378 wg.Wait() 4379 4380 for _, e := range ret { 4381 if e == graphql.Null { 4382 return graphql.Null 4383 } 4384 } 4385 4386 return ret 4387 } 4388 4389 func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler { 4390 if v == nil { 4391 return graphql.Null 4392 } 4393 ret := make(graphql.Array, len(v)) 4394 var wg sync.WaitGroup 4395 isLen1 := len(v) == 1 4396 if !isLen1 { 4397 wg.Add(len(v)) 4398 } 4399 for i := range v { 4400 i := i 4401 fc := &graphql.FieldContext{ 4402 Index: &i, 4403 Result: &v[i], 4404 } 4405 ctx := graphql.WithFieldContext(ctx, fc) 4406 f := func(i int) { 4407 defer func() { 4408 if r := recover(); r != nil { 4409 ec.Error(ctx, ec.Recover(ctx, r)) 4410 ret = nil 4411 } 4412 }() 4413 if !isLen1 { 4414 defer wg.Done() 4415 } 4416 ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i]) 4417 } 4418 if isLen1 { 4419 f(i) 4420 } else { 4421 go f(i) 4422 } 4423 4424 } 4425 wg.Wait() 4426 4427 for _, e := range ret { 4428 if e == graphql.Null { 4429 return graphql.Null 4430 } 4431 } 4432 4433 return ret 4434 } 4435 4436 func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { 4437 if v == nil { 4438 return graphql.Null 4439 } 4440 ret := make(graphql.Array, len(v)) 4441 var wg sync.WaitGroup 4442 isLen1 := len(v) == 1 4443 if !isLen1 { 4444 wg.Add(len(v)) 4445 } 4446 for i := range v { 4447 i := i 4448 fc := &graphql.FieldContext{ 4449 Index: &i, 4450 Result: &v[i], 4451 } 4452 ctx := graphql.WithFieldContext(ctx, fc) 4453 f := func(i int) { 4454 defer func() { 4455 if r := recover(); r != nil { 4456 ec.Error(ctx, ec.Recover(ctx, r)) 4457 ret = nil 4458 } 4459 }() 4460 if !isLen1 { 4461 defer wg.Done() 4462 } 4463 ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) 4464 } 4465 if isLen1 { 4466 f(i) 4467 } else { 4468 go f(i) 4469 } 4470 4471 } 4472 wg.Wait() 4473 4474 for _, e := range ret { 4475 if e == graphql.Null { 4476 return graphql.Null 4477 } 4478 } 4479 4480 return ret 4481 } 4482 4483 func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler { 4484 if v == nil { 4485 return graphql.Null 4486 } 4487 return ec.___Schema(ctx, sel, v) 4488 } 4489 4490 func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { 4491 if v == nil { 4492 return graphql.Null 4493 } 4494 ret := make(graphql.Array, len(v)) 4495 var wg sync.WaitGroup 4496 isLen1 := len(v) == 1 4497 if !isLen1 { 4498 wg.Add(len(v)) 4499 } 4500 for i := range v { 4501 i := i 4502 fc := &graphql.FieldContext{ 4503 Index: &i, 4504 Result: &v[i], 4505 } 4506 ctx := graphql.WithFieldContext(ctx, fc) 4507 f := func(i int) { 4508 defer func() { 4509 if r := recover(); r != nil { 4510 ec.Error(ctx, ec.Recover(ctx, r)) 4511 ret = nil 4512 } 4513 }() 4514 if !isLen1 { 4515 defer wg.Done() 4516 } 4517 ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) 4518 } 4519 if isLen1 { 4520 f(i) 4521 } else { 4522 go f(i) 4523 } 4524 4525 } 4526 wg.Wait() 4527 4528 for _, e := range ret { 4529 if e == graphql.Null { 4530 return graphql.Null 4531 } 4532 } 4533 4534 return ret 4535 } 4536 4537 func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { 4538 if v == nil { 4539 return graphql.Null 4540 } 4541 return ec.___Type(ctx, sel, v) 4542 } 4543 4544 // endregion ***************************** type.gotpl *****************************