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