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