github.com/mstephano/gqlgen-schemagen@v0.0.0-20230113041936-dd2cd4ea46aa/plugin/federation/testdata/entityresolver/generated/exec.go (about) 1 // Code generated by github.com/mstephano/gqlgen-schemagen, DO NOT EDIT. 2 3 package generated 4 5 import ( 6 "bytes" 7 "context" 8 "errors" 9 "fmt" 10 "strconv" 11 "sync" 12 13 "github.com/mstephano/gqlgen-schemagen/graphql" 14 "github.com/mstephano/gqlgen-schemagen/graphql/introspection" 15 "github.com/mstephano/gqlgen-schemagen/plugin/federation/fedruntime" 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 Entity() EntityResolver 39 } 40 41 type DirectiveRoot struct { 42 EntityResolver func(ctx context.Context, obj interface{}, next graphql.Resolver, multi *bool) (res interface{}, err error) 43 } 44 45 type ComplexityRoot struct { 46 Entity struct { 47 FindHelloByName func(childComplexity int, name string) int 48 FindHelloMultiSingleKeysByKey1AndKey2 func(childComplexity int, key1 string, key2 string) int 49 FindHelloWithErrorsByName func(childComplexity int, name string) int 50 FindManyMultiHelloByNames func(childComplexity int, reps []*MultiHelloByNamesInput) int 51 FindManyMultiHelloMultipleRequiresByNames func(childComplexity int, reps []*MultiHelloMultipleRequiresByNamesInput) int 52 FindManyMultiHelloRequiresByNames func(childComplexity int, reps []*MultiHelloRequiresByNamesInput) int 53 FindManyMultiHelloWithErrorByNames func(childComplexity int, reps []*MultiHelloWithErrorByNamesInput) int 54 FindManyMultiPlanetRequiresNestedByNames func(childComplexity int, reps []*MultiPlanetRequiresNestedByNamesInput) int 55 FindPlanetMultipleRequiresByName func(childComplexity int, name string) int 56 FindPlanetRequiresByName func(childComplexity int, name string) int 57 FindPlanetRequiresNestedByName func(childComplexity int, name string) int 58 FindWorldByHelloNameAndFoo func(childComplexity int, helloName string, foo string) int 59 FindWorldNameByName func(childComplexity int, name string) int 60 FindWorldWithMultipleKeysByBar func(childComplexity int, bar int) int 61 FindWorldWithMultipleKeysByHelloNameAndFoo func(childComplexity int, helloName string, foo string) int 62 } 63 64 Hello struct { 65 Name func(childComplexity int) int 66 Secondary func(childComplexity int) int 67 } 68 69 HelloMultiSingleKeys struct { 70 Key1 func(childComplexity int) int 71 Key2 func(childComplexity int) int 72 } 73 74 HelloWithErrors struct { 75 Name func(childComplexity int) int 76 } 77 78 MultiHello struct { 79 Name func(childComplexity int) int 80 } 81 82 MultiHelloMultipleRequires struct { 83 Key1 func(childComplexity int) int 84 Key2 func(childComplexity int) int 85 Key3 func(childComplexity int) int 86 Name func(childComplexity int) int 87 } 88 89 MultiHelloRequires struct { 90 Key1 func(childComplexity int) int 91 Key2 func(childComplexity int) int 92 Name func(childComplexity int) int 93 } 94 95 MultiHelloWithError struct { 96 Name func(childComplexity int) int 97 } 98 99 MultiPlanetRequiresNested struct { 100 Name func(childComplexity int) int 101 Size func(childComplexity int) int 102 World func(childComplexity int) int 103 } 104 105 PlanetMultipleRequires struct { 106 Density func(childComplexity int) int 107 Diameter func(childComplexity int) int 108 Name func(childComplexity int) int 109 Weight func(childComplexity int) int 110 } 111 112 PlanetRequires struct { 113 Diameter func(childComplexity int) int 114 Name func(childComplexity int) int 115 Size func(childComplexity int) int 116 } 117 118 PlanetRequiresNested struct { 119 Name func(childComplexity int) int 120 Size func(childComplexity int) int 121 World func(childComplexity int) int 122 } 123 124 Query struct { 125 __resolve__service func(childComplexity int) int 126 __resolve_entities func(childComplexity int, representations []map[string]interface{}) int 127 } 128 129 World struct { 130 Bar func(childComplexity int) int 131 Foo func(childComplexity int) int 132 Hello func(childComplexity int) int 133 } 134 135 WorldName struct { 136 Name func(childComplexity int) int 137 } 138 139 WorldWithMultipleKeys struct { 140 Bar func(childComplexity int) int 141 Foo func(childComplexity int) int 142 Hello func(childComplexity int) int 143 } 144 145 _Service struct { 146 SDL func(childComplexity int) int 147 } 148 } 149 150 type EntityResolver interface { 151 FindHelloByName(ctx context.Context, name string) (*Hello, error) 152 FindHelloMultiSingleKeysByKey1AndKey2(ctx context.Context, key1 string, key2 string) (*HelloMultiSingleKeys, error) 153 FindHelloWithErrorsByName(ctx context.Context, name string) (*HelloWithErrors, error) 154 FindManyMultiHelloByNames(ctx context.Context, reps []*MultiHelloByNamesInput) ([]*MultiHello, error) 155 FindManyMultiHelloMultipleRequiresByNames(ctx context.Context, reps []*MultiHelloMultipleRequiresByNamesInput) ([]*MultiHelloMultipleRequires, error) 156 FindManyMultiHelloRequiresByNames(ctx context.Context, reps []*MultiHelloRequiresByNamesInput) ([]*MultiHelloRequires, error) 157 FindManyMultiHelloWithErrorByNames(ctx context.Context, reps []*MultiHelloWithErrorByNamesInput) ([]*MultiHelloWithError, error) 158 FindManyMultiPlanetRequiresNestedByNames(ctx context.Context, reps []*MultiPlanetRequiresNestedByNamesInput) ([]*MultiPlanetRequiresNested, error) 159 FindPlanetMultipleRequiresByName(ctx context.Context, name string) (*PlanetMultipleRequires, error) 160 FindPlanetRequiresByName(ctx context.Context, name string) (*PlanetRequires, error) 161 FindPlanetRequiresNestedByName(ctx context.Context, name string) (*PlanetRequiresNested, error) 162 FindWorldByHelloNameAndFoo(ctx context.Context, helloName string, foo string) (*World, error) 163 FindWorldNameByName(ctx context.Context, name string) (*WorldName, error) 164 FindWorldWithMultipleKeysByHelloNameAndFoo(ctx context.Context, helloName string, foo string) (*WorldWithMultipleKeys, error) 165 FindWorldWithMultipleKeysByBar(ctx context.Context, bar int) (*WorldWithMultipleKeys, error) 166 } 167 168 type executableSchema struct { 169 resolvers ResolverRoot 170 directives DirectiveRoot 171 complexity ComplexityRoot 172 } 173 174 func (e *executableSchema) Schema() *ast.Schema { 175 return parsedSchema 176 } 177 178 func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) { 179 ec := executionContext{nil, e} 180 _ = ec 181 switch typeName + "." + field { 182 183 case "Entity.findHelloByName": 184 if e.complexity.Entity.FindHelloByName == nil { 185 break 186 } 187 188 args, err := ec.field_Entity_findHelloByName_args(context.TODO(), rawArgs) 189 if err != nil { 190 return 0, false 191 } 192 193 return e.complexity.Entity.FindHelloByName(childComplexity, args["name"].(string)), true 194 195 case "Entity.findHelloMultiSingleKeysByKey1AndKey2": 196 if e.complexity.Entity.FindHelloMultiSingleKeysByKey1AndKey2 == nil { 197 break 198 } 199 200 args, err := ec.field_Entity_findHelloMultiSingleKeysByKey1AndKey2_args(context.TODO(), rawArgs) 201 if err != nil { 202 return 0, false 203 } 204 205 return e.complexity.Entity.FindHelloMultiSingleKeysByKey1AndKey2(childComplexity, args["key1"].(string), args["key2"].(string)), true 206 207 case "Entity.findHelloWithErrorsByName": 208 if e.complexity.Entity.FindHelloWithErrorsByName == nil { 209 break 210 } 211 212 args, err := ec.field_Entity_findHelloWithErrorsByName_args(context.TODO(), rawArgs) 213 if err != nil { 214 return 0, false 215 } 216 217 return e.complexity.Entity.FindHelloWithErrorsByName(childComplexity, args["name"].(string)), true 218 219 case "Entity.findManyMultiHelloByNames": 220 if e.complexity.Entity.FindManyMultiHelloByNames == nil { 221 break 222 } 223 224 args, err := ec.field_Entity_findManyMultiHelloByNames_args(context.TODO(), rawArgs) 225 if err != nil { 226 return 0, false 227 } 228 229 return e.complexity.Entity.FindManyMultiHelloByNames(childComplexity, args["reps"].([]*MultiHelloByNamesInput)), true 230 231 case "Entity.findManyMultiHelloMultipleRequiresByNames": 232 if e.complexity.Entity.FindManyMultiHelloMultipleRequiresByNames == nil { 233 break 234 } 235 236 args, err := ec.field_Entity_findManyMultiHelloMultipleRequiresByNames_args(context.TODO(), rawArgs) 237 if err != nil { 238 return 0, false 239 } 240 241 return e.complexity.Entity.FindManyMultiHelloMultipleRequiresByNames(childComplexity, args["reps"].([]*MultiHelloMultipleRequiresByNamesInput)), true 242 243 case "Entity.findManyMultiHelloRequiresByNames": 244 if e.complexity.Entity.FindManyMultiHelloRequiresByNames == nil { 245 break 246 } 247 248 args, err := ec.field_Entity_findManyMultiHelloRequiresByNames_args(context.TODO(), rawArgs) 249 if err != nil { 250 return 0, false 251 } 252 253 return e.complexity.Entity.FindManyMultiHelloRequiresByNames(childComplexity, args["reps"].([]*MultiHelloRequiresByNamesInput)), true 254 255 case "Entity.findManyMultiHelloWithErrorByNames": 256 if e.complexity.Entity.FindManyMultiHelloWithErrorByNames == nil { 257 break 258 } 259 260 args, err := ec.field_Entity_findManyMultiHelloWithErrorByNames_args(context.TODO(), rawArgs) 261 if err != nil { 262 return 0, false 263 } 264 265 return e.complexity.Entity.FindManyMultiHelloWithErrorByNames(childComplexity, args["reps"].([]*MultiHelloWithErrorByNamesInput)), true 266 267 case "Entity.findManyMultiPlanetRequiresNestedByNames": 268 if e.complexity.Entity.FindManyMultiPlanetRequiresNestedByNames == nil { 269 break 270 } 271 272 args, err := ec.field_Entity_findManyMultiPlanetRequiresNestedByNames_args(context.TODO(), rawArgs) 273 if err != nil { 274 return 0, false 275 } 276 277 return e.complexity.Entity.FindManyMultiPlanetRequiresNestedByNames(childComplexity, args["reps"].([]*MultiPlanetRequiresNestedByNamesInput)), true 278 279 case "Entity.findPlanetMultipleRequiresByName": 280 if e.complexity.Entity.FindPlanetMultipleRequiresByName == nil { 281 break 282 } 283 284 args, err := ec.field_Entity_findPlanetMultipleRequiresByName_args(context.TODO(), rawArgs) 285 if err != nil { 286 return 0, false 287 } 288 289 return e.complexity.Entity.FindPlanetMultipleRequiresByName(childComplexity, args["name"].(string)), true 290 291 case "Entity.findPlanetRequiresByName": 292 if e.complexity.Entity.FindPlanetRequiresByName == nil { 293 break 294 } 295 296 args, err := ec.field_Entity_findPlanetRequiresByName_args(context.TODO(), rawArgs) 297 if err != nil { 298 return 0, false 299 } 300 301 return e.complexity.Entity.FindPlanetRequiresByName(childComplexity, args["name"].(string)), true 302 303 case "Entity.findPlanetRequiresNestedByName": 304 if e.complexity.Entity.FindPlanetRequiresNestedByName == nil { 305 break 306 } 307 308 args, err := ec.field_Entity_findPlanetRequiresNestedByName_args(context.TODO(), rawArgs) 309 if err != nil { 310 return 0, false 311 } 312 313 return e.complexity.Entity.FindPlanetRequiresNestedByName(childComplexity, args["name"].(string)), true 314 315 case "Entity.findWorldByHelloNameAndFoo": 316 if e.complexity.Entity.FindWorldByHelloNameAndFoo == nil { 317 break 318 } 319 320 args, err := ec.field_Entity_findWorldByHelloNameAndFoo_args(context.TODO(), rawArgs) 321 if err != nil { 322 return 0, false 323 } 324 325 return e.complexity.Entity.FindWorldByHelloNameAndFoo(childComplexity, args["helloName"].(string), args["foo"].(string)), true 326 327 case "Entity.findWorldNameByName": 328 if e.complexity.Entity.FindWorldNameByName == nil { 329 break 330 } 331 332 args, err := ec.field_Entity_findWorldNameByName_args(context.TODO(), rawArgs) 333 if err != nil { 334 return 0, false 335 } 336 337 return e.complexity.Entity.FindWorldNameByName(childComplexity, args["name"].(string)), true 338 339 case "Entity.findWorldWithMultipleKeysByBar": 340 if e.complexity.Entity.FindWorldWithMultipleKeysByBar == nil { 341 break 342 } 343 344 args, err := ec.field_Entity_findWorldWithMultipleKeysByBar_args(context.TODO(), rawArgs) 345 if err != nil { 346 return 0, false 347 } 348 349 return e.complexity.Entity.FindWorldWithMultipleKeysByBar(childComplexity, args["bar"].(int)), true 350 351 case "Entity.findWorldWithMultipleKeysByHelloNameAndFoo": 352 if e.complexity.Entity.FindWorldWithMultipleKeysByHelloNameAndFoo == nil { 353 break 354 } 355 356 args, err := ec.field_Entity_findWorldWithMultipleKeysByHelloNameAndFoo_args(context.TODO(), rawArgs) 357 if err != nil { 358 return 0, false 359 } 360 361 return e.complexity.Entity.FindWorldWithMultipleKeysByHelloNameAndFoo(childComplexity, args["helloName"].(string), args["foo"].(string)), true 362 363 case "Hello.name": 364 if e.complexity.Hello.Name == nil { 365 break 366 } 367 368 return e.complexity.Hello.Name(childComplexity), true 369 370 case "Hello.secondary": 371 if e.complexity.Hello.Secondary == nil { 372 break 373 } 374 375 return e.complexity.Hello.Secondary(childComplexity), true 376 377 case "HelloMultiSingleKeys.key1": 378 if e.complexity.HelloMultiSingleKeys.Key1 == nil { 379 break 380 } 381 382 return e.complexity.HelloMultiSingleKeys.Key1(childComplexity), true 383 384 case "HelloMultiSingleKeys.key2": 385 if e.complexity.HelloMultiSingleKeys.Key2 == nil { 386 break 387 } 388 389 return e.complexity.HelloMultiSingleKeys.Key2(childComplexity), true 390 391 case "HelloWithErrors.name": 392 if e.complexity.HelloWithErrors.Name == nil { 393 break 394 } 395 396 return e.complexity.HelloWithErrors.Name(childComplexity), true 397 398 case "MultiHello.name": 399 if e.complexity.MultiHello.Name == nil { 400 break 401 } 402 403 return e.complexity.MultiHello.Name(childComplexity), true 404 405 case "MultiHelloMultipleRequires.key1": 406 if e.complexity.MultiHelloMultipleRequires.Key1 == nil { 407 break 408 } 409 410 return e.complexity.MultiHelloMultipleRequires.Key1(childComplexity), true 411 412 case "MultiHelloMultipleRequires.key2": 413 if e.complexity.MultiHelloMultipleRequires.Key2 == nil { 414 break 415 } 416 417 return e.complexity.MultiHelloMultipleRequires.Key2(childComplexity), true 418 419 case "MultiHelloMultipleRequires.key3": 420 if e.complexity.MultiHelloMultipleRequires.Key3 == nil { 421 break 422 } 423 424 return e.complexity.MultiHelloMultipleRequires.Key3(childComplexity), true 425 426 case "MultiHelloMultipleRequires.name": 427 if e.complexity.MultiHelloMultipleRequires.Name == nil { 428 break 429 } 430 431 return e.complexity.MultiHelloMultipleRequires.Name(childComplexity), true 432 433 case "MultiHelloRequires.key1": 434 if e.complexity.MultiHelloRequires.Key1 == nil { 435 break 436 } 437 438 return e.complexity.MultiHelloRequires.Key1(childComplexity), true 439 440 case "MultiHelloRequires.key2": 441 if e.complexity.MultiHelloRequires.Key2 == nil { 442 break 443 } 444 445 return e.complexity.MultiHelloRequires.Key2(childComplexity), true 446 447 case "MultiHelloRequires.name": 448 if e.complexity.MultiHelloRequires.Name == nil { 449 break 450 } 451 452 return e.complexity.MultiHelloRequires.Name(childComplexity), true 453 454 case "MultiHelloWithError.name": 455 if e.complexity.MultiHelloWithError.Name == nil { 456 break 457 } 458 459 return e.complexity.MultiHelloWithError.Name(childComplexity), true 460 461 case "MultiPlanetRequiresNested.name": 462 if e.complexity.MultiPlanetRequiresNested.Name == nil { 463 break 464 } 465 466 return e.complexity.MultiPlanetRequiresNested.Name(childComplexity), true 467 468 case "MultiPlanetRequiresNested.size": 469 if e.complexity.MultiPlanetRequiresNested.Size == nil { 470 break 471 } 472 473 return e.complexity.MultiPlanetRequiresNested.Size(childComplexity), true 474 475 case "MultiPlanetRequiresNested.world": 476 if e.complexity.MultiPlanetRequiresNested.World == nil { 477 break 478 } 479 480 return e.complexity.MultiPlanetRequiresNested.World(childComplexity), true 481 482 case "PlanetMultipleRequires.density": 483 if e.complexity.PlanetMultipleRequires.Density == nil { 484 break 485 } 486 487 return e.complexity.PlanetMultipleRequires.Density(childComplexity), true 488 489 case "PlanetMultipleRequires.diameter": 490 if e.complexity.PlanetMultipleRequires.Diameter == nil { 491 break 492 } 493 494 return e.complexity.PlanetMultipleRequires.Diameter(childComplexity), true 495 496 case "PlanetMultipleRequires.name": 497 if e.complexity.PlanetMultipleRequires.Name == nil { 498 break 499 } 500 501 return e.complexity.PlanetMultipleRequires.Name(childComplexity), true 502 503 case "PlanetMultipleRequires.weight": 504 if e.complexity.PlanetMultipleRequires.Weight == nil { 505 break 506 } 507 508 return e.complexity.PlanetMultipleRequires.Weight(childComplexity), true 509 510 case "PlanetRequires.diameter": 511 if e.complexity.PlanetRequires.Diameter == nil { 512 break 513 } 514 515 return e.complexity.PlanetRequires.Diameter(childComplexity), true 516 517 case "PlanetRequires.name": 518 if e.complexity.PlanetRequires.Name == nil { 519 break 520 } 521 522 return e.complexity.PlanetRequires.Name(childComplexity), true 523 524 case "PlanetRequires.size": 525 if e.complexity.PlanetRequires.Size == nil { 526 break 527 } 528 529 return e.complexity.PlanetRequires.Size(childComplexity), true 530 531 case "PlanetRequiresNested.name": 532 if e.complexity.PlanetRequiresNested.Name == nil { 533 break 534 } 535 536 return e.complexity.PlanetRequiresNested.Name(childComplexity), true 537 538 case "PlanetRequiresNested.size": 539 if e.complexity.PlanetRequiresNested.Size == nil { 540 break 541 } 542 543 return e.complexity.PlanetRequiresNested.Size(childComplexity), true 544 545 case "PlanetRequiresNested.world": 546 if e.complexity.PlanetRequiresNested.World == nil { 547 break 548 } 549 550 return e.complexity.PlanetRequiresNested.World(childComplexity), true 551 552 case "Query._service": 553 if e.complexity.Query.__resolve__service == nil { 554 break 555 } 556 557 return e.complexity.Query.__resolve__service(childComplexity), true 558 559 case "Query._entities": 560 if e.complexity.Query.__resolve_entities == nil { 561 break 562 } 563 564 args, err := ec.field_Query__entities_args(context.TODO(), rawArgs) 565 if err != nil { 566 return 0, false 567 } 568 569 return e.complexity.Query.__resolve_entities(childComplexity, args["representations"].([]map[string]interface{})), true 570 571 case "World.bar": 572 if e.complexity.World.Bar == nil { 573 break 574 } 575 576 return e.complexity.World.Bar(childComplexity), true 577 578 case "World.foo": 579 if e.complexity.World.Foo == nil { 580 break 581 } 582 583 return e.complexity.World.Foo(childComplexity), true 584 585 case "World.hello": 586 if e.complexity.World.Hello == nil { 587 break 588 } 589 590 return e.complexity.World.Hello(childComplexity), true 591 592 case "WorldName.name": 593 if e.complexity.WorldName.Name == nil { 594 break 595 } 596 597 return e.complexity.WorldName.Name(childComplexity), true 598 599 case "WorldWithMultipleKeys.bar": 600 if e.complexity.WorldWithMultipleKeys.Bar == nil { 601 break 602 } 603 604 return e.complexity.WorldWithMultipleKeys.Bar(childComplexity), true 605 606 case "WorldWithMultipleKeys.foo": 607 if e.complexity.WorldWithMultipleKeys.Foo == nil { 608 break 609 } 610 611 return e.complexity.WorldWithMultipleKeys.Foo(childComplexity), true 612 613 case "WorldWithMultipleKeys.hello": 614 if e.complexity.WorldWithMultipleKeys.Hello == nil { 615 break 616 } 617 618 return e.complexity.WorldWithMultipleKeys.Hello(childComplexity), true 619 620 case "_Service.sdl": 621 if e.complexity._Service.SDL == nil { 622 break 623 } 624 625 return e.complexity._Service.SDL(childComplexity), true 626 627 } 628 return 0, false 629 } 630 631 func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { 632 rc := graphql.GetOperationContext(ctx) 633 ec := executionContext{rc, e} 634 inputUnmarshalMap := graphql.BuildUnmarshalerMap( 635 ec.unmarshalInputMultiHelloByNamesInput, 636 ec.unmarshalInputMultiHelloMultipleRequiresByNamesInput, 637 ec.unmarshalInputMultiHelloRequiresByNamesInput, 638 ec.unmarshalInputMultiHelloWithErrorByNamesInput, 639 ec.unmarshalInputMultiPlanetRequiresNestedByNamesInput, 640 ) 641 first := true 642 643 switch rc.Operation.Operation { 644 case ast.Query: 645 return func(ctx context.Context) *graphql.Response { 646 if !first { 647 return nil 648 } 649 first = false 650 ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) 651 data := ec._Query(ctx, rc.Operation.SelectionSet) 652 var buf bytes.Buffer 653 data.MarshalGQL(&buf) 654 655 return &graphql.Response{ 656 Data: buf.Bytes(), 657 } 658 } 659 660 default: 661 return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation")) 662 } 663 } 664 665 type executionContext struct { 666 *graphql.OperationContext 667 *executableSchema 668 } 669 670 func (ec *executionContext) introspectSchema() (*introspection.Schema, error) { 671 if ec.DisableIntrospection { 672 return nil, errors.New("introspection disabled") 673 } 674 return introspection.WrapSchema(parsedSchema), nil 675 } 676 677 func (ec *executionContext) introspectType(name string) (*introspection.Type, error) { 678 if ec.DisableIntrospection { 679 return nil, errors.New("introspection disabled") 680 } 681 return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil 682 } 683 684 var sources = []*ast.Source{ 685 {Name: "../schema.graphql", Input: `directive @entityResolver(multi: Boolean) on OBJECT 686 687 type Hello @key(fields: "name") { 688 name: String! 689 secondary: String! 690 } 691 692 type World @key(fields: "hello { name } foo ") { 693 foo: String! 694 bar: Int! 695 hello: Hello 696 } 697 698 type WorldWithMultipleKeys @key(fields: "hello { name } foo ") @key(fields: "bar") { 699 foo: String! 700 bar: Int! 701 hello: Hello 702 } 703 704 type WorldName @key(fields: "name") { 705 name: String! 706 } 707 708 type HelloWithErrors @key(fields: "name") { 709 name: String! 710 } 711 712 type PlanetRequires @key(fields: "name") { 713 name: String! 714 size: Int! @requires(fields: "diameter") 715 diameter: Int! 716 } 717 718 type PlanetMultipleRequires @key(fields: "name") { 719 name: String! @external 720 diameter: Int! @external 721 density: Int! @external 722 weight: Int! @requires(fields: "diameter density") 723 } 724 725 type PlanetRequiresNested @key(fields: "name") { 726 name: String! @external 727 world: World! @external 728 size: Int! @requires(fields: "world{ foo }") 729 } 730 731 type MultiPlanetRequiresNested @key(fields: "name") @entityResolver(multi: true) { 732 name: String! @external 733 world: World! @external 734 size: Int! @requires(fields: "world{ foo }") 735 } 736 737 type MultiHello @key(fields: "name") @entityResolver(multi: true) { 738 name: String! 739 } 740 741 type MultiHelloWithError @key(fields: "name") @entityResolver(multi: true) { 742 name: String! 743 } 744 745 type HelloMultiSingleKeys @key(fields: "key1 key2") { 746 key1: String! 747 key2: String! 748 } 749 750 type MultiHelloRequires @key(fields: "name") @entityResolver(multi: true) { 751 name: String! @external 752 key1: String! @external 753 key2: String! @requires(fields: "key1") 754 } 755 756 type MultiHelloMultipleRequires @key(fields: "name") @entityResolver(multi: true) { 757 name: String! @external 758 key1: String! @external 759 key2: String! @external 760 key3: String! @requires(fields: "key1 key2") 761 } 762 `, BuiltIn: false}, 763 {Name: "../../../federation/directives.graphql", Input: ` 764 scalar _Any 765 scalar _FieldSet 766 767 directive @external on FIELD_DEFINITION 768 directive @requires(fields: _FieldSet!) on FIELD_DEFINITION 769 directive @provides(fields: _FieldSet!) on FIELD_DEFINITION 770 directive @extends on OBJECT | INTERFACE 771 772 directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE 773 `, BuiltIn: true}, 774 {Name: "../../../federation/entity.graphql", Input: ` 775 # a union of all types that use the @key directive 776 union _Entity = Hello | HelloMultiSingleKeys | HelloWithErrors | MultiHello | MultiHelloMultipleRequires | MultiHelloRequires | MultiHelloWithError | MultiPlanetRequiresNested | PlanetMultipleRequires | PlanetRequires | PlanetRequiresNested | World | WorldName | WorldWithMultipleKeys 777 778 input MultiHelloByNamesInput { 779 Name: String! 780 } 781 782 input MultiHelloMultipleRequiresByNamesInput { 783 Name: String! 784 } 785 786 input MultiHelloRequiresByNamesInput { 787 Name: String! 788 } 789 790 input MultiHelloWithErrorByNamesInput { 791 Name: String! 792 } 793 794 input MultiPlanetRequiresNestedByNamesInput { 795 Name: String! 796 } 797 798 # fake type to build resolver interfaces for users to implement 799 type Entity { 800 findHelloByName(name: String!,): Hello! 801 findHelloMultiSingleKeysByKey1AndKey2(key1: String!,key2: String!,): HelloMultiSingleKeys! 802 findHelloWithErrorsByName(name: String!,): HelloWithErrors! 803 findManyMultiHelloByNames(reps: [MultiHelloByNamesInput!]!): [MultiHello] 804 findManyMultiHelloMultipleRequiresByNames(reps: [MultiHelloMultipleRequiresByNamesInput!]!): [MultiHelloMultipleRequires] 805 findManyMultiHelloRequiresByNames(reps: [MultiHelloRequiresByNamesInput!]!): [MultiHelloRequires] 806 findManyMultiHelloWithErrorByNames(reps: [MultiHelloWithErrorByNamesInput!]!): [MultiHelloWithError] 807 findManyMultiPlanetRequiresNestedByNames(reps: [MultiPlanetRequiresNestedByNamesInput!]!): [MultiPlanetRequiresNested] 808 findPlanetMultipleRequiresByName(name: String!,): PlanetMultipleRequires! 809 findPlanetRequiresByName(name: String!,): PlanetRequires! 810 findPlanetRequiresNestedByName(name: String!,): PlanetRequiresNested! 811 findWorldByHelloNameAndFoo(helloName: String!,foo: String!,): World! 812 findWorldNameByName(name: String!,): WorldName! 813 findWorldWithMultipleKeysByHelloNameAndFoo(helloName: String!,foo: String!,): WorldWithMultipleKeys! 814 findWorldWithMultipleKeysByBar(bar: Int!,): WorldWithMultipleKeys! 815 816 } 817 818 type _Service { 819 sdl: String 820 } 821 822 extend type Query { 823 _entities(representations: [_Any!]!): [_Entity]! 824 _service: _Service! 825 } 826 `, BuiltIn: true}, 827 } 828 var parsedSchema = gqlparser.MustLoadSchema(sources...) 829 830 // endregion ************************** generated!.gotpl ************************** 831 832 // region ***************************** args.gotpl ***************************** 833 834 func (ec *executionContext) dir_entityResolver_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 835 var err error 836 args := map[string]interface{}{} 837 var arg0 *bool 838 if tmp, ok := rawArgs["multi"]; ok { 839 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("multi")) 840 arg0, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp) 841 if err != nil { 842 return nil, err 843 } 844 } 845 args["multi"] = arg0 846 return args, nil 847 } 848 849 func (ec *executionContext) field_Entity_findHelloByName_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 850 var err error 851 args := map[string]interface{}{} 852 var arg0 string 853 if tmp, ok := rawArgs["name"]; ok { 854 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) 855 arg0, err = ec.unmarshalNString2string(ctx, tmp) 856 if err != nil { 857 return nil, err 858 } 859 } 860 args["name"] = arg0 861 return args, nil 862 } 863 864 func (ec *executionContext) field_Entity_findHelloMultiSingleKeysByKey1AndKey2_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 865 var err error 866 args := map[string]interface{}{} 867 var arg0 string 868 if tmp, ok := rawArgs["key1"]; ok { 869 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key1")) 870 arg0, err = ec.unmarshalNString2string(ctx, tmp) 871 if err != nil { 872 return nil, err 873 } 874 } 875 args["key1"] = arg0 876 var arg1 string 877 if tmp, ok := rawArgs["key2"]; ok { 878 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key2")) 879 arg1, err = ec.unmarshalNString2string(ctx, tmp) 880 if err != nil { 881 return nil, err 882 } 883 } 884 args["key2"] = arg1 885 return args, nil 886 } 887 888 func (ec *executionContext) field_Entity_findHelloWithErrorsByName_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 889 var err error 890 args := map[string]interface{}{} 891 var arg0 string 892 if tmp, ok := rawArgs["name"]; ok { 893 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) 894 arg0, err = ec.unmarshalNString2string(ctx, tmp) 895 if err != nil { 896 return nil, err 897 } 898 } 899 args["name"] = arg0 900 return args, nil 901 } 902 903 func (ec *executionContext) field_Entity_findManyMultiHelloByNames_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 904 var err error 905 args := map[string]interface{}{} 906 var arg0 []*MultiHelloByNamesInput 907 if tmp, ok := rawArgs["reps"]; ok { 908 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("reps")) 909 arg0, err = ec.unmarshalNMultiHelloByNamesInput2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloByNamesInputᚄ(ctx, tmp) 910 if err != nil { 911 return nil, err 912 } 913 } 914 args["reps"] = arg0 915 return args, nil 916 } 917 918 func (ec *executionContext) field_Entity_findManyMultiHelloMultipleRequiresByNames_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 919 var err error 920 args := map[string]interface{}{} 921 var arg0 []*MultiHelloMultipleRequiresByNamesInput 922 if tmp, ok := rawArgs["reps"]; ok { 923 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("reps")) 924 arg0, err = ec.unmarshalNMultiHelloMultipleRequiresByNamesInput2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloMultipleRequiresByNamesInputᚄ(ctx, tmp) 925 if err != nil { 926 return nil, err 927 } 928 } 929 args["reps"] = arg0 930 return args, nil 931 } 932 933 func (ec *executionContext) field_Entity_findManyMultiHelloRequiresByNames_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 934 var err error 935 args := map[string]interface{}{} 936 var arg0 []*MultiHelloRequiresByNamesInput 937 if tmp, ok := rawArgs["reps"]; ok { 938 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("reps")) 939 arg0, err = ec.unmarshalNMultiHelloRequiresByNamesInput2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloRequiresByNamesInputᚄ(ctx, tmp) 940 if err != nil { 941 return nil, err 942 } 943 } 944 args["reps"] = arg0 945 return args, nil 946 } 947 948 func (ec *executionContext) field_Entity_findManyMultiHelloWithErrorByNames_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 949 var err error 950 args := map[string]interface{}{} 951 var arg0 []*MultiHelloWithErrorByNamesInput 952 if tmp, ok := rawArgs["reps"]; ok { 953 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("reps")) 954 arg0, err = ec.unmarshalNMultiHelloWithErrorByNamesInput2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloWithErrorByNamesInputᚄ(ctx, tmp) 955 if err != nil { 956 return nil, err 957 } 958 } 959 args["reps"] = arg0 960 return args, nil 961 } 962 963 func (ec *executionContext) field_Entity_findManyMultiPlanetRequiresNestedByNames_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 964 var err error 965 args := map[string]interface{}{} 966 var arg0 []*MultiPlanetRequiresNestedByNamesInput 967 if tmp, ok := rawArgs["reps"]; ok { 968 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("reps")) 969 arg0, err = ec.unmarshalNMultiPlanetRequiresNestedByNamesInput2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiPlanetRequiresNestedByNamesInputᚄ(ctx, tmp) 970 if err != nil { 971 return nil, err 972 } 973 } 974 args["reps"] = arg0 975 return args, nil 976 } 977 978 func (ec *executionContext) field_Entity_findPlanetMultipleRequiresByName_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 979 var err error 980 args := map[string]interface{}{} 981 var arg0 string 982 if tmp, ok := rawArgs["name"]; ok { 983 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) 984 arg0, err = ec.unmarshalNString2string(ctx, tmp) 985 if err != nil { 986 return nil, err 987 } 988 } 989 args["name"] = arg0 990 return args, nil 991 } 992 993 func (ec *executionContext) field_Entity_findPlanetRequiresByName_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 994 var err error 995 args := map[string]interface{}{} 996 var arg0 string 997 if tmp, ok := rawArgs["name"]; ok { 998 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) 999 arg0, err = ec.unmarshalNString2string(ctx, tmp) 1000 if err != nil { 1001 return nil, err 1002 } 1003 } 1004 args["name"] = arg0 1005 return args, nil 1006 } 1007 1008 func (ec *executionContext) field_Entity_findPlanetRequiresNestedByName_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 1009 var err error 1010 args := map[string]interface{}{} 1011 var arg0 string 1012 if tmp, ok := rawArgs["name"]; ok { 1013 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) 1014 arg0, err = ec.unmarshalNString2string(ctx, tmp) 1015 if err != nil { 1016 return nil, err 1017 } 1018 } 1019 args["name"] = arg0 1020 return args, nil 1021 } 1022 1023 func (ec *executionContext) field_Entity_findWorldByHelloNameAndFoo_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 1024 var err error 1025 args := map[string]interface{}{} 1026 var arg0 string 1027 if tmp, ok := rawArgs["helloName"]; ok { 1028 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("helloName")) 1029 arg0, err = ec.unmarshalNString2string(ctx, tmp) 1030 if err != nil { 1031 return nil, err 1032 } 1033 } 1034 args["helloName"] = arg0 1035 var arg1 string 1036 if tmp, ok := rawArgs["foo"]; ok { 1037 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("foo")) 1038 arg1, err = ec.unmarshalNString2string(ctx, tmp) 1039 if err != nil { 1040 return nil, err 1041 } 1042 } 1043 args["foo"] = arg1 1044 return args, nil 1045 } 1046 1047 func (ec *executionContext) field_Entity_findWorldNameByName_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 1048 var err error 1049 args := map[string]interface{}{} 1050 var arg0 string 1051 if tmp, ok := rawArgs["name"]; ok { 1052 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) 1053 arg0, err = ec.unmarshalNString2string(ctx, tmp) 1054 if err != nil { 1055 return nil, err 1056 } 1057 } 1058 args["name"] = arg0 1059 return args, nil 1060 } 1061 1062 func (ec *executionContext) field_Entity_findWorldWithMultipleKeysByBar_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 1063 var err error 1064 args := map[string]interface{}{} 1065 var arg0 int 1066 if tmp, ok := rawArgs["bar"]; ok { 1067 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bar")) 1068 arg0, err = ec.unmarshalNInt2int(ctx, tmp) 1069 if err != nil { 1070 return nil, err 1071 } 1072 } 1073 args["bar"] = arg0 1074 return args, nil 1075 } 1076 1077 func (ec *executionContext) field_Entity_findWorldWithMultipleKeysByHelloNameAndFoo_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 1078 var err error 1079 args := map[string]interface{}{} 1080 var arg0 string 1081 if tmp, ok := rawArgs["helloName"]; ok { 1082 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("helloName")) 1083 arg0, err = ec.unmarshalNString2string(ctx, tmp) 1084 if err != nil { 1085 return nil, err 1086 } 1087 } 1088 args["helloName"] = arg0 1089 var arg1 string 1090 if tmp, ok := rawArgs["foo"]; ok { 1091 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("foo")) 1092 arg1, err = ec.unmarshalNString2string(ctx, tmp) 1093 if err != nil { 1094 return nil, err 1095 } 1096 } 1097 args["foo"] = arg1 1098 return args, nil 1099 } 1100 1101 func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 1102 var err error 1103 args := map[string]interface{}{} 1104 var arg0 string 1105 if tmp, ok := rawArgs["name"]; ok { 1106 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) 1107 arg0, err = ec.unmarshalNString2string(ctx, tmp) 1108 if err != nil { 1109 return nil, err 1110 } 1111 } 1112 args["name"] = arg0 1113 return args, nil 1114 } 1115 1116 func (ec *executionContext) field_Query__entities_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 1117 var err error 1118 args := map[string]interface{}{} 1119 var arg0 []map[string]interface{} 1120 if tmp, ok := rawArgs["representations"]; ok { 1121 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("representations")) 1122 arg0, err = ec.unmarshalN_Any2ᚕmapᚄ(ctx, tmp) 1123 if err != nil { 1124 return nil, err 1125 } 1126 } 1127 args["representations"] = arg0 1128 return args, nil 1129 } 1130 1131 func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 1132 var err error 1133 args := map[string]interface{}{} 1134 var arg0 bool 1135 if tmp, ok := rawArgs["includeDeprecated"]; ok { 1136 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) 1137 arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) 1138 if err != nil { 1139 return nil, err 1140 } 1141 } 1142 args["includeDeprecated"] = arg0 1143 return args, nil 1144 } 1145 1146 func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 1147 var err error 1148 args := map[string]interface{}{} 1149 var arg0 bool 1150 if tmp, ok := rawArgs["includeDeprecated"]; ok { 1151 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) 1152 arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) 1153 if err != nil { 1154 return nil, err 1155 } 1156 } 1157 args["includeDeprecated"] = arg0 1158 return args, nil 1159 } 1160 1161 // endregion ***************************** args.gotpl ***************************** 1162 1163 // region ************************** directives.gotpl ************************** 1164 1165 // endregion ************************** directives.gotpl ************************** 1166 1167 // region **************************** field.gotpl ***************************** 1168 1169 func (ec *executionContext) _Entity_findHelloByName(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1170 fc, err := ec.fieldContext_Entity_findHelloByName(ctx, field) 1171 if err != nil { 1172 return graphql.Null 1173 } 1174 ctx = graphql.WithFieldContext(ctx, fc) 1175 defer func() { 1176 if r := recover(); r != nil { 1177 ec.Error(ctx, ec.Recover(ctx, r)) 1178 ret = graphql.Null 1179 } 1180 }() 1181 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1182 ctx = rctx // use context from middleware stack in children 1183 return ec.resolvers.Entity().FindHelloByName(rctx, fc.Args["name"].(string)) 1184 }) 1185 if err != nil { 1186 ec.Error(ctx, err) 1187 } 1188 if resTmp == nil { 1189 if !graphql.HasFieldError(ctx, fc) { 1190 ec.Errorf(ctx, "must not be null") 1191 } 1192 return graphql.Null 1193 } 1194 res := resTmp.(*Hello) 1195 fc.Result = res 1196 return ec.marshalNHello2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐHello(ctx, field.Selections, res) 1197 } 1198 1199 func (ec *executionContext) fieldContext_Entity_findHelloByName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1200 fc = &graphql.FieldContext{ 1201 Object: "Entity", 1202 Field: field, 1203 IsMethod: true, 1204 IsResolver: true, 1205 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1206 switch field.Name { 1207 case "name": 1208 return ec.fieldContext_Hello_name(ctx, field) 1209 case "secondary": 1210 return ec.fieldContext_Hello_secondary(ctx, field) 1211 } 1212 return nil, fmt.Errorf("no field named %q was found under type Hello", field.Name) 1213 }, 1214 } 1215 defer func() { 1216 if r := recover(); r != nil { 1217 err = ec.Recover(ctx, r) 1218 ec.Error(ctx, err) 1219 } 1220 }() 1221 ctx = graphql.WithFieldContext(ctx, fc) 1222 if fc.Args, err = ec.field_Entity_findHelloByName_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 1223 ec.Error(ctx, err) 1224 return 1225 } 1226 return fc, nil 1227 } 1228 1229 func (ec *executionContext) _Entity_findHelloMultiSingleKeysByKey1AndKey2(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1230 fc, err := ec.fieldContext_Entity_findHelloMultiSingleKeysByKey1AndKey2(ctx, field) 1231 if err != nil { 1232 return graphql.Null 1233 } 1234 ctx = graphql.WithFieldContext(ctx, fc) 1235 defer func() { 1236 if r := recover(); r != nil { 1237 ec.Error(ctx, ec.Recover(ctx, r)) 1238 ret = graphql.Null 1239 } 1240 }() 1241 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1242 ctx = rctx // use context from middleware stack in children 1243 return ec.resolvers.Entity().FindHelloMultiSingleKeysByKey1AndKey2(rctx, fc.Args["key1"].(string), fc.Args["key2"].(string)) 1244 }) 1245 if err != nil { 1246 ec.Error(ctx, err) 1247 } 1248 if resTmp == nil { 1249 if !graphql.HasFieldError(ctx, fc) { 1250 ec.Errorf(ctx, "must not be null") 1251 } 1252 return graphql.Null 1253 } 1254 res := resTmp.(*HelloMultiSingleKeys) 1255 fc.Result = res 1256 return ec.marshalNHelloMultiSingleKeys2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐHelloMultiSingleKeys(ctx, field.Selections, res) 1257 } 1258 1259 func (ec *executionContext) fieldContext_Entity_findHelloMultiSingleKeysByKey1AndKey2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1260 fc = &graphql.FieldContext{ 1261 Object: "Entity", 1262 Field: field, 1263 IsMethod: true, 1264 IsResolver: true, 1265 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1266 switch field.Name { 1267 case "key1": 1268 return ec.fieldContext_HelloMultiSingleKeys_key1(ctx, field) 1269 case "key2": 1270 return ec.fieldContext_HelloMultiSingleKeys_key2(ctx, field) 1271 } 1272 return nil, fmt.Errorf("no field named %q was found under type HelloMultiSingleKeys", field.Name) 1273 }, 1274 } 1275 defer func() { 1276 if r := recover(); r != nil { 1277 err = ec.Recover(ctx, r) 1278 ec.Error(ctx, err) 1279 } 1280 }() 1281 ctx = graphql.WithFieldContext(ctx, fc) 1282 if fc.Args, err = ec.field_Entity_findHelloMultiSingleKeysByKey1AndKey2_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 1283 ec.Error(ctx, err) 1284 return 1285 } 1286 return fc, nil 1287 } 1288 1289 func (ec *executionContext) _Entity_findHelloWithErrorsByName(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1290 fc, err := ec.fieldContext_Entity_findHelloWithErrorsByName(ctx, field) 1291 if err != nil { 1292 return graphql.Null 1293 } 1294 ctx = graphql.WithFieldContext(ctx, fc) 1295 defer func() { 1296 if r := recover(); r != nil { 1297 ec.Error(ctx, ec.Recover(ctx, r)) 1298 ret = graphql.Null 1299 } 1300 }() 1301 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1302 ctx = rctx // use context from middleware stack in children 1303 return ec.resolvers.Entity().FindHelloWithErrorsByName(rctx, fc.Args["name"].(string)) 1304 }) 1305 if err != nil { 1306 ec.Error(ctx, err) 1307 } 1308 if resTmp == nil { 1309 if !graphql.HasFieldError(ctx, fc) { 1310 ec.Errorf(ctx, "must not be null") 1311 } 1312 return graphql.Null 1313 } 1314 res := resTmp.(*HelloWithErrors) 1315 fc.Result = res 1316 return ec.marshalNHelloWithErrors2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐHelloWithErrors(ctx, field.Selections, res) 1317 } 1318 1319 func (ec *executionContext) fieldContext_Entity_findHelloWithErrorsByName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1320 fc = &graphql.FieldContext{ 1321 Object: "Entity", 1322 Field: field, 1323 IsMethod: true, 1324 IsResolver: true, 1325 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1326 switch field.Name { 1327 case "name": 1328 return ec.fieldContext_HelloWithErrors_name(ctx, field) 1329 } 1330 return nil, fmt.Errorf("no field named %q was found under type HelloWithErrors", field.Name) 1331 }, 1332 } 1333 defer func() { 1334 if r := recover(); r != nil { 1335 err = ec.Recover(ctx, r) 1336 ec.Error(ctx, err) 1337 } 1338 }() 1339 ctx = graphql.WithFieldContext(ctx, fc) 1340 if fc.Args, err = ec.field_Entity_findHelloWithErrorsByName_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 1341 ec.Error(ctx, err) 1342 return 1343 } 1344 return fc, nil 1345 } 1346 1347 func (ec *executionContext) _Entity_findManyMultiHelloByNames(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1348 fc, err := ec.fieldContext_Entity_findManyMultiHelloByNames(ctx, field) 1349 if err != nil { 1350 return graphql.Null 1351 } 1352 ctx = graphql.WithFieldContext(ctx, fc) 1353 defer func() { 1354 if r := recover(); r != nil { 1355 ec.Error(ctx, ec.Recover(ctx, r)) 1356 ret = graphql.Null 1357 } 1358 }() 1359 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1360 directive0 := func(rctx context.Context) (interface{}, error) { 1361 ctx = rctx // use context from middleware stack in children 1362 return ec.resolvers.Entity().FindManyMultiHelloByNames(rctx, fc.Args["reps"].([]*MultiHelloByNamesInput)) 1363 } 1364 directive1 := func(ctx context.Context) (interface{}, error) { 1365 multi, err := ec.unmarshalOBoolean2ᚖbool(ctx, true) 1366 if err != nil { 1367 return nil, err 1368 } 1369 if ec.directives.EntityResolver == nil { 1370 return nil, errors.New("directive entityResolver is not implemented") 1371 } 1372 return ec.directives.EntityResolver(ctx, nil, directive0, multi) 1373 } 1374 1375 tmp, err := directive1(rctx) 1376 if err != nil { 1377 return nil, graphql.ErrorOnPath(ctx, err) 1378 } 1379 if tmp == nil { 1380 return nil, nil 1381 } 1382 if data, ok := tmp.([]*MultiHello); ok { 1383 return data, nil 1384 } 1385 return nil, fmt.Errorf(`unexpected type %T from directive, should be []*github.com/mstephano/gqlgen-schemagen/plugin/federation/testdata/entityresolver/generated.MultiHello`, tmp) 1386 }) 1387 if err != nil { 1388 ec.Error(ctx, err) 1389 } 1390 if resTmp == nil { 1391 return graphql.Null 1392 } 1393 res := resTmp.([]*MultiHello) 1394 fc.Result = res 1395 return ec.marshalOMultiHello2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHello(ctx, field.Selections, res) 1396 } 1397 1398 func (ec *executionContext) fieldContext_Entity_findManyMultiHelloByNames(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1399 fc = &graphql.FieldContext{ 1400 Object: "Entity", 1401 Field: field, 1402 IsMethod: true, 1403 IsResolver: true, 1404 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1405 switch field.Name { 1406 case "name": 1407 return ec.fieldContext_MultiHello_name(ctx, field) 1408 } 1409 return nil, fmt.Errorf("no field named %q was found under type MultiHello", field.Name) 1410 }, 1411 } 1412 defer func() { 1413 if r := recover(); r != nil { 1414 err = ec.Recover(ctx, r) 1415 ec.Error(ctx, err) 1416 } 1417 }() 1418 ctx = graphql.WithFieldContext(ctx, fc) 1419 if fc.Args, err = ec.field_Entity_findManyMultiHelloByNames_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 1420 ec.Error(ctx, err) 1421 return 1422 } 1423 return fc, nil 1424 } 1425 1426 func (ec *executionContext) _Entity_findManyMultiHelloMultipleRequiresByNames(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1427 fc, err := ec.fieldContext_Entity_findManyMultiHelloMultipleRequiresByNames(ctx, field) 1428 if err != nil { 1429 return graphql.Null 1430 } 1431 ctx = graphql.WithFieldContext(ctx, fc) 1432 defer func() { 1433 if r := recover(); r != nil { 1434 ec.Error(ctx, ec.Recover(ctx, r)) 1435 ret = graphql.Null 1436 } 1437 }() 1438 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1439 directive0 := func(rctx context.Context) (interface{}, error) { 1440 ctx = rctx // use context from middleware stack in children 1441 return ec.resolvers.Entity().FindManyMultiHelloMultipleRequiresByNames(rctx, fc.Args["reps"].([]*MultiHelloMultipleRequiresByNamesInput)) 1442 } 1443 directive1 := func(ctx context.Context) (interface{}, error) { 1444 multi, err := ec.unmarshalOBoolean2ᚖbool(ctx, true) 1445 if err != nil { 1446 return nil, err 1447 } 1448 if ec.directives.EntityResolver == nil { 1449 return nil, errors.New("directive entityResolver is not implemented") 1450 } 1451 return ec.directives.EntityResolver(ctx, nil, directive0, multi) 1452 } 1453 1454 tmp, err := directive1(rctx) 1455 if err != nil { 1456 return nil, graphql.ErrorOnPath(ctx, err) 1457 } 1458 if tmp == nil { 1459 return nil, nil 1460 } 1461 if data, ok := tmp.([]*MultiHelloMultipleRequires); ok { 1462 return data, nil 1463 } 1464 return nil, fmt.Errorf(`unexpected type %T from directive, should be []*github.com/mstephano/gqlgen-schemagen/plugin/federation/testdata/entityresolver/generated.MultiHelloMultipleRequires`, tmp) 1465 }) 1466 if err != nil { 1467 ec.Error(ctx, err) 1468 } 1469 if resTmp == nil { 1470 return graphql.Null 1471 } 1472 res := resTmp.([]*MultiHelloMultipleRequires) 1473 fc.Result = res 1474 return ec.marshalOMultiHelloMultipleRequires2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloMultipleRequires(ctx, field.Selections, res) 1475 } 1476 1477 func (ec *executionContext) fieldContext_Entity_findManyMultiHelloMultipleRequiresByNames(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1478 fc = &graphql.FieldContext{ 1479 Object: "Entity", 1480 Field: field, 1481 IsMethod: true, 1482 IsResolver: true, 1483 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1484 switch field.Name { 1485 case "name": 1486 return ec.fieldContext_MultiHelloMultipleRequires_name(ctx, field) 1487 case "key1": 1488 return ec.fieldContext_MultiHelloMultipleRequires_key1(ctx, field) 1489 case "key2": 1490 return ec.fieldContext_MultiHelloMultipleRequires_key2(ctx, field) 1491 case "key3": 1492 return ec.fieldContext_MultiHelloMultipleRequires_key3(ctx, field) 1493 } 1494 return nil, fmt.Errorf("no field named %q was found under type MultiHelloMultipleRequires", field.Name) 1495 }, 1496 } 1497 defer func() { 1498 if r := recover(); r != nil { 1499 err = ec.Recover(ctx, r) 1500 ec.Error(ctx, err) 1501 } 1502 }() 1503 ctx = graphql.WithFieldContext(ctx, fc) 1504 if fc.Args, err = ec.field_Entity_findManyMultiHelloMultipleRequiresByNames_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 1505 ec.Error(ctx, err) 1506 return 1507 } 1508 return fc, nil 1509 } 1510 1511 func (ec *executionContext) _Entity_findManyMultiHelloRequiresByNames(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1512 fc, err := ec.fieldContext_Entity_findManyMultiHelloRequiresByNames(ctx, field) 1513 if err != nil { 1514 return graphql.Null 1515 } 1516 ctx = graphql.WithFieldContext(ctx, fc) 1517 defer func() { 1518 if r := recover(); r != nil { 1519 ec.Error(ctx, ec.Recover(ctx, r)) 1520 ret = graphql.Null 1521 } 1522 }() 1523 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1524 directive0 := func(rctx context.Context) (interface{}, error) { 1525 ctx = rctx // use context from middleware stack in children 1526 return ec.resolvers.Entity().FindManyMultiHelloRequiresByNames(rctx, fc.Args["reps"].([]*MultiHelloRequiresByNamesInput)) 1527 } 1528 directive1 := func(ctx context.Context) (interface{}, error) { 1529 multi, err := ec.unmarshalOBoolean2ᚖbool(ctx, true) 1530 if err != nil { 1531 return nil, err 1532 } 1533 if ec.directives.EntityResolver == nil { 1534 return nil, errors.New("directive entityResolver is not implemented") 1535 } 1536 return ec.directives.EntityResolver(ctx, nil, directive0, multi) 1537 } 1538 1539 tmp, err := directive1(rctx) 1540 if err != nil { 1541 return nil, graphql.ErrorOnPath(ctx, err) 1542 } 1543 if tmp == nil { 1544 return nil, nil 1545 } 1546 if data, ok := tmp.([]*MultiHelloRequires); ok { 1547 return data, nil 1548 } 1549 return nil, fmt.Errorf(`unexpected type %T from directive, should be []*github.com/mstephano/gqlgen-schemagen/plugin/federation/testdata/entityresolver/generated.MultiHelloRequires`, tmp) 1550 }) 1551 if err != nil { 1552 ec.Error(ctx, err) 1553 } 1554 if resTmp == nil { 1555 return graphql.Null 1556 } 1557 res := resTmp.([]*MultiHelloRequires) 1558 fc.Result = res 1559 return ec.marshalOMultiHelloRequires2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloRequires(ctx, field.Selections, res) 1560 } 1561 1562 func (ec *executionContext) fieldContext_Entity_findManyMultiHelloRequiresByNames(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1563 fc = &graphql.FieldContext{ 1564 Object: "Entity", 1565 Field: field, 1566 IsMethod: true, 1567 IsResolver: true, 1568 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1569 switch field.Name { 1570 case "name": 1571 return ec.fieldContext_MultiHelloRequires_name(ctx, field) 1572 case "key1": 1573 return ec.fieldContext_MultiHelloRequires_key1(ctx, field) 1574 case "key2": 1575 return ec.fieldContext_MultiHelloRequires_key2(ctx, field) 1576 } 1577 return nil, fmt.Errorf("no field named %q was found under type MultiHelloRequires", field.Name) 1578 }, 1579 } 1580 defer func() { 1581 if r := recover(); r != nil { 1582 err = ec.Recover(ctx, r) 1583 ec.Error(ctx, err) 1584 } 1585 }() 1586 ctx = graphql.WithFieldContext(ctx, fc) 1587 if fc.Args, err = ec.field_Entity_findManyMultiHelloRequiresByNames_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 1588 ec.Error(ctx, err) 1589 return 1590 } 1591 return fc, nil 1592 } 1593 1594 func (ec *executionContext) _Entity_findManyMultiHelloWithErrorByNames(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1595 fc, err := ec.fieldContext_Entity_findManyMultiHelloWithErrorByNames(ctx, field) 1596 if err != nil { 1597 return graphql.Null 1598 } 1599 ctx = graphql.WithFieldContext(ctx, fc) 1600 defer func() { 1601 if r := recover(); r != nil { 1602 ec.Error(ctx, ec.Recover(ctx, r)) 1603 ret = graphql.Null 1604 } 1605 }() 1606 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1607 directive0 := func(rctx context.Context) (interface{}, error) { 1608 ctx = rctx // use context from middleware stack in children 1609 return ec.resolvers.Entity().FindManyMultiHelloWithErrorByNames(rctx, fc.Args["reps"].([]*MultiHelloWithErrorByNamesInput)) 1610 } 1611 directive1 := func(ctx context.Context) (interface{}, error) { 1612 multi, err := ec.unmarshalOBoolean2ᚖbool(ctx, true) 1613 if err != nil { 1614 return nil, err 1615 } 1616 if ec.directives.EntityResolver == nil { 1617 return nil, errors.New("directive entityResolver is not implemented") 1618 } 1619 return ec.directives.EntityResolver(ctx, nil, directive0, multi) 1620 } 1621 1622 tmp, err := directive1(rctx) 1623 if err != nil { 1624 return nil, graphql.ErrorOnPath(ctx, err) 1625 } 1626 if tmp == nil { 1627 return nil, nil 1628 } 1629 if data, ok := tmp.([]*MultiHelloWithError); ok { 1630 return data, nil 1631 } 1632 return nil, fmt.Errorf(`unexpected type %T from directive, should be []*github.com/mstephano/gqlgen-schemagen/plugin/federation/testdata/entityresolver/generated.MultiHelloWithError`, tmp) 1633 }) 1634 if err != nil { 1635 ec.Error(ctx, err) 1636 } 1637 if resTmp == nil { 1638 return graphql.Null 1639 } 1640 res := resTmp.([]*MultiHelloWithError) 1641 fc.Result = res 1642 return ec.marshalOMultiHelloWithError2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloWithError(ctx, field.Selections, res) 1643 } 1644 1645 func (ec *executionContext) fieldContext_Entity_findManyMultiHelloWithErrorByNames(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1646 fc = &graphql.FieldContext{ 1647 Object: "Entity", 1648 Field: field, 1649 IsMethod: true, 1650 IsResolver: true, 1651 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1652 switch field.Name { 1653 case "name": 1654 return ec.fieldContext_MultiHelloWithError_name(ctx, field) 1655 } 1656 return nil, fmt.Errorf("no field named %q was found under type MultiHelloWithError", field.Name) 1657 }, 1658 } 1659 defer func() { 1660 if r := recover(); r != nil { 1661 err = ec.Recover(ctx, r) 1662 ec.Error(ctx, err) 1663 } 1664 }() 1665 ctx = graphql.WithFieldContext(ctx, fc) 1666 if fc.Args, err = ec.field_Entity_findManyMultiHelloWithErrorByNames_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 1667 ec.Error(ctx, err) 1668 return 1669 } 1670 return fc, nil 1671 } 1672 1673 func (ec *executionContext) _Entity_findManyMultiPlanetRequiresNestedByNames(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1674 fc, err := ec.fieldContext_Entity_findManyMultiPlanetRequiresNestedByNames(ctx, field) 1675 if err != nil { 1676 return graphql.Null 1677 } 1678 ctx = graphql.WithFieldContext(ctx, fc) 1679 defer func() { 1680 if r := recover(); r != nil { 1681 ec.Error(ctx, ec.Recover(ctx, r)) 1682 ret = graphql.Null 1683 } 1684 }() 1685 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1686 directive0 := func(rctx context.Context) (interface{}, error) { 1687 ctx = rctx // use context from middleware stack in children 1688 return ec.resolvers.Entity().FindManyMultiPlanetRequiresNestedByNames(rctx, fc.Args["reps"].([]*MultiPlanetRequiresNestedByNamesInput)) 1689 } 1690 directive1 := func(ctx context.Context) (interface{}, error) { 1691 multi, err := ec.unmarshalOBoolean2ᚖbool(ctx, true) 1692 if err != nil { 1693 return nil, err 1694 } 1695 if ec.directives.EntityResolver == nil { 1696 return nil, errors.New("directive entityResolver is not implemented") 1697 } 1698 return ec.directives.EntityResolver(ctx, nil, directive0, multi) 1699 } 1700 1701 tmp, err := directive1(rctx) 1702 if err != nil { 1703 return nil, graphql.ErrorOnPath(ctx, err) 1704 } 1705 if tmp == nil { 1706 return nil, nil 1707 } 1708 if data, ok := tmp.([]*MultiPlanetRequiresNested); ok { 1709 return data, nil 1710 } 1711 return nil, fmt.Errorf(`unexpected type %T from directive, should be []*github.com/mstephano/gqlgen-schemagen/plugin/federation/testdata/entityresolver/generated.MultiPlanetRequiresNested`, tmp) 1712 }) 1713 if err != nil { 1714 ec.Error(ctx, err) 1715 } 1716 if resTmp == nil { 1717 return graphql.Null 1718 } 1719 res := resTmp.([]*MultiPlanetRequiresNested) 1720 fc.Result = res 1721 return ec.marshalOMultiPlanetRequiresNested2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiPlanetRequiresNested(ctx, field.Selections, res) 1722 } 1723 1724 func (ec *executionContext) fieldContext_Entity_findManyMultiPlanetRequiresNestedByNames(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1725 fc = &graphql.FieldContext{ 1726 Object: "Entity", 1727 Field: field, 1728 IsMethod: true, 1729 IsResolver: true, 1730 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1731 switch field.Name { 1732 case "name": 1733 return ec.fieldContext_MultiPlanetRequiresNested_name(ctx, field) 1734 case "world": 1735 return ec.fieldContext_MultiPlanetRequiresNested_world(ctx, field) 1736 case "size": 1737 return ec.fieldContext_MultiPlanetRequiresNested_size(ctx, field) 1738 } 1739 return nil, fmt.Errorf("no field named %q was found under type MultiPlanetRequiresNested", field.Name) 1740 }, 1741 } 1742 defer func() { 1743 if r := recover(); r != nil { 1744 err = ec.Recover(ctx, r) 1745 ec.Error(ctx, err) 1746 } 1747 }() 1748 ctx = graphql.WithFieldContext(ctx, fc) 1749 if fc.Args, err = ec.field_Entity_findManyMultiPlanetRequiresNestedByNames_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 1750 ec.Error(ctx, err) 1751 return 1752 } 1753 return fc, nil 1754 } 1755 1756 func (ec *executionContext) _Entity_findPlanetMultipleRequiresByName(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1757 fc, err := ec.fieldContext_Entity_findPlanetMultipleRequiresByName(ctx, field) 1758 if err != nil { 1759 return graphql.Null 1760 } 1761 ctx = graphql.WithFieldContext(ctx, fc) 1762 defer func() { 1763 if r := recover(); r != nil { 1764 ec.Error(ctx, ec.Recover(ctx, r)) 1765 ret = graphql.Null 1766 } 1767 }() 1768 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1769 ctx = rctx // use context from middleware stack in children 1770 return ec.resolvers.Entity().FindPlanetMultipleRequiresByName(rctx, fc.Args["name"].(string)) 1771 }) 1772 if err != nil { 1773 ec.Error(ctx, err) 1774 } 1775 if resTmp == nil { 1776 if !graphql.HasFieldError(ctx, fc) { 1777 ec.Errorf(ctx, "must not be null") 1778 } 1779 return graphql.Null 1780 } 1781 res := resTmp.(*PlanetMultipleRequires) 1782 fc.Result = res 1783 return ec.marshalNPlanetMultipleRequires2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐPlanetMultipleRequires(ctx, field.Selections, res) 1784 } 1785 1786 func (ec *executionContext) fieldContext_Entity_findPlanetMultipleRequiresByName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1787 fc = &graphql.FieldContext{ 1788 Object: "Entity", 1789 Field: field, 1790 IsMethod: true, 1791 IsResolver: true, 1792 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1793 switch field.Name { 1794 case "name": 1795 return ec.fieldContext_PlanetMultipleRequires_name(ctx, field) 1796 case "diameter": 1797 return ec.fieldContext_PlanetMultipleRequires_diameter(ctx, field) 1798 case "density": 1799 return ec.fieldContext_PlanetMultipleRequires_density(ctx, field) 1800 case "weight": 1801 return ec.fieldContext_PlanetMultipleRequires_weight(ctx, field) 1802 } 1803 return nil, fmt.Errorf("no field named %q was found under type PlanetMultipleRequires", field.Name) 1804 }, 1805 } 1806 defer func() { 1807 if r := recover(); r != nil { 1808 err = ec.Recover(ctx, r) 1809 ec.Error(ctx, err) 1810 } 1811 }() 1812 ctx = graphql.WithFieldContext(ctx, fc) 1813 if fc.Args, err = ec.field_Entity_findPlanetMultipleRequiresByName_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 1814 ec.Error(ctx, err) 1815 return 1816 } 1817 return fc, nil 1818 } 1819 1820 func (ec *executionContext) _Entity_findPlanetRequiresByName(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1821 fc, err := ec.fieldContext_Entity_findPlanetRequiresByName(ctx, field) 1822 if err != nil { 1823 return graphql.Null 1824 } 1825 ctx = graphql.WithFieldContext(ctx, fc) 1826 defer func() { 1827 if r := recover(); r != nil { 1828 ec.Error(ctx, ec.Recover(ctx, r)) 1829 ret = graphql.Null 1830 } 1831 }() 1832 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1833 ctx = rctx // use context from middleware stack in children 1834 return ec.resolvers.Entity().FindPlanetRequiresByName(rctx, fc.Args["name"].(string)) 1835 }) 1836 if err != nil { 1837 ec.Error(ctx, err) 1838 } 1839 if resTmp == nil { 1840 if !graphql.HasFieldError(ctx, fc) { 1841 ec.Errorf(ctx, "must not be null") 1842 } 1843 return graphql.Null 1844 } 1845 res := resTmp.(*PlanetRequires) 1846 fc.Result = res 1847 return ec.marshalNPlanetRequires2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐPlanetRequires(ctx, field.Selections, res) 1848 } 1849 1850 func (ec *executionContext) fieldContext_Entity_findPlanetRequiresByName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1851 fc = &graphql.FieldContext{ 1852 Object: "Entity", 1853 Field: field, 1854 IsMethod: true, 1855 IsResolver: true, 1856 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1857 switch field.Name { 1858 case "name": 1859 return ec.fieldContext_PlanetRequires_name(ctx, field) 1860 case "size": 1861 return ec.fieldContext_PlanetRequires_size(ctx, field) 1862 case "diameter": 1863 return ec.fieldContext_PlanetRequires_diameter(ctx, field) 1864 } 1865 return nil, fmt.Errorf("no field named %q was found under type PlanetRequires", field.Name) 1866 }, 1867 } 1868 defer func() { 1869 if r := recover(); r != nil { 1870 err = ec.Recover(ctx, r) 1871 ec.Error(ctx, err) 1872 } 1873 }() 1874 ctx = graphql.WithFieldContext(ctx, fc) 1875 if fc.Args, err = ec.field_Entity_findPlanetRequiresByName_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 1876 ec.Error(ctx, err) 1877 return 1878 } 1879 return fc, nil 1880 } 1881 1882 func (ec *executionContext) _Entity_findPlanetRequiresNestedByName(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1883 fc, err := ec.fieldContext_Entity_findPlanetRequiresNestedByName(ctx, field) 1884 if err != nil { 1885 return graphql.Null 1886 } 1887 ctx = graphql.WithFieldContext(ctx, fc) 1888 defer func() { 1889 if r := recover(); r != nil { 1890 ec.Error(ctx, ec.Recover(ctx, r)) 1891 ret = graphql.Null 1892 } 1893 }() 1894 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1895 ctx = rctx // use context from middleware stack in children 1896 return ec.resolvers.Entity().FindPlanetRequiresNestedByName(rctx, fc.Args["name"].(string)) 1897 }) 1898 if err != nil { 1899 ec.Error(ctx, err) 1900 } 1901 if resTmp == nil { 1902 if !graphql.HasFieldError(ctx, fc) { 1903 ec.Errorf(ctx, "must not be null") 1904 } 1905 return graphql.Null 1906 } 1907 res := resTmp.(*PlanetRequiresNested) 1908 fc.Result = res 1909 return ec.marshalNPlanetRequiresNested2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐPlanetRequiresNested(ctx, field.Selections, res) 1910 } 1911 1912 func (ec *executionContext) fieldContext_Entity_findPlanetRequiresNestedByName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1913 fc = &graphql.FieldContext{ 1914 Object: "Entity", 1915 Field: field, 1916 IsMethod: true, 1917 IsResolver: true, 1918 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1919 switch field.Name { 1920 case "name": 1921 return ec.fieldContext_PlanetRequiresNested_name(ctx, field) 1922 case "world": 1923 return ec.fieldContext_PlanetRequiresNested_world(ctx, field) 1924 case "size": 1925 return ec.fieldContext_PlanetRequiresNested_size(ctx, field) 1926 } 1927 return nil, fmt.Errorf("no field named %q was found under type PlanetRequiresNested", field.Name) 1928 }, 1929 } 1930 defer func() { 1931 if r := recover(); r != nil { 1932 err = ec.Recover(ctx, r) 1933 ec.Error(ctx, err) 1934 } 1935 }() 1936 ctx = graphql.WithFieldContext(ctx, fc) 1937 if fc.Args, err = ec.field_Entity_findPlanetRequiresNestedByName_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 1938 ec.Error(ctx, err) 1939 return 1940 } 1941 return fc, nil 1942 } 1943 1944 func (ec *executionContext) _Entity_findWorldByHelloNameAndFoo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 1945 fc, err := ec.fieldContext_Entity_findWorldByHelloNameAndFoo(ctx, field) 1946 if err != nil { 1947 return graphql.Null 1948 } 1949 ctx = graphql.WithFieldContext(ctx, fc) 1950 defer func() { 1951 if r := recover(); r != nil { 1952 ec.Error(ctx, ec.Recover(ctx, r)) 1953 ret = graphql.Null 1954 } 1955 }() 1956 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1957 ctx = rctx // use context from middleware stack in children 1958 return ec.resolvers.Entity().FindWorldByHelloNameAndFoo(rctx, fc.Args["helloName"].(string), fc.Args["foo"].(string)) 1959 }) 1960 if err != nil { 1961 ec.Error(ctx, err) 1962 } 1963 if resTmp == nil { 1964 if !graphql.HasFieldError(ctx, fc) { 1965 ec.Errorf(ctx, "must not be null") 1966 } 1967 return graphql.Null 1968 } 1969 res := resTmp.(*World) 1970 fc.Result = res 1971 return ec.marshalNWorld2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐWorld(ctx, field.Selections, res) 1972 } 1973 1974 func (ec *executionContext) fieldContext_Entity_findWorldByHelloNameAndFoo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1975 fc = &graphql.FieldContext{ 1976 Object: "Entity", 1977 Field: field, 1978 IsMethod: true, 1979 IsResolver: true, 1980 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1981 switch field.Name { 1982 case "foo": 1983 return ec.fieldContext_World_foo(ctx, field) 1984 case "bar": 1985 return ec.fieldContext_World_bar(ctx, field) 1986 case "hello": 1987 return ec.fieldContext_World_hello(ctx, field) 1988 } 1989 return nil, fmt.Errorf("no field named %q was found under type World", field.Name) 1990 }, 1991 } 1992 defer func() { 1993 if r := recover(); r != nil { 1994 err = ec.Recover(ctx, r) 1995 ec.Error(ctx, err) 1996 } 1997 }() 1998 ctx = graphql.WithFieldContext(ctx, fc) 1999 if fc.Args, err = ec.field_Entity_findWorldByHelloNameAndFoo_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 2000 ec.Error(ctx, err) 2001 return 2002 } 2003 return fc, nil 2004 } 2005 2006 func (ec *executionContext) _Entity_findWorldNameByName(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 2007 fc, err := ec.fieldContext_Entity_findWorldNameByName(ctx, field) 2008 if err != nil { 2009 return graphql.Null 2010 } 2011 ctx = graphql.WithFieldContext(ctx, fc) 2012 defer func() { 2013 if r := recover(); r != nil { 2014 ec.Error(ctx, ec.Recover(ctx, r)) 2015 ret = graphql.Null 2016 } 2017 }() 2018 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2019 ctx = rctx // use context from middleware stack in children 2020 return ec.resolvers.Entity().FindWorldNameByName(rctx, fc.Args["name"].(string)) 2021 }) 2022 if err != nil { 2023 ec.Error(ctx, err) 2024 } 2025 if resTmp == nil { 2026 if !graphql.HasFieldError(ctx, fc) { 2027 ec.Errorf(ctx, "must not be null") 2028 } 2029 return graphql.Null 2030 } 2031 res := resTmp.(*WorldName) 2032 fc.Result = res 2033 return ec.marshalNWorldName2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐWorldName(ctx, field.Selections, res) 2034 } 2035 2036 func (ec *executionContext) fieldContext_Entity_findWorldNameByName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2037 fc = &graphql.FieldContext{ 2038 Object: "Entity", 2039 Field: field, 2040 IsMethod: true, 2041 IsResolver: true, 2042 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2043 switch field.Name { 2044 case "name": 2045 return ec.fieldContext_WorldName_name(ctx, field) 2046 } 2047 return nil, fmt.Errorf("no field named %q was found under type WorldName", field.Name) 2048 }, 2049 } 2050 defer func() { 2051 if r := recover(); r != nil { 2052 err = ec.Recover(ctx, r) 2053 ec.Error(ctx, err) 2054 } 2055 }() 2056 ctx = graphql.WithFieldContext(ctx, fc) 2057 if fc.Args, err = ec.field_Entity_findWorldNameByName_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 2058 ec.Error(ctx, err) 2059 return 2060 } 2061 return fc, nil 2062 } 2063 2064 func (ec *executionContext) _Entity_findWorldWithMultipleKeysByHelloNameAndFoo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 2065 fc, err := ec.fieldContext_Entity_findWorldWithMultipleKeysByHelloNameAndFoo(ctx, field) 2066 if err != nil { 2067 return graphql.Null 2068 } 2069 ctx = graphql.WithFieldContext(ctx, fc) 2070 defer func() { 2071 if r := recover(); r != nil { 2072 ec.Error(ctx, ec.Recover(ctx, r)) 2073 ret = graphql.Null 2074 } 2075 }() 2076 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2077 ctx = rctx // use context from middleware stack in children 2078 return ec.resolvers.Entity().FindWorldWithMultipleKeysByHelloNameAndFoo(rctx, fc.Args["helloName"].(string), fc.Args["foo"].(string)) 2079 }) 2080 if err != nil { 2081 ec.Error(ctx, err) 2082 } 2083 if resTmp == nil { 2084 if !graphql.HasFieldError(ctx, fc) { 2085 ec.Errorf(ctx, "must not be null") 2086 } 2087 return graphql.Null 2088 } 2089 res := resTmp.(*WorldWithMultipleKeys) 2090 fc.Result = res 2091 return ec.marshalNWorldWithMultipleKeys2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐWorldWithMultipleKeys(ctx, field.Selections, res) 2092 } 2093 2094 func (ec *executionContext) fieldContext_Entity_findWorldWithMultipleKeysByHelloNameAndFoo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2095 fc = &graphql.FieldContext{ 2096 Object: "Entity", 2097 Field: field, 2098 IsMethod: true, 2099 IsResolver: true, 2100 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2101 switch field.Name { 2102 case "foo": 2103 return ec.fieldContext_WorldWithMultipleKeys_foo(ctx, field) 2104 case "bar": 2105 return ec.fieldContext_WorldWithMultipleKeys_bar(ctx, field) 2106 case "hello": 2107 return ec.fieldContext_WorldWithMultipleKeys_hello(ctx, field) 2108 } 2109 return nil, fmt.Errorf("no field named %q was found under type WorldWithMultipleKeys", field.Name) 2110 }, 2111 } 2112 defer func() { 2113 if r := recover(); r != nil { 2114 err = ec.Recover(ctx, r) 2115 ec.Error(ctx, err) 2116 } 2117 }() 2118 ctx = graphql.WithFieldContext(ctx, fc) 2119 if fc.Args, err = ec.field_Entity_findWorldWithMultipleKeysByHelloNameAndFoo_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 2120 ec.Error(ctx, err) 2121 return 2122 } 2123 return fc, nil 2124 } 2125 2126 func (ec *executionContext) _Entity_findWorldWithMultipleKeysByBar(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 2127 fc, err := ec.fieldContext_Entity_findWorldWithMultipleKeysByBar(ctx, field) 2128 if err != nil { 2129 return graphql.Null 2130 } 2131 ctx = graphql.WithFieldContext(ctx, fc) 2132 defer func() { 2133 if r := recover(); r != nil { 2134 ec.Error(ctx, ec.Recover(ctx, r)) 2135 ret = graphql.Null 2136 } 2137 }() 2138 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2139 ctx = rctx // use context from middleware stack in children 2140 return ec.resolvers.Entity().FindWorldWithMultipleKeysByBar(rctx, fc.Args["bar"].(int)) 2141 }) 2142 if err != nil { 2143 ec.Error(ctx, err) 2144 } 2145 if resTmp == nil { 2146 if !graphql.HasFieldError(ctx, fc) { 2147 ec.Errorf(ctx, "must not be null") 2148 } 2149 return graphql.Null 2150 } 2151 res := resTmp.(*WorldWithMultipleKeys) 2152 fc.Result = res 2153 return ec.marshalNWorldWithMultipleKeys2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐWorldWithMultipleKeys(ctx, field.Selections, res) 2154 } 2155 2156 func (ec *executionContext) fieldContext_Entity_findWorldWithMultipleKeysByBar(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2157 fc = &graphql.FieldContext{ 2158 Object: "Entity", 2159 Field: field, 2160 IsMethod: true, 2161 IsResolver: true, 2162 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2163 switch field.Name { 2164 case "foo": 2165 return ec.fieldContext_WorldWithMultipleKeys_foo(ctx, field) 2166 case "bar": 2167 return ec.fieldContext_WorldWithMultipleKeys_bar(ctx, field) 2168 case "hello": 2169 return ec.fieldContext_WorldWithMultipleKeys_hello(ctx, field) 2170 } 2171 return nil, fmt.Errorf("no field named %q was found under type WorldWithMultipleKeys", field.Name) 2172 }, 2173 } 2174 defer func() { 2175 if r := recover(); r != nil { 2176 err = ec.Recover(ctx, r) 2177 ec.Error(ctx, err) 2178 } 2179 }() 2180 ctx = graphql.WithFieldContext(ctx, fc) 2181 if fc.Args, err = ec.field_Entity_findWorldWithMultipleKeysByBar_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 2182 ec.Error(ctx, err) 2183 return 2184 } 2185 return fc, nil 2186 } 2187 2188 func (ec *executionContext) _Hello_name(ctx context.Context, field graphql.CollectedField, obj *Hello) (ret graphql.Marshaler) { 2189 fc, err := ec.fieldContext_Hello_name(ctx, field) 2190 if err != nil { 2191 return graphql.Null 2192 } 2193 ctx = graphql.WithFieldContext(ctx, fc) 2194 defer func() { 2195 if r := recover(); r != nil { 2196 ec.Error(ctx, ec.Recover(ctx, r)) 2197 ret = graphql.Null 2198 } 2199 }() 2200 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2201 ctx = rctx // use context from middleware stack in children 2202 return obj.Name, nil 2203 }) 2204 if err != nil { 2205 ec.Error(ctx, err) 2206 return graphql.Null 2207 } 2208 if resTmp == nil { 2209 if !graphql.HasFieldError(ctx, fc) { 2210 ec.Errorf(ctx, "must not be null") 2211 } 2212 return graphql.Null 2213 } 2214 res := resTmp.(string) 2215 fc.Result = res 2216 return ec.marshalNString2string(ctx, field.Selections, res) 2217 } 2218 2219 func (ec *executionContext) fieldContext_Hello_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2220 fc = &graphql.FieldContext{ 2221 Object: "Hello", 2222 Field: field, 2223 IsMethod: false, 2224 IsResolver: false, 2225 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2226 return nil, errors.New("field of type String does not have child fields") 2227 }, 2228 } 2229 return fc, nil 2230 } 2231 2232 func (ec *executionContext) _Hello_secondary(ctx context.Context, field graphql.CollectedField, obj *Hello) (ret graphql.Marshaler) { 2233 fc, err := ec.fieldContext_Hello_secondary(ctx, field) 2234 if err != nil { 2235 return graphql.Null 2236 } 2237 ctx = graphql.WithFieldContext(ctx, fc) 2238 defer func() { 2239 if r := recover(); r != nil { 2240 ec.Error(ctx, ec.Recover(ctx, r)) 2241 ret = graphql.Null 2242 } 2243 }() 2244 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2245 ctx = rctx // use context from middleware stack in children 2246 return obj.Secondary, nil 2247 }) 2248 if err != nil { 2249 ec.Error(ctx, err) 2250 return graphql.Null 2251 } 2252 if resTmp == nil { 2253 if !graphql.HasFieldError(ctx, fc) { 2254 ec.Errorf(ctx, "must not be null") 2255 } 2256 return graphql.Null 2257 } 2258 res := resTmp.(string) 2259 fc.Result = res 2260 return ec.marshalNString2string(ctx, field.Selections, res) 2261 } 2262 2263 func (ec *executionContext) fieldContext_Hello_secondary(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2264 fc = &graphql.FieldContext{ 2265 Object: "Hello", 2266 Field: field, 2267 IsMethod: false, 2268 IsResolver: false, 2269 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2270 return nil, errors.New("field of type String does not have child fields") 2271 }, 2272 } 2273 return fc, nil 2274 } 2275 2276 func (ec *executionContext) _HelloMultiSingleKeys_key1(ctx context.Context, field graphql.CollectedField, obj *HelloMultiSingleKeys) (ret graphql.Marshaler) { 2277 fc, err := ec.fieldContext_HelloMultiSingleKeys_key1(ctx, field) 2278 if err != nil { 2279 return graphql.Null 2280 } 2281 ctx = graphql.WithFieldContext(ctx, fc) 2282 defer func() { 2283 if r := recover(); r != nil { 2284 ec.Error(ctx, ec.Recover(ctx, r)) 2285 ret = graphql.Null 2286 } 2287 }() 2288 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2289 ctx = rctx // use context from middleware stack in children 2290 return obj.Key1, nil 2291 }) 2292 if err != nil { 2293 ec.Error(ctx, err) 2294 return graphql.Null 2295 } 2296 if resTmp == nil { 2297 if !graphql.HasFieldError(ctx, fc) { 2298 ec.Errorf(ctx, "must not be null") 2299 } 2300 return graphql.Null 2301 } 2302 res := resTmp.(string) 2303 fc.Result = res 2304 return ec.marshalNString2string(ctx, field.Selections, res) 2305 } 2306 2307 func (ec *executionContext) fieldContext_HelloMultiSingleKeys_key1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2308 fc = &graphql.FieldContext{ 2309 Object: "HelloMultiSingleKeys", 2310 Field: field, 2311 IsMethod: false, 2312 IsResolver: false, 2313 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2314 return nil, errors.New("field of type String does not have child fields") 2315 }, 2316 } 2317 return fc, nil 2318 } 2319 2320 func (ec *executionContext) _HelloMultiSingleKeys_key2(ctx context.Context, field graphql.CollectedField, obj *HelloMultiSingleKeys) (ret graphql.Marshaler) { 2321 fc, err := ec.fieldContext_HelloMultiSingleKeys_key2(ctx, field) 2322 if err != nil { 2323 return graphql.Null 2324 } 2325 ctx = graphql.WithFieldContext(ctx, fc) 2326 defer func() { 2327 if r := recover(); r != nil { 2328 ec.Error(ctx, ec.Recover(ctx, r)) 2329 ret = graphql.Null 2330 } 2331 }() 2332 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2333 ctx = rctx // use context from middleware stack in children 2334 return obj.Key2, nil 2335 }) 2336 if err != nil { 2337 ec.Error(ctx, err) 2338 return graphql.Null 2339 } 2340 if resTmp == nil { 2341 if !graphql.HasFieldError(ctx, fc) { 2342 ec.Errorf(ctx, "must not be null") 2343 } 2344 return graphql.Null 2345 } 2346 res := resTmp.(string) 2347 fc.Result = res 2348 return ec.marshalNString2string(ctx, field.Selections, res) 2349 } 2350 2351 func (ec *executionContext) fieldContext_HelloMultiSingleKeys_key2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2352 fc = &graphql.FieldContext{ 2353 Object: "HelloMultiSingleKeys", 2354 Field: field, 2355 IsMethod: false, 2356 IsResolver: false, 2357 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2358 return nil, errors.New("field of type String does not have child fields") 2359 }, 2360 } 2361 return fc, nil 2362 } 2363 2364 func (ec *executionContext) _HelloWithErrors_name(ctx context.Context, field graphql.CollectedField, obj *HelloWithErrors) (ret graphql.Marshaler) { 2365 fc, err := ec.fieldContext_HelloWithErrors_name(ctx, field) 2366 if err != nil { 2367 return graphql.Null 2368 } 2369 ctx = graphql.WithFieldContext(ctx, fc) 2370 defer func() { 2371 if r := recover(); r != nil { 2372 ec.Error(ctx, ec.Recover(ctx, r)) 2373 ret = graphql.Null 2374 } 2375 }() 2376 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2377 ctx = rctx // use context from middleware stack in children 2378 return obj.Name, nil 2379 }) 2380 if err != nil { 2381 ec.Error(ctx, err) 2382 return graphql.Null 2383 } 2384 if resTmp == nil { 2385 if !graphql.HasFieldError(ctx, fc) { 2386 ec.Errorf(ctx, "must not be null") 2387 } 2388 return graphql.Null 2389 } 2390 res := resTmp.(string) 2391 fc.Result = res 2392 return ec.marshalNString2string(ctx, field.Selections, res) 2393 } 2394 2395 func (ec *executionContext) fieldContext_HelloWithErrors_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2396 fc = &graphql.FieldContext{ 2397 Object: "HelloWithErrors", 2398 Field: field, 2399 IsMethod: false, 2400 IsResolver: false, 2401 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2402 return nil, errors.New("field of type String does not have child fields") 2403 }, 2404 } 2405 return fc, nil 2406 } 2407 2408 func (ec *executionContext) _MultiHello_name(ctx context.Context, field graphql.CollectedField, obj *MultiHello) (ret graphql.Marshaler) { 2409 fc, err := ec.fieldContext_MultiHello_name(ctx, field) 2410 if err != nil { 2411 return graphql.Null 2412 } 2413 ctx = graphql.WithFieldContext(ctx, fc) 2414 defer func() { 2415 if r := recover(); r != nil { 2416 ec.Error(ctx, ec.Recover(ctx, r)) 2417 ret = graphql.Null 2418 } 2419 }() 2420 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2421 ctx = rctx // use context from middleware stack in children 2422 return obj.Name, nil 2423 }) 2424 if err != nil { 2425 ec.Error(ctx, err) 2426 return graphql.Null 2427 } 2428 if resTmp == nil { 2429 if !graphql.HasFieldError(ctx, fc) { 2430 ec.Errorf(ctx, "must not be null") 2431 } 2432 return graphql.Null 2433 } 2434 res := resTmp.(string) 2435 fc.Result = res 2436 return ec.marshalNString2string(ctx, field.Selections, res) 2437 } 2438 2439 func (ec *executionContext) fieldContext_MultiHello_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2440 fc = &graphql.FieldContext{ 2441 Object: "MultiHello", 2442 Field: field, 2443 IsMethod: false, 2444 IsResolver: false, 2445 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2446 return nil, errors.New("field of type String does not have child fields") 2447 }, 2448 } 2449 return fc, nil 2450 } 2451 2452 func (ec *executionContext) _MultiHelloMultipleRequires_name(ctx context.Context, field graphql.CollectedField, obj *MultiHelloMultipleRequires) (ret graphql.Marshaler) { 2453 fc, err := ec.fieldContext_MultiHelloMultipleRequires_name(ctx, field) 2454 if err != nil { 2455 return graphql.Null 2456 } 2457 ctx = graphql.WithFieldContext(ctx, fc) 2458 defer func() { 2459 if r := recover(); r != nil { 2460 ec.Error(ctx, ec.Recover(ctx, r)) 2461 ret = graphql.Null 2462 } 2463 }() 2464 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2465 ctx = rctx // use context from middleware stack in children 2466 return obj.Name, nil 2467 }) 2468 if err != nil { 2469 ec.Error(ctx, err) 2470 return graphql.Null 2471 } 2472 if resTmp == nil { 2473 if !graphql.HasFieldError(ctx, fc) { 2474 ec.Errorf(ctx, "must not be null") 2475 } 2476 return graphql.Null 2477 } 2478 res := resTmp.(string) 2479 fc.Result = res 2480 return ec.marshalNString2string(ctx, field.Selections, res) 2481 } 2482 2483 func (ec *executionContext) fieldContext_MultiHelloMultipleRequires_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2484 fc = &graphql.FieldContext{ 2485 Object: "MultiHelloMultipleRequires", 2486 Field: field, 2487 IsMethod: false, 2488 IsResolver: false, 2489 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2490 return nil, errors.New("field of type String does not have child fields") 2491 }, 2492 } 2493 return fc, nil 2494 } 2495 2496 func (ec *executionContext) _MultiHelloMultipleRequires_key1(ctx context.Context, field graphql.CollectedField, obj *MultiHelloMultipleRequires) (ret graphql.Marshaler) { 2497 fc, err := ec.fieldContext_MultiHelloMultipleRequires_key1(ctx, field) 2498 if err != nil { 2499 return graphql.Null 2500 } 2501 ctx = graphql.WithFieldContext(ctx, fc) 2502 defer func() { 2503 if r := recover(); r != nil { 2504 ec.Error(ctx, ec.Recover(ctx, r)) 2505 ret = graphql.Null 2506 } 2507 }() 2508 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2509 ctx = rctx // use context from middleware stack in children 2510 return obj.Key1, nil 2511 }) 2512 if err != nil { 2513 ec.Error(ctx, err) 2514 return graphql.Null 2515 } 2516 if resTmp == nil { 2517 if !graphql.HasFieldError(ctx, fc) { 2518 ec.Errorf(ctx, "must not be null") 2519 } 2520 return graphql.Null 2521 } 2522 res := resTmp.(string) 2523 fc.Result = res 2524 return ec.marshalNString2string(ctx, field.Selections, res) 2525 } 2526 2527 func (ec *executionContext) fieldContext_MultiHelloMultipleRequires_key1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2528 fc = &graphql.FieldContext{ 2529 Object: "MultiHelloMultipleRequires", 2530 Field: field, 2531 IsMethod: false, 2532 IsResolver: false, 2533 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2534 return nil, errors.New("field of type String does not have child fields") 2535 }, 2536 } 2537 return fc, nil 2538 } 2539 2540 func (ec *executionContext) _MultiHelloMultipleRequires_key2(ctx context.Context, field graphql.CollectedField, obj *MultiHelloMultipleRequires) (ret graphql.Marshaler) { 2541 fc, err := ec.fieldContext_MultiHelloMultipleRequires_key2(ctx, field) 2542 if err != nil { 2543 return graphql.Null 2544 } 2545 ctx = graphql.WithFieldContext(ctx, fc) 2546 defer func() { 2547 if r := recover(); r != nil { 2548 ec.Error(ctx, ec.Recover(ctx, r)) 2549 ret = graphql.Null 2550 } 2551 }() 2552 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2553 ctx = rctx // use context from middleware stack in children 2554 return obj.Key2, nil 2555 }) 2556 if err != nil { 2557 ec.Error(ctx, err) 2558 return graphql.Null 2559 } 2560 if resTmp == nil { 2561 if !graphql.HasFieldError(ctx, fc) { 2562 ec.Errorf(ctx, "must not be null") 2563 } 2564 return graphql.Null 2565 } 2566 res := resTmp.(string) 2567 fc.Result = res 2568 return ec.marshalNString2string(ctx, field.Selections, res) 2569 } 2570 2571 func (ec *executionContext) fieldContext_MultiHelloMultipleRequires_key2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2572 fc = &graphql.FieldContext{ 2573 Object: "MultiHelloMultipleRequires", 2574 Field: field, 2575 IsMethod: false, 2576 IsResolver: false, 2577 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2578 return nil, errors.New("field of type String does not have child fields") 2579 }, 2580 } 2581 return fc, nil 2582 } 2583 2584 func (ec *executionContext) _MultiHelloMultipleRequires_key3(ctx context.Context, field graphql.CollectedField, obj *MultiHelloMultipleRequires) (ret graphql.Marshaler) { 2585 fc, err := ec.fieldContext_MultiHelloMultipleRequires_key3(ctx, field) 2586 if err != nil { 2587 return graphql.Null 2588 } 2589 ctx = graphql.WithFieldContext(ctx, fc) 2590 defer func() { 2591 if r := recover(); r != nil { 2592 ec.Error(ctx, ec.Recover(ctx, r)) 2593 ret = graphql.Null 2594 } 2595 }() 2596 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2597 ctx = rctx // use context from middleware stack in children 2598 return obj.Key3, nil 2599 }) 2600 if err != nil { 2601 ec.Error(ctx, err) 2602 return graphql.Null 2603 } 2604 if resTmp == nil { 2605 if !graphql.HasFieldError(ctx, fc) { 2606 ec.Errorf(ctx, "must not be null") 2607 } 2608 return graphql.Null 2609 } 2610 res := resTmp.(string) 2611 fc.Result = res 2612 return ec.marshalNString2string(ctx, field.Selections, res) 2613 } 2614 2615 func (ec *executionContext) fieldContext_MultiHelloMultipleRequires_key3(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2616 fc = &graphql.FieldContext{ 2617 Object: "MultiHelloMultipleRequires", 2618 Field: field, 2619 IsMethod: false, 2620 IsResolver: false, 2621 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2622 return nil, errors.New("field of type String does not have child fields") 2623 }, 2624 } 2625 return fc, nil 2626 } 2627 2628 func (ec *executionContext) _MultiHelloRequires_name(ctx context.Context, field graphql.CollectedField, obj *MultiHelloRequires) (ret graphql.Marshaler) { 2629 fc, err := ec.fieldContext_MultiHelloRequires_name(ctx, field) 2630 if err != nil { 2631 return graphql.Null 2632 } 2633 ctx = graphql.WithFieldContext(ctx, fc) 2634 defer func() { 2635 if r := recover(); r != nil { 2636 ec.Error(ctx, ec.Recover(ctx, r)) 2637 ret = graphql.Null 2638 } 2639 }() 2640 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2641 ctx = rctx // use context from middleware stack in children 2642 return obj.Name, nil 2643 }) 2644 if err != nil { 2645 ec.Error(ctx, err) 2646 return graphql.Null 2647 } 2648 if resTmp == nil { 2649 if !graphql.HasFieldError(ctx, fc) { 2650 ec.Errorf(ctx, "must not be null") 2651 } 2652 return graphql.Null 2653 } 2654 res := resTmp.(string) 2655 fc.Result = res 2656 return ec.marshalNString2string(ctx, field.Selections, res) 2657 } 2658 2659 func (ec *executionContext) fieldContext_MultiHelloRequires_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2660 fc = &graphql.FieldContext{ 2661 Object: "MultiHelloRequires", 2662 Field: field, 2663 IsMethod: false, 2664 IsResolver: false, 2665 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2666 return nil, errors.New("field of type String does not have child fields") 2667 }, 2668 } 2669 return fc, nil 2670 } 2671 2672 func (ec *executionContext) _MultiHelloRequires_key1(ctx context.Context, field graphql.CollectedField, obj *MultiHelloRequires) (ret graphql.Marshaler) { 2673 fc, err := ec.fieldContext_MultiHelloRequires_key1(ctx, field) 2674 if err != nil { 2675 return graphql.Null 2676 } 2677 ctx = graphql.WithFieldContext(ctx, fc) 2678 defer func() { 2679 if r := recover(); r != nil { 2680 ec.Error(ctx, ec.Recover(ctx, r)) 2681 ret = graphql.Null 2682 } 2683 }() 2684 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2685 ctx = rctx // use context from middleware stack in children 2686 return obj.Key1, nil 2687 }) 2688 if err != nil { 2689 ec.Error(ctx, err) 2690 return graphql.Null 2691 } 2692 if resTmp == nil { 2693 if !graphql.HasFieldError(ctx, fc) { 2694 ec.Errorf(ctx, "must not be null") 2695 } 2696 return graphql.Null 2697 } 2698 res := resTmp.(string) 2699 fc.Result = res 2700 return ec.marshalNString2string(ctx, field.Selections, res) 2701 } 2702 2703 func (ec *executionContext) fieldContext_MultiHelloRequires_key1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2704 fc = &graphql.FieldContext{ 2705 Object: "MultiHelloRequires", 2706 Field: field, 2707 IsMethod: false, 2708 IsResolver: false, 2709 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2710 return nil, errors.New("field of type String does not have child fields") 2711 }, 2712 } 2713 return fc, nil 2714 } 2715 2716 func (ec *executionContext) _MultiHelloRequires_key2(ctx context.Context, field graphql.CollectedField, obj *MultiHelloRequires) (ret graphql.Marshaler) { 2717 fc, err := ec.fieldContext_MultiHelloRequires_key2(ctx, field) 2718 if err != nil { 2719 return graphql.Null 2720 } 2721 ctx = graphql.WithFieldContext(ctx, fc) 2722 defer func() { 2723 if r := recover(); r != nil { 2724 ec.Error(ctx, ec.Recover(ctx, r)) 2725 ret = graphql.Null 2726 } 2727 }() 2728 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2729 ctx = rctx // use context from middleware stack in children 2730 return obj.Key2, nil 2731 }) 2732 if err != nil { 2733 ec.Error(ctx, err) 2734 return graphql.Null 2735 } 2736 if resTmp == nil { 2737 if !graphql.HasFieldError(ctx, fc) { 2738 ec.Errorf(ctx, "must not be null") 2739 } 2740 return graphql.Null 2741 } 2742 res := resTmp.(string) 2743 fc.Result = res 2744 return ec.marshalNString2string(ctx, field.Selections, res) 2745 } 2746 2747 func (ec *executionContext) fieldContext_MultiHelloRequires_key2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2748 fc = &graphql.FieldContext{ 2749 Object: "MultiHelloRequires", 2750 Field: field, 2751 IsMethod: false, 2752 IsResolver: false, 2753 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2754 return nil, errors.New("field of type String does not have child fields") 2755 }, 2756 } 2757 return fc, nil 2758 } 2759 2760 func (ec *executionContext) _MultiHelloWithError_name(ctx context.Context, field graphql.CollectedField, obj *MultiHelloWithError) (ret graphql.Marshaler) { 2761 fc, err := ec.fieldContext_MultiHelloWithError_name(ctx, field) 2762 if err != nil { 2763 return graphql.Null 2764 } 2765 ctx = graphql.WithFieldContext(ctx, fc) 2766 defer func() { 2767 if r := recover(); r != nil { 2768 ec.Error(ctx, ec.Recover(ctx, r)) 2769 ret = graphql.Null 2770 } 2771 }() 2772 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2773 ctx = rctx // use context from middleware stack in children 2774 return obj.Name, nil 2775 }) 2776 if err != nil { 2777 ec.Error(ctx, err) 2778 return graphql.Null 2779 } 2780 if resTmp == nil { 2781 if !graphql.HasFieldError(ctx, fc) { 2782 ec.Errorf(ctx, "must not be null") 2783 } 2784 return graphql.Null 2785 } 2786 res := resTmp.(string) 2787 fc.Result = res 2788 return ec.marshalNString2string(ctx, field.Selections, res) 2789 } 2790 2791 func (ec *executionContext) fieldContext_MultiHelloWithError_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2792 fc = &graphql.FieldContext{ 2793 Object: "MultiHelloWithError", 2794 Field: field, 2795 IsMethod: false, 2796 IsResolver: false, 2797 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2798 return nil, errors.New("field of type String does not have child fields") 2799 }, 2800 } 2801 return fc, nil 2802 } 2803 2804 func (ec *executionContext) _MultiPlanetRequiresNested_name(ctx context.Context, field graphql.CollectedField, obj *MultiPlanetRequiresNested) (ret graphql.Marshaler) { 2805 fc, err := ec.fieldContext_MultiPlanetRequiresNested_name(ctx, field) 2806 if err != nil { 2807 return graphql.Null 2808 } 2809 ctx = graphql.WithFieldContext(ctx, fc) 2810 defer func() { 2811 if r := recover(); r != nil { 2812 ec.Error(ctx, ec.Recover(ctx, r)) 2813 ret = graphql.Null 2814 } 2815 }() 2816 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2817 ctx = rctx // use context from middleware stack in children 2818 return obj.Name, nil 2819 }) 2820 if err != nil { 2821 ec.Error(ctx, err) 2822 return graphql.Null 2823 } 2824 if resTmp == nil { 2825 if !graphql.HasFieldError(ctx, fc) { 2826 ec.Errorf(ctx, "must not be null") 2827 } 2828 return graphql.Null 2829 } 2830 res := resTmp.(string) 2831 fc.Result = res 2832 return ec.marshalNString2string(ctx, field.Selections, res) 2833 } 2834 2835 func (ec *executionContext) fieldContext_MultiPlanetRequiresNested_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2836 fc = &graphql.FieldContext{ 2837 Object: "MultiPlanetRequiresNested", 2838 Field: field, 2839 IsMethod: false, 2840 IsResolver: false, 2841 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2842 return nil, errors.New("field of type String does not have child fields") 2843 }, 2844 } 2845 return fc, nil 2846 } 2847 2848 func (ec *executionContext) _MultiPlanetRequiresNested_world(ctx context.Context, field graphql.CollectedField, obj *MultiPlanetRequiresNested) (ret graphql.Marshaler) { 2849 fc, err := ec.fieldContext_MultiPlanetRequiresNested_world(ctx, field) 2850 if err != nil { 2851 return graphql.Null 2852 } 2853 ctx = graphql.WithFieldContext(ctx, fc) 2854 defer func() { 2855 if r := recover(); r != nil { 2856 ec.Error(ctx, ec.Recover(ctx, r)) 2857 ret = graphql.Null 2858 } 2859 }() 2860 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2861 ctx = rctx // use context from middleware stack in children 2862 return obj.World, nil 2863 }) 2864 if err != nil { 2865 ec.Error(ctx, err) 2866 return graphql.Null 2867 } 2868 if resTmp == nil { 2869 if !graphql.HasFieldError(ctx, fc) { 2870 ec.Errorf(ctx, "must not be null") 2871 } 2872 return graphql.Null 2873 } 2874 res := resTmp.(*World) 2875 fc.Result = res 2876 return ec.marshalNWorld2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐWorld(ctx, field.Selections, res) 2877 } 2878 2879 func (ec *executionContext) fieldContext_MultiPlanetRequiresNested_world(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2880 fc = &graphql.FieldContext{ 2881 Object: "MultiPlanetRequiresNested", 2882 Field: field, 2883 IsMethod: false, 2884 IsResolver: false, 2885 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2886 switch field.Name { 2887 case "foo": 2888 return ec.fieldContext_World_foo(ctx, field) 2889 case "bar": 2890 return ec.fieldContext_World_bar(ctx, field) 2891 case "hello": 2892 return ec.fieldContext_World_hello(ctx, field) 2893 } 2894 return nil, fmt.Errorf("no field named %q was found under type World", field.Name) 2895 }, 2896 } 2897 return fc, nil 2898 } 2899 2900 func (ec *executionContext) _MultiPlanetRequiresNested_size(ctx context.Context, field graphql.CollectedField, obj *MultiPlanetRequiresNested) (ret graphql.Marshaler) { 2901 fc, err := ec.fieldContext_MultiPlanetRequiresNested_size(ctx, field) 2902 if err != nil { 2903 return graphql.Null 2904 } 2905 ctx = graphql.WithFieldContext(ctx, fc) 2906 defer func() { 2907 if r := recover(); r != nil { 2908 ec.Error(ctx, ec.Recover(ctx, r)) 2909 ret = graphql.Null 2910 } 2911 }() 2912 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2913 ctx = rctx // use context from middleware stack in children 2914 return obj.Size, nil 2915 }) 2916 if err != nil { 2917 ec.Error(ctx, err) 2918 return graphql.Null 2919 } 2920 if resTmp == nil { 2921 if !graphql.HasFieldError(ctx, fc) { 2922 ec.Errorf(ctx, "must not be null") 2923 } 2924 return graphql.Null 2925 } 2926 res := resTmp.(int) 2927 fc.Result = res 2928 return ec.marshalNInt2int(ctx, field.Selections, res) 2929 } 2930 2931 func (ec *executionContext) fieldContext_MultiPlanetRequiresNested_size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2932 fc = &graphql.FieldContext{ 2933 Object: "MultiPlanetRequiresNested", 2934 Field: field, 2935 IsMethod: false, 2936 IsResolver: false, 2937 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2938 return nil, errors.New("field of type Int does not have child fields") 2939 }, 2940 } 2941 return fc, nil 2942 } 2943 2944 func (ec *executionContext) _PlanetMultipleRequires_name(ctx context.Context, field graphql.CollectedField, obj *PlanetMultipleRequires) (ret graphql.Marshaler) { 2945 fc, err := ec.fieldContext_PlanetMultipleRequires_name(ctx, field) 2946 if err != nil { 2947 return graphql.Null 2948 } 2949 ctx = graphql.WithFieldContext(ctx, fc) 2950 defer func() { 2951 if r := recover(); r != nil { 2952 ec.Error(ctx, ec.Recover(ctx, r)) 2953 ret = graphql.Null 2954 } 2955 }() 2956 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2957 ctx = rctx // use context from middleware stack in children 2958 return obj.Name, nil 2959 }) 2960 if err != nil { 2961 ec.Error(ctx, err) 2962 return graphql.Null 2963 } 2964 if resTmp == nil { 2965 if !graphql.HasFieldError(ctx, fc) { 2966 ec.Errorf(ctx, "must not be null") 2967 } 2968 return graphql.Null 2969 } 2970 res := resTmp.(string) 2971 fc.Result = res 2972 return ec.marshalNString2string(ctx, field.Selections, res) 2973 } 2974 2975 func (ec *executionContext) fieldContext_PlanetMultipleRequires_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2976 fc = &graphql.FieldContext{ 2977 Object: "PlanetMultipleRequires", 2978 Field: field, 2979 IsMethod: false, 2980 IsResolver: false, 2981 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2982 return nil, errors.New("field of type String does not have child fields") 2983 }, 2984 } 2985 return fc, nil 2986 } 2987 2988 func (ec *executionContext) _PlanetMultipleRequires_diameter(ctx context.Context, field graphql.CollectedField, obj *PlanetMultipleRequires) (ret graphql.Marshaler) { 2989 fc, err := ec.fieldContext_PlanetMultipleRequires_diameter(ctx, field) 2990 if err != nil { 2991 return graphql.Null 2992 } 2993 ctx = graphql.WithFieldContext(ctx, fc) 2994 defer func() { 2995 if r := recover(); r != nil { 2996 ec.Error(ctx, ec.Recover(ctx, r)) 2997 ret = graphql.Null 2998 } 2999 }() 3000 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3001 ctx = rctx // use context from middleware stack in children 3002 return obj.Diameter, nil 3003 }) 3004 if err != nil { 3005 ec.Error(ctx, err) 3006 return graphql.Null 3007 } 3008 if resTmp == nil { 3009 if !graphql.HasFieldError(ctx, fc) { 3010 ec.Errorf(ctx, "must not be null") 3011 } 3012 return graphql.Null 3013 } 3014 res := resTmp.(int) 3015 fc.Result = res 3016 return ec.marshalNInt2int(ctx, field.Selections, res) 3017 } 3018 3019 func (ec *executionContext) fieldContext_PlanetMultipleRequires_diameter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3020 fc = &graphql.FieldContext{ 3021 Object: "PlanetMultipleRequires", 3022 Field: field, 3023 IsMethod: false, 3024 IsResolver: false, 3025 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3026 return nil, errors.New("field of type Int does not have child fields") 3027 }, 3028 } 3029 return fc, nil 3030 } 3031 3032 func (ec *executionContext) _PlanetMultipleRequires_density(ctx context.Context, field graphql.CollectedField, obj *PlanetMultipleRequires) (ret graphql.Marshaler) { 3033 fc, err := ec.fieldContext_PlanetMultipleRequires_density(ctx, field) 3034 if err != nil { 3035 return graphql.Null 3036 } 3037 ctx = graphql.WithFieldContext(ctx, fc) 3038 defer func() { 3039 if r := recover(); r != nil { 3040 ec.Error(ctx, ec.Recover(ctx, r)) 3041 ret = graphql.Null 3042 } 3043 }() 3044 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3045 ctx = rctx // use context from middleware stack in children 3046 return obj.Density, nil 3047 }) 3048 if err != nil { 3049 ec.Error(ctx, err) 3050 return graphql.Null 3051 } 3052 if resTmp == nil { 3053 if !graphql.HasFieldError(ctx, fc) { 3054 ec.Errorf(ctx, "must not be null") 3055 } 3056 return graphql.Null 3057 } 3058 res := resTmp.(int) 3059 fc.Result = res 3060 return ec.marshalNInt2int(ctx, field.Selections, res) 3061 } 3062 3063 func (ec *executionContext) fieldContext_PlanetMultipleRequires_density(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3064 fc = &graphql.FieldContext{ 3065 Object: "PlanetMultipleRequires", 3066 Field: field, 3067 IsMethod: false, 3068 IsResolver: false, 3069 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3070 return nil, errors.New("field of type Int does not have child fields") 3071 }, 3072 } 3073 return fc, nil 3074 } 3075 3076 func (ec *executionContext) _PlanetMultipleRequires_weight(ctx context.Context, field graphql.CollectedField, obj *PlanetMultipleRequires) (ret graphql.Marshaler) { 3077 fc, err := ec.fieldContext_PlanetMultipleRequires_weight(ctx, field) 3078 if err != nil { 3079 return graphql.Null 3080 } 3081 ctx = graphql.WithFieldContext(ctx, fc) 3082 defer func() { 3083 if r := recover(); r != nil { 3084 ec.Error(ctx, ec.Recover(ctx, r)) 3085 ret = graphql.Null 3086 } 3087 }() 3088 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3089 ctx = rctx // use context from middleware stack in children 3090 return obj.Weight, nil 3091 }) 3092 if err != nil { 3093 ec.Error(ctx, err) 3094 return graphql.Null 3095 } 3096 if resTmp == nil { 3097 if !graphql.HasFieldError(ctx, fc) { 3098 ec.Errorf(ctx, "must not be null") 3099 } 3100 return graphql.Null 3101 } 3102 res := resTmp.(int) 3103 fc.Result = res 3104 return ec.marshalNInt2int(ctx, field.Selections, res) 3105 } 3106 3107 func (ec *executionContext) fieldContext_PlanetMultipleRequires_weight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3108 fc = &graphql.FieldContext{ 3109 Object: "PlanetMultipleRequires", 3110 Field: field, 3111 IsMethod: false, 3112 IsResolver: false, 3113 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3114 return nil, errors.New("field of type Int does not have child fields") 3115 }, 3116 } 3117 return fc, nil 3118 } 3119 3120 func (ec *executionContext) _PlanetRequires_name(ctx context.Context, field graphql.CollectedField, obj *PlanetRequires) (ret graphql.Marshaler) { 3121 fc, err := ec.fieldContext_PlanetRequires_name(ctx, field) 3122 if err != nil { 3123 return graphql.Null 3124 } 3125 ctx = graphql.WithFieldContext(ctx, fc) 3126 defer func() { 3127 if r := recover(); r != nil { 3128 ec.Error(ctx, ec.Recover(ctx, r)) 3129 ret = graphql.Null 3130 } 3131 }() 3132 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3133 ctx = rctx // use context from middleware stack in children 3134 return obj.Name, nil 3135 }) 3136 if err != nil { 3137 ec.Error(ctx, err) 3138 return graphql.Null 3139 } 3140 if resTmp == nil { 3141 if !graphql.HasFieldError(ctx, fc) { 3142 ec.Errorf(ctx, "must not be null") 3143 } 3144 return graphql.Null 3145 } 3146 res := resTmp.(string) 3147 fc.Result = res 3148 return ec.marshalNString2string(ctx, field.Selections, res) 3149 } 3150 3151 func (ec *executionContext) fieldContext_PlanetRequires_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3152 fc = &graphql.FieldContext{ 3153 Object: "PlanetRequires", 3154 Field: field, 3155 IsMethod: false, 3156 IsResolver: false, 3157 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3158 return nil, errors.New("field of type String does not have child fields") 3159 }, 3160 } 3161 return fc, nil 3162 } 3163 3164 func (ec *executionContext) _PlanetRequires_size(ctx context.Context, field graphql.CollectedField, obj *PlanetRequires) (ret graphql.Marshaler) { 3165 fc, err := ec.fieldContext_PlanetRequires_size(ctx, field) 3166 if err != nil { 3167 return graphql.Null 3168 } 3169 ctx = graphql.WithFieldContext(ctx, fc) 3170 defer func() { 3171 if r := recover(); r != nil { 3172 ec.Error(ctx, ec.Recover(ctx, r)) 3173 ret = graphql.Null 3174 } 3175 }() 3176 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3177 ctx = rctx // use context from middleware stack in children 3178 return obj.Size, nil 3179 }) 3180 if err != nil { 3181 ec.Error(ctx, err) 3182 return graphql.Null 3183 } 3184 if resTmp == nil { 3185 if !graphql.HasFieldError(ctx, fc) { 3186 ec.Errorf(ctx, "must not be null") 3187 } 3188 return graphql.Null 3189 } 3190 res := resTmp.(int) 3191 fc.Result = res 3192 return ec.marshalNInt2int(ctx, field.Selections, res) 3193 } 3194 3195 func (ec *executionContext) fieldContext_PlanetRequires_size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3196 fc = &graphql.FieldContext{ 3197 Object: "PlanetRequires", 3198 Field: field, 3199 IsMethod: false, 3200 IsResolver: false, 3201 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3202 return nil, errors.New("field of type Int does not have child fields") 3203 }, 3204 } 3205 return fc, nil 3206 } 3207 3208 func (ec *executionContext) _PlanetRequires_diameter(ctx context.Context, field graphql.CollectedField, obj *PlanetRequires) (ret graphql.Marshaler) { 3209 fc, err := ec.fieldContext_PlanetRequires_diameter(ctx, field) 3210 if err != nil { 3211 return graphql.Null 3212 } 3213 ctx = graphql.WithFieldContext(ctx, fc) 3214 defer func() { 3215 if r := recover(); r != nil { 3216 ec.Error(ctx, ec.Recover(ctx, r)) 3217 ret = graphql.Null 3218 } 3219 }() 3220 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3221 ctx = rctx // use context from middleware stack in children 3222 return obj.Diameter, nil 3223 }) 3224 if err != nil { 3225 ec.Error(ctx, err) 3226 return graphql.Null 3227 } 3228 if resTmp == nil { 3229 if !graphql.HasFieldError(ctx, fc) { 3230 ec.Errorf(ctx, "must not be null") 3231 } 3232 return graphql.Null 3233 } 3234 res := resTmp.(int) 3235 fc.Result = res 3236 return ec.marshalNInt2int(ctx, field.Selections, res) 3237 } 3238 3239 func (ec *executionContext) fieldContext_PlanetRequires_diameter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3240 fc = &graphql.FieldContext{ 3241 Object: "PlanetRequires", 3242 Field: field, 3243 IsMethod: false, 3244 IsResolver: false, 3245 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3246 return nil, errors.New("field of type Int does not have child fields") 3247 }, 3248 } 3249 return fc, nil 3250 } 3251 3252 func (ec *executionContext) _PlanetRequiresNested_name(ctx context.Context, field graphql.CollectedField, obj *PlanetRequiresNested) (ret graphql.Marshaler) { 3253 fc, err := ec.fieldContext_PlanetRequiresNested_name(ctx, field) 3254 if err != nil { 3255 return graphql.Null 3256 } 3257 ctx = graphql.WithFieldContext(ctx, fc) 3258 defer func() { 3259 if r := recover(); r != nil { 3260 ec.Error(ctx, ec.Recover(ctx, r)) 3261 ret = graphql.Null 3262 } 3263 }() 3264 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3265 ctx = rctx // use context from middleware stack in children 3266 return obj.Name, nil 3267 }) 3268 if err != nil { 3269 ec.Error(ctx, err) 3270 return graphql.Null 3271 } 3272 if resTmp == nil { 3273 if !graphql.HasFieldError(ctx, fc) { 3274 ec.Errorf(ctx, "must not be null") 3275 } 3276 return graphql.Null 3277 } 3278 res := resTmp.(string) 3279 fc.Result = res 3280 return ec.marshalNString2string(ctx, field.Selections, res) 3281 } 3282 3283 func (ec *executionContext) fieldContext_PlanetRequiresNested_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3284 fc = &graphql.FieldContext{ 3285 Object: "PlanetRequiresNested", 3286 Field: field, 3287 IsMethod: false, 3288 IsResolver: false, 3289 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3290 return nil, errors.New("field of type String does not have child fields") 3291 }, 3292 } 3293 return fc, nil 3294 } 3295 3296 func (ec *executionContext) _PlanetRequiresNested_world(ctx context.Context, field graphql.CollectedField, obj *PlanetRequiresNested) (ret graphql.Marshaler) { 3297 fc, err := ec.fieldContext_PlanetRequiresNested_world(ctx, field) 3298 if err != nil { 3299 return graphql.Null 3300 } 3301 ctx = graphql.WithFieldContext(ctx, fc) 3302 defer func() { 3303 if r := recover(); r != nil { 3304 ec.Error(ctx, ec.Recover(ctx, r)) 3305 ret = graphql.Null 3306 } 3307 }() 3308 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3309 ctx = rctx // use context from middleware stack in children 3310 return obj.World, nil 3311 }) 3312 if err != nil { 3313 ec.Error(ctx, err) 3314 return graphql.Null 3315 } 3316 if resTmp == nil { 3317 if !graphql.HasFieldError(ctx, fc) { 3318 ec.Errorf(ctx, "must not be null") 3319 } 3320 return graphql.Null 3321 } 3322 res := resTmp.(*World) 3323 fc.Result = res 3324 return ec.marshalNWorld2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐWorld(ctx, field.Selections, res) 3325 } 3326 3327 func (ec *executionContext) fieldContext_PlanetRequiresNested_world(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3328 fc = &graphql.FieldContext{ 3329 Object: "PlanetRequiresNested", 3330 Field: field, 3331 IsMethod: false, 3332 IsResolver: false, 3333 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3334 switch field.Name { 3335 case "foo": 3336 return ec.fieldContext_World_foo(ctx, field) 3337 case "bar": 3338 return ec.fieldContext_World_bar(ctx, field) 3339 case "hello": 3340 return ec.fieldContext_World_hello(ctx, field) 3341 } 3342 return nil, fmt.Errorf("no field named %q was found under type World", field.Name) 3343 }, 3344 } 3345 return fc, nil 3346 } 3347 3348 func (ec *executionContext) _PlanetRequiresNested_size(ctx context.Context, field graphql.CollectedField, obj *PlanetRequiresNested) (ret graphql.Marshaler) { 3349 fc, err := ec.fieldContext_PlanetRequiresNested_size(ctx, field) 3350 if err != nil { 3351 return graphql.Null 3352 } 3353 ctx = graphql.WithFieldContext(ctx, fc) 3354 defer func() { 3355 if r := recover(); r != nil { 3356 ec.Error(ctx, ec.Recover(ctx, r)) 3357 ret = graphql.Null 3358 } 3359 }() 3360 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3361 ctx = rctx // use context from middleware stack in children 3362 return obj.Size, nil 3363 }) 3364 if err != nil { 3365 ec.Error(ctx, err) 3366 return graphql.Null 3367 } 3368 if resTmp == nil { 3369 if !graphql.HasFieldError(ctx, fc) { 3370 ec.Errorf(ctx, "must not be null") 3371 } 3372 return graphql.Null 3373 } 3374 res := resTmp.(int) 3375 fc.Result = res 3376 return ec.marshalNInt2int(ctx, field.Selections, res) 3377 } 3378 3379 func (ec *executionContext) fieldContext_PlanetRequiresNested_size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3380 fc = &graphql.FieldContext{ 3381 Object: "PlanetRequiresNested", 3382 Field: field, 3383 IsMethod: false, 3384 IsResolver: false, 3385 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3386 return nil, errors.New("field of type Int does not have child fields") 3387 }, 3388 } 3389 return fc, nil 3390 } 3391 3392 func (ec *executionContext) _Query__entities(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 3393 fc, err := ec.fieldContext_Query__entities(ctx, field) 3394 if err != nil { 3395 return graphql.Null 3396 } 3397 ctx = graphql.WithFieldContext(ctx, fc) 3398 defer func() { 3399 if r := recover(); r != nil { 3400 ec.Error(ctx, ec.Recover(ctx, r)) 3401 ret = graphql.Null 3402 } 3403 }() 3404 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3405 ctx = rctx // use context from middleware stack in children 3406 return ec.__resolve_entities(ctx, fc.Args["representations"].([]map[string]interface{})), nil 3407 }) 3408 if err != nil { 3409 ec.Error(ctx, err) 3410 } 3411 if resTmp == nil { 3412 if !graphql.HasFieldError(ctx, fc) { 3413 ec.Errorf(ctx, "must not be null") 3414 } 3415 return graphql.Null 3416 } 3417 res := resTmp.([]fedruntime.Entity) 3418 fc.Result = res 3419 return ec.marshalN_Entity2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋfedruntimeᚐEntity(ctx, field.Selections, res) 3420 } 3421 3422 func (ec *executionContext) fieldContext_Query__entities(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3423 fc = &graphql.FieldContext{ 3424 Object: "Query", 3425 Field: field, 3426 IsMethod: true, 3427 IsResolver: false, 3428 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3429 return nil, errors.New("field of type _Entity does not have child fields") 3430 }, 3431 } 3432 defer func() { 3433 if r := recover(); r != nil { 3434 err = ec.Recover(ctx, r) 3435 ec.Error(ctx, err) 3436 } 3437 }() 3438 ctx = graphql.WithFieldContext(ctx, fc) 3439 if fc.Args, err = ec.field_Query__entities_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 3440 ec.Error(ctx, err) 3441 return 3442 } 3443 return fc, nil 3444 } 3445 3446 func (ec *executionContext) _Query__service(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 3447 fc, err := ec.fieldContext_Query__service(ctx, field) 3448 if err != nil { 3449 return graphql.Null 3450 } 3451 ctx = graphql.WithFieldContext(ctx, fc) 3452 defer func() { 3453 if r := recover(); r != nil { 3454 ec.Error(ctx, ec.Recover(ctx, r)) 3455 ret = graphql.Null 3456 } 3457 }() 3458 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3459 ctx = rctx // use context from middleware stack in children 3460 return ec.__resolve__service(ctx) 3461 }) 3462 if err != nil { 3463 ec.Error(ctx, err) 3464 } 3465 if resTmp == nil { 3466 if !graphql.HasFieldError(ctx, fc) { 3467 ec.Errorf(ctx, "must not be null") 3468 } 3469 return graphql.Null 3470 } 3471 res := resTmp.(fedruntime.Service) 3472 fc.Result = res 3473 return ec.marshalN_Service2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋfedruntimeᚐService(ctx, field.Selections, res) 3474 } 3475 3476 func (ec *executionContext) fieldContext_Query__service(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3477 fc = &graphql.FieldContext{ 3478 Object: "Query", 3479 Field: field, 3480 IsMethod: true, 3481 IsResolver: false, 3482 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3483 switch field.Name { 3484 case "sdl": 3485 return ec.fieldContext__Service_sdl(ctx, field) 3486 } 3487 return nil, fmt.Errorf("no field named %q was found under type _Service", field.Name) 3488 }, 3489 } 3490 return fc, nil 3491 } 3492 3493 func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 3494 fc, err := ec.fieldContext_Query___type(ctx, field) 3495 if err != nil { 3496 return graphql.Null 3497 } 3498 ctx = graphql.WithFieldContext(ctx, fc) 3499 defer func() { 3500 if r := recover(); r != nil { 3501 ec.Error(ctx, ec.Recover(ctx, r)) 3502 ret = graphql.Null 3503 } 3504 }() 3505 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3506 ctx = rctx // use context from middleware stack in children 3507 return ec.introspectType(fc.Args["name"].(string)) 3508 }) 3509 if err != nil { 3510 ec.Error(ctx, err) 3511 } 3512 if resTmp == nil { 3513 return graphql.Null 3514 } 3515 res := resTmp.(*introspection.Type) 3516 fc.Result = res 3517 return ec.marshalO__Type2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 3518 } 3519 3520 func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3521 fc = &graphql.FieldContext{ 3522 Object: "Query", 3523 Field: field, 3524 IsMethod: true, 3525 IsResolver: false, 3526 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3527 switch field.Name { 3528 case "kind": 3529 return ec.fieldContext___Type_kind(ctx, field) 3530 case "name": 3531 return ec.fieldContext___Type_name(ctx, field) 3532 case "description": 3533 return ec.fieldContext___Type_description(ctx, field) 3534 case "fields": 3535 return ec.fieldContext___Type_fields(ctx, field) 3536 case "interfaces": 3537 return ec.fieldContext___Type_interfaces(ctx, field) 3538 case "possibleTypes": 3539 return ec.fieldContext___Type_possibleTypes(ctx, field) 3540 case "enumValues": 3541 return ec.fieldContext___Type_enumValues(ctx, field) 3542 case "inputFields": 3543 return ec.fieldContext___Type_inputFields(ctx, field) 3544 case "ofType": 3545 return ec.fieldContext___Type_ofType(ctx, field) 3546 case "specifiedByURL": 3547 return ec.fieldContext___Type_specifiedByURL(ctx, field) 3548 } 3549 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 3550 }, 3551 } 3552 defer func() { 3553 if r := recover(); r != nil { 3554 err = ec.Recover(ctx, r) 3555 ec.Error(ctx, err) 3556 } 3557 }() 3558 ctx = graphql.WithFieldContext(ctx, fc) 3559 if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 3560 ec.Error(ctx, err) 3561 return 3562 } 3563 return fc, nil 3564 } 3565 3566 func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 3567 fc, err := ec.fieldContext_Query___schema(ctx, field) 3568 if err != nil { 3569 return graphql.Null 3570 } 3571 ctx = graphql.WithFieldContext(ctx, fc) 3572 defer func() { 3573 if r := recover(); r != nil { 3574 ec.Error(ctx, ec.Recover(ctx, r)) 3575 ret = graphql.Null 3576 } 3577 }() 3578 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3579 ctx = rctx // use context from middleware stack in children 3580 return ec.introspectSchema() 3581 }) 3582 if err != nil { 3583 ec.Error(ctx, err) 3584 } 3585 if resTmp == nil { 3586 return graphql.Null 3587 } 3588 res := resTmp.(*introspection.Schema) 3589 fc.Result = res 3590 return ec.marshalO__Schema2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) 3591 } 3592 3593 func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3594 fc = &graphql.FieldContext{ 3595 Object: "Query", 3596 Field: field, 3597 IsMethod: true, 3598 IsResolver: false, 3599 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3600 switch field.Name { 3601 case "description": 3602 return ec.fieldContext___Schema_description(ctx, field) 3603 case "types": 3604 return ec.fieldContext___Schema_types(ctx, field) 3605 case "queryType": 3606 return ec.fieldContext___Schema_queryType(ctx, field) 3607 case "mutationType": 3608 return ec.fieldContext___Schema_mutationType(ctx, field) 3609 case "subscriptionType": 3610 return ec.fieldContext___Schema_subscriptionType(ctx, field) 3611 case "directives": 3612 return ec.fieldContext___Schema_directives(ctx, field) 3613 } 3614 return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name) 3615 }, 3616 } 3617 return fc, nil 3618 } 3619 3620 func (ec *executionContext) _World_foo(ctx context.Context, field graphql.CollectedField, obj *World) (ret graphql.Marshaler) { 3621 fc, err := ec.fieldContext_World_foo(ctx, field) 3622 if err != nil { 3623 return graphql.Null 3624 } 3625 ctx = graphql.WithFieldContext(ctx, fc) 3626 defer func() { 3627 if r := recover(); r != nil { 3628 ec.Error(ctx, ec.Recover(ctx, r)) 3629 ret = graphql.Null 3630 } 3631 }() 3632 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3633 ctx = rctx // use context from middleware stack in children 3634 return obj.Foo, nil 3635 }) 3636 if err != nil { 3637 ec.Error(ctx, err) 3638 return graphql.Null 3639 } 3640 if resTmp == nil { 3641 if !graphql.HasFieldError(ctx, fc) { 3642 ec.Errorf(ctx, "must not be null") 3643 } 3644 return graphql.Null 3645 } 3646 res := resTmp.(string) 3647 fc.Result = res 3648 return ec.marshalNString2string(ctx, field.Selections, res) 3649 } 3650 3651 func (ec *executionContext) fieldContext_World_foo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3652 fc = &graphql.FieldContext{ 3653 Object: "World", 3654 Field: field, 3655 IsMethod: false, 3656 IsResolver: false, 3657 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3658 return nil, errors.New("field of type String does not have child fields") 3659 }, 3660 } 3661 return fc, nil 3662 } 3663 3664 func (ec *executionContext) _World_bar(ctx context.Context, field graphql.CollectedField, obj *World) (ret graphql.Marshaler) { 3665 fc, err := ec.fieldContext_World_bar(ctx, field) 3666 if err != nil { 3667 return graphql.Null 3668 } 3669 ctx = graphql.WithFieldContext(ctx, fc) 3670 defer func() { 3671 if r := recover(); r != nil { 3672 ec.Error(ctx, ec.Recover(ctx, r)) 3673 ret = graphql.Null 3674 } 3675 }() 3676 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3677 ctx = rctx // use context from middleware stack in children 3678 return obj.Bar, nil 3679 }) 3680 if err != nil { 3681 ec.Error(ctx, err) 3682 return graphql.Null 3683 } 3684 if resTmp == nil { 3685 if !graphql.HasFieldError(ctx, fc) { 3686 ec.Errorf(ctx, "must not be null") 3687 } 3688 return graphql.Null 3689 } 3690 res := resTmp.(int) 3691 fc.Result = res 3692 return ec.marshalNInt2int(ctx, field.Selections, res) 3693 } 3694 3695 func (ec *executionContext) fieldContext_World_bar(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3696 fc = &graphql.FieldContext{ 3697 Object: "World", 3698 Field: field, 3699 IsMethod: false, 3700 IsResolver: false, 3701 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3702 return nil, errors.New("field of type Int does not have child fields") 3703 }, 3704 } 3705 return fc, nil 3706 } 3707 3708 func (ec *executionContext) _World_hello(ctx context.Context, field graphql.CollectedField, obj *World) (ret graphql.Marshaler) { 3709 fc, err := ec.fieldContext_World_hello(ctx, field) 3710 if err != nil { 3711 return graphql.Null 3712 } 3713 ctx = graphql.WithFieldContext(ctx, fc) 3714 defer func() { 3715 if r := recover(); r != nil { 3716 ec.Error(ctx, ec.Recover(ctx, r)) 3717 ret = graphql.Null 3718 } 3719 }() 3720 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3721 ctx = rctx // use context from middleware stack in children 3722 return obj.Hello, nil 3723 }) 3724 if err != nil { 3725 ec.Error(ctx, err) 3726 return graphql.Null 3727 } 3728 if resTmp == nil { 3729 return graphql.Null 3730 } 3731 res := resTmp.(*Hello) 3732 fc.Result = res 3733 return ec.marshalOHello2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐHello(ctx, field.Selections, res) 3734 } 3735 3736 func (ec *executionContext) fieldContext_World_hello(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3737 fc = &graphql.FieldContext{ 3738 Object: "World", 3739 Field: field, 3740 IsMethod: false, 3741 IsResolver: false, 3742 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3743 switch field.Name { 3744 case "name": 3745 return ec.fieldContext_Hello_name(ctx, field) 3746 case "secondary": 3747 return ec.fieldContext_Hello_secondary(ctx, field) 3748 } 3749 return nil, fmt.Errorf("no field named %q was found under type Hello", field.Name) 3750 }, 3751 } 3752 return fc, nil 3753 } 3754 3755 func (ec *executionContext) _WorldName_name(ctx context.Context, field graphql.CollectedField, obj *WorldName) (ret graphql.Marshaler) { 3756 fc, err := ec.fieldContext_WorldName_name(ctx, field) 3757 if err != nil { 3758 return graphql.Null 3759 } 3760 ctx = graphql.WithFieldContext(ctx, fc) 3761 defer func() { 3762 if r := recover(); r != nil { 3763 ec.Error(ctx, ec.Recover(ctx, r)) 3764 ret = graphql.Null 3765 } 3766 }() 3767 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3768 ctx = rctx // use context from middleware stack in children 3769 return obj.Name, nil 3770 }) 3771 if err != nil { 3772 ec.Error(ctx, err) 3773 return graphql.Null 3774 } 3775 if resTmp == nil { 3776 if !graphql.HasFieldError(ctx, fc) { 3777 ec.Errorf(ctx, "must not be null") 3778 } 3779 return graphql.Null 3780 } 3781 res := resTmp.(string) 3782 fc.Result = res 3783 return ec.marshalNString2string(ctx, field.Selections, res) 3784 } 3785 3786 func (ec *executionContext) fieldContext_WorldName_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3787 fc = &graphql.FieldContext{ 3788 Object: "WorldName", 3789 Field: field, 3790 IsMethod: false, 3791 IsResolver: false, 3792 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3793 return nil, errors.New("field of type String does not have child fields") 3794 }, 3795 } 3796 return fc, nil 3797 } 3798 3799 func (ec *executionContext) _WorldWithMultipleKeys_foo(ctx context.Context, field graphql.CollectedField, obj *WorldWithMultipleKeys) (ret graphql.Marshaler) { 3800 fc, err := ec.fieldContext_WorldWithMultipleKeys_foo(ctx, field) 3801 if err != nil { 3802 return graphql.Null 3803 } 3804 ctx = graphql.WithFieldContext(ctx, fc) 3805 defer func() { 3806 if r := recover(); r != nil { 3807 ec.Error(ctx, ec.Recover(ctx, r)) 3808 ret = graphql.Null 3809 } 3810 }() 3811 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3812 ctx = rctx // use context from middleware stack in children 3813 return obj.Foo, nil 3814 }) 3815 if err != nil { 3816 ec.Error(ctx, err) 3817 return graphql.Null 3818 } 3819 if resTmp == nil { 3820 if !graphql.HasFieldError(ctx, fc) { 3821 ec.Errorf(ctx, "must not be null") 3822 } 3823 return graphql.Null 3824 } 3825 res := resTmp.(string) 3826 fc.Result = res 3827 return ec.marshalNString2string(ctx, field.Selections, res) 3828 } 3829 3830 func (ec *executionContext) fieldContext_WorldWithMultipleKeys_foo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3831 fc = &graphql.FieldContext{ 3832 Object: "WorldWithMultipleKeys", 3833 Field: field, 3834 IsMethod: false, 3835 IsResolver: false, 3836 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3837 return nil, errors.New("field of type String does not have child fields") 3838 }, 3839 } 3840 return fc, nil 3841 } 3842 3843 func (ec *executionContext) _WorldWithMultipleKeys_bar(ctx context.Context, field graphql.CollectedField, obj *WorldWithMultipleKeys) (ret graphql.Marshaler) { 3844 fc, err := ec.fieldContext_WorldWithMultipleKeys_bar(ctx, field) 3845 if err != nil { 3846 return graphql.Null 3847 } 3848 ctx = graphql.WithFieldContext(ctx, fc) 3849 defer func() { 3850 if r := recover(); r != nil { 3851 ec.Error(ctx, ec.Recover(ctx, r)) 3852 ret = graphql.Null 3853 } 3854 }() 3855 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3856 ctx = rctx // use context from middleware stack in children 3857 return obj.Bar, nil 3858 }) 3859 if err != nil { 3860 ec.Error(ctx, err) 3861 return graphql.Null 3862 } 3863 if resTmp == nil { 3864 if !graphql.HasFieldError(ctx, fc) { 3865 ec.Errorf(ctx, "must not be null") 3866 } 3867 return graphql.Null 3868 } 3869 res := resTmp.(int) 3870 fc.Result = res 3871 return ec.marshalNInt2int(ctx, field.Selections, res) 3872 } 3873 3874 func (ec *executionContext) fieldContext_WorldWithMultipleKeys_bar(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3875 fc = &graphql.FieldContext{ 3876 Object: "WorldWithMultipleKeys", 3877 Field: field, 3878 IsMethod: false, 3879 IsResolver: false, 3880 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3881 return nil, errors.New("field of type Int does not have child fields") 3882 }, 3883 } 3884 return fc, nil 3885 } 3886 3887 func (ec *executionContext) _WorldWithMultipleKeys_hello(ctx context.Context, field graphql.CollectedField, obj *WorldWithMultipleKeys) (ret graphql.Marshaler) { 3888 fc, err := ec.fieldContext_WorldWithMultipleKeys_hello(ctx, field) 3889 if err != nil { 3890 return graphql.Null 3891 } 3892 ctx = graphql.WithFieldContext(ctx, fc) 3893 defer func() { 3894 if r := recover(); r != nil { 3895 ec.Error(ctx, ec.Recover(ctx, r)) 3896 ret = graphql.Null 3897 } 3898 }() 3899 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3900 ctx = rctx // use context from middleware stack in children 3901 return obj.Hello, nil 3902 }) 3903 if err != nil { 3904 ec.Error(ctx, err) 3905 return graphql.Null 3906 } 3907 if resTmp == nil { 3908 return graphql.Null 3909 } 3910 res := resTmp.(*Hello) 3911 fc.Result = res 3912 return ec.marshalOHello2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐHello(ctx, field.Selections, res) 3913 } 3914 3915 func (ec *executionContext) fieldContext_WorldWithMultipleKeys_hello(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3916 fc = &graphql.FieldContext{ 3917 Object: "WorldWithMultipleKeys", 3918 Field: field, 3919 IsMethod: false, 3920 IsResolver: false, 3921 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3922 switch field.Name { 3923 case "name": 3924 return ec.fieldContext_Hello_name(ctx, field) 3925 case "secondary": 3926 return ec.fieldContext_Hello_secondary(ctx, field) 3927 } 3928 return nil, fmt.Errorf("no field named %q was found under type Hello", field.Name) 3929 }, 3930 } 3931 return fc, nil 3932 } 3933 3934 func (ec *executionContext) __Service_sdl(ctx context.Context, field graphql.CollectedField, obj *fedruntime.Service) (ret graphql.Marshaler) { 3935 fc, err := ec.fieldContext__Service_sdl(ctx, field) 3936 if err != nil { 3937 return graphql.Null 3938 } 3939 ctx = graphql.WithFieldContext(ctx, fc) 3940 defer func() { 3941 if r := recover(); r != nil { 3942 ec.Error(ctx, ec.Recover(ctx, r)) 3943 ret = graphql.Null 3944 } 3945 }() 3946 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3947 ctx = rctx // use context from middleware stack in children 3948 return obj.SDL, nil 3949 }) 3950 if err != nil { 3951 ec.Error(ctx, err) 3952 return graphql.Null 3953 } 3954 if resTmp == nil { 3955 return graphql.Null 3956 } 3957 res := resTmp.(string) 3958 fc.Result = res 3959 return ec.marshalOString2string(ctx, field.Selections, res) 3960 } 3961 3962 func (ec *executionContext) fieldContext__Service_sdl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3963 fc = &graphql.FieldContext{ 3964 Object: "_Service", 3965 Field: field, 3966 IsMethod: false, 3967 IsResolver: false, 3968 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3969 return nil, errors.New("field of type String does not have child fields") 3970 }, 3971 } 3972 return fc, nil 3973 } 3974 3975 func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 3976 fc, err := ec.fieldContext___Directive_name(ctx, field) 3977 if err != nil { 3978 return graphql.Null 3979 } 3980 ctx = graphql.WithFieldContext(ctx, fc) 3981 defer func() { 3982 if r := recover(); r != nil { 3983 ec.Error(ctx, ec.Recover(ctx, r)) 3984 ret = graphql.Null 3985 } 3986 }() 3987 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 3988 ctx = rctx // use context from middleware stack in children 3989 return obj.Name, nil 3990 }) 3991 if err != nil { 3992 ec.Error(ctx, err) 3993 return graphql.Null 3994 } 3995 if resTmp == nil { 3996 if !graphql.HasFieldError(ctx, fc) { 3997 ec.Errorf(ctx, "must not be null") 3998 } 3999 return graphql.Null 4000 } 4001 res := resTmp.(string) 4002 fc.Result = res 4003 return ec.marshalNString2string(ctx, field.Selections, res) 4004 } 4005 4006 func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4007 fc = &graphql.FieldContext{ 4008 Object: "__Directive", 4009 Field: field, 4010 IsMethod: false, 4011 IsResolver: false, 4012 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4013 return nil, errors.New("field of type String does not have child fields") 4014 }, 4015 } 4016 return fc, nil 4017 } 4018 4019 func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 4020 fc, err := ec.fieldContext___Directive_description(ctx, field) 4021 if err != nil { 4022 return graphql.Null 4023 } 4024 ctx = graphql.WithFieldContext(ctx, fc) 4025 defer func() { 4026 if r := recover(); r != nil { 4027 ec.Error(ctx, ec.Recover(ctx, r)) 4028 ret = graphql.Null 4029 } 4030 }() 4031 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4032 ctx = rctx // use context from middleware stack in children 4033 return obj.Description(), nil 4034 }) 4035 if err != nil { 4036 ec.Error(ctx, err) 4037 return graphql.Null 4038 } 4039 if resTmp == nil { 4040 return graphql.Null 4041 } 4042 res := resTmp.(*string) 4043 fc.Result = res 4044 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 4045 } 4046 4047 func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4048 fc = &graphql.FieldContext{ 4049 Object: "__Directive", 4050 Field: field, 4051 IsMethod: true, 4052 IsResolver: false, 4053 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4054 return nil, errors.New("field of type String does not have child fields") 4055 }, 4056 } 4057 return fc, nil 4058 } 4059 4060 func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 4061 fc, err := ec.fieldContext___Directive_locations(ctx, field) 4062 if err != nil { 4063 return graphql.Null 4064 } 4065 ctx = graphql.WithFieldContext(ctx, fc) 4066 defer func() { 4067 if r := recover(); r != nil { 4068 ec.Error(ctx, ec.Recover(ctx, r)) 4069 ret = graphql.Null 4070 } 4071 }() 4072 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4073 ctx = rctx // use context from middleware stack in children 4074 return obj.Locations, nil 4075 }) 4076 if err != nil { 4077 ec.Error(ctx, err) 4078 return graphql.Null 4079 } 4080 if resTmp == nil { 4081 if !graphql.HasFieldError(ctx, fc) { 4082 ec.Errorf(ctx, "must not be null") 4083 } 4084 return graphql.Null 4085 } 4086 res := resTmp.([]string) 4087 fc.Result = res 4088 return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) 4089 } 4090 4091 func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4092 fc = &graphql.FieldContext{ 4093 Object: "__Directive", 4094 Field: field, 4095 IsMethod: false, 4096 IsResolver: false, 4097 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4098 return nil, errors.New("field of type __DirectiveLocation does not have child fields") 4099 }, 4100 } 4101 return fc, nil 4102 } 4103 4104 func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 4105 fc, err := ec.fieldContext___Directive_args(ctx, field) 4106 if err != nil { 4107 return graphql.Null 4108 } 4109 ctx = graphql.WithFieldContext(ctx, fc) 4110 defer func() { 4111 if r := recover(); r != nil { 4112 ec.Error(ctx, ec.Recover(ctx, r)) 4113 ret = graphql.Null 4114 } 4115 }() 4116 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4117 ctx = rctx // use context from middleware stack in children 4118 return obj.Args, nil 4119 }) 4120 if err != nil { 4121 ec.Error(ctx, err) 4122 return graphql.Null 4123 } 4124 if resTmp == nil { 4125 if !graphql.HasFieldError(ctx, fc) { 4126 ec.Errorf(ctx, "must not be null") 4127 } 4128 return graphql.Null 4129 } 4130 res := resTmp.([]introspection.InputValue) 4131 fc.Result = res 4132 return ec.marshalN__InputValue2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 4133 } 4134 4135 func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4136 fc = &graphql.FieldContext{ 4137 Object: "__Directive", 4138 Field: field, 4139 IsMethod: false, 4140 IsResolver: false, 4141 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4142 switch field.Name { 4143 case "name": 4144 return ec.fieldContext___InputValue_name(ctx, field) 4145 case "description": 4146 return ec.fieldContext___InputValue_description(ctx, field) 4147 case "type": 4148 return ec.fieldContext___InputValue_type(ctx, field) 4149 case "defaultValue": 4150 return ec.fieldContext___InputValue_defaultValue(ctx, field) 4151 } 4152 return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) 4153 }, 4154 } 4155 return fc, nil 4156 } 4157 4158 func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 4159 fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field) 4160 if err != nil { 4161 return graphql.Null 4162 } 4163 ctx = graphql.WithFieldContext(ctx, fc) 4164 defer func() { 4165 if r := recover(); r != nil { 4166 ec.Error(ctx, ec.Recover(ctx, r)) 4167 ret = graphql.Null 4168 } 4169 }() 4170 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4171 ctx = rctx // use context from middleware stack in children 4172 return obj.IsRepeatable, nil 4173 }) 4174 if err != nil { 4175 ec.Error(ctx, err) 4176 return graphql.Null 4177 } 4178 if resTmp == nil { 4179 if !graphql.HasFieldError(ctx, fc) { 4180 ec.Errorf(ctx, "must not be null") 4181 } 4182 return graphql.Null 4183 } 4184 res := resTmp.(bool) 4185 fc.Result = res 4186 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 4187 } 4188 4189 func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4190 fc = &graphql.FieldContext{ 4191 Object: "__Directive", 4192 Field: field, 4193 IsMethod: false, 4194 IsResolver: false, 4195 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4196 return nil, errors.New("field of type Boolean does not have child fields") 4197 }, 4198 } 4199 return fc, nil 4200 } 4201 4202 func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 4203 fc, err := ec.fieldContext___EnumValue_name(ctx, field) 4204 if err != nil { 4205 return graphql.Null 4206 } 4207 ctx = graphql.WithFieldContext(ctx, fc) 4208 defer func() { 4209 if r := recover(); r != nil { 4210 ec.Error(ctx, ec.Recover(ctx, r)) 4211 ret = graphql.Null 4212 } 4213 }() 4214 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4215 ctx = rctx // use context from middleware stack in children 4216 return obj.Name, nil 4217 }) 4218 if err != nil { 4219 ec.Error(ctx, err) 4220 return graphql.Null 4221 } 4222 if resTmp == nil { 4223 if !graphql.HasFieldError(ctx, fc) { 4224 ec.Errorf(ctx, "must not be null") 4225 } 4226 return graphql.Null 4227 } 4228 res := resTmp.(string) 4229 fc.Result = res 4230 return ec.marshalNString2string(ctx, field.Selections, res) 4231 } 4232 4233 func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4234 fc = &graphql.FieldContext{ 4235 Object: "__EnumValue", 4236 Field: field, 4237 IsMethod: false, 4238 IsResolver: false, 4239 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4240 return nil, errors.New("field of type String does not have child fields") 4241 }, 4242 } 4243 return fc, nil 4244 } 4245 4246 func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 4247 fc, err := ec.fieldContext___EnumValue_description(ctx, field) 4248 if err != nil { 4249 return graphql.Null 4250 } 4251 ctx = graphql.WithFieldContext(ctx, fc) 4252 defer func() { 4253 if r := recover(); r != nil { 4254 ec.Error(ctx, ec.Recover(ctx, r)) 4255 ret = graphql.Null 4256 } 4257 }() 4258 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4259 ctx = rctx // use context from middleware stack in children 4260 return obj.Description(), nil 4261 }) 4262 if err != nil { 4263 ec.Error(ctx, err) 4264 return graphql.Null 4265 } 4266 if resTmp == nil { 4267 return graphql.Null 4268 } 4269 res := resTmp.(*string) 4270 fc.Result = res 4271 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 4272 } 4273 4274 func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4275 fc = &graphql.FieldContext{ 4276 Object: "__EnumValue", 4277 Field: field, 4278 IsMethod: true, 4279 IsResolver: false, 4280 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4281 return nil, errors.New("field of type String does not have child fields") 4282 }, 4283 } 4284 return fc, nil 4285 } 4286 4287 func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 4288 fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field) 4289 if err != nil { 4290 return graphql.Null 4291 } 4292 ctx = graphql.WithFieldContext(ctx, fc) 4293 defer func() { 4294 if r := recover(); r != nil { 4295 ec.Error(ctx, ec.Recover(ctx, r)) 4296 ret = graphql.Null 4297 } 4298 }() 4299 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4300 ctx = rctx // use context from middleware stack in children 4301 return obj.IsDeprecated(), nil 4302 }) 4303 if err != nil { 4304 ec.Error(ctx, err) 4305 return graphql.Null 4306 } 4307 if resTmp == nil { 4308 if !graphql.HasFieldError(ctx, fc) { 4309 ec.Errorf(ctx, "must not be null") 4310 } 4311 return graphql.Null 4312 } 4313 res := resTmp.(bool) 4314 fc.Result = res 4315 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 4316 } 4317 4318 func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4319 fc = &graphql.FieldContext{ 4320 Object: "__EnumValue", 4321 Field: field, 4322 IsMethod: true, 4323 IsResolver: false, 4324 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4325 return nil, errors.New("field of type Boolean does not have child fields") 4326 }, 4327 } 4328 return fc, nil 4329 } 4330 4331 func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 4332 fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field) 4333 if err != nil { 4334 return graphql.Null 4335 } 4336 ctx = graphql.WithFieldContext(ctx, fc) 4337 defer func() { 4338 if r := recover(); r != nil { 4339 ec.Error(ctx, ec.Recover(ctx, r)) 4340 ret = graphql.Null 4341 } 4342 }() 4343 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4344 ctx = rctx // use context from middleware stack in children 4345 return obj.DeprecationReason(), nil 4346 }) 4347 if err != nil { 4348 ec.Error(ctx, err) 4349 return graphql.Null 4350 } 4351 if resTmp == nil { 4352 return graphql.Null 4353 } 4354 res := resTmp.(*string) 4355 fc.Result = res 4356 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 4357 } 4358 4359 func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4360 fc = &graphql.FieldContext{ 4361 Object: "__EnumValue", 4362 Field: field, 4363 IsMethod: true, 4364 IsResolver: false, 4365 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4366 return nil, errors.New("field of type String does not have child fields") 4367 }, 4368 } 4369 return fc, nil 4370 } 4371 4372 func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 4373 fc, err := ec.fieldContext___Field_name(ctx, field) 4374 if err != nil { 4375 return graphql.Null 4376 } 4377 ctx = graphql.WithFieldContext(ctx, fc) 4378 defer func() { 4379 if r := recover(); r != nil { 4380 ec.Error(ctx, ec.Recover(ctx, r)) 4381 ret = graphql.Null 4382 } 4383 }() 4384 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4385 ctx = rctx // use context from middleware stack in children 4386 return obj.Name, nil 4387 }) 4388 if err != nil { 4389 ec.Error(ctx, err) 4390 return graphql.Null 4391 } 4392 if resTmp == nil { 4393 if !graphql.HasFieldError(ctx, fc) { 4394 ec.Errorf(ctx, "must not be null") 4395 } 4396 return graphql.Null 4397 } 4398 res := resTmp.(string) 4399 fc.Result = res 4400 return ec.marshalNString2string(ctx, field.Selections, res) 4401 } 4402 4403 func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4404 fc = &graphql.FieldContext{ 4405 Object: "__Field", 4406 Field: field, 4407 IsMethod: false, 4408 IsResolver: false, 4409 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4410 return nil, errors.New("field of type String does not have child fields") 4411 }, 4412 } 4413 return fc, nil 4414 } 4415 4416 func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 4417 fc, err := ec.fieldContext___Field_description(ctx, field) 4418 if err != nil { 4419 return graphql.Null 4420 } 4421 ctx = graphql.WithFieldContext(ctx, fc) 4422 defer func() { 4423 if r := recover(); r != nil { 4424 ec.Error(ctx, ec.Recover(ctx, r)) 4425 ret = graphql.Null 4426 } 4427 }() 4428 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4429 ctx = rctx // use context from middleware stack in children 4430 return obj.Description(), nil 4431 }) 4432 if err != nil { 4433 ec.Error(ctx, err) 4434 return graphql.Null 4435 } 4436 if resTmp == nil { 4437 return graphql.Null 4438 } 4439 res := resTmp.(*string) 4440 fc.Result = res 4441 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 4442 } 4443 4444 func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4445 fc = &graphql.FieldContext{ 4446 Object: "__Field", 4447 Field: field, 4448 IsMethod: true, 4449 IsResolver: false, 4450 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4451 return nil, errors.New("field of type String does not have child fields") 4452 }, 4453 } 4454 return fc, nil 4455 } 4456 4457 func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 4458 fc, err := ec.fieldContext___Field_args(ctx, field) 4459 if err != nil { 4460 return graphql.Null 4461 } 4462 ctx = graphql.WithFieldContext(ctx, fc) 4463 defer func() { 4464 if r := recover(); r != nil { 4465 ec.Error(ctx, ec.Recover(ctx, r)) 4466 ret = graphql.Null 4467 } 4468 }() 4469 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4470 ctx = rctx // use context from middleware stack in children 4471 return obj.Args, nil 4472 }) 4473 if err != nil { 4474 ec.Error(ctx, err) 4475 return graphql.Null 4476 } 4477 if resTmp == nil { 4478 if !graphql.HasFieldError(ctx, fc) { 4479 ec.Errorf(ctx, "must not be null") 4480 } 4481 return graphql.Null 4482 } 4483 res := resTmp.([]introspection.InputValue) 4484 fc.Result = res 4485 return ec.marshalN__InputValue2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 4486 } 4487 4488 func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4489 fc = &graphql.FieldContext{ 4490 Object: "__Field", 4491 Field: field, 4492 IsMethod: false, 4493 IsResolver: false, 4494 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4495 switch field.Name { 4496 case "name": 4497 return ec.fieldContext___InputValue_name(ctx, field) 4498 case "description": 4499 return ec.fieldContext___InputValue_description(ctx, field) 4500 case "type": 4501 return ec.fieldContext___InputValue_type(ctx, field) 4502 case "defaultValue": 4503 return ec.fieldContext___InputValue_defaultValue(ctx, field) 4504 } 4505 return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) 4506 }, 4507 } 4508 return fc, nil 4509 } 4510 4511 func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 4512 fc, err := ec.fieldContext___Field_type(ctx, field) 4513 if err != nil { 4514 return graphql.Null 4515 } 4516 ctx = graphql.WithFieldContext(ctx, fc) 4517 defer func() { 4518 if r := recover(); r != nil { 4519 ec.Error(ctx, ec.Recover(ctx, r)) 4520 ret = graphql.Null 4521 } 4522 }() 4523 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4524 ctx = rctx // use context from middleware stack in children 4525 return obj.Type, nil 4526 }) 4527 if err != nil { 4528 ec.Error(ctx, err) 4529 return graphql.Null 4530 } 4531 if resTmp == nil { 4532 if !graphql.HasFieldError(ctx, fc) { 4533 ec.Errorf(ctx, "must not be null") 4534 } 4535 return graphql.Null 4536 } 4537 res := resTmp.(*introspection.Type) 4538 fc.Result = res 4539 return ec.marshalN__Type2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 4540 } 4541 4542 func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4543 fc = &graphql.FieldContext{ 4544 Object: "__Field", 4545 Field: field, 4546 IsMethod: false, 4547 IsResolver: false, 4548 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4549 switch field.Name { 4550 case "kind": 4551 return ec.fieldContext___Type_kind(ctx, field) 4552 case "name": 4553 return ec.fieldContext___Type_name(ctx, field) 4554 case "description": 4555 return ec.fieldContext___Type_description(ctx, field) 4556 case "fields": 4557 return ec.fieldContext___Type_fields(ctx, field) 4558 case "interfaces": 4559 return ec.fieldContext___Type_interfaces(ctx, field) 4560 case "possibleTypes": 4561 return ec.fieldContext___Type_possibleTypes(ctx, field) 4562 case "enumValues": 4563 return ec.fieldContext___Type_enumValues(ctx, field) 4564 case "inputFields": 4565 return ec.fieldContext___Type_inputFields(ctx, field) 4566 case "ofType": 4567 return ec.fieldContext___Type_ofType(ctx, field) 4568 case "specifiedByURL": 4569 return ec.fieldContext___Type_specifiedByURL(ctx, field) 4570 } 4571 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 4572 }, 4573 } 4574 return fc, nil 4575 } 4576 4577 func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 4578 fc, err := ec.fieldContext___Field_isDeprecated(ctx, field) 4579 if err != nil { 4580 return graphql.Null 4581 } 4582 ctx = graphql.WithFieldContext(ctx, fc) 4583 defer func() { 4584 if r := recover(); r != nil { 4585 ec.Error(ctx, ec.Recover(ctx, r)) 4586 ret = graphql.Null 4587 } 4588 }() 4589 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4590 ctx = rctx // use context from middleware stack in children 4591 return obj.IsDeprecated(), nil 4592 }) 4593 if err != nil { 4594 ec.Error(ctx, err) 4595 return graphql.Null 4596 } 4597 if resTmp == nil { 4598 if !graphql.HasFieldError(ctx, fc) { 4599 ec.Errorf(ctx, "must not be null") 4600 } 4601 return graphql.Null 4602 } 4603 res := resTmp.(bool) 4604 fc.Result = res 4605 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 4606 } 4607 4608 func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4609 fc = &graphql.FieldContext{ 4610 Object: "__Field", 4611 Field: field, 4612 IsMethod: true, 4613 IsResolver: false, 4614 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4615 return nil, errors.New("field of type Boolean does not have child fields") 4616 }, 4617 } 4618 return fc, nil 4619 } 4620 4621 func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 4622 fc, err := ec.fieldContext___Field_deprecationReason(ctx, field) 4623 if err != nil { 4624 return graphql.Null 4625 } 4626 ctx = graphql.WithFieldContext(ctx, fc) 4627 defer func() { 4628 if r := recover(); r != nil { 4629 ec.Error(ctx, ec.Recover(ctx, r)) 4630 ret = graphql.Null 4631 } 4632 }() 4633 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4634 ctx = rctx // use context from middleware stack in children 4635 return obj.DeprecationReason(), nil 4636 }) 4637 if err != nil { 4638 ec.Error(ctx, err) 4639 return graphql.Null 4640 } 4641 if resTmp == nil { 4642 return graphql.Null 4643 } 4644 res := resTmp.(*string) 4645 fc.Result = res 4646 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 4647 } 4648 4649 func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4650 fc = &graphql.FieldContext{ 4651 Object: "__Field", 4652 Field: field, 4653 IsMethod: true, 4654 IsResolver: false, 4655 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4656 return nil, errors.New("field of type String does not have child fields") 4657 }, 4658 } 4659 return fc, nil 4660 } 4661 4662 func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 4663 fc, err := ec.fieldContext___InputValue_name(ctx, field) 4664 if err != nil { 4665 return graphql.Null 4666 } 4667 ctx = graphql.WithFieldContext(ctx, fc) 4668 defer func() { 4669 if r := recover(); r != nil { 4670 ec.Error(ctx, ec.Recover(ctx, r)) 4671 ret = graphql.Null 4672 } 4673 }() 4674 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4675 ctx = rctx // use context from middleware stack in children 4676 return obj.Name, nil 4677 }) 4678 if err != nil { 4679 ec.Error(ctx, err) 4680 return graphql.Null 4681 } 4682 if resTmp == nil { 4683 if !graphql.HasFieldError(ctx, fc) { 4684 ec.Errorf(ctx, "must not be null") 4685 } 4686 return graphql.Null 4687 } 4688 res := resTmp.(string) 4689 fc.Result = res 4690 return ec.marshalNString2string(ctx, field.Selections, res) 4691 } 4692 4693 func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4694 fc = &graphql.FieldContext{ 4695 Object: "__InputValue", 4696 Field: field, 4697 IsMethod: false, 4698 IsResolver: false, 4699 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4700 return nil, errors.New("field of type String does not have child fields") 4701 }, 4702 } 4703 return fc, nil 4704 } 4705 4706 func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 4707 fc, err := ec.fieldContext___InputValue_description(ctx, field) 4708 if err != nil { 4709 return graphql.Null 4710 } 4711 ctx = graphql.WithFieldContext(ctx, fc) 4712 defer func() { 4713 if r := recover(); r != nil { 4714 ec.Error(ctx, ec.Recover(ctx, r)) 4715 ret = graphql.Null 4716 } 4717 }() 4718 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4719 ctx = rctx // use context from middleware stack in children 4720 return obj.Description(), nil 4721 }) 4722 if err != nil { 4723 ec.Error(ctx, err) 4724 return graphql.Null 4725 } 4726 if resTmp == nil { 4727 return graphql.Null 4728 } 4729 res := resTmp.(*string) 4730 fc.Result = res 4731 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 4732 } 4733 4734 func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4735 fc = &graphql.FieldContext{ 4736 Object: "__InputValue", 4737 Field: field, 4738 IsMethod: true, 4739 IsResolver: false, 4740 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4741 return nil, errors.New("field of type String does not have child fields") 4742 }, 4743 } 4744 return fc, nil 4745 } 4746 4747 func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 4748 fc, err := ec.fieldContext___InputValue_type(ctx, field) 4749 if err != nil { 4750 return graphql.Null 4751 } 4752 ctx = graphql.WithFieldContext(ctx, fc) 4753 defer func() { 4754 if r := recover(); r != nil { 4755 ec.Error(ctx, ec.Recover(ctx, r)) 4756 ret = graphql.Null 4757 } 4758 }() 4759 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4760 ctx = rctx // use context from middleware stack in children 4761 return obj.Type, nil 4762 }) 4763 if err != nil { 4764 ec.Error(ctx, err) 4765 return graphql.Null 4766 } 4767 if resTmp == nil { 4768 if !graphql.HasFieldError(ctx, fc) { 4769 ec.Errorf(ctx, "must not be null") 4770 } 4771 return graphql.Null 4772 } 4773 res := resTmp.(*introspection.Type) 4774 fc.Result = res 4775 return ec.marshalN__Type2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 4776 } 4777 4778 func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4779 fc = &graphql.FieldContext{ 4780 Object: "__InputValue", 4781 Field: field, 4782 IsMethod: false, 4783 IsResolver: false, 4784 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4785 switch field.Name { 4786 case "kind": 4787 return ec.fieldContext___Type_kind(ctx, field) 4788 case "name": 4789 return ec.fieldContext___Type_name(ctx, field) 4790 case "description": 4791 return ec.fieldContext___Type_description(ctx, field) 4792 case "fields": 4793 return ec.fieldContext___Type_fields(ctx, field) 4794 case "interfaces": 4795 return ec.fieldContext___Type_interfaces(ctx, field) 4796 case "possibleTypes": 4797 return ec.fieldContext___Type_possibleTypes(ctx, field) 4798 case "enumValues": 4799 return ec.fieldContext___Type_enumValues(ctx, field) 4800 case "inputFields": 4801 return ec.fieldContext___Type_inputFields(ctx, field) 4802 case "ofType": 4803 return ec.fieldContext___Type_ofType(ctx, field) 4804 case "specifiedByURL": 4805 return ec.fieldContext___Type_specifiedByURL(ctx, field) 4806 } 4807 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 4808 }, 4809 } 4810 return fc, nil 4811 } 4812 4813 func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 4814 fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field) 4815 if err != nil { 4816 return graphql.Null 4817 } 4818 ctx = graphql.WithFieldContext(ctx, fc) 4819 defer func() { 4820 if r := recover(); r != nil { 4821 ec.Error(ctx, ec.Recover(ctx, r)) 4822 ret = graphql.Null 4823 } 4824 }() 4825 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4826 ctx = rctx // use context from middleware stack in children 4827 return obj.DefaultValue, nil 4828 }) 4829 if err != nil { 4830 ec.Error(ctx, err) 4831 return graphql.Null 4832 } 4833 if resTmp == nil { 4834 return graphql.Null 4835 } 4836 res := resTmp.(*string) 4837 fc.Result = res 4838 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 4839 } 4840 4841 func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4842 fc = &graphql.FieldContext{ 4843 Object: "__InputValue", 4844 Field: field, 4845 IsMethod: false, 4846 IsResolver: false, 4847 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4848 return nil, errors.New("field of type String does not have child fields") 4849 }, 4850 } 4851 return fc, nil 4852 } 4853 4854 func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 4855 fc, err := ec.fieldContext___Schema_description(ctx, field) 4856 if err != nil { 4857 return graphql.Null 4858 } 4859 ctx = graphql.WithFieldContext(ctx, fc) 4860 defer func() { 4861 if r := recover(); r != nil { 4862 ec.Error(ctx, ec.Recover(ctx, r)) 4863 ret = graphql.Null 4864 } 4865 }() 4866 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4867 ctx = rctx // use context from middleware stack in children 4868 return obj.Description(), nil 4869 }) 4870 if err != nil { 4871 ec.Error(ctx, err) 4872 return graphql.Null 4873 } 4874 if resTmp == nil { 4875 return graphql.Null 4876 } 4877 res := resTmp.(*string) 4878 fc.Result = res 4879 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 4880 } 4881 4882 func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4883 fc = &graphql.FieldContext{ 4884 Object: "__Schema", 4885 Field: field, 4886 IsMethod: true, 4887 IsResolver: false, 4888 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4889 return nil, errors.New("field of type String does not have child fields") 4890 }, 4891 } 4892 return fc, nil 4893 } 4894 4895 func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 4896 fc, err := ec.fieldContext___Schema_types(ctx, field) 4897 if err != nil { 4898 return graphql.Null 4899 } 4900 ctx = graphql.WithFieldContext(ctx, fc) 4901 defer func() { 4902 if r := recover(); r != nil { 4903 ec.Error(ctx, ec.Recover(ctx, r)) 4904 ret = graphql.Null 4905 } 4906 }() 4907 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4908 ctx = rctx // use context from middleware stack in children 4909 return obj.Types(), nil 4910 }) 4911 if err != nil { 4912 ec.Error(ctx, err) 4913 return graphql.Null 4914 } 4915 if resTmp == nil { 4916 if !graphql.HasFieldError(ctx, fc) { 4917 ec.Errorf(ctx, "must not be null") 4918 } 4919 return graphql.Null 4920 } 4921 res := resTmp.([]introspection.Type) 4922 fc.Result = res 4923 return ec.marshalN__Type2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 4924 } 4925 4926 func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4927 fc = &graphql.FieldContext{ 4928 Object: "__Schema", 4929 Field: field, 4930 IsMethod: true, 4931 IsResolver: false, 4932 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4933 switch field.Name { 4934 case "kind": 4935 return ec.fieldContext___Type_kind(ctx, field) 4936 case "name": 4937 return ec.fieldContext___Type_name(ctx, field) 4938 case "description": 4939 return ec.fieldContext___Type_description(ctx, field) 4940 case "fields": 4941 return ec.fieldContext___Type_fields(ctx, field) 4942 case "interfaces": 4943 return ec.fieldContext___Type_interfaces(ctx, field) 4944 case "possibleTypes": 4945 return ec.fieldContext___Type_possibleTypes(ctx, field) 4946 case "enumValues": 4947 return ec.fieldContext___Type_enumValues(ctx, field) 4948 case "inputFields": 4949 return ec.fieldContext___Type_inputFields(ctx, field) 4950 case "ofType": 4951 return ec.fieldContext___Type_ofType(ctx, field) 4952 case "specifiedByURL": 4953 return ec.fieldContext___Type_specifiedByURL(ctx, field) 4954 } 4955 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 4956 }, 4957 } 4958 return fc, nil 4959 } 4960 4961 func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 4962 fc, err := ec.fieldContext___Schema_queryType(ctx, field) 4963 if err != nil { 4964 return graphql.Null 4965 } 4966 ctx = graphql.WithFieldContext(ctx, fc) 4967 defer func() { 4968 if r := recover(); r != nil { 4969 ec.Error(ctx, ec.Recover(ctx, r)) 4970 ret = graphql.Null 4971 } 4972 }() 4973 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 4974 ctx = rctx // use context from middleware stack in children 4975 return obj.QueryType(), nil 4976 }) 4977 if err != nil { 4978 ec.Error(ctx, err) 4979 return graphql.Null 4980 } 4981 if resTmp == nil { 4982 if !graphql.HasFieldError(ctx, fc) { 4983 ec.Errorf(ctx, "must not be null") 4984 } 4985 return graphql.Null 4986 } 4987 res := resTmp.(*introspection.Type) 4988 fc.Result = res 4989 return ec.marshalN__Type2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 4990 } 4991 4992 func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4993 fc = &graphql.FieldContext{ 4994 Object: "__Schema", 4995 Field: field, 4996 IsMethod: true, 4997 IsResolver: false, 4998 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4999 switch field.Name { 5000 case "kind": 5001 return ec.fieldContext___Type_kind(ctx, field) 5002 case "name": 5003 return ec.fieldContext___Type_name(ctx, field) 5004 case "description": 5005 return ec.fieldContext___Type_description(ctx, field) 5006 case "fields": 5007 return ec.fieldContext___Type_fields(ctx, field) 5008 case "interfaces": 5009 return ec.fieldContext___Type_interfaces(ctx, field) 5010 case "possibleTypes": 5011 return ec.fieldContext___Type_possibleTypes(ctx, field) 5012 case "enumValues": 5013 return ec.fieldContext___Type_enumValues(ctx, field) 5014 case "inputFields": 5015 return ec.fieldContext___Type_inputFields(ctx, field) 5016 case "ofType": 5017 return ec.fieldContext___Type_ofType(ctx, field) 5018 case "specifiedByURL": 5019 return ec.fieldContext___Type_specifiedByURL(ctx, field) 5020 } 5021 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 5022 }, 5023 } 5024 return fc, nil 5025 } 5026 5027 func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 5028 fc, err := ec.fieldContext___Schema_mutationType(ctx, field) 5029 if err != nil { 5030 return graphql.Null 5031 } 5032 ctx = graphql.WithFieldContext(ctx, fc) 5033 defer func() { 5034 if r := recover(); r != nil { 5035 ec.Error(ctx, ec.Recover(ctx, r)) 5036 ret = graphql.Null 5037 } 5038 }() 5039 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 5040 ctx = rctx // use context from middleware stack in children 5041 return obj.MutationType(), nil 5042 }) 5043 if err != nil { 5044 ec.Error(ctx, err) 5045 return graphql.Null 5046 } 5047 if resTmp == nil { 5048 return graphql.Null 5049 } 5050 res := resTmp.(*introspection.Type) 5051 fc.Result = res 5052 return ec.marshalO__Type2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 5053 } 5054 5055 func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5056 fc = &graphql.FieldContext{ 5057 Object: "__Schema", 5058 Field: field, 5059 IsMethod: true, 5060 IsResolver: false, 5061 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5062 switch field.Name { 5063 case "kind": 5064 return ec.fieldContext___Type_kind(ctx, field) 5065 case "name": 5066 return ec.fieldContext___Type_name(ctx, field) 5067 case "description": 5068 return ec.fieldContext___Type_description(ctx, field) 5069 case "fields": 5070 return ec.fieldContext___Type_fields(ctx, field) 5071 case "interfaces": 5072 return ec.fieldContext___Type_interfaces(ctx, field) 5073 case "possibleTypes": 5074 return ec.fieldContext___Type_possibleTypes(ctx, field) 5075 case "enumValues": 5076 return ec.fieldContext___Type_enumValues(ctx, field) 5077 case "inputFields": 5078 return ec.fieldContext___Type_inputFields(ctx, field) 5079 case "ofType": 5080 return ec.fieldContext___Type_ofType(ctx, field) 5081 case "specifiedByURL": 5082 return ec.fieldContext___Type_specifiedByURL(ctx, field) 5083 } 5084 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 5085 }, 5086 } 5087 return fc, nil 5088 } 5089 5090 func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 5091 fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field) 5092 if err != nil { 5093 return graphql.Null 5094 } 5095 ctx = graphql.WithFieldContext(ctx, fc) 5096 defer func() { 5097 if r := recover(); r != nil { 5098 ec.Error(ctx, ec.Recover(ctx, r)) 5099 ret = graphql.Null 5100 } 5101 }() 5102 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 5103 ctx = rctx // use context from middleware stack in children 5104 return obj.SubscriptionType(), nil 5105 }) 5106 if err != nil { 5107 ec.Error(ctx, err) 5108 return graphql.Null 5109 } 5110 if resTmp == nil { 5111 return graphql.Null 5112 } 5113 res := resTmp.(*introspection.Type) 5114 fc.Result = res 5115 return ec.marshalO__Type2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 5116 } 5117 5118 func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5119 fc = &graphql.FieldContext{ 5120 Object: "__Schema", 5121 Field: field, 5122 IsMethod: true, 5123 IsResolver: false, 5124 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5125 switch field.Name { 5126 case "kind": 5127 return ec.fieldContext___Type_kind(ctx, field) 5128 case "name": 5129 return ec.fieldContext___Type_name(ctx, field) 5130 case "description": 5131 return ec.fieldContext___Type_description(ctx, field) 5132 case "fields": 5133 return ec.fieldContext___Type_fields(ctx, field) 5134 case "interfaces": 5135 return ec.fieldContext___Type_interfaces(ctx, field) 5136 case "possibleTypes": 5137 return ec.fieldContext___Type_possibleTypes(ctx, field) 5138 case "enumValues": 5139 return ec.fieldContext___Type_enumValues(ctx, field) 5140 case "inputFields": 5141 return ec.fieldContext___Type_inputFields(ctx, field) 5142 case "ofType": 5143 return ec.fieldContext___Type_ofType(ctx, field) 5144 case "specifiedByURL": 5145 return ec.fieldContext___Type_specifiedByURL(ctx, field) 5146 } 5147 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 5148 }, 5149 } 5150 return fc, nil 5151 } 5152 5153 func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 5154 fc, err := ec.fieldContext___Schema_directives(ctx, field) 5155 if err != nil { 5156 return graphql.Null 5157 } 5158 ctx = graphql.WithFieldContext(ctx, fc) 5159 defer func() { 5160 if r := recover(); r != nil { 5161 ec.Error(ctx, ec.Recover(ctx, r)) 5162 ret = graphql.Null 5163 } 5164 }() 5165 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 5166 ctx = rctx // use context from middleware stack in children 5167 return obj.Directives(), nil 5168 }) 5169 if err != nil { 5170 ec.Error(ctx, err) 5171 return graphql.Null 5172 } 5173 if resTmp == nil { 5174 if !graphql.HasFieldError(ctx, fc) { 5175 ec.Errorf(ctx, "must not be null") 5176 } 5177 return graphql.Null 5178 } 5179 res := resTmp.([]introspection.Directive) 5180 fc.Result = res 5181 return ec.marshalN__Directive2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) 5182 } 5183 5184 func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5185 fc = &graphql.FieldContext{ 5186 Object: "__Schema", 5187 Field: field, 5188 IsMethod: true, 5189 IsResolver: false, 5190 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5191 switch field.Name { 5192 case "name": 5193 return ec.fieldContext___Directive_name(ctx, field) 5194 case "description": 5195 return ec.fieldContext___Directive_description(ctx, field) 5196 case "locations": 5197 return ec.fieldContext___Directive_locations(ctx, field) 5198 case "args": 5199 return ec.fieldContext___Directive_args(ctx, field) 5200 case "isRepeatable": 5201 return ec.fieldContext___Directive_isRepeatable(ctx, field) 5202 } 5203 return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name) 5204 }, 5205 } 5206 return fc, nil 5207 } 5208 5209 func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 5210 fc, err := ec.fieldContext___Type_kind(ctx, field) 5211 if err != nil { 5212 return graphql.Null 5213 } 5214 ctx = graphql.WithFieldContext(ctx, fc) 5215 defer func() { 5216 if r := recover(); r != nil { 5217 ec.Error(ctx, ec.Recover(ctx, r)) 5218 ret = graphql.Null 5219 } 5220 }() 5221 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 5222 ctx = rctx // use context from middleware stack in children 5223 return obj.Kind(), nil 5224 }) 5225 if err != nil { 5226 ec.Error(ctx, err) 5227 return graphql.Null 5228 } 5229 if resTmp == nil { 5230 if !graphql.HasFieldError(ctx, fc) { 5231 ec.Errorf(ctx, "must not be null") 5232 } 5233 return graphql.Null 5234 } 5235 res := resTmp.(string) 5236 fc.Result = res 5237 return ec.marshalN__TypeKind2string(ctx, field.Selections, res) 5238 } 5239 5240 func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5241 fc = &graphql.FieldContext{ 5242 Object: "__Type", 5243 Field: field, 5244 IsMethod: true, 5245 IsResolver: false, 5246 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5247 return nil, errors.New("field of type __TypeKind does not have child fields") 5248 }, 5249 } 5250 return fc, nil 5251 } 5252 5253 func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 5254 fc, err := ec.fieldContext___Type_name(ctx, field) 5255 if err != nil { 5256 return graphql.Null 5257 } 5258 ctx = graphql.WithFieldContext(ctx, fc) 5259 defer func() { 5260 if r := recover(); r != nil { 5261 ec.Error(ctx, ec.Recover(ctx, r)) 5262 ret = graphql.Null 5263 } 5264 }() 5265 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 5266 ctx = rctx // use context from middleware stack in children 5267 return obj.Name(), nil 5268 }) 5269 if err != nil { 5270 ec.Error(ctx, err) 5271 return graphql.Null 5272 } 5273 if resTmp == nil { 5274 return graphql.Null 5275 } 5276 res := resTmp.(*string) 5277 fc.Result = res 5278 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 5279 } 5280 5281 func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5282 fc = &graphql.FieldContext{ 5283 Object: "__Type", 5284 Field: field, 5285 IsMethod: true, 5286 IsResolver: false, 5287 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5288 return nil, errors.New("field of type String does not have child fields") 5289 }, 5290 } 5291 return fc, nil 5292 } 5293 5294 func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 5295 fc, err := ec.fieldContext___Type_description(ctx, field) 5296 if err != nil { 5297 return graphql.Null 5298 } 5299 ctx = graphql.WithFieldContext(ctx, fc) 5300 defer func() { 5301 if r := recover(); r != nil { 5302 ec.Error(ctx, ec.Recover(ctx, r)) 5303 ret = graphql.Null 5304 } 5305 }() 5306 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 5307 ctx = rctx // use context from middleware stack in children 5308 return obj.Description(), nil 5309 }) 5310 if err != nil { 5311 ec.Error(ctx, err) 5312 return graphql.Null 5313 } 5314 if resTmp == nil { 5315 return graphql.Null 5316 } 5317 res := resTmp.(*string) 5318 fc.Result = res 5319 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 5320 } 5321 5322 func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5323 fc = &graphql.FieldContext{ 5324 Object: "__Type", 5325 Field: field, 5326 IsMethod: true, 5327 IsResolver: false, 5328 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5329 return nil, errors.New("field of type String does not have child fields") 5330 }, 5331 } 5332 return fc, nil 5333 } 5334 5335 func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 5336 fc, err := ec.fieldContext___Type_fields(ctx, field) 5337 if err != nil { 5338 return graphql.Null 5339 } 5340 ctx = graphql.WithFieldContext(ctx, fc) 5341 defer func() { 5342 if r := recover(); r != nil { 5343 ec.Error(ctx, ec.Recover(ctx, r)) 5344 ret = graphql.Null 5345 } 5346 }() 5347 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 5348 ctx = rctx // use context from middleware stack in children 5349 return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil 5350 }) 5351 if err != nil { 5352 ec.Error(ctx, err) 5353 return graphql.Null 5354 } 5355 if resTmp == nil { 5356 return graphql.Null 5357 } 5358 res := resTmp.([]introspection.Field) 5359 fc.Result = res 5360 return ec.marshalO__Field2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) 5361 } 5362 5363 func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5364 fc = &graphql.FieldContext{ 5365 Object: "__Type", 5366 Field: field, 5367 IsMethod: true, 5368 IsResolver: false, 5369 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5370 switch field.Name { 5371 case "name": 5372 return ec.fieldContext___Field_name(ctx, field) 5373 case "description": 5374 return ec.fieldContext___Field_description(ctx, field) 5375 case "args": 5376 return ec.fieldContext___Field_args(ctx, field) 5377 case "type": 5378 return ec.fieldContext___Field_type(ctx, field) 5379 case "isDeprecated": 5380 return ec.fieldContext___Field_isDeprecated(ctx, field) 5381 case "deprecationReason": 5382 return ec.fieldContext___Field_deprecationReason(ctx, field) 5383 } 5384 return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name) 5385 }, 5386 } 5387 defer func() { 5388 if r := recover(); r != nil { 5389 err = ec.Recover(ctx, r) 5390 ec.Error(ctx, err) 5391 } 5392 }() 5393 ctx = graphql.WithFieldContext(ctx, fc) 5394 if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 5395 ec.Error(ctx, err) 5396 return 5397 } 5398 return fc, nil 5399 } 5400 5401 func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 5402 fc, err := ec.fieldContext___Type_interfaces(ctx, field) 5403 if err != nil { 5404 return graphql.Null 5405 } 5406 ctx = graphql.WithFieldContext(ctx, fc) 5407 defer func() { 5408 if r := recover(); r != nil { 5409 ec.Error(ctx, ec.Recover(ctx, r)) 5410 ret = graphql.Null 5411 } 5412 }() 5413 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 5414 ctx = rctx // use context from middleware stack in children 5415 return obj.Interfaces(), nil 5416 }) 5417 if err != nil { 5418 ec.Error(ctx, err) 5419 return graphql.Null 5420 } 5421 if resTmp == nil { 5422 return graphql.Null 5423 } 5424 res := resTmp.([]introspection.Type) 5425 fc.Result = res 5426 return ec.marshalO__Type2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 5427 } 5428 5429 func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5430 fc = &graphql.FieldContext{ 5431 Object: "__Type", 5432 Field: field, 5433 IsMethod: true, 5434 IsResolver: false, 5435 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5436 switch field.Name { 5437 case "kind": 5438 return ec.fieldContext___Type_kind(ctx, field) 5439 case "name": 5440 return ec.fieldContext___Type_name(ctx, field) 5441 case "description": 5442 return ec.fieldContext___Type_description(ctx, field) 5443 case "fields": 5444 return ec.fieldContext___Type_fields(ctx, field) 5445 case "interfaces": 5446 return ec.fieldContext___Type_interfaces(ctx, field) 5447 case "possibleTypes": 5448 return ec.fieldContext___Type_possibleTypes(ctx, field) 5449 case "enumValues": 5450 return ec.fieldContext___Type_enumValues(ctx, field) 5451 case "inputFields": 5452 return ec.fieldContext___Type_inputFields(ctx, field) 5453 case "ofType": 5454 return ec.fieldContext___Type_ofType(ctx, field) 5455 case "specifiedByURL": 5456 return ec.fieldContext___Type_specifiedByURL(ctx, field) 5457 } 5458 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 5459 }, 5460 } 5461 return fc, nil 5462 } 5463 5464 func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 5465 fc, err := ec.fieldContext___Type_possibleTypes(ctx, field) 5466 if err != nil { 5467 return graphql.Null 5468 } 5469 ctx = graphql.WithFieldContext(ctx, fc) 5470 defer func() { 5471 if r := recover(); r != nil { 5472 ec.Error(ctx, ec.Recover(ctx, r)) 5473 ret = graphql.Null 5474 } 5475 }() 5476 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 5477 ctx = rctx // use context from middleware stack in children 5478 return obj.PossibleTypes(), nil 5479 }) 5480 if err != nil { 5481 ec.Error(ctx, err) 5482 return graphql.Null 5483 } 5484 if resTmp == nil { 5485 return graphql.Null 5486 } 5487 res := resTmp.([]introspection.Type) 5488 fc.Result = res 5489 return ec.marshalO__Type2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 5490 } 5491 5492 func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5493 fc = &graphql.FieldContext{ 5494 Object: "__Type", 5495 Field: field, 5496 IsMethod: true, 5497 IsResolver: false, 5498 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5499 switch field.Name { 5500 case "kind": 5501 return ec.fieldContext___Type_kind(ctx, field) 5502 case "name": 5503 return ec.fieldContext___Type_name(ctx, field) 5504 case "description": 5505 return ec.fieldContext___Type_description(ctx, field) 5506 case "fields": 5507 return ec.fieldContext___Type_fields(ctx, field) 5508 case "interfaces": 5509 return ec.fieldContext___Type_interfaces(ctx, field) 5510 case "possibleTypes": 5511 return ec.fieldContext___Type_possibleTypes(ctx, field) 5512 case "enumValues": 5513 return ec.fieldContext___Type_enumValues(ctx, field) 5514 case "inputFields": 5515 return ec.fieldContext___Type_inputFields(ctx, field) 5516 case "ofType": 5517 return ec.fieldContext___Type_ofType(ctx, field) 5518 case "specifiedByURL": 5519 return ec.fieldContext___Type_specifiedByURL(ctx, field) 5520 } 5521 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 5522 }, 5523 } 5524 return fc, nil 5525 } 5526 5527 func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 5528 fc, err := ec.fieldContext___Type_enumValues(ctx, field) 5529 if err != nil { 5530 return graphql.Null 5531 } 5532 ctx = graphql.WithFieldContext(ctx, fc) 5533 defer func() { 5534 if r := recover(); r != nil { 5535 ec.Error(ctx, ec.Recover(ctx, r)) 5536 ret = graphql.Null 5537 } 5538 }() 5539 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 5540 ctx = rctx // use context from middleware stack in children 5541 return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil 5542 }) 5543 if err != nil { 5544 ec.Error(ctx, err) 5545 return graphql.Null 5546 } 5547 if resTmp == nil { 5548 return graphql.Null 5549 } 5550 res := resTmp.([]introspection.EnumValue) 5551 fc.Result = res 5552 return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) 5553 } 5554 5555 func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5556 fc = &graphql.FieldContext{ 5557 Object: "__Type", 5558 Field: field, 5559 IsMethod: true, 5560 IsResolver: false, 5561 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5562 switch field.Name { 5563 case "name": 5564 return ec.fieldContext___EnumValue_name(ctx, field) 5565 case "description": 5566 return ec.fieldContext___EnumValue_description(ctx, field) 5567 case "isDeprecated": 5568 return ec.fieldContext___EnumValue_isDeprecated(ctx, field) 5569 case "deprecationReason": 5570 return ec.fieldContext___EnumValue_deprecationReason(ctx, field) 5571 } 5572 return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name) 5573 }, 5574 } 5575 defer func() { 5576 if r := recover(); r != nil { 5577 err = ec.Recover(ctx, r) 5578 ec.Error(ctx, err) 5579 } 5580 }() 5581 ctx = graphql.WithFieldContext(ctx, fc) 5582 if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 5583 ec.Error(ctx, err) 5584 return 5585 } 5586 return fc, nil 5587 } 5588 5589 func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 5590 fc, err := ec.fieldContext___Type_inputFields(ctx, field) 5591 if err != nil { 5592 return graphql.Null 5593 } 5594 ctx = graphql.WithFieldContext(ctx, fc) 5595 defer func() { 5596 if r := recover(); r != nil { 5597 ec.Error(ctx, ec.Recover(ctx, r)) 5598 ret = graphql.Null 5599 } 5600 }() 5601 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 5602 ctx = rctx // use context from middleware stack in children 5603 return obj.InputFields(), nil 5604 }) 5605 if err != nil { 5606 ec.Error(ctx, err) 5607 return graphql.Null 5608 } 5609 if resTmp == nil { 5610 return graphql.Null 5611 } 5612 res := resTmp.([]introspection.InputValue) 5613 fc.Result = res 5614 return ec.marshalO__InputValue2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 5615 } 5616 5617 func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5618 fc = &graphql.FieldContext{ 5619 Object: "__Type", 5620 Field: field, 5621 IsMethod: true, 5622 IsResolver: false, 5623 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5624 switch field.Name { 5625 case "name": 5626 return ec.fieldContext___InputValue_name(ctx, field) 5627 case "description": 5628 return ec.fieldContext___InputValue_description(ctx, field) 5629 case "type": 5630 return ec.fieldContext___InputValue_type(ctx, field) 5631 case "defaultValue": 5632 return ec.fieldContext___InputValue_defaultValue(ctx, field) 5633 } 5634 return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) 5635 }, 5636 } 5637 return fc, nil 5638 } 5639 5640 func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 5641 fc, err := ec.fieldContext___Type_ofType(ctx, field) 5642 if err != nil { 5643 return graphql.Null 5644 } 5645 ctx = graphql.WithFieldContext(ctx, fc) 5646 defer func() { 5647 if r := recover(); r != nil { 5648 ec.Error(ctx, ec.Recover(ctx, r)) 5649 ret = graphql.Null 5650 } 5651 }() 5652 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 5653 ctx = rctx // use context from middleware stack in children 5654 return obj.OfType(), nil 5655 }) 5656 if err != nil { 5657 ec.Error(ctx, err) 5658 return graphql.Null 5659 } 5660 if resTmp == nil { 5661 return graphql.Null 5662 } 5663 res := resTmp.(*introspection.Type) 5664 fc.Result = res 5665 return ec.marshalO__Type2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 5666 } 5667 5668 func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5669 fc = &graphql.FieldContext{ 5670 Object: "__Type", 5671 Field: field, 5672 IsMethod: true, 5673 IsResolver: false, 5674 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5675 switch field.Name { 5676 case "kind": 5677 return ec.fieldContext___Type_kind(ctx, field) 5678 case "name": 5679 return ec.fieldContext___Type_name(ctx, field) 5680 case "description": 5681 return ec.fieldContext___Type_description(ctx, field) 5682 case "fields": 5683 return ec.fieldContext___Type_fields(ctx, field) 5684 case "interfaces": 5685 return ec.fieldContext___Type_interfaces(ctx, field) 5686 case "possibleTypes": 5687 return ec.fieldContext___Type_possibleTypes(ctx, field) 5688 case "enumValues": 5689 return ec.fieldContext___Type_enumValues(ctx, field) 5690 case "inputFields": 5691 return ec.fieldContext___Type_inputFields(ctx, field) 5692 case "ofType": 5693 return ec.fieldContext___Type_ofType(ctx, field) 5694 case "specifiedByURL": 5695 return ec.fieldContext___Type_specifiedByURL(ctx, field) 5696 } 5697 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 5698 }, 5699 } 5700 return fc, nil 5701 } 5702 5703 func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 5704 fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field) 5705 if err != nil { 5706 return graphql.Null 5707 } 5708 ctx = graphql.WithFieldContext(ctx, fc) 5709 defer func() { 5710 if r := recover(); r != nil { 5711 ec.Error(ctx, ec.Recover(ctx, r)) 5712 ret = graphql.Null 5713 } 5714 }() 5715 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 5716 ctx = rctx // use context from middleware stack in children 5717 return obj.SpecifiedByURL(), nil 5718 }) 5719 if err != nil { 5720 ec.Error(ctx, err) 5721 return graphql.Null 5722 } 5723 if resTmp == nil { 5724 return graphql.Null 5725 } 5726 res := resTmp.(*string) 5727 fc.Result = res 5728 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 5729 } 5730 5731 func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5732 fc = &graphql.FieldContext{ 5733 Object: "__Type", 5734 Field: field, 5735 IsMethod: true, 5736 IsResolver: false, 5737 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5738 return nil, errors.New("field of type String does not have child fields") 5739 }, 5740 } 5741 return fc, nil 5742 } 5743 5744 // endregion **************************** field.gotpl ***************************** 5745 5746 // region **************************** input.gotpl ***************************** 5747 5748 func (ec *executionContext) unmarshalInputMultiHelloByNamesInput(ctx context.Context, obj interface{}) (MultiHelloByNamesInput, error) { 5749 var it MultiHelloByNamesInput 5750 asMap := map[string]interface{}{} 5751 for k, v := range obj.(map[string]interface{}) { 5752 asMap[k] = v 5753 } 5754 5755 fieldsInOrder := [...]string{"Name"} 5756 for _, k := range fieldsInOrder { 5757 v, ok := asMap[k] 5758 if !ok { 5759 continue 5760 } 5761 switch k { 5762 case "Name": 5763 var err error 5764 5765 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("Name")) 5766 it.Name, err = ec.unmarshalNString2string(ctx, v) 5767 if err != nil { 5768 return it, err 5769 } 5770 } 5771 } 5772 5773 return it, nil 5774 } 5775 5776 func (ec *executionContext) unmarshalInputMultiHelloMultipleRequiresByNamesInput(ctx context.Context, obj interface{}) (MultiHelloMultipleRequiresByNamesInput, error) { 5777 var it MultiHelloMultipleRequiresByNamesInput 5778 asMap := map[string]interface{}{} 5779 for k, v := range obj.(map[string]interface{}) { 5780 asMap[k] = v 5781 } 5782 5783 fieldsInOrder := [...]string{"Name"} 5784 for _, k := range fieldsInOrder { 5785 v, ok := asMap[k] 5786 if !ok { 5787 continue 5788 } 5789 switch k { 5790 case "Name": 5791 var err error 5792 5793 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("Name")) 5794 it.Name, err = ec.unmarshalNString2string(ctx, v) 5795 if err != nil { 5796 return it, err 5797 } 5798 } 5799 } 5800 5801 return it, nil 5802 } 5803 5804 func (ec *executionContext) unmarshalInputMultiHelloRequiresByNamesInput(ctx context.Context, obj interface{}) (MultiHelloRequiresByNamesInput, error) { 5805 var it MultiHelloRequiresByNamesInput 5806 asMap := map[string]interface{}{} 5807 for k, v := range obj.(map[string]interface{}) { 5808 asMap[k] = v 5809 } 5810 5811 fieldsInOrder := [...]string{"Name"} 5812 for _, k := range fieldsInOrder { 5813 v, ok := asMap[k] 5814 if !ok { 5815 continue 5816 } 5817 switch k { 5818 case "Name": 5819 var err error 5820 5821 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("Name")) 5822 it.Name, err = ec.unmarshalNString2string(ctx, v) 5823 if err != nil { 5824 return it, err 5825 } 5826 } 5827 } 5828 5829 return it, nil 5830 } 5831 5832 func (ec *executionContext) unmarshalInputMultiHelloWithErrorByNamesInput(ctx context.Context, obj interface{}) (MultiHelloWithErrorByNamesInput, error) { 5833 var it MultiHelloWithErrorByNamesInput 5834 asMap := map[string]interface{}{} 5835 for k, v := range obj.(map[string]interface{}) { 5836 asMap[k] = v 5837 } 5838 5839 fieldsInOrder := [...]string{"Name"} 5840 for _, k := range fieldsInOrder { 5841 v, ok := asMap[k] 5842 if !ok { 5843 continue 5844 } 5845 switch k { 5846 case "Name": 5847 var err error 5848 5849 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("Name")) 5850 it.Name, err = ec.unmarshalNString2string(ctx, v) 5851 if err != nil { 5852 return it, err 5853 } 5854 } 5855 } 5856 5857 return it, nil 5858 } 5859 5860 func (ec *executionContext) unmarshalInputMultiPlanetRequiresNestedByNamesInput(ctx context.Context, obj interface{}) (MultiPlanetRequiresNestedByNamesInput, error) { 5861 var it MultiPlanetRequiresNestedByNamesInput 5862 asMap := map[string]interface{}{} 5863 for k, v := range obj.(map[string]interface{}) { 5864 asMap[k] = v 5865 } 5866 5867 fieldsInOrder := [...]string{"Name"} 5868 for _, k := range fieldsInOrder { 5869 v, ok := asMap[k] 5870 if !ok { 5871 continue 5872 } 5873 switch k { 5874 case "Name": 5875 var err error 5876 5877 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("Name")) 5878 it.Name, err = ec.unmarshalNString2string(ctx, v) 5879 if err != nil { 5880 return it, err 5881 } 5882 } 5883 } 5884 5885 return it, nil 5886 } 5887 5888 // endregion **************************** input.gotpl ***************************** 5889 5890 // region ************************** interface.gotpl *************************** 5891 5892 func (ec *executionContext) __Entity(ctx context.Context, sel ast.SelectionSet, obj fedruntime.Entity) graphql.Marshaler { 5893 switch obj := (obj).(type) { 5894 case nil: 5895 return graphql.Null 5896 case Hello: 5897 return ec._Hello(ctx, sel, &obj) 5898 case *Hello: 5899 if obj == nil { 5900 return graphql.Null 5901 } 5902 return ec._Hello(ctx, sel, obj) 5903 case HelloMultiSingleKeys: 5904 return ec._HelloMultiSingleKeys(ctx, sel, &obj) 5905 case *HelloMultiSingleKeys: 5906 if obj == nil { 5907 return graphql.Null 5908 } 5909 return ec._HelloMultiSingleKeys(ctx, sel, obj) 5910 case HelloWithErrors: 5911 return ec._HelloWithErrors(ctx, sel, &obj) 5912 case *HelloWithErrors: 5913 if obj == nil { 5914 return graphql.Null 5915 } 5916 return ec._HelloWithErrors(ctx, sel, obj) 5917 case MultiHello: 5918 return ec._MultiHello(ctx, sel, &obj) 5919 case *MultiHello: 5920 if obj == nil { 5921 return graphql.Null 5922 } 5923 return ec._MultiHello(ctx, sel, obj) 5924 case MultiHelloMultipleRequires: 5925 return ec._MultiHelloMultipleRequires(ctx, sel, &obj) 5926 case *MultiHelloMultipleRequires: 5927 if obj == nil { 5928 return graphql.Null 5929 } 5930 return ec._MultiHelloMultipleRequires(ctx, sel, obj) 5931 case MultiHelloRequires: 5932 return ec._MultiHelloRequires(ctx, sel, &obj) 5933 case *MultiHelloRequires: 5934 if obj == nil { 5935 return graphql.Null 5936 } 5937 return ec._MultiHelloRequires(ctx, sel, obj) 5938 case MultiHelloWithError: 5939 return ec._MultiHelloWithError(ctx, sel, &obj) 5940 case *MultiHelloWithError: 5941 if obj == nil { 5942 return graphql.Null 5943 } 5944 return ec._MultiHelloWithError(ctx, sel, obj) 5945 case MultiPlanetRequiresNested: 5946 return ec._MultiPlanetRequiresNested(ctx, sel, &obj) 5947 case *MultiPlanetRequiresNested: 5948 if obj == nil { 5949 return graphql.Null 5950 } 5951 return ec._MultiPlanetRequiresNested(ctx, sel, obj) 5952 case PlanetMultipleRequires: 5953 return ec._PlanetMultipleRequires(ctx, sel, &obj) 5954 case *PlanetMultipleRequires: 5955 if obj == nil { 5956 return graphql.Null 5957 } 5958 return ec._PlanetMultipleRequires(ctx, sel, obj) 5959 case PlanetRequires: 5960 return ec._PlanetRequires(ctx, sel, &obj) 5961 case *PlanetRequires: 5962 if obj == nil { 5963 return graphql.Null 5964 } 5965 return ec._PlanetRequires(ctx, sel, obj) 5966 case PlanetRequiresNested: 5967 return ec._PlanetRequiresNested(ctx, sel, &obj) 5968 case *PlanetRequiresNested: 5969 if obj == nil { 5970 return graphql.Null 5971 } 5972 return ec._PlanetRequiresNested(ctx, sel, obj) 5973 case World: 5974 return ec._World(ctx, sel, &obj) 5975 case *World: 5976 if obj == nil { 5977 return graphql.Null 5978 } 5979 return ec._World(ctx, sel, obj) 5980 case WorldName: 5981 return ec._WorldName(ctx, sel, &obj) 5982 case *WorldName: 5983 if obj == nil { 5984 return graphql.Null 5985 } 5986 return ec._WorldName(ctx, sel, obj) 5987 case WorldWithMultipleKeys: 5988 return ec._WorldWithMultipleKeys(ctx, sel, &obj) 5989 case *WorldWithMultipleKeys: 5990 if obj == nil { 5991 return graphql.Null 5992 } 5993 return ec._WorldWithMultipleKeys(ctx, sel, obj) 5994 default: 5995 panic(fmt.Errorf("unexpected type %T", obj)) 5996 } 5997 } 5998 5999 // endregion ************************** interface.gotpl *************************** 6000 6001 // region **************************** object.gotpl **************************** 6002 6003 var entityImplementors = []string{"Entity"} 6004 6005 func (ec *executionContext) _Entity(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { 6006 fields := graphql.CollectFields(ec.OperationContext, sel, entityImplementors) 6007 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ 6008 Object: "Entity", 6009 }) 6010 6011 out := graphql.NewFieldSet(fields) 6012 for i, field := range fields { 6013 innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ 6014 Object: field.Name, 6015 Field: field, 6016 }) 6017 6018 switch field.Name { 6019 case "__typename": 6020 out.Values[i] = graphql.MarshalString("Entity") 6021 case "findHelloByName": 6022 field := field 6023 6024 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 6025 defer func() { 6026 if r := recover(); r != nil { 6027 ec.Error(ctx, ec.Recover(ctx, r)) 6028 } 6029 }() 6030 res = ec._Entity_findHelloByName(ctx, field) 6031 return res 6032 } 6033 6034 rrm := func(ctx context.Context) graphql.Marshaler { 6035 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 6036 } 6037 6038 out.Concurrently(i, func() graphql.Marshaler { 6039 return rrm(innerCtx) 6040 }) 6041 case "findHelloMultiSingleKeysByKey1AndKey2": 6042 field := field 6043 6044 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 6045 defer func() { 6046 if r := recover(); r != nil { 6047 ec.Error(ctx, ec.Recover(ctx, r)) 6048 } 6049 }() 6050 res = ec._Entity_findHelloMultiSingleKeysByKey1AndKey2(ctx, field) 6051 return res 6052 } 6053 6054 rrm := func(ctx context.Context) graphql.Marshaler { 6055 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 6056 } 6057 6058 out.Concurrently(i, func() graphql.Marshaler { 6059 return rrm(innerCtx) 6060 }) 6061 case "findHelloWithErrorsByName": 6062 field := field 6063 6064 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 6065 defer func() { 6066 if r := recover(); r != nil { 6067 ec.Error(ctx, ec.Recover(ctx, r)) 6068 } 6069 }() 6070 res = ec._Entity_findHelloWithErrorsByName(ctx, field) 6071 return res 6072 } 6073 6074 rrm := func(ctx context.Context) graphql.Marshaler { 6075 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 6076 } 6077 6078 out.Concurrently(i, func() graphql.Marshaler { 6079 return rrm(innerCtx) 6080 }) 6081 case "findManyMultiHelloByNames": 6082 field := field 6083 6084 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 6085 defer func() { 6086 if r := recover(); r != nil { 6087 ec.Error(ctx, ec.Recover(ctx, r)) 6088 } 6089 }() 6090 res = ec._Entity_findManyMultiHelloByNames(ctx, field) 6091 return res 6092 } 6093 6094 rrm := func(ctx context.Context) graphql.Marshaler { 6095 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 6096 } 6097 6098 out.Concurrently(i, func() graphql.Marshaler { 6099 return rrm(innerCtx) 6100 }) 6101 case "findManyMultiHelloMultipleRequiresByNames": 6102 field := field 6103 6104 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 6105 defer func() { 6106 if r := recover(); r != nil { 6107 ec.Error(ctx, ec.Recover(ctx, r)) 6108 } 6109 }() 6110 res = ec._Entity_findManyMultiHelloMultipleRequiresByNames(ctx, field) 6111 return res 6112 } 6113 6114 rrm := func(ctx context.Context) graphql.Marshaler { 6115 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 6116 } 6117 6118 out.Concurrently(i, func() graphql.Marshaler { 6119 return rrm(innerCtx) 6120 }) 6121 case "findManyMultiHelloRequiresByNames": 6122 field := field 6123 6124 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 6125 defer func() { 6126 if r := recover(); r != nil { 6127 ec.Error(ctx, ec.Recover(ctx, r)) 6128 } 6129 }() 6130 res = ec._Entity_findManyMultiHelloRequiresByNames(ctx, field) 6131 return res 6132 } 6133 6134 rrm := func(ctx context.Context) graphql.Marshaler { 6135 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 6136 } 6137 6138 out.Concurrently(i, func() graphql.Marshaler { 6139 return rrm(innerCtx) 6140 }) 6141 case "findManyMultiHelloWithErrorByNames": 6142 field := field 6143 6144 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 6145 defer func() { 6146 if r := recover(); r != nil { 6147 ec.Error(ctx, ec.Recover(ctx, r)) 6148 } 6149 }() 6150 res = ec._Entity_findManyMultiHelloWithErrorByNames(ctx, field) 6151 return res 6152 } 6153 6154 rrm := func(ctx context.Context) graphql.Marshaler { 6155 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 6156 } 6157 6158 out.Concurrently(i, func() graphql.Marshaler { 6159 return rrm(innerCtx) 6160 }) 6161 case "findManyMultiPlanetRequiresNestedByNames": 6162 field := field 6163 6164 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 6165 defer func() { 6166 if r := recover(); r != nil { 6167 ec.Error(ctx, ec.Recover(ctx, r)) 6168 } 6169 }() 6170 res = ec._Entity_findManyMultiPlanetRequiresNestedByNames(ctx, field) 6171 return res 6172 } 6173 6174 rrm := func(ctx context.Context) graphql.Marshaler { 6175 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 6176 } 6177 6178 out.Concurrently(i, func() graphql.Marshaler { 6179 return rrm(innerCtx) 6180 }) 6181 case "findPlanetMultipleRequiresByName": 6182 field := field 6183 6184 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 6185 defer func() { 6186 if r := recover(); r != nil { 6187 ec.Error(ctx, ec.Recover(ctx, r)) 6188 } 6189 }() 6190 res = ec._Entity_findPlanetMultipleRequiresByName(ctx, field) 6191 return res 6192 } 6193 6194 rrm := func(ctx context.Context) graphql.Marshaler { 6195 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 6196 } 6197 6198 out.Concurrently(i, func() graphql.Marshaler { 6199 return rrm(innerCtx) 6200 }) 6201 case "findPlanetRequiresByName": 6202 field := field 6203 6204 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 6205 defer func() { 6206 if r := recover(); r != nil { 6207 ec.Error(ctx, ec.Recover(ctx, r)) 6208 } 6209 }() 6210 res = ec._Entity_findPlanetRequiresByName(ctx, field) 6211 return res 6212 } 6213 6214 rrm := func(ctx context.Context) graphql.Marshaler { 6215 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 6216 } 6217 6218 out.Concurrently(i, func() graphql.Marshaler { 6219 return rrm(innerCtx) 6220 }) 6221 case "findPlanetRequiresNestedByName": 6222 field := field 6223 6224 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 6225 defer func() { 6226 if r := recover(); r != nil { 6227 ec.Error(ctx, ec.Recover(ctx, r)) 6228 } 6229 }() 6230 res = ec._Entity_findPlanetRequiresNestedByName(ctx, field) 6231 return res 6232 } 6233 6234 rrm := func(ctx context.Context) graphql.Marshaler { 6235 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 6236 } 6237 6238 out.Concurrently(i, func() graphql.Marshaler { 6239 return rrm(innerCtx) 6240 }) 6241 case "findWorldByHelloNameAndFoo": 6242 field := field 6243 6244 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 6245 defer func() { 6246 if r := recover(); r != nil { 6247 ec.Error(ctx, ec.Recover(ctx, r)) 6248 } 6249 }() 6250 res = ec._Entity_findWorldByHelloNameAndFoo(ctx, field) 6251 return res 6252 } 6253 6254 rrm := func(ctx context.Context) graphql.Marshaler { 6255 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 6256 } 6257 6258 out.Concurrently(i, func() graphql.Marshaler { 6259 return rrm(innerCtx) 6260 }) 6261 case "findWorldNameByName": 6262 field := field 6263 6264 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 6265 defer func() { 6266 if r := recover(); r != nil { 6267 ec.Error(ctx, ec.Recover(ctx, r)) 6268 } 6269 }() 6270 res = ec._Entity_findWorldNameByName(ctx, field) 6271 return res 6272 } 6273 6274 rrm := func(ctx context.Context) graphql.Marshaler { 6275 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 6276 } 6277 6278 out.Concurrently(i, func() graphql.Marshaler { 6279 return rrm(innerCtx) 6280 }) 6281 case "findWorldWithMultipleKeysByHelloNameAndFoo": 6282 field := field 6283 6284 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 6285 defer func() { 6286 if r := recover(); r != nil { 6287 ec.Error(ctx, ec.Recover(ctx, r)) 6288 } 6289 }() 6290 res = ec._Entity_findWorldWithMultipleKeysByHelloNameAndFoo(ctx, field) 6291 return res 6292 } 6293 6294 rrm := func(ctx context.Context) graphql.Marshaler { 6295 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 6296 } 6297 6298 out.Concurrently(i, func() graphql.Marshaler { 6299 return rrm(innerCtx) 6300 }) 6301 case "findWorldWithMultipleKeysByBar": 6302 field := field 6303 6304 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 6305 defer func() { 6306 if r := recover(); r != nil { 6307 ec.Error(ctx, ec.Recover(ctx, r)) 6308 } 6309 }() 6310 res = ec._Entity_findWorldWithMultipleKeysByBar(ctx, field) 6311 return res 6312 } 6313 6314 rrm := func(ctx context.Context) graphql.Marshaler { 6315 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 6316 } 6317 6318 out.Concurrently(i, func() graphql.Marshaler { 6319 return rrm(innerCtx) 6320 }) 6321 default: 6322 panic("unknown field " + strconv.Quote(field.Name)) 6323 } 6324 } 6325 out.Dispatch() 6326 return out 6327 } 6328 6329 var helloImplementors = []string{"Hello", "_Entity"} 6330 6331 func (ec *executionContext) _Hello(ctx context.Context, sel ast.SelectionSet, obj *Hello) graphql.Marshaler { 6332 fields := graphql.CollectFields(ec.OperationContext, sel, helloImplementors) 6333 out := graphql.NewFieldSet(fields) 6334 var invalids uint32 6335 for i, field := range fields { 6336 switch field.Name { 6337 case "__typename": 6338 out.Values[i] = graphql.MarshalString("Hello") 6339 case "name": 6340 6341 out.Values[i] = ec._Hello_name(ctx, field, obj) 6342 6343 if out.Values[i] == graphql.Null { 6344 invalids++ 6345 } 6346 case "secondary": 6347 6348 out.Values[i] = ec._Hello_secondary(ctx, field, obj) 6349 6350 if out.Values[i] == graphql.Null { 6351 invalids++ 6352 } 6353 default: 6354 panic("unknown field " + strconv.Quote(field.Name)) 6355 } 6356 } 6357 out.Dispatch() 6358 if invalids > 0 { 6359 return graphql.Null 6360 } 6361 return out 6362 } 6363 6364 var helloMultiSingleKeysImplementors = []string{"HelloMultiSingleKeys", "_Entity"} 6365 6366 func (ec *executionContext) _HelloMultiSingleKeys(ctx context.Context, sel ast.SelectionSet, obj *HelloMultiSingleKeys) graphql.Marshaler { 6367 fields := graphql.CollectFields(ec.OperationContext, sel, helloMultiSingleKeysImplementors) 6368 out := graphql.NewFieldSet(fields) 6369 var invalids uint32 6370 for i, field := range fields { 6371 switch field.Name { 6372 case "__typename": 6373 out.Values[i] = graphql.MarshalString("HelloMultiSingleKeys") 6374 case "key1": 6375 6376 out.Values[i] = ec._HelloMultiSingleKeys_key1(ctx, field, obj) 6377 6378 if out.Values[i] == graphql.Null { 6379 invalids++ 6380 } 6381 case "key2": 6382 6383 out.Values[i] = ec._HelloMultiSingleKeys_key2(ctx, field, obj) 6384 6385 if out.Values[i] == graphql.Null { 6386 invalids++ 6387 } 6388 default: 6389 panic("unknown field " + strconv.Quote(field.Name)) 6390 } 6391 } 6392 out.Dispatch() 6393 if invalids > 0 { 6394 return graphql.Null 6395 } 6396 return out 6397 } 6398 6399 var helloWithErrorsImplementors = []string{"HelloWithErrors", "_Entity"} 6400 6401 func (ec *executionContext) _HelloWithErrors(ctx context.Context, sel ast.SelectionSet, obj *HelloWithErrors) graphql.Marshaler { 6402 fields := graphql.CollectFields(ec.OperationContext, sel, helloWithErrorsImplementors) 6403 out := graphql.NewFieldSet(fields) 6404 var invalids uint32 6405 for i, field := range fields { 6406 switch field.Name { 6407 case "__typename": 6408 out.Values[i] = graphql.MarshalString("HelloWithErrors") 6409 case "name": 6410 6411 out.Values[i] = ec._HelloWithErrors_name(ctx, field, obj) 6412 6413 if out.Values[i] == graphql.Null { 6414 invalids++ 6415 } 6416 default: 6417 panic("unknown field " + strconv.Quote(field.Name)) 6418 } 6419 } 6420 out.Dispatch() 6421 if invalids > 0 { 6422 return graphql.Null 6423 } 6424 return out 6425 } 6426 6427 var multiHelloImplementors = []string{"MultiHello", "_Entity"} 6428 6429 func (ec *executionContext) _MultiHello(ctx context.Context, sel ast.SelectionSet, obj *MultiHello) graphql.Marshaler { 6430 fields := graphql.CollectFields(ec.OperationContext, sel, multiHelloImplementors) 6431 out := graphql.NewFieldSet(fields) 6432 var invalids uint32 6433 for i, field := range fields { 6434 switch field.Name { 6435 case "__typename": 6436 out.Values[i] = graphql.MarshalString("MultiHello") 6437 case "name": 6438 6439 out.Values[i] = ec._MultiHello_name(ctx, field, obj) 6440 6441 if out.Values[i] == graphql.Null { 6442 invalids++ 6443 } 6444 default: 6445 panic("unknown field " + strconv.Quote(field.Name)) 6446 } 6447 } 6448 out.Dispatch() 6449 if invalids > 0 { 6450 return graphql.Null 6451 } 6452 return out 6453 } 6454 6455 var multiHelloMultipleRequiresImplementors = []string{"MultiHelloMultipleRequires", "_Entity"} 6456 6457 func (ec *executionContext) _MultiHelloMultipleRequires(ctx context.Context, sel ast.SelectionSet, obj *MultiHelloMultipleRequires) graphql.Marshaler { 6458 fields := graphql.CollectFields(ec.OperationContext, sel, multiHelloMultipleRequiresImplementors) 6459 out := graphql.NewFieldSet(fields) 6460 var invalids uint32 6461 for i, field := range fields { 6462 switch field.Name { 6463 case "__typename": 6464 out.Values[i] = graphql.MarshalString("MultiHelloMultipleRequires") 6465 case "name": 6466 6467 out.Values[i] = ec._MultiHelloMultipleRequires_name(ctx, field, obj) 6468 6469 if out.Values[i] == graphql.Null { 6470 invalids++ 6471 } 6472 case "key1": 6473 6474 out.Values[i] = ec._MultiHelloMultipleRequires_key1(ctx, field, obj) 6475 6476 if out.Values[i] == graphql.Null { 6477 invalids++ 6478 } 6479 case "key2": 6480 6481 out.Values[i] = ec._MultiHelloMultipleRequires_key2(ctx, field, obj) 6482 6483 if out.Values[i] == graphql.Null { 6484 invalids++ 6485 } 6486 case "key3": 6487 6488 out.Values[i] = ec._MultiHelloMultipleRequires_key3(ctx, field, obj) 6489 6490 if out.Values[i] == graphql.Null { 6491 invalids++ 6492 } 6493 default: 6494 panic("unknown field " + strconv.Quote(field.Name)) 6495 } 6496 } 6497 out.Dispatch() 6498 if invalids > 0 { 6499 return graphql.Null 6500 } 6501 return out 6502 } 6503 6504 var multiHelloRequiresImplementors = []string{"MultiHelloRequires", "_Entity"} 6505 6506 func (ec *executionContext) _MultiHelloRequires(ctx context.Context, sel ast.SelectionSet, obj *MultiHelloRequires) graphql.Marshaler { 6507 fields := graphql.CollectFields(ec.OperationContext, sel, multiHelloRequiresImplementors) 6508 out := graphql.NewFieldSet(fields) 6509 var invalids uint32 6510 for i, field := range fields { 6511 switch field.Name { 6512 case "__typename": 6513 out.Values[i] = graphql.MarshalString("MultiHelloRequires") 6514 case "name": 6515 6516 out.Values[i] = ec._MultiHelloRequires_name(ctx, field, obj) 6517 6518 if out.Values[i] == graphql.Null { 6519 invalids++ 6520 } 6521 case "key1": 6522 6523 out.Values[i] = ec._MultiHelloRequires_key1(ctx, field, obj) 6524 6525 if out.Values[i] == graphql.Null { 6526 invalids++ 6527 } 6528 case "key2": 6529 6530 out.Values[i] = ec._MultiHelloRequires_key2(ctx, field, obj) 6531 6532 if out.Values[i] == graphql.Null { 6533 invalids++ 6534 } 6535 default: 6536 panic("unknown field " + strconv.Quote(field.Name)) 6537 } 6538 } 6539 out.Dispatch() 6540 if invalids > 0 { 6541 return graphql.Null 6542 } 6543 return out 6544 } 6545 6546 var multiHelloWithErrorImplementors = []string{"MultiHelloWithError", "_Entity"} 6547 6548 func (ec *executionContext) _MultiHelloWithError(ctx context.Context, sel ast.SelectionSet, obj *MultiHelloWithError) graphql.Marshaler { 6549 fields := graphql.CollectFields(ec.OperationContext, sel, multiHelloWithErrorImplementors) 6550 out := graphql.NewFieldSet(fields) 6551 var invalids uint32 6552 for i, field := range fields { 6553 switch field.Name { 6554 case "__typename": 6555 out.Values[i] = graphql.MarshalString("MultiHelloWithError") 6556 case "name": 6557 6558 out.Values[i] = ec._MultiHelloWithError_name(ctx, field, obj) 6559 6560 if out.Values[i] == graphql.Null { 6561 invalids++ 6562 } 6563 default: 6564 panic("unknown field " + strconv.Quote(field.Name)) 6565 } 6566 } 6567 out.Dispatch() 6568 if invalids > 0 { 6569 return graphql.Null 6570 } 6571 return out 6572 } 6573 6574 var multiPlanetRequiresNestedImplementors = []string{"MultiPlanetRequiresNested", "_Entity"} 6575 6576 func (ec *executionContext) _MultiPlanetRequiresNested(ctx context.Context, sel ast.SelectionSet, obj *MultiPlanetRequiresNested) graphql.Marshaler { 6577 fields := graphql.CollectFields(ec.OperationContext, sel, multiPlanetRequiresNestedImplementors) 6578 out := graphql.NewFieldSet(fields) 6579 var invalids uint32 6580 for i, field := range fields { 6581 switch field.Name { 6582 case "__typename": 6583 out.Values[i] = graphql.MarshalString("MultiPlanetRequiresNested") 6584 case "name": 6585 6586 out.Values[i] = ec._MultiPlanetRequiresNested_name(ctx, field, obj) 6587 6588 if out.Values[i] == graphql.Null { 6589 invalids++ 6590 } 6591 case "world": 6592 6593 out.Values[i] = ec._MultiPlanetRequiresNested_world(ctx, field, obj) 6594 6595 if out.Values[i] == graphql.Null { 6596 invalids++ 6597 } 6598 case "size": 6599 6600 out.Values[i] = ec._MultiPlanetRequiresNested_size(ctx, field, obj) 6601 6602 if out.Values[i] == graphql.Null { 6603 invalids++ 6604 } 6605 default: 6606 panic("unknown field " + strconv.Quote(field.Name)) 6607 } 6608 } 6609 out.Dispatch() 6610 if invalids > 0 { 6611 return graphql.Null 6612 } 6613 return out 6614 } 6615 6616 var planetMultipleRequiresImplementors = []string{"PlanetMultipleRequires", "_Entity"} 6617 6618 func (ec *executionContext) _PlanetMultipleRequires(ctx context.Context, sel ast.SelectionSet, obj *PlanetMultipleRequires) graphql.Marshaler { 6619 fields := graphql.CollectFields(ec.OperationContext, sel, planetMultipleRequiresImplementors) 6620 out := graphql.NewFieldSet(fields) 6621 var invalids uint32 6622 for i, field := range fields { 6623 switch field.Name { 6624 case "__typename": 6625 out.Values[i] = graphql.MarshalString("PlanetMultipleRequires") 6626 case "name": 6627 6628 out.Values[i] = ec._PlanetMultipleRequires_name(ctx, field, obj) 6629 6630 if out.Values[i] == graphql.Null { 6631 invalids++ 6632 } 6633 case "diameter": 6634 6635 out.Values[i] = ec._PlanetMultipleRequires_diameter(ctx, field, obj) 6636 6637 if out.Values[i] == graphql.Null { 6638 invalids++ 6639 } 6640 case "density": 6641 6642 out.Values[i] = ec._PlanetMultipleRequires_density(ctx, field, obj) 6643 6644 if out.Values[i] == graphql.Null { 6645 invalids++ 6646 } 6647 case "weight": 6648 6649 out.Values[i] = ec._PlanetMultipleRequires_weight(ctx, field, obj) 6650 6651 if out.Values[i] == graphql.Null { 6652 invalids++ 6653 } 6654 default: 6655 panic("unknown field " + strconv.Quote(field.Name)) 6656 } 6657 } 6658 out.Dispatch() 6659 if invalids > 0 { 6660 return graphql.Null 6661 } 6662 return out 6663 } 6664 6665 var planetRequiresImplementors = []string{"PlanetRequires", "_Entity"} 6666 6667 func (ec *executionContext) _PlanetRequires(ctx context.Context, sel ast.SelectionSet, obj *PlanetRequires) graphql.Marshaler { 6668 fields := graphql.CollectFields(ec.OperationContext, sel, planetRequiresImplementors) 6669 out := graphql.NewFieldSet(fields) 6670 var invalids uint32 6671 for i, field := range fields { 6672 switch field.Name { 6673 case "__typename": 6674 out.Values[i] = graphql.MarshalString("PlanetRequires") 6675 case "name": 6676 6677 out.Values[i] = ec._PlanetRequires_name(ctx, field, obj) 6678 6679 if out.Values[i] == graphql.Null { 6680 invalids++ 6681 } 6682 case "size": 6683 6684 out.Values[i] = ec._PlanetRequires_size(ctx, field, obj) 6685 6686 if out.Values[i] == graphql.Null { 6687 invalids++ 6688 } 6689 case "diameter": 6690 6691 out.Values[i] = ec._PlanetRequires_diameter(ctx, field, obj) 6692 6693 if out.Values[i] == graphql.Null { 6694 invalids++ 6695 } 6696 default: 6697 panic("unknown field " + strconv.Quote(field.Name)) 6698 } 6699 } 6700 out.Dispatch() 6701 if invalids > 0 { 6702 return graphql.Null 6703 } 6704 return out 6705 } 6706 6707 var planetRequiresNestedImplementors = []string{"PlanetRequiresNested", "_Entity"} 6708 6709 func (ec *executionContext) _PlanetRequiresNested(ctx context.Context, sel ast.SelectionSet, obj *PlanetRequiresNested) graphql.Marshaler { 6710 fields := graphql.CollectFields(ec.OperationContext, sel, planetRequiresNestedImplementors) 6711 out := graphql.NewFieldSet(fields) 6712 var invalids uint32 6713 for i, field := range fields { 6714 switch field.Name { 6715 case "__typename": 6716 out.Values[i] = graphql.MarshalString("PlanetRequiresNested") 6717 case "name": 6718 6719 out.Values[i] = ec._PlanetRequiresNested_name(ctx, field, obj) 6720 6721 if out.Values[i] == graphql.Null { 6722 invalids++ 6723 } 6724 case "world": 6725 6726 out.Values[i] = ec._PlanetRequiresNested_world(ctx, field, obj) 6727 6728 if out.Values[i] == graphql.Null { 6729 invalids++ 6730 } 6731 case "size": 6732 6733 out.Values[i] = ec._PlanetRequiresNested_size(ctx, field, obj) 6734 6735 if out.Values[i] == graphql.Null { 6736 invalids++ 6737 } 6738 default: 6739 panic("unknown field " + strconv.Quote(field.Name)) 6740 } 6741 } 6742 out.Dispatch() 6743 if invalids > 0 { 6744 return graphql.Null 6745 } 6746 return out 6747 } 6748 6749 var queryImplementors = []string{"Query"} 6750 6751 func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { 6752 fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) 6753 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ 6754 Object: "Query", 6755 }) 6756 6757 out := graphql.NewFieldSet(fields) 6758 for i, field := range fields { 6759 innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ 6760 Object: field.Name, 6761 Field: field, 6762 }) 6763 6764 switch field.Name { 6765 case "__typename": 6766 out.Values[i] = graphql.MarshalString("Query") 6767 case "_entities": 6768 field := field 6769 6770 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 6771 defer func() { 6772 if r := recover(); r != nil { 6773 ec.Error(ctx, ec.Recover(ctx, r)) 6774 } 6775 }() 6776 res = ec._Query__entities(ctx, field) 6777 return res 6778 } 6779 6780 rrm := func(ctx context.Context) graphql.Marshaler { 6781 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 6782 } 6783 6784 out.Concurrently(i, func() graphql.Marshaler { 6785 return rrm(innerCtx) 6786 }) 6787 case "_service": 6788 field := field 6789 6790 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 6791 defer func() { 6792 if r := recover(); r != nil { 6793 ec.Error(ctx, ec.Recover(ctx, r)) 6794 } 6795 }() 6796 res = ec._Query__service(ctx, field) 6797 return res 6798 } 6799 6800 rrm := func(ctx context.Context) graphql.Marshaler { 6801 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 6802 } 6803 6804 out.Concurrently(i, func() graphql.Marshaler { 6805 return rrm(innerCtx) 6806 }) 6807 case "__type": 6808 6809 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 6810 return ec._Query___type(ctx, field) 6811 }) 6812 6813 case "__schema": 6814 6815 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 6816 return ec._Query___schema(ctx, field) 6817 }) 6818 6819 default: 6820 panic("unknown field " + strconv.Quote(field.Name)) 6821 } 6822 } 6823 out.Dispatch() 6824 return out 6825 } 6826 6827 var worldImplementors = []string{"World", "_Entity"} 6828 6829 func (ec *executionContext) _World(ctx context.Context, sel ast.SelectionSet, obj *World) graphql.Marshaler { 6830 fields := graphql.CollectFields(ec.OperationContext, sel, worldImplementors) 6831 out := graphql.NewFieldSet(fields) 6832 var invalids uint32 6833 for i, field := range fields { 6834 switch field.Name { 6835 case "__typename": 6836 out.Values[i] = graphql.MarshalString("World") 6837 case "foo": 6838 6839 out.Values[i] = ec._World_foo(ctx, field, obj) 6840 6841 if out.Values[i] == graphql.Null { 6842 invalids++ 6843 } 6844 case "bar": 6845 6846 out.Values[i] = ec._World_bar(ctx, field, obj) 6847 6848 if out.Values[i] == graphql.Null { 6849 invalids++ 6850 } 6851 case "hello": 6852 6853 out.Values[i] = ec._World_hello(ctx, field, obj) 6854 6855 default: 6856 panic("unknown field " + strconv.Quote(field.Name)) 6857 } 6858 } 6859 out.Dispatch() 6860 if invalids > 0 { 6861 return graphql.Null 6862 } 6863 return out 6864 } 6865 6866 var worldNameImplementors = []string{"WorldName", "_Entity"} 6867 6868 func (ec *executionContext) _WorldName(ctx context.Context, sel ast.SelectionSet, obj *WorldName) graphql.Marshaler { 6869 fields := graphql.CollectFields(ec.OperationContext, sel, worldNameImplementors) 6870 out := graphql.NewFieldSet(fields) 6871 var invalids uint32 6872 for i, field := range fields { 6873 switch field.Name { 6874 case "__typename": 6875 out.Values[i] = graphql.MarshalString("WorldName") 6876 case "name": 6877 6878 out.Values[i] = ec._WorldName_name(ctx, field, obj) 6879 6880 if out.Values[i] == graphql.Null { 6881 invalids++ 6882 } 6883 default: 6884 panic("unknown field " + strconv.Quote(field.Name)) 6885 } 6886 } 6887 out.Dispatch() 6888 if invalids > 0 { 6889 return graphql.Null 6890 } 6891 return out 6892 } 6893 6894 var worldWithMultipleKeysImplementors = []string{"WorldWithMultipleKeys", "_Entity"} 6895 6896 func (ec *executionContext) _WorldWithMultipleKeys(ctx context.Context, sel ast.SelectionSet, obj *WorldWithMultipleKeys) graphql.Marshaler { 6897 fields := graphql.CollectFields(ec.OperationContext, sel, worldWithMultipleKeysImplementors) 6898 out := graphql.NewFieldSet(fields) 6899 var invalids uint32 6900 for i, field := range fields { 6901 switch field.Name { 6902 case "__typename": 6903 out.Values[i] = graphql.MarshalString("WorldWithMultipleKeys") 6904 case "foo": 6905 6906 out.Values[i] = ec._WorldWithMultipleKeys_foo(ctx, field, obj) 6907 6908 if out.Values[i] == graphql.Null { 6909 invalids++ 6910 } 6911 case "bar": 6912 6913 out.Values[i] = ec._WorldWithMultipleKeys_bar(ctx, field, obj) 6914 6915 if out.Values[i] == graphql.Null { 6916 invalids++ 6917 } 6918 case "hello": 6919 6920 out.Values[i] = ec._WorldWithMultipleKeys_hello(ctx, field, obj) 6921 6922 default: 6923 panic("unknown field " + strconv.Quote(field.Name)) 6924 } 6925 } 6926 out.Dispatch() 6927 if invalids > 0 { 6928 return graphql.Null 6929 } 6930 return out 6931 } 6932 6933 var _ServiceImplementors = []string{"_Service"} 6934 6935 func (ec *executionContext) __Service(ctx context.Context, sel ast.SelectionSet, obj *fedruntime.Service) graphql.Marshaler { 6936 fields := graphql.CollectFields(ec.OperationContext, sel, _ServiceImplementors) 6937 out := graphql.NewFieldSet(fields) 6938 var invalids uint32 6939 for i, field := range fields { 6940 switch field.Name { 6941 case "__typename": 6942 out.Values[i] = graphql.MarshalString("_Service") 6943 case "sdl": 6944 6945 out.Values[i] = ec.__Service_sdl(ctx, field, obj) 6946 6947 default: 6948 panic("unknown field " + strconv.Quote(field.Name)) 6949 } 6950 } 6951 out.Dispatch() 6952 if invalids > 0 { 6953 return graphql.Null 6954 } 6955 return out 6956 } 6957 6958 var __DirectiveImplementors = []string{"__Directive"} 6959 6960 func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { 6961 fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) 6962 out := graphql.NewFieldSet(fields) 6963 var invalids uint32 6964 for i, field := range fields { 6965 switch field.Name { 6966 case "__typename": 6967 out.Values[i] = graphql.MarshalString("__Directive") 6968 case "name": 6969 6970 out.Values[i] = ec.___Directive_name(ctx, field, obj) 6971 6972 if out.Values[i] == graphql.Null { 6973 invalids++ 6974 } 6975 case "description": 6976 6977 out.Values[i] = ec.___Directive_description(ctx, field, obj) 6978 6979 case "locations": 6980 6981 out.Values[i] = ec.___Directive_locations(ctx, field, obj) 6982 6983 if out.Values[i] == graphql.Null { 6984 invalids++ 6985 } 6986 case "args": 6987 6988 out.Values[i] = ec.___Directive_args(ctx, field, obj) 6989 6990 if out.Values[i] == graphql.Null { 6991 invalids++ 6992 } 6993 case "isRepeatable": 6994 6995 out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj) 6996 6997 if out.Values[i] == graphql.Null { 6998 invalids++ 6999 } 7000 default: 7001 panic("unknown field " + strconv.Quote(field.Name)) 7002 } 7003 } 7004 out.Dispatch() 7005 if invalids > 0 { 7006 return graphql.Null 7007 } 7008 return out 7009 } 7010 7011 var __EnumValueImplementors = []string{"__EnumValue"} 7012 7013 func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { 7014 fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) 7015 out := graphql.NewFieldSet(fields) 7016 var invalids uint32 7017 for i, field := range fields { 7018 switch field.Name { 7019 case "__typename": 7020 out.Values[i] = graphql.MarshalString("__EnumValue") 7021 case "name": 7022 7023 out.Values[i] = ec.___EnumValue_name(ctx, field, obj) 7024 7025 if out.Values[i] == graphql.Null { 7026 invalids++ 7027 } 7028 case "description": 7029 7030 out.Values[i] = ec.___EnumValue_description(ctx, field, obj) 7031 7032 case "isDeprecated": 7033 7034 out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj) 7035 7036 if out.Values[i] == graphql.Null { 7037 invalids++ 7038 } 7039 case "deprecationReason": 7040 7041 out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj) 7042 7043 default: 7044 panic("unknown field " + strconv.Quote(field.Name)) 7045 } 7046 } 7047 out.Dispatch() 7048 if invalids > 0 { 7049 return graphql.Null 7050 } 7051 return out 7052 } 7053 7054 var __FieldImplementors = []string{"__Field"} 7055 7056 func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { 7057 fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) 7058 out := graphql.NewFieldSet(fields) 7059 var invalids uint32 7060 for i, field := range fields { 7061 switch field.Name { 7062 case "__typename": 7063 out.Values[i] = graphql.MarshalString("__Field") 7064 case "name": 7065 7066 out.Values[i] = ec.___Field_name(ctx, field, obj) 7067 7068 if out.Values[i] == graphql.Null { 7069 invalids++ 7070 } 7071 case "description": 7072 7073 out.Values[i] = ec.___Field_description(ctx, field, obj) 7074 7075 case "args": 7076 7077 out.Values[i] = ec.___Field_args(ctx, field, obj) 7078 7079 if out.Values[i] == graphql.Null { 7080 invalids++ 7081 } 7082 case "type": 7083 7084 out.Values[i] = ec.___Field_type(ctx, field, obj) 7085 7086 if out.Values[i] == graphql.Null { 7087 invalids++ 7088 } 7089 case "isDeprecated": 7090 7091 out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj) 7092 7093 if out.Values[i] == graphql.Null { 7094 invalids++ 7095 } 7096 case "deprecationReason": 7097 7098 out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj) 7099 7100 default: 7101 panic("unknown field " + strconv.Quote(field.Name)) 7102 } 7103 } 7104 out.Dispatch() 7105 if invalids > 0 { 7106 return graphql.Null 7107 } 7108 return out 7109 } 7110 7111 var __InputValueImplementors = []string{"__InputValue"} 7112 7113 func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { 7114 fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) 7115 out := graphql.NewFieldSet(fields) 7116 var invalids uint32 7117 for i, field := range fields { 7118 switch field.Name { 7119 case "__typename": 7120 out.Values[i] = graphql.MarshalString("__InputValue") 7121 case "name": 7122 7123 out.Values[i] = ec.___InputValue_name(ctx, field, obj) 7124 7125 if out.Values[i] == graphql.Null { 7126 invalids++ 7127 } 7128 case "description": 7129 7130 out.Values[i] = ec.___InputValue_description(ctx, field, obj) 7131 7132 case "type": 7133 7134 out.Values[i] = ec.___InputValue_type(ctx, field, obj) 7135 7136 if out.Values[i] == graphql.Null { 7137 invalids++ 7138 } 7139 case "defaultValue": 7140 7141 out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj) 7142 7143 default: 7144 panic("unknown field " + strconv.Quote(field.Name)) 7145 } 7146 } 7147 out.Dispatch() 7148 if invalids > 0 { 7149 return graphql.Null 7150 } 7151 return out 7152 } 7153 7154 var __SchemaImplementors = []string{"__Schema"} 7155 7156 func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { 7157 fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) 7158 out := graphql.NewFieldSet(fields) 7159 var invalids uint32 7160 for i, field := range fields { 7161 switch field.Name { 7162 case "__typename": 7163 out.Values[i] = graphql.MarshalString("__Schema") 7164 case "description": 7165 7166 out.Values[i] = ec.___Schema_description(ctx, field, obj) 7167 7168 case "types": 7169 7170 out.Values[i] = ec.___Schema_types(ctx, field, obj) 7171 7172 if out.Values[i] == graphql.Null { 7173 invalids++ 7174 } 7175 case "queryType": 7176 7177 out.Values[i] = ec.___Schema_queryType(ctx, field, obj) 7178 7179 if out.Values[i] == graphql.Null { 7180 invalids++ 7181 } 7182 case "mutationType": 7183 7184 out.Values[i] = ec.___Schema_mutationType(ctx, field, obj) 7185 7186 case "subscriptionType": 7187 7188 out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj) 7189 7190 case "directives": 7191 7192 out.Values[i] = ec.___Schema_directives(ctx, field, obj) 7193 7194 if out.Values[i] == graphql.Null { 7195 invalids++ 7196 } 7197 default: 7198 panic("unknown field " + strconv.Quote(field.Name)) 7199 } 7200 } 7201 out.Dispatch() 7202 if invalids > 0 { 7203 return graphql.Null 7204 } 7205 return out 7206 } 7207 7208 var __TypeImplementors = []string{"__Type"} 7209 7210 func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { 7211 fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) 7212 out := graphql.NewFieldSet(fields) 7213 var invalids uint32 7214 for i, field := range fields { 7215 switch field.Name { 7216 case "__typename": 7217 out.Values[i] = graphql.MarshalString("__Type") 7218 case "kind": 7219 7220 out.Values[i] = ec.___Type_kind(ctx, field, obj) 7221 7222 if out.Values[i] == graphql.Null { 7223 invalids++ 7224 } 7225 case "name": 7226 7227 out.Values[i] = ec.___Type_name(ctx, field, obj) 7228 7229 case "description": 7230 7231 out.Values[i] = ec.___Type_description(ctx, field, obj) 7232 7233 case "fields": 7234 7235 out.Values[i] = ec.___Type_fields(ctx, field, obj) 7236 7237 case "interfaces": 7238 7239 out.Values[i] = ec.___Type_interfaces(ctx, field, obj) 7240 7241 case "possibleTypes": 7242 7243 out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj) 7244 7245 case "enumValues": 7246 7247 out.Values[i] = ec.___Type_enumValues(ctx, field, obj) 7248 7249 case "inputFields": 7250 7251 out.Values[i] = ec.___Type_inputFields(ctx, field, obj) 7252 7253 case "ofType": 7254 7255 out.Values[i] = ec.___Type_ofType(ctx, field, obj) 7256 7257 case "specifiedByURL": 7258 7259 out.Values[i] = ec.___Type_specifiedByURL(ctx, field, obj) 7260 7261 default: 7262 panic("unknown field " + strconv.Quote(field.Name)) 7263 } 7264 } 7265 out.Dispatch() 7266 if invalids > 0 { 7267 return graphql.Null 7268 } 7269 return out 7270 } 7271 7272 // endregion **************************** object.gotpl **************************** 7273 7274 // region ***************************** type.gotpl ***************************** 7275 7276 func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) { 7277 res, err := graphql.UnmarshalBoolean(v) 7278 return res, graphql.ErrorOnPath(ctx, err) 7279 } 7280 7281 func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { 7282 res := graphql.MarshalBoolean(v) 7283 if res == graphql.Null { 7284 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 7285 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 7286 } 7287 } 7288 return res 7289 } 7290 7291 func (ec *executionContext) marshalNHello2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐHello(ctx context.Context, sel ast.SelectionSet, v Hello) graphql.Marshaler { 7292 return ec._Hello(ctx, sel, &v) 7293 } 7294 7295 func (ec *executionContext) marshalNHello2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐHello(ctx context.Context, sel ast.SelectionSet, v *Hello) graphql.Marshaler { 7296 if v == nil { 7297 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 7298 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 7299 } 7300 return graphql.Null 7301 } 7302 return ec._Hello(ctx, sel, v) 7303 } 7304 7305 func (ec *executionContext) marshalNHelloMultiSingleKeys2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐHelloMultiSingleKeys(ctx context.Context, sel ast.SelectionSet, v HelloMultiSingleKeys) graphql.Marshaler { 7306 return ec._HelloMultiSingleKeys(ctx, sel, &v) 7307 } 7308 7309 func (ec *executionContext) marshalNHelloMultiSingleKeys2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐHelloMultiSingleKeys(ctx context.Context, sel ast.SelectionSet, v *HelloMultiSingleKeys) graphql.Marshaler { 7310 if v == nil { 7311 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 7312 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 7313 } 7314 return graphql.Null 7315 } 7316 return ec._HelloMultiSingleKeys(ctx, sel, v) 7317 } 7318 7319 func (ec *executionContext) marshalNHelloWithErrors2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐHelloWithErrors(ctx context.Context, sel ast.SelectionSet, v HelloWithErrors) graphql.Marshaler { 7320 return ec._HelloWithErrors(ctx, sel, &v) 7321 } 7322 7323 func (ec *executionContext) marshalNHelloWithErrors2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐHelloWithErrors(ctx context.Context, sel ast.SelectionSet, v *HelloWithErrors) graphql.Marshaler { 7324 if v == nil { 7325 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 7326 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 7327 } 7328 return graphql.Null 7329 } 7330 return ec._HelloWithErrors(ctx, sel, v) 7331 } 7332 7333 func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) { 7334 res, err := graphql.UnmarshalInt(v) 7335 return res, graphql.ErrorOnPath(ctx, err) 7336 } 7337 7338 func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { 7339 res := graphql.MarshalInt(v) 7340 if res == graphql.Null { 7341 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 7342 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 7343 } 7344 } 7345 return res 7346 } 7347 7348 func (ec *executionContext) unmarshalNMultiHelloByNamesInput2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloByNamesInputᚄ(ctx context.Context, v interface{}) ([]*MultiHelloByNamesInput, error) { 7349 var vSlice []interface{} 7350 if v != nil { 7351 vSlice = graphql.CoerceList(v) 7352 } 7353 var err error 7354 res := make([]*MultiHelloByNamesInput, len(vSlice)) 7355 for i := range vSlice { 7356 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 7357 res[i], err = ec.unmarshalNMultiHelloByNamesInput2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloByNamesInput(ctx, vSlice[i]) 7358 if err != nil { 7359 return nil, err 7360 } 7361 } 7362 return res, nil 7363 } 7364 7365 func (ec *executionContext) unmarshalNMultiHelloByNamesInput2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloByNamesInput(ctx context.Context, v interface{}) (*MultiHelloByNamesInput, error) { 7366 res, err := ec.unmarshalInputMultiHelloByNamesInput(ctx, v) 7367 return &res, graphql.ErrorOnPath(ctx, err) 7368 } 7369 7370 func (ec *executionContext) unmarshalNMultiHelloMultipleRequiresByNamesInput2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloMultipleRequiresByNamesInputᚄ(ctx context.Context, v interface{}) ([]*MultiHelloMultipleRequiresByNamesInput, error) { 7371 var vSlice []interface{} 7372 if v != nil { 7373 vSlice = graphql.CoerceList(v) 7374 } 7375 var err error 7376 res := make([]*MultiHelloMultipleRequiresByNamesInput, len(vSlice)) 7377 for i := range vSlice { 7378 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 7379 res[i], err = ec.unmarshalNMultiHelloMultipleRequiresByNamesInput2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloMultipleRequiresByNamesInput(ctx, vSlice[i]) 7380 if err != nil { 7381 return nil, err 7382 } 7383 } 7384 return res, nil 7385 } 7386 7387 func (ec *executionContext) unmarshalNMultiHelloMultipleRequiresByNamesInput2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloMultipleRequiresByNamesInput(ctx context.Context, v interface{}) (*MultiHelloMultipleRequiresByNamesInput, error) { 7388 res, err := ec.unmarshalInputMultiHelloMultipleRequiresByNamesInput(ctx, v) 7389 return &res, graphql.ErrorOnPath(ctx, err) 7390 } 7391 7392 func (ec *executionContext) unmarshalNMultiHelloRequiresByNamesInput2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloRequiresByNamesInputᚄ(ctx context.Context, v interface{}) ([]*MultiHelloRequiresByNamesInput, error) { 7393 var vSlice []interface{} 7394 if v != nil { 7395 vSlice = graphql.CoerceList(v) 7396 } 7397 var err error 7398 res := make([]*MultiHelloRequiresByNamesInput, len(vSlice)) 7399 for i := range vSlice { 7400 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 7401 res[i], err = ec.unmarshalNMultiHelloRequiresByNamesInput2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloRequiresByNamesInput(ctx, vSlice[i]) 7402 if err != nil { 7403 return nil, err 7404 } 7405 } 7406 return res, nil 7407 } 7408 7409 func (ec *executionContext) unmarshalNMultiHelloRequiresByNamesInput2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloRequiresByNamesInput(ctx context.Context, v interface{}) (*MultiHelloRequiresByNamesInput, error) { 7410 res, err := ec.unmarshalInputMultiHelloRequiresByNamesInput(ctx, v) 7411 return &res, graphql.ErrorOnPath(ctx, err) 7412 } 7413 7414 func (ec *executionContext) unmarshalNMultiHelloWithErrorByNamesInput2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloWithErrorByNamesInputᚄ(ctx context.Context, v interface{}) ([]*MultiHelloWithErrorByNamesInput, error) { 7415 var vSlice []interface{} 7416 if v != nil { 7417 vSlice = graphql.CoerceList(v) 7418 } 7419 var err error 7420 res := make([]*MultiHelloWithErrorByNamesInput, len(vSlice)) 7421 for i := range vSlice { 7422 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 7423 res[i], err = ec.unmarshalNMultiHelloWithErrorByNamesInput2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloWithErrorByNamesInput(ctx, vSlice[i]) 7424 if err != nil { 7425 return nil, err 7426 } 7427 } 7428 return res, nil 7429 } 7430 7431 func (ec *executionContext) unmarshalNMultiHelloWithErrorByNamesInput2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloWithErrorByNamesInput(ctx context.Context, v interface{}) (*MultiHelloWithErrorByNamesInput, error) { 7432 res, err := ec.unmarshalInputMultiHelloWithErrorByNamesInput(ctx, v) 7433 return &res, graphql.ErrorOnPath(ctx, err) 7434 } 7435 7436 func (ec *executionContext) unmarshalNMultiPlanetRequiresNestedByNamesInput2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiPlanetRequiresNestedByNamesInputᚄ(ctx context.Context, v interface{}) ([]*MultiPlanetRequiresNestedByNamesInput, error) { 7437 var vSlice []interface{} 7438 if v != nil { 7439 vSlice = graphql.CoerceList(v) 7440 } 7441 var err error 7442 res := make([]*MultiPlanetRequiresNestedByNamesInput, len(vSlice)) 7443 for i := range vSlice { 7444 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 7445 res[i], err = ec.unmarshalNMultiPlanetRequiresNestedByNamesInput2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiPlanetRequiresNestedByNamesInput(ctx, vSlice[i]) 7446 if err != nil { 7447 return nil, err 7448 } 7449 } 7450 return res, nil 7451 } 7452 7453 func (ec *executionContext) unmarshalNMultiPlanetRequiresNestedByNamesInput2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiPlanetRequiresNestedByNamesInput(ctx context.Context, v interface{}) (*MultiPlanetRequiresNestedByNamesInput, error) { 7454 res, err := ec.unmarshalInputMultiPlanetRequiresNestedByNamesInput(ctx, v) 7455 return &res, graphql.ErrorOnPath(ctx, err) 7456 } 7457 7458 func (ec *executionContext) marshalNPlanetMultipleRequires2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐPlanetMultipleRequires(ctx context.Context, sel ast.SelectionSet, v PlanetMultipleRequires) graphql.Marshaler { 7459 return ec._PlanetMultipleRequires(ctx, sel, &v) 7460 } 7461 7462 func (ec *executionContext) marshalNPlanetMultipleRequires2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐPlanetMultipleRequires(ctx context.Context, sel ast.SelectionSet, v *PlanetMultipleRequires) graphql.Marshaler { 7463 if v == nil { 7464 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 7465 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 7466 } 7467 return graphql.Null 7468 } 7469 return ec._PlanetMultipleRequires(ctx, sel, v) 7470 } 7471 7472 func (ec *executionContext) marshalNPlanetRequires2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐPlanetRequires(ctx context.Context, sel ast.SelectionSet, v PlanetRequires) graphql.Marshaler { 7473 return ec._PlanetRequires(ctx, sel, &v) 7474 } 7475 7476 func (ec *executionContext) marshalNPlanetRequires2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐPlanetRequires(ctx context.Context, sel ast.SelectionSet, v *PlanetRequires) graphql.Marshaler { 7477 if v == nil { 7478 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 7479 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 7480 } 7481 return graphql.Null 7482 } 7483 return ec._PlanetRequires(ctx, sel, v) 7484 } 7485 7486 func (ec *executionContext) marshalNPlanetRequiresNested2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐPlanetRequiresNested(ctx context.Context, sel ast.SelectionSet, v PlanetRequiresNested) graphql.Marshaler { 7487 return ec._PlanetRequiresNested(ctx, sel, &v) 7488 } 7489 7490 func (ec *executionContext) marshalNPlanetRequiresNested2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐPlanetRequiresNested(ctx context.Context, sel ast.SelectionSet, v *PlanetRequiresNested) graphql.Marshaler { 7491 if v == nil { 7492 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 7493 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 7494 } 7495 return graphql.Null 7496 } 7497 return ec._PlanetRequiresNested(ctx, sel, v) 7498 } 7499 7500 func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) { 7501 res, err := graphql.UnmarshalString(v) 7502 return res, graphql.ErrorOnPath(ctx, err) 7503 } 7504 7505 func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 7506 res := graphql.MarshalString(v) 7507 if res == graphql.Null { 7508 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 7509 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 7510 } 7511 } 7512 return res 7513 } 7514 7515 func (ec *executionContext) marshalNWorld2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐWorld(ctx context.Context, sel ast.SelectionSet, v World) graphql.Marshaler { 7516 return ec._World(ctx, sel, &v) 7517 } 7518 7519 func (ec *executionContext) marshalNWorld2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐWorld(ctx context.Context, sel ast.SelectionSet, v *World) graphql.Marshaler { 7520 if v == nil { 7521 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 7522 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 7523 } 7524 return graphql.Null 7525 } 7526 return ec._World(ctx, sel, v) 7527 } 7528 7529 func (ec *executionContext) marshalNWorldName2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐWorldName(ctx context.Context, sel ast.SelectionSet, v WorldName) graphql.Marshaler { 7530 return ec._WorldName(ctx, sel, &v) 7531 } 7532 7533 func (ec *executionContext) marshalNWorldName2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐWorldName(ctx context.Context, sel ast.SelectionSet, v *WorldName) graphql.Marshaler { 7534 if v == nil { 7535 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 7536 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 7537 } 7538 return graphql.Null 7539 } 7540 return ec._WorldName(ctx, sel, v) 7541 } 7542 7543 func (ec *executionContext) marshalNWorldWithMultipleKeys2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐWorldWithMultipleKeys(ctx context.Context, sel ast.SelectionSet, v WorldWithMultipleKeys) graphql.Marshaler { 7544 return ec._WorldWithMultipleKeys(ctx, sel, &v) 7545 } 7546 7547 func (ec *executionContext) marshalNWorldWithMultipleKeys2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐWorldWithMultipleKeys(ctx context.Context, sel ast.SelectionSet, v *WorldWithMultipleKeys) graphql.Marshaler { 7548 if v == nil { 7549 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 7550 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 7551 } 7552 return graphql.Null 7553 } 7554 return ec._WorldWithMultipleKeys(ctx, sel, v) 7555 } 7556 7557 func (ec *executionContext) unmarshalN_Any2map(ctx context.Context, v interface{}) (map[string]interface{}, error) { 7558 res, err := graphql.UnmarshalMap(v) 7559 return res, graphql.ErrorOnPath(ctx, err) 7560 } 7561 7562 func (ec *executionContext) marshalN_Any2map(ctx context.Context, sel ast.SelectionSet, v map[string]interface{}) graphql.Marshaler { 7563 if v == nil { 7564 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 7565 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 7566 } 7567 return graphql.Null 7568 } 7569 res := graphql.MarshalMap(v) 7570 if res == graphql.Null { 7571 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 7572 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 7573 } 7574 } 7575 return res 7576 } 7577 7578 func (ec *executionContext) unmarshalN_Any2ᚕmapᚄ(ctx context.Context, v interface{}) ([]map[string]interface{}, error) { 7579 var vSlice []interface{} 7580 if v != nil { 7581 vSlice = graphql.CoerceList(v) 7582 } 7583 var err error 7584 res := make([]map[string]interface{}, len(vSlice)) 7585 for i := range vSlice { 7586 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 7587 res[i], err = ec.unmarshalN_Any2map(ctx, vSlice[i]) 7588 if err != nil { 7589 return nil, err 7590 } 7591 } 7592 return res, nil 7593 } 7594 7595 func (ec *executionContext) marshalN_Any2ᚕmapᚄ(ctx context.Context, sel ast.SelectionSet, v []map[string]interface{}) graphql.Marshaler { 7596 ret := make(graphql.Array, len(v)) 7597 for i := range v { 7598 ret[i] = ec.marshalN_Any2map(ctx, sel, v[i]) 7599 } 7600 7601 for _, e := range ret { 7602 if e == graphql.Null { 7603 return graphql.Null 7604 } 7605 } 7606 7607 return ret 7608 } 7609 7610 func (ec *executionContext) marshalN_Entity2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋfedruntimeᚐEntity(ctx context.Context, sel ast.SelectionSet, v []fedruntime.Entity) graphql.Marshaler { 7611 ret := make(graphql.Array, len(v)) 7612 var wg sync.WaitGroup 7613 isLen1 := len(v) == 1 7614 if !isLen1 { 7615 wg.Add(len(v)) 7616 } 7617 for i := range v { 7618 i := i 7619 fc := &graphql.FieldContext{ 7620 Index: &i, 7621 Result: &v[i], 7622 } 7623 ctx := graphql.WithFieldContext(ctx, fc) 7624 f := func(i int) { 7625 defer func() { 7626 if r := recover(); r != nil { 7627 ec.Error(ctx, ec.Recover(ctx, r)) 7628 ret = nil 7629 } 7630 }() 7631 if !isLen1 { 7632 defer wg.Done() 7633 } 7634 ret[i] = ec.marshalO_Entity2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋfedruntimeᚐEntity(ctx, sel, v[i]) 7635 } 7636 if isLen1 { 7637 f(i) 7638 } else { 7639 go f(i) 7640 } 7641 7642 } 7643 wg.Wait() 7644 7645 return ret 7646 } 7647 7648 func (ec *executionContext) unmarshalN_FieldSet2string(ctx context.Context, v interface{}) (string, error) { 7649 res, err := graphql.UnmarshalString(v) 7650 return res, graphql.ErrorOnPath(ctx, err) 7651 } 7652 7653 func (ec *executionContext) marshalN_FieldSet2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 7654 res := graphql.MarshalString(v) 7655 if res == graphql.Null { 7656 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 7657 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 7658 } 7659 } 7660 return res 7661 } 7662 7663 func (ec *executionContext) marshalN_Service2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋfedruntimeᚐService(ctx context.Context, sel ast.SelectionSet, v fedruntime.Service) graphql.Marshaler { 7664 return ec.__Service(ctx, sel, &v) 7665 } 7666 7667 func (ec *executionContext) marshalN__Directive2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler { 7668 return ec.___Directive(ctx, sel, &v) 7669 } 7670 7671 func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler { 7672 ret := make(graphql.Array, len(v)) 7673 var wg sync.WaitGroup 7674 isLen1 := len(v) == 1 7675 if !isLen1 { 7676 wg.Add(len(v)) 7677 } 7678 for i := range v { 7679 i := i 7680 fc := &graphql.FieldContext{ 7681 Index: &i, 7682 Result: &v[i], 7683 } 7684 ctx := graphql.WithFieldContext(ctx, fc) 7685 f := func(i int) { 7686 defer func() { 7687 if r := recover(); r != nil { 7688 ec.Error(ctx, ec.Recover(ctx, r)) 7689 ret = nil 7690 } 7691 }() 7692 if !isLen1 { 7693 defer wg.Done() 7694 } 7695 ret[i] = ec.marshalN__Directive2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i]) 7696 } 7697 if isLen1 { 7698 f(i) 7699 } else { 7700 go f(i) 7701 } 7702 7703 } 7704 wg.Wait() 7705 7706 for _, e := range ret { 7707 if e == graphql.Null { 7708 return graphql.Null 7709 } 7710 } 7711 7712 return ret 7713 } 7714 7715 func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) { 7716 res, err := graphql.UnmarshalString(v) 7717 return res, graphql.ErrorOnPath(ctx, err) 7718 } 7719 7720 func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 7721 res := graphql.MarshalString(v) 7722 if res == graphql.Null { 7723 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 7724 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 7725 } 7726 } 7727 return res 7728 } 7729 7730 func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { 7731 var vSlice []interface{} 7732 if v != nil { 7733 vSlice = graphql.CoerceList(v) 7734 } 7735 var err error 7736 res := make([]string, len(vSlice)) 7737 for i := range vSlice { 7738 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 7739 res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i]) 7740 if err != nil { 7741 return nil, err 7742 } 7743 } 7744 return res, nil 7745 } 7746 7747 func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { 7748 ret := make(graphql.Array, len(v)) 7749 var wg sync.WaitGroup 7750 isLen1 := len(v) == 1 7751 if !isLen1 { 7752 wg.Add(len(v)) 7753 } 7754 for i := range v { 7755 i := i 7756 fc := &graphql.FieldContext{ 7757 Index: &i, 7758 Result: &v[i], 7759 } 7760 ctx := graphql.WithFieldContext(ctx, fc) 7761 f := func(i int) { 7762 defer func() { 7763 if r := recover(); r != nil { 7764 ec.Error(ctx, ec.Recover(ctx, r)) 7765 ret = nil 7766 } 7767 }() 7768 if !isLen1 { 7769 defer wg.Done() 7770 } 7771 ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i]) 7772 } 7773 if isLen1 { 7774 f(i) 7775 } else { 7776 go f(i) 7777 } 7778 7779 } 7780 wg.Wait() 7781 7782 for _, e := range ret { 7783 if e == graphql.Null { 7784 return graphql.Null 7785 } 7786 } 7787 7788 return ret 7789 } 7790 7791 func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler { 7792 return ec.___EnumValue(ctx, sel, &v) 7793 } 7794 7795 func (ec *executionContext) marshalN__Field2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler { 7796 return ec.___Field(ctx, sel, &v) 7797 } 7798 7799 func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler { 7800 return ec.___InputValue(ctx, sel, &v) 7801 } 7802 7803 func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { 7804 ret := make(graphql.Array, len(v)) 7805 var wg sync.WaitGroup 7806 isLen1 := len(v) == 1 7807 if !isLen1 { 7808 wg.Add(len(v)) 7809 } 7810 for i := range v { 7811 i := i 7812 fc := &graphql.FieldContext{ 7813 Index: &i, 7814 Result: &v[i], 7815 } 7816 ctx := graphql.WithFieldContext(ctx, fc) 7817 f := func(i int) { 7818 defer func() { 7819 if r := recover(); r != nil { 7820 ec.Error(ctx, ec.Recover(ctx, r)) 7821 ret = nil 7822 } 7823 }() 7824 if !isLen1 { 7825 defer wg.Done() 7826 } 7827 ret[i] = ec.marshalN__InputValue2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) 7828 } 7829 if isLen1 { 7830 f(i) 7831 } else { 7832 go f(i) 7833 } 7834 7835 } 7836 wg.Wait() 7837 7838 for _, e := range ret { 7839 if e == graphql.Null { 7840 return graphql.Null 7841 } 7842 } 7843 7844 return ret 7845 } 7846 7847 func (ec *executionContext) marshalN__Type2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { 7848 return ec.___Type(ctx, sel, &v) 7849 } 7850 7851 func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { 7852 ret := make(graphql.Array, len(v)) 7853 var wg sync.WaitGroup 7854 isLen1 := len(v) == 1 7855 if !isLen1 { 7856 wg.Add(len(v)) 7857 } 7858 for i := range v { 7859 i := i 7860 fc := &graphql.FieldContext{ 7861 Index: &i, 7862 Result: &v[i], 7863 } 7864 ctx := graphql.WithFieldContext(ctx, fc) 7865 f := func(i int) { 7866 defer func() { 7867 if r := recover(); r != nil { 7868 ec.Error(ctx, ec.Recover(ctx, r)) 7869 ret = nil 7870 } 7871 }() 7872 if !isLen1 { 7873 defer wg.Done() 7874 } 7875 ret[i] = ec.marshalN__Type2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) 7876 } 7877 if isLen1 { 7878 f(i) 7879 } else { 7880 go f(i) 7881 } 7882 7883 } 7884 wg.Wait() 7885 7886 for _, e := range ret { 7887 if e == graphql.Null { 7888 return graphql.Null 7889 } 7890 } 7891 7892 return ret 7893 } 7894 7895 func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { 7896 if v == nil { 7897 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 7898 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 7899 } 7900 return graphql.Null 7901 } 7902 return ec.___Type(ctx, sel, v) 7903 } 7904 7905 func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) { 7906 res, err := graphql.UnmarshalString(v) 7907 return res, graphql.ErrorOnPath(ctx, err) 7908 } 7909 7910 func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 7911 res := graphql.MarshalString(v) 7912 if res == graphql.Null { 7913 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 7914 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 7915 } 7916 } 7917 return res 7918 } 7919 7920 func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) { 7921 res, err := graphql.UnmarshalBoolean(v) 7922 return res, graphql.ErrorOnPath(ctx, err) 7923 } 7924 7925 func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { 7926 res := graphql.MarshalBoolean(v) 7927 return res 7928 } 7929 7930 func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) { 7931 if v == nil { 7932 return nil, nil 7933 } 7934 res, err := graphql.UnmarshalBoolean(v) 7935 return &res, graphql.ErrorOnPath(ctx, err) 7936 } 7937 7938 func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler { 7939 if v == nil { 7940 return graphql.Null 7941 } 7942 res := graphql.MarshalBoolean(*v) 7943 return res 7944 } 7945 7946 func (ec *executionContext) marshalOHello2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐHello(ctx context.Context, sel ast.SelectionSet, v *Hello) graphql.Marshaler { 7947 if v == nil { 7948 return graphql.Null 7949 } 7950 return ec._Hello(ctx, sel, v) 7951 } 7952 7953 func (ec *executionContext) marshalOMultiHello2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHello(ctx context.Context, sel ast.SelectionSet, v []*MultiHello) graphql.Marshaler { 7954 if v == nil { 7955 return graphql.Null 7956 } 7957 ret := make(graphql.Array, len(v)) 7958 var wg sync.WaitGroup 7959 isLen1 := len(v) == 1 7960 if !isLen1 { 7961 wg.Add(len(v)) 7962 } 7963 for i := range v { 7964 i := i 7965 fc := &graphql.FieldContext{ 7966 Index: &i, 7967 Result: &v[i], 7968 } 7969 ctx := graphql.WithFieldContext(ctx, fc) 7970 f := func(i int) { 7971 defer func() { 7972 if r := recover(); r != nil { 7973 ec.Error(ctx, ec.Recover(ctx, r)) 7974 ret = nil 7975 } 7976 }() 7977 if !isLen1 { 7978 defer wg.Done() 7979 } 7980 ret[i] = ec.marshalOMultiHello2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHello(ctx, sel, v[i]) 7981 } 7982 if isLen1 { 7983 f(i) 7984 } else { 7985 go f(i) 7986 } 7987 7988 } 7989 wg.Wait() 7990 7991 return ret 7992 } 7993 7994 func (ec *executionContext) marshalOMultiHello2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHello(ctx context.Context, sel ast.SelectionSet, v *MultiHello) graphql.Marshaler { 7995 if v == nil { 7996 return graphql.Null 7997 } 7998 return ec._MultiHello(ctx, sel, v) 7999 } 8000 8001 func (ec *executionContext) marshalOMultiHelloMultipleRequires2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloMultipleRequires(ctx context.Context, sel ast.SelectionSet, v []*MultiHelloMultipleRequires) graphql.Marshaler { 8002 if v == nil { 8003 return graphql.Null 8004 } 8005 ret := make(graphql.Array, len(v)) 8006 var wg sync.WaitGroup 8007 isLen1 := len(v) == 1 8008 if !isLen1 { 8009 wg.Add(len(v)) 8010 } 8011 for i := range v { 8012 i := i 8013 fc := &graphql.FieldContext{ 8014 Index: &i, 8015 Result: &v[i], 8016 } 8017 ctx := graphql.WithFieldContext(ctx, fc) 8018 f := func(i int) { 8019 defer func() { 8020 if r := recover(); r != nil { 8021 ec.Error(ctx, ec.Recover(ctx, r)) 8022 ret = nil 8023 } 8024 }() 8025 if !isLen1 { 8026 defer wg.Done() 8027 } 8028 ret[i] = ec.marshalOMultiHelloMultipleRequires2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloMultipleRequires(ctx, sel, v[i]) 8029 } 8030 if isLen1 { 8031 f(i) 8032 } else { 8033 go f(i) 8034 } 8035 8036 } 8037 wg.Wait() 8038 8039 return ret 8040 } 8041 8042 func (ec *executionContext) marshalOMultiHelloMultipleRequires2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloMultipleRequires(ctx context.Context, sel ast.SelectionSet, v *MultiHelloMultipleRequires) graphql.Marshaler { 8043 if v == nil { 8044 return graphql.Null 8045 } 8046 return ec._MultiHelloMultipleRequires(ctx, sel, v) 8047 } 8048 8049 func (ec *executionContext) marshalOMultiHelloRequires2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloRequires(ctx context.Context, sel ast.SelectionSet, v []*MultiHelloRequires) graphql.Marshaler { 8050 if v == nil { 8051 return graphql.Null 8052 } 8053 ret := make(graphql.Array, len(v)) 8054 var wg sync.WaitGroup 8055 isLen1 := len(v) == 1 8056 if !isLen1 { 8057 wg.Add(len(v)) 8058 } 8059 for i := range v { 8060 i := i 8061 fc := &graphql.FieldContext{ 8062 Index: &i, 8063 Result: &v[i], 8064 } 8065 ctx := graphql.WithFieldContext(ctx, fc) 8066 f := func(i int) { 8067 defer func() { 8068 if r := recover(); r != nil { 8069 ec.Error(ctx, ec.Recover(ctx, r)) 8070 ret = nil 8071 } 8072 }() 8073 if !isLen1 { 8074 defer wg.Done() 8075 } 8076 ret[i] = ec.marshalOMultiHelloRequires2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloRequires(ctx, sel, v[i]) 8077 } 8078 if isLen1 { 8079 f(i) 8080 } else { 8081 go f(i) 8082 } 8083 8084 } 8085 wg.Wait() 8086 8087 return ret 8088 } 8089 8090 func (ec *executionContext) marshalOMultiHelloRequires2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloRequires(ctx context.Context, sel ast.SelectionSet, v *MultiHelloRequires) graphql.Marshaler { 8091 if v == nil { 8092 return graphql.Null 8093 } 8094 return ec._MultiHelloRequires(ctx, sel, v) 8095 } 8096 8097 func (ec *executionContext) marshalOMultiHelloWithError2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloWithError(ctx context.Context, sel ast.SelectionSet, v []*MultiHelloWithError) graphql.Marshaler { 8098 if v == nil { 8099 return graphql.Null 8100 } 8101 ret := make(graphql.Array, len(v)) 8102 var wg sync.WaitGroup 8103 isLen1 := len(v) == 1 8104 if !isLen1 { 8105 wg.Add(len(v)) 8106 } 8107 for i := range v { 8108 i := i 8109 fc := &graphql.FieldContext{ 8110 Index: &i, 8111 Result: &v[i], 8112 } 8113 ctx := graphql.WithFieldContext(ctx, fc) 8114 f := func(i int) { 8115 defer func() { 8116 if r := recover(); r != nil { 8117 ec.Error(ctx, ec.Recover(ctx, r)) 8118 ret = nil 8119 } 8120 }() 8121 if !isLen1 { 8122 defer wg.Done() 8123 } 8124 ret[i] = ec.marshalOMultiHelloWithError2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloWithError(ctx, sel, v[i]) 8125 } 8126 if isLen1 { 8127 f(i) 8128 } else { 8129 go f(i) 8130 } 8131 8132 } 8133 wg.Wait() 8134 8135 return ret 8136 } 8137 8138 func (ec *executionContext) marshalOMultiHelloWithError2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiHelloWithError(ctx context.Context, sel ast.SelectionSet, v *MultiHelloWithError) graphql.Marshaler { 8139 if v == nil { 8140 return graphql.Null 8141 } 8142 return ec._MultiHelloWithError(ctx, sel, v) 8143 } 8144 8145 func (ec *executionContext) marshalOMultiPlanetRequiresNested2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiPlanetRequiresNested(ctx context.Context, sel ast.SelectionSet, v []*MultiPlanetRequiresNested) graphql.Marshaler { 8146 if v == nil { 8147 return graphql.Null 8148 } 8149 ret := make(graphql.Array, len(v)) 8150 var wg sync.WaitGroup 8151 isLen1 := len(v) == 1 8152 if !isLen1 { 8153 wg.Add(len(v)) 8154 } 8155 for i := range v { 8156 i := i 8157 fc := &graphql.FieldContext{ 8158 Index: &i, 8159 Result: &v[i], 8160 } 8161 ctx := graphql.WithFieldContext(ctx, fc) 8162 f := func(i int) { 8163 defer func() { 8164 if r := recover(); r != nil { 8165 ec.Error(ctx, ec.Recover(ctx, r)) 8166 ret = nil 8167 } 8168 }() 8169 if !isLen1 { 8170 defer wg.Done() 8171 } 8172 ret[i] = ec.marshalOMultiPlanetRequiresNested2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiPlanetRequiresNested(ctx, sel, v[i]) 8173 } 8174 if isLen1 { 8175 f(i) 8176 } else { 8177 go f(i) 8178 } 8179 8180 } 8181 wg.Wait() 8182 8183 return ret 8184 } 8185 8186 func (ec *executionContext) marshalOMultiPlanetRequiresNested2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋtestdataᚋentityresolverᚋgeneratedᚐMultiPlanetRequiresNested(ctx context.Context, sel ast.SelectionSet, v *MultiPlanetRequiresNested) graphql.Marshaler { 8187 if v == nil { 8188 return graphql.Null 8189 } 8190 return ec._MultiPlanetRequiresNested(ctx, sel, v) 8191 } 8192 8193 func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) { 8194 res, err := graphql.UnmarshalString(v) 8195 return res, graphql.ErrorOnPath(ctx, err) 8196 } 8197 8198 func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 8199 res := graphql.MarshalString(v) 8200 return res 8201 } 8202 8203 func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { 8204 if v == nil { 8205 return nil, nil 8206 } 8207 res, err := graphql.UnmarshalString(v) 8208 return &res, graphql.ErrorOnPath(ctx, err) 8209 } 8210 8211 func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { 8212 if v == nil { 8213 return graphql.Null 8214 } 8215 res := graphql.MarshalString(*v) 8216 return res 8217 } 8218 8219 func (ec *executionContext) marshalO_Entity2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋpluginᚋfederationᚋfedruntimeᚐEntity(ctx context.Context, sel ast.SelectionSet, v fedruntime.Entity) graphql.Marshaler { 8220 if v == nil { 8221 return graphql.Null 8222 } 8223 return ec.__Entity(ctx, sel, v) 8224 } 8225 8226 func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler { 8227 if v == nil { 8228 return graphql.Null 8229 } 8230 ret := make(graphql.Array, len(v)) 8231 var wg sync.WaitGroup 8232 isLen1 := len(v) == 1 8233 if !isLen1 { 8234 wg.Add(len(v)) 8235 } 8236 for i := range v { 8237 i := i 8238 fc := &graphql.FieldContext{ 8239 Index: &i, 8240 Result: &v[i], 8241 } 8242 ctx := graphql.WithFieldContext(ctx, fc) 8243 f := func(i int) { 8244 defer func() { 8245 if r := recover(); r != nil { 8246 ec.Error(ctx, ec.Recover(ctx, r)) 8247 ret = nil 8248 } 8249 }() 8250 if !isLen1 { 8251 defer wg.Done() 8252 } 8253 ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i]) 8254 } 8255 if isLen1 { 8256 f(i) 8257 } else { 8258 go f(i) 8259 } 8260 8261 } 8262 wg.Wait() 8263 8264 for _, e := range ret { 8265 if e == graphql.Null { 8266 return graphql.Null 8267 } 8268 } 8269 8270 return ret 8271 } 8272 8273 func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler { 8274 if v == nil { 8275 return graphql.Null 8276 } 8277 ret := make(graphql.Array, len(v)) 8278 var wg sync.WaitGroup 8279 isLen1 := len(v) == 1 8280 if !isLen1 { 8281 wg.Add(len(v)) 8282 } 8283 for i := range v { 8284 i := i 8285 fc := &graphql.FieldContext{ 8286 Index: &i, 8287 Result: &v[i], 8288 } 8289 ctx := graphql.WithFieldContext(ctx, fc) 8290 f := func(i int) { 8291 defer func() { 8292 if r := recover(); r != nil { 8293 ec.Error(ctx, ec.Recover(ctx, r)) 8294 ret = nil 8295 } 8296 }() 8297 if !isLen1 { 8298 defer wg.Done() 8299 } 8300 ret[i] = ec.marshalN__Field2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i]) 8301 } 8302 if isLen1 { 8303 f(i) 8304 } else { 8305 go f(i) 8306 } 8307 8308 } 8309 wg.Wait() 8310 8311 for _, e := range ret { 8312 if e == graphql.Null { 8313 return graphql.Null 8314 } 8315 } 8316 8317 return ret 8318 } 8319 8320 func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { 8321 if v == nil { 8322 return graphql.Null 8323 } 8324 ret := make(graphql.Array, len(v)) 8325 var wg sync.WaitGroup 8326 isLen1 := len(v) == 1 8327 if !isLen1 { 8328 wg.Add(len(v)) 8329 } 8330 for i := range v { 8331 i := i 8332 fc := &graphql.FieldContext{ 8333 Index: &i, 8334 Result: &v[i], 8335 } 8336 ctx := graphql.WithFieldContext(ctx, fc) 8337 f := func(i int) { 8338 defer func() { 8339 if r := recover(); r != nil { 8340 ec.Error(ctx, ec.Recover(ctx, r)) 8341 ret = nil 8342 } 8343 }() 8344 if !isLen1 { 8345 defer wg.Done() 8346 } 8347 ret[i] = ec.marshalN__InputValue2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) 8348 } 8349 if isLen1 { 8350 f(i) 8351 } else { 8352 go f(i) 8353 } 8354 8355 } 8356 wg.Wait() 8357 8358 for _, e := range ret { 8359 if e == graphql.Null { 8360 return graphql.Null 8361 } 8362 } 8363 8364 return ret 8365 } 8366 8367 func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler { 8368 if v == nil { 8369 return graphql.Null 8370 } 8371 return ec.___Schema(ctx, sel, v) 8372 } 8373 8374 func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { 8375 if v == nil { 8376 return graphql.Null 8377 } 8378 ret := make(graphql.Array, len(v)) 8379 var wg sync.WaitGroup 8380 isLen1 := len(v) == 1 8381 if !isLen1 { 8382 wg.Add(len(v)) 8383 } 8384 for i := range v { 8385 i := i 8386 fc := &graphql.FieldContext{ 8387 Index: &i, 8388 Result: &v[i], 8389 } 8390 ctx := graphql.WithFieldContext(ctx, fc) 8391 f := func(i int) { 8392 defer func() { 8393 if r := recover(); r != nil { 8394 ec.Error(ctx, ec.Recover(ctx, r)) 8395 ret = nil 8396 } 8397 }() 8398 if !isLen1 { 8399 defer wg.Done() 8400 } 8401 ret[i] = ec.marshalN__Type2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) 8402 } 8403 if isLen1 { 8404 f(i) 8405 } else { 8406 go f(i) 8407 } 8408 8409 } 8410 wg.Wait() 8411 8412 for _, e := range ret { 8413 if e == graphql.Null { 8414 return graphql.Null 8415 } 8416 } 8417 8418 return ret 8419 } 8420 8421 func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { 8422 if v == nil { 8423 return graphql.Null 8424 } 8425 return ec.___Type(ctx, sel, v) 8426 } 8427 8428 // endregion ***************************** type.gotpl *****************************