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