github.com/senomas/gqlgen@v0.17.11-0.20220626120754-9aee61b0716a/codegen/testserver/followschema/root_.generated.go (about) 1 // Code generated by github.com/99designs/gqlgen, DO NOT EDIT. 2 3 package followschema 4 5 import ( 6 "bytes" 7 "context" 8 "embed" 9 "errors" 10 "fmt" 11 12 "github.com/99designs/gqlgen/graphql" 13 "github.com/99designs/gqlgen/graphql/introspection" 14 gqlparser "github.com/vektah/gqlparser/v2" 15 "github.com/vektah/gqlparser/v2/ast" 16 ) 17 18 // NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface. 19 func NewExecutableSchema(cfg Config) graphql.ExecutableSchema { 20 return &executableSchema{ 21 resolvers: cfg.Resolvers, 22 directives: cfg.Directives, 23 complexity: cfg.Complexity, 24 } 25 } 26 27 type Config struct { 28 Resolvers ResolverRoot 29 Directives DirectiveRoot 30 Complexity ComplexityRoot 31 } 32 33 type ResolverRoot interface { 34 BackedByInterface() BackedByInterfaceResolver 35 Errors() ErrorsResolver 36 ForcedResolver() ForcedResolverResolver 37 ModelMethods() ModelMethodsResolver 38 Mutation() MutationResolver 39 OverlappingFields() OverlappingFieldsResolver 40 Panics() PanicsResolver 41 Pet() PetResolver 42 Primitive() PrimitiveResolver 43 PrimitiveString() PrimitiveStringResolver 44 Query() QueryResolver 45 Subscription() SubscriptionResolver 46 User() UserResolver 47 WrappedMap() WrappedMapResolver 48 WrappedSlice() WrappedSliceResolver 49 } 50 51 type DirectiveRoot struct { 52 Custom func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 53 Directive1 func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 54 Directive2 func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 55 Directive3 func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 56 Length func(ctx context.Context, obj interface{}, next graphql.Resolver, min int, max *int, message *string) (res interface{}, err error) 57 Logged func(ctx context.Context, obj interface{}, next graphql.Resolver, id string) (res interface{}, err error) 58 MakeNil func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 59 MakeTypedNil func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 60 Order1 func(ctx context.Context, obj interface{}, next graphql.Resolver, location string) (res interface{}, err error) 61 Order2 func(ctx context.Context, obj interface{}, next graphql.Resolver, location string) (res interface{}, err error) 62 Range func(ctx context.Context, obj interface{}, next graphql.Resolver, min *int, max *int) (res interface{}, err error) 63 ToNull func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 64 Unimplemented func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 65 } 66 67 type ComplexityRoot struct { 68 A struct { 69 ID func(childComplexity int) int 70 } 71 72 AIt struct { 73 ID func(childComplexity int) int 74 } 75 76 AbIt struct { 77 ID func(childComplexity int) int 78 } 79 80 Autobind struct { 81 IdInt func(childComplexity int) int 82 IdStr func(childComplexity int) int 83 Int func(childComplexity int) int 84 Int32 func(childComplexity int) int 85 Int64 func(childComplexity int) int 86 } 87 88 B struct { 89 ID func(childComplexity int) int 90 } 91 92 BackedByInterface struct { 93 ID func(childComplexity int) int 94 ThisShouldBind func(childComplexity int) int 95 ThisShouldBindWithError func(childComplexity int) int 96 } 97 98 Cat struct { 99 CatBreed func(childComplexity int) int 100 Species func(childComplexity int) int 101 } 102 103 CheckIssue896 struct { 104 ID func(childComplexity int) int 105 } 106 107 Circle struct { 108 Area func(childComplexity int) int 109 Coordinates func(childComplexity int) int 110 Radius func(childComplexity int) int 111 } 112 113 ConcreteNodeA struct { 114 Child func(childComplexity int) int 115 ID func(childComplexity int) int 116 Name func(childComplexity int) int 117 } 118 119 ConcreteNodeInterface struct { 120 Child func(childComplexity int) int 121 ID func(childComplexity int) int 122 } 123 124 Content_Post struct { 125 Foo func(childComplexity int) int 126 } 127 128 Content_User struct { 129 Foo func(childComplexity int) int 130 } 131 132 Coordinates struct { 133 X func(childComplexity int) int 134 Y func(childComplexity int) int 135 } 136 137 DefaultParametersMirror struct { 138 FalsyBoolean func(childComplexity int) int 139 TruthyBoolean func(childComplexity int) int 140 } 141 142 Dog struct { 143 DogBreed func(childComplexity int) int 144 Species func(childComplexity int) int 145 } 146 147 EmbeddedCase1 struct { 148 ExportedEmbeddedPointerExportedMethod func(childComplexity int) int 149 } 150 151 EmbeddedCase2 struct { 152 UnexportedEmbeddedPointerExportedMethod func(childComplexity int) int 153 } 154 155 EmbeddedCase3 struct { 156 UnexportedEmbeddedInterfaceExportedMethod func(childComplexity int) int 157 } 158 159 EmbeddedDefaultScalar struct { 160 Value func(childComplexity int) int 161 } 162 163 EmbeddedPointer struct { 164 ID func(childComplexity int) int 165 Title func(childComplexity int) int 166 } 167 168 Error struct { 169 ErrorOnNonRequiredField func(childComplexity int) int 170 ErrorOnRequiredField func(childComplexity int) int 171 ID func(childComplexity int) int 172 NilOnRequiredField func(childComplexity int) int 173 } 174 175 Errors struct { 176 A func(childComplexity int) int 177 B func(childComplexity int) int 178 C func(childComplexity int) int 179 D func(childComplexity int) int 180 E func(childComplexity int) int 181 } 182 183 ForcedResolver struct { 184 Field func(childComplexity int) int 185 } 186 187 InnerObject struct { 188 ID func(childComplexity int) int 189 } 190 191 InvalidIdentifier struct { 192 ID func(childComplexity int) int 193 } 194 195 It struct { 196 ID func(childComplexity int) int 197 } 198 199 LoopA struct { 200 B func(childComplexity int) int 201 } 202 203 LoopB struct { 204 A func(childComplexity int) int 205 } 206 207 Map struct { 208 ID func(childComplexity int) int 209 } 210 211 MapStringInterfaceType struct { 212 A func(childComplexity int) int 213 B func(childComplexity int) int 214 } 215 216 ModelMethods struct { 217 NoContext func(childComplexity int) int 218 ResolverField func(childComplexity int) int 219 WithContext func(childComplexity int) int 220 } 221 222 Mutation struct { 223 DefaultInput func(childComplexity int, input DefaultInput) int 224 UpdatePtrToPtr func(childComplexity int, input UpdatePtrToPtrOuter) int 225 UpdateSomething func(childComplexity int, input SpecialInput) int 226 } 227 228 ObjectDirectives struct { 229 NullableText func(childComplexity int) int 230 Order func(childComplexity int) int 231 Text func(childComplexity int) int 232 } 233 234 ObjectDirectivesWithCustomGoModel struct { 235 NullableText func(childComplexity int) int 236 } 237 238 OuterObject struct { 239 Inner func(childComplexity int) int 240 } 241 242 OverlappingFields struct { 243 Foo func(childComplexity int) int 244 NewFoo func(childComplexity int) int 245 OldFoo func(childComplexity int) int 246 } 247 248 Panics struct { 249 ArgUnmarshal func(childComplexity int, u []MarshalPanic) int 250 FieldFuncMarshal func(childComplexity int, u []MarshalPanic) int 251 FieldScalarMarshal func(childComplexity int) int 252 } 253 254 Pet struct { 255 Friends func(childComplexity int, limit *int) int 256 ID func(childComplexity int) int 257 } 258 259 Primitive struct { 260 Squared func(childComplexity int) int 261 Value func(childComplexity int) int 262 } 263 264 PrimitiveString struct { 265 Doubled func(childComplexity int) int 266 Len func(childComplexity int) int 267 Value func(childComplexity int) int 268 } 269 270 PtrToPtrInner struct { 271 Key func(childComplexity int) int 272 Value func(childComplexity int) int 273 } 274 275 PtrToPtrOuter struct { 276 Inner func(childComplexity int) int 277 Name func(childComplexity int) int 278 StupidInner func(childComplexity int) int 279 } 280 281 PtrToSliceContainer struct { 282 PtrToSlice func(childComplexity int) int 283 } 284 285 Query struct { 286 Animal func(childComplexity int) int 287 Autobind func(childComplexity int) int 288 Collision func(childComplexity int) int 289 DefaultParameters func(childComplexity int, falsyBoolean *bool, truthyBoolean *bool) int 290 DefaultScalar func(childComplexity int, arg string) int 291 DeprecatedField func(childComplexity int) int 292 DirectiveArg func(childComplexity int, arg string) int 293 DirectiveDouble func(childComplexity int) int 294 DirectiveField func(childComplexity int) int 295 DirectiveFieldDef func(childComplexity int, ret string) int 296 DirectiveInput func(childComplexity int, arg InputDirectives) int 297 DirectiveInputNullable func(childComplexity int, arg *InputDirectives) int 298 DirectiveInputType func(childComplexity int, arg InnerInput) int 299 DirectiveNullableArg func(childComplexity int, arg *int, arg2 *int, arg3 *string) int 300 DirectiveObject func(childComplexity int) int 301 DirectiveObjectWithCustomGoModel func(childComplexity int) int 302 DirectiveUnimplemented func(childComplexity int) int 303 EmbeddedCase1 func(childComplexity int) int 304 EmbeddedCase2 func(childComplexity int) int 305 EmbeddedCase3 func(childComplexity int) int 306 EnumInInput func(childComplexity int, input *InputWithEnumValue) int 307 ErrorBubble func(childComplexity int) int 308 ErrorBubbleList func(childComplexity int) int 309 ErrorList func(childComplexity int) int 310 Errors func(childComplexity int) int 311 Fallback func(childComplexity int, arg FallbackToStringEncoding) int 312 Infinity func(childComplexity int) int 313 InputNullableSlice func(childComplexity int, arg []string) int 314 InputSlice func(childComplexity int, arg []string) int 315 InvalidIdentifier func(childComplexity int) int 316 Issue896a func(childComplexity int) int 317 MapInput func(childComplexity int, input map[string]interface{}) int 318 MapNestedStringInterface func(childComplexity int, in *NestedMapInput) int 319 MapStringInterface func(childComplexity int, in map[string]interface{}) int 320 ModelMethods func(childComplexity int) int 321 NestedInputs func(childComplexity int, input [][]*OuterInput) int 322 NestedOutputs func(childComplexity int) int 323 NoShape func(childComplexity int) int 324 NoShapeTypedNil func(childComplexity int) int 325 Node func(childComplexity int) int 326 NotAnInterface func(childComplexity int) int 327 NullableArg func(childComplexity int, arg *int) int 328 OptionalUnion func(childComplexity int) int 329 Overlapping func(childComplexity int) int 330 Panics func(childComplexity int) int 331 PrimitiveObject func(childComplexity int) int 332 PrimitiveStringObject func(childComplexity int) int 333 PtrToSliceContainer func(childComplexity int) int 334 Recursive func(childComplexity int, input *RecursiveInputSlice) int 335 ScalarSlice func(childComplexity int) int 336 ShapeUnion func(childComplexity int) int 337 Shapes func(childComplexity int) int 338 Slices func(childComplexity int) int 339 StringFromContextFunction func(childComplexity int) int 340 StringFromContextInterface func(childComplexity int) int 341 User func(childComplexity int, id int) int 342 VOkCaseNil func(childComplexity int) int 343 VOkCaseValue func(childComplexity int) int 344 Valid func(childComplexity int) int 345 ValidType func(childComplexity int) int 346 VariadicModel func(childComplexity int) int 347 WrappedMap func(childComplexity int) int 348 WrappedScalar func(childComplexity int) int 349 WrappedSlice func(childComplexity int) int 350 WrappedStruct func(childComplexity int) int 351 } 352 353 Rectangle struct { 354 Area func(childComplexity int) int 355 Coordinates func(childComplexity int) int 356 Length func(childComplexity int) int 357 Width func(childComplexity int) int 358 } 359 360 Slices struct { 361 Test1 func(childComplexity int) int 362 Test2 func(childComplexity int) int 363 Test3 func(childComplexity int) int 364 Test4 func(childComplexity int) int 365 } 366 367 Subscription struct { 368 DirectiveArg func(childComplexity int, arg string) int 369 DirectiveDouble func(childComplexity int) int 370 DirectiveNullableArg func(childComplexity int, arg *int, arg2 *int, arg3 *string) int 371 DirectiveUnimplemented func(childComplexity int) int 372 ErrorRequired func(childComplexity int) int 373 InitPayload func(childComplexity int) int 374 Issue896b func(childComplexity int) int 375 Updated func(childComplexity int) int 376 } 377 378 User struct { 379 Created func(childComplexity int) int 380 Friends func(childComplexity int) int 381 ID func(childComplexity int) int 382 Pets func(childComplexity int, limit *int) int 383 Updated func(childComplexity int) int 384 } 385 386 VOkCaseNil struct { 387 Value func(childComplexity int) int 388 } 389 390 VOkCaseValue struct { 391 Value func(childComplexity int) int 392 } 393 394 ValidType struct { 395 DifferentCase func(childComplexity int) int 396 DifferentCaseOld func(childComplexity int) int 397 ValidArgs func(childComplexity int, breakArg string, defaultArg string, funcArg string, interfaceArg string, selectArg string, caseArg string, deferArg string, goArg string, mapArg string, structArg string, chanArg string, elseArg string, gotoArg string, packageArg string, switchArg string, constArg string, fallthroughArg string, ifArg string, rangeArg string, typeArg string, continueArg string, forArg string, importArg string, returnArg string, varArg string, _ string) int 398 ValidInputKeywords func(childComplexity int, input *ValidInput) int 399 } 400 401 VariadicModel struct { 402 Value func(childComplexity int, rank int) int 403 } 404 405 WrappedMap struct { 406 Get func(childComplexity int, key string) int 407 } 408 409 WrappedSlice struct { 410 Get func(childComplexity int, idx int) int 411 } 412 413 WrappedStruct struct { 414 Desc func(childComplexity int) int 415 Name func(childComplexity int) int 416 } 417 418 XXIt struct { 419 ID func(childComplexity int) int 420 } 421 422 XxIt struct { 423 ID func(childComplexity int) int 424 } 425 426 AsdfIt struct { 427 ID func(childComplexity int) int 428 } 429 430 IIt struct { 431 ID func(childComplexity int) int 432 } 433 } 434 435 type executableSchema struct { 436 resolvers ResolverRoot 437 directives DirectiveRoot 438 complexity ComplexityRoot 439 } 440 441 func (e *executableSchema) Schema() *ast.Schema { 442 return parsedSchema 443 } 444 445 func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) { 446 ec := executionContext{nil, e} 447 _ = ec 448 switch typeName + "." + field { 449 450 case "A.id": 451 if e.complexity.A.ID == nil { 452 break 453 } 454 455 return e.complexity.A.ID(childComplexity), true 456 457 case "AIt.id": 458 if e.complexity.AIt.ID == nil { 459 break 460 } 461 462 return e.complexity.AIt.ID(childComplexity), true 463 464 case "AbIt.id": 465 if e.complexity.AbIt.ID == nil { 466 break 467 } 468 469 return e.complexity.AbIt.ID(childComplexity), true 470 471 case "Autobind.idInt": 472 if e.complexity.Autobind.IdInt == nil { 473 break 474 } 475 476 return e.complexity.Autobind.IdInt(childComplexity), true 477 478 case "Autobind.idStr": 479 if e.complexity.Autobind.IdStr == nil { 480 break 481 } 482 483 return e.complexity.Autobind.IdStr(childComplexity), true 484 485 case "Autobind.int": 486 if e.complexity.Autobind.Int == nil { 487 break 488 } 489 490 return e.complexity.Autobind.Int(childComplexity), true 491 492 case "Autobind.int32": 493 if e.complexity.Autobind.Int32 == nil { 494 break 495 } 496 497 return e.complexity.Autobind.Int32(childComplexity), true 498 499 case "Autobind.int64": 500 if e.complexity.Autobind.Int64 == nil { 501 break 502 } 503 504 return e.complexity.Autobind.Int64(childComplexity), true 505 506 case "B.id": 507 if e.complexity.B.ID == nil { 508 break 509 } 510 511 return e.complexity.B.ID(childComplexity), true 512 513 case "BackedByInterface.id": 514 if e.complexity.BackedByInterface.ID == nil { 515 break 516 } 517 518 return e.complexity.BackedByInterface.ID(childComplexity), true 519 520 case "BackedByInterface.thisShouldBind": 521 if e.complexity.BackedByInterface.ThisShouldBind == nil { 522 break 523 } 524 525 return e.complexity.BackedByInterface.ThisShouldBind(childComplexity), true 526 527 case "BackedByInterface.thisShouldBindWithError": 528 if e.complexity.BackedByInterface.ThisShouldBindWithError == nil { 529 break 530 } 531 532 return e.complexity.BackedByInterface.ThisShouldBindWithError(childComplexity), true 533 534 case "Cat.catBreed": 535 if e.complexity.Cat.CatBreed == nil { 536 break 537 } 538 539 return e.complexity.Cat.CatBreed(childComplexity), true 540 541 case "Cat.species": 542 if e.complexity.Cat.Species == nil { 543 break 544 } 545 546 return e.complexity.Cat.Species(childComplexity), true 547 548 case "CheckIssue896.id": 549 if e.complexity.CheckIssue896.ID == nil { 550 break 551 } 552 553 return e.complexity.CheckIssue896.ID(childComplexity), true 554 555 case "Circle.area": 556 if e.complexity.Circle.Area == nil { 557 break 558 } 559 560 return e.complexity.Circle.Area(childComplexity), true 561 562 case "Circle.coordinates": 563 if e.complexity.Circle.Coordinates == nil { 564 break 565 } 566 567 return e.complexity.Circle.Coordinates(childComplexity), true 568 569 case "Circle.radius": 570 if e.complexity.Circle.Radius == nil { 571 break 572 } 573 574 return e.complexity.Circle.Radius(childComplexity), true 575 576 case "ConcreteNodeA.child": 577 if e.complexity.ConcreteNodeA.Child == nil { 578 break 579 } 580 581 return e.complexity.ConcreteNodeA.Child(childComplexity), true 582 583 case "ConcreteNodeA.id": 584 if e.complexity.ConcreteNodeA.ID == nil { 585 break 586 } 587 588 return e.complexity.ConcreteNodeA.ID(childComplexity), true 589 590 case "ConcreteNodeA.name": 591 if e.complexity.ConcreteNodeA.Name == nil { 592 break 593 } 594 595 return e.complexity.ConcreteNodeA.Name(childComplexity), true 596 597 case "ConcreteNodeInterface.child": 598 if e.complexity.ConcreteNodeInterface.Child == nil { 599 break 600 } 601 602 return e.complexity.ConcreteNodeInterface.Child(childComplexity), true 603 604 case "ConcreteNodeInterface.id": 605 if e.complexity.ConcreteNodeInterface.ID == nil { 606 break 607 } 608 609 return e.complexity.ConcreteNodeInterface.ID(childComplexity), true 610 611 case "Content_Post.foo": 612 if e.complexity.Content_Post.Foo == nil { 613 break 614 } 615 616 return e.complexity.Content_Post.Foo(childComplexity), true 617 618 case "Content_User.foo": 619 if e.complexity.Content_User.Foo == nil { 620 break 621 } 622 623 return e.complexity.Content_User.Foo(childComplexity), true 624 625 case "Coordinates.x": 626 if e.complexity.Coordinates.X == nil { 627 break 628 } 629 630 return e.complexity.Coordinates.X(childComplexity), true 631 632 case "Coordinates.y": 633 if e.complexity.Coordinates.Y == nil { 634 break 635 } 636 637 return e.complexity.Coordinates.Y(childComplexity), true 638 639 case "DefaultParametersMirror.falsyBoolean": 640 if e.complexity.DefaultParametersMirror.FalsyBoolean == nil { 641 break 642 } 643 644 return e.complexity.DefaultParametersMirror.FalsyBoolean(childComplexity), true 645 646 case "DefaultParametersMirror.truthyBoolean": 647 if e.complexity.DefaultParametersMirror.TruthyBoolean == nil { 648 break 649 } 650 651 return e.complexity.DefaultParametersMirror.TruthyBoolean(childComplexity), true 652 653 case "Dog.dogBreed": 654 if e.complexity.Dog.DogBreed == nil { 655 break 656 } 657 658 return e.complexity.Dog.DogBreed(childComplexity), true 659 660 case "Dog.species": 661 if e.complexity.Dog.Species == nil { 662 break 663 } 664 665 return e.complexity.Dog.Species(childComplexity), true 666 667 case "EmbeddedCase1.exportedEmbeddedPointerExportedMethod": 668 if e.complexity.EmbeddedCase1.ExportedEmbeddedPointerExportedMethod == nil { 669 break 670 } 671 672 return e.complexity.EmbeddedCase1.ExportedEmbeddedPointerExportedMethod(childComplexity), true 673 674 case "EmbeddedCase2.unexportedEmbeddedPointerExportedMethod": 675 if e.complexity.EmbeddedCase2.UnexportedEmbeddedPointerExportedMethod == nil { 676 break 677 } 678 679 return e.complexity.EmbeddedCase2.UnexportedEmbeddedPointerExportedMethod(childComplexity), true 680 681 case "EmbeddedCase3.unexportedEmbeddedInterfaceExportedMethod": 682 if e.complexity.EmbeddedCase3.UnexportedEmbeddedInterfaceExportedMethod == nil { 683 break 684 } 685 686 return e.complexity.EmbeddedCase3.UnexportedEmbeddedInterfaceExportedMethod(childComplexity), true 687 688 case "EmbeddedDefaultScalar.value": 689 if e.complexity.EmbeddedDefaultScalar.Value == nil { 690 break 691 } 692 693 return e.complexity.EmbeddedDefaultScalar.Value(childComplexity), true 694 695 case "EmbeddedPointer.ID": 696 if e.complexity.EmbeddedPointer.ID == nil { 697 break 698 } 699 700 return e.complexity.EmbeddedPointer.ID(childComplexity), true 701 702 case "EmbeddedPointer.Title": 703 if e.complexity.EmbeddedPointer.Title == nil { 704 break 705 } 706 707 return e.complexity.EmbeddedPointer.Title(childComplexity), true 708 709 case "Error.errorOnNonRequiredField": 710 if e.complexity.Error.ErrorOnNonRequiredField == nil { 711 break 712 } 713 714 return e.complexity.Error.ErrorOnNonRequiredField(childComplexity), true 715 716 case "Error.errorOnRequiredField": 717 if e.complexity.Error.ErrorOnRequiredField == nil { 718 break 719 } 720 721 return e.complexity.Error.ErrorOnRequiredField(childComplexity), true 722 723 case "Error.id": 724 if e.complexity.Error.ID == nil { 725 break 726 } 727 728 return e.complexity.Error.ID(childComplexity), true 729 730 case "Error.nilOnRequiredField": 731 if e.complexity.Error.NilOnRequiredField == nil { 732 break 733 } 734 735 return e.complexity.Error.NilOnRequiredField(childComplexity), true 736 737 case "Errors.a": 738 if e.complexity.Errors.A == nil { 739 break 740 } 741 742 return e.complexity.Errors.A(childComplexity), true 743 744 case "Errors.b": 745 if e.complexity.Errors.B == nil { 746 break 747 } 748 749 return e.complexity.Errors.B(childComplexity), true 750 751 case "Errors.c": 752 if e.complexity.Errors.C == nil { 753 break 754 } 755 756 return e.complexity.Errors.C(childComplexity), true 757 758 case "Errors.d": 759 if e.complexity.Errors.D == nil { 760 break 761 } 762 763 return e.complexity.Errors.D(childComplexity), true 764 765 case "Errors.e": 766 if e.complexity.Errors.E == nil { 767 break 768 } 769 770 return e.complexity.Errors.E(childComplexity), true 771 772 case "ForcedResolver.field": 773 if e.complexity.ForcedResolver.Field == nil { 774 break 775 } 776 777 return e.complexity.ForcedResolver.Field(childComplexity), true 778 779 case "InnerObject.id": 780 if e.complexity.InnerObject.ID == nil { 781 break 782 } 783 784 return e.complexity.InnerObject.ID(childComplexity), true 785 786 case "InvalidIdentifier.id": 787 if e.complexity.InvalidIdentifier.ID == nil { 788 break 789 } 790 791 return e.complexity.InvalidIdentifier.ID(childComplexity), true 792 793 case "It.id": 794 if e.complexity.It.ID == nil { 795 break 796 } 797 798 return e.complexity.It.ID(childComplexity), true 799 800 case "LoopA.b": 801 if e.complexity.LoopA.B == nil { 802 break 803 } 804 805 return e.complexity.LoopA.B(childComplexity), true 806 807 case "LoopB.a": 808 if e.complexity.LoopB.A == nil { 809 break 810 } 811 812 return e.complexity.LoopB.A(childComplexity), true 813 814 case "Map.id": 815 if e.complexity.Map.ID == nil { 816 break 817 } 818 819 return e.complexity.Map.ID(childComplexity), true 820 821 case "MapStringInterfaceType.a": 822 if e.complexity.MapStringInterfaceType.A == nil { 823 break 824 } 825 826 return e.complexity.MapStringInterfaceType.A(childComplexity), true 827 828 case "MapStringInterfaceType.b": 829 if e.complexity.MapStringInterfaceType.B == nil { 830 break 831 } 832 833 return e.complexity.MapStringInterfaceType.B(childComplexity), true 834 835 case "ModelMethods.noContext": 836 if e.complexity.ModelMethods.NoContext == nil { 837 break 838 } 839 840 return e.complexity.ModelMethods.NoContext(childComplexity), true 841 842 case "ModelMethods.resolverField": 843 if e.complexity.ModelMethods.ResolverField == nil { 844 break 845 } 846 847 return e.complexity.ModelMethods.ResolverField(childComplexity), true 848 849 case "ModelMethods.withContext": 850 if e.complexity.ModelMethods.WithContext == nil { 851 break 852 } 853 854 return e.complexity.ModelMethods.WithContext(childComplexity), true 855 856 case "Mutation.defaultInput": 857 if e.complexity.Mutation.DefaultInput == nil { 858 break 859 } 860 861 args, err := ec.field_Mutation_defaultInput_args(context.TODO(), rawArgs) 862 if err != nil { 863 return 0, false 864 } 865 866 return e.complexity.Mutation.DefaultInput(childComplexity, args["input"].(DefaultInput)), true 867 868 case "Mutation.updatePtrToPtr": 869 if e.complexity.Mutation.UpdatePtrToPtr == nil { 870 break 871 } 872 873 args, err := ec.field_Mutation_updatePtrToPtr_args(context.TODO(), rawArgs) 874 if err != nil { 875 return 0, false 876 } 877 878 return e.complexity.Mutation.UpdatePtrToPtr(childComplexity, args["input"].(UpdatePtrToPtrOuter)), true 879 880 case "Mutation.updateSomething": 881 if e.complexity.Mutation.UpdateSomething == nil { 882 break 883 } 884 885 args, err := ec.field_Mutation_updateSomething_args(context.TODO(), rawArgs) 886 if err != nil { 887 return 0, false 888 } 889 890 return e.complexity.Mutation.UpdateSomething(childComplexity, args["input"].(SpecialInput)), true 891 892 case "ObjectDirectives.nullableText": 893 if e.complexity.ObjectDirectives.NullableText == nil { 894 break 895 } 896 897 return e.complexity.ObjectDirectives.NullableText(childComplexity), true 898 899 case "ObjectDirectives.order": 900 if e.complexity.ObjectDirectives.Order == nil { 901 break 902 } 903 904 return e.complexity.ObjectDirectives.Order(childComplexity), true 905 906 case "ObjectDirectives.text": 907 if e.complexity.ObjectDirectives.Text == nil { 908 break 909 } 910 911 return e.complexity.ObjectDirectives.Text(childComplexity), true 912 913 case "ObjectDirectivesWithCustomGoModel.nullableText": 914 if e.complexity.ObjectDirectivesWithCustomGoModel.NullableText == nil { 915 break 916 } 917 918 return e.complexity.ObjectDirectivesWithCustomGoModel.NullableText(childComplexity), true 919 920 case "OuterObject.inner": 921 if e.complexity.OuterObject.Inner == nil { 922 break 923 } 924 925 return e.complexity.OuterObject.Inner(childComplexity), true 926 927 case "OverlappingFields.oneFoo", "OverlappingFields.twoFoo": 928 if e.complexity.OverlappingFields.Foo == nil { 929 break 930 } 931 932 return e.complexity.OverlappingFields.Foo(childComplexity), true 933 934 case "OverlappingFields.newFoo", "OverlappingFields.new_foo": 935 if e.complexity.OverlappingFields.NewFoo == nil { 936 break 937 } 938 939 return e.complexity.OverlappingFields.NewFoo(childComplexity), true 940 941 case "OverlappingFields.oldFoo": 942 if e.complexity.OverlappingFields.OldFoo == nil { 943 break 944 } 945 946 return e.complexity.OverlappingFields.OldFoo(childComplexity), true 947 948 case "Panics.argUnmarshal": 949 if e.complexity.Panics.ArgUnmarshal == nil { 950 break 951 } 952 953 args, err := ec.field_Panics_argUnmarshal_args(context.TODO(), rawArgs) 954 if err != nil { 955 return 0, false 956 } 957 958 return e.complexity.Panics.ArgUnmarshal(childComplexity, args["u"].([]MarshalPanic)), true 959 960 case "Panics.fieldFuncMarshal": 961 if e.complexity.Panics.FieldFuncMarshal == nil { 962 break 963 } 964 965 args, err := ec.field_Panics_fieldFuncMarshal_args(context.TODO(), rawArgs) 966 if err != nil { 967 return 0, false 968 } 969 970 return e.complexity.Panics.FieldFuncMarshal(childComplexity, args["u"].([]MarshalPanic)), true 971 972 case "Panics.fieldScalarMarshal": 973 if e.complexity.Panics.FieldScalarMarshal == nil { 974 break 975 } 976 977 return e.complexity.Panics.FieldScalarMarshal(childComplexity), true 978 979 case "Pet.friends": 980 if e.complexity.Pet.Friends == nil { 981 break 982 } 983 984 args, err := ec.field_Pet_friends_args(context.TODO(), rawArgs) 985 if err != nil { 986 return 0, false 987 } 988 989 return e.complexity.Pet.Friends(childComplexity, args["limit"].(*int)), true 990 991 case "Pet.id": 992 if e.complexity.Pet.ID == nil { 993 break 994 } 995 996 return e.complexity.Pet.ID(childComplexity), true 997 998 case "Primitive.squared": 999 if e.complexity.Primitive.Squared == nil { 1000 break 1001 } 1002 1003 return e.complexity.Primitive.Squared(childComplexity), true 1004 1005 case "Primitive.value": 1006 if e.complexity.Primitive.Value == nil { 1007 break 1008 } 1009 1010 return e.complexity.Primitive.Value(childComplexity), true 1011 1012 case "PrimitiveString.doubled": 1013 if e.complexity.PrimitiveString.Doubled == nil { 1014 break 1015 } 1016 1017 return e.complexity.PrimitiveString.Doubled(childComplexity), true 1018 1019 case "PrimitiveString.len": 1020 if e.complexity.PrimitiveString.Len == nil { 1021 break 1022 } 1023 1024 return e.complexity.PrimitiveString.Len(childComplexity), true 1025 1026 case "PrimitiveString.value": 1027 if e.complexity.PrimitiveString.Value == nil { 1028 break 1029 } 1030 1031 return e.complexity.PrimitiveString.Value(childComplexity), true 1032 1033 case "PtrToPtrInner.key": 1034 if e.complexity.PtrToPtrInner.Key == nil { 1035 break 1036 } 1037 1038 return e.complexity.PtrToPtrInner.Key(childComplexity), true 1039 1040 case "PtrToPtrInner.value": 1041 if e.complexity.PtrToPtrInner.Value == nil { 1042 break 1043 } 1044 1045 return e.complexity.PtrToPtrInner.Value(childComplexity), true 1046 1047 case "PtrToPtrOuter.inner": 1048 if e.complexity.PtrToPtrOuter.Inner == nil { 1049 break 1050 } 1051 1052 return e.complexity.PtrToPtrOuter.Inner(childComplexity), true 1053 1054 case "PtrToPtrOuter.name": 1055 if e.complexity.PtrToPtrOuter.Name == nil { 1056 break 1057 } 1058 1059 return e.complexity.PtrToPtrOuter.Name(childComplexity), true 1060 1061 case "PtrToPtrOuter.stupidInner": 1062 if e.complexity.PtrToPtrOuter.StupidInner == nil { 1063 break 1064 } 1065 1066 return e.complexity.PtrToPtrOuter.StupidInner(childComplexity), true 1067 1068 case "PtrToSliceContainer.ptrToSlice": 1069 if e.complexity.PtrToSliceContainer.PtrToSlice == nil { 1070 break 1071 } 1072 1073 return e.complexity.PtrToSliceContainer.PtrToSlice(childComplexity), true 1074 1075 case "Query.animal": 1076 if e.complexity.Query.Animal == nil { 1077 break 1078 } 1079 1080 return e.complexity.Query.Animal(childComplexity), true 1081 1082 case "Query.autobind": 1083 if e.complexity.Query.Autobind == nil { 1084 break 1085 } 1086 1087 return e.complexity.Query.Autobind(childComplexity), true 1088 1089 case "Query.collision": 1090 if e.complexity.Query.Collision == nil { 1091 break 1092 } 1093 1094 return e.complexity.Query.Collision(childComplexity), true 1095 1096 case "Query.defaultParameters": 1097 if e.complexity.Query.DefaultParameters == nil { 1098 break 1099 } 1100 1101 args, err := ec.field_Query_defaultParameters_args(context.TODO(), rawArgs) 1102 if err != nil { 1103 return 0, false 1104 } 1105 1106 return e.complexity.Query.DefaultParameters(childComplexity, args["falsyBoolean"].(*bool), args["truthyBoolean"].(*bool)), true 1107 1108 case "Query.defaultScalar": 1109 if e.complexity.Query.DefaultScalar == nil { 1110 break 1111 } 1112 1113 args, err := ec.field_Query_defaultScalar_args(context.TODO(), rawArgs) 1114 if err != nil { 1115 return 0, false 1116 } 1117 1118 return e.complexity.Query.DefaultScalar(childComplexity, args["arg"].(string)), true 1119 1120 case "Query.deprecatedField": 1121 if e.complexity.Query.DeprecatedField == nil { 1122 break 1123 } 1124 1125 return e.complexity.Query.DeprecatedField(childComplexity), true 1126 1127 case "Query.directiveArg": 1128 if e.complexity.Query.DirectiveArg == nil { 1129 break 1130 } 1131 1132 args, err := ec.field_Query_directiveArg_args(context.TODO(), rawArgs) 1133 if err != nil { 1134 return 0, false 1135 } 1136 1137 return e.complexity.Query.DirectiveArg(childComplexity, args["arg"].(string)), true 1138 1139 case "Query.directiveDouble": 1140 if e.complexity.Query.DirectiveDouble == nil { 1141 break 1142 } 1143 1144 return e.complexity.Query.DirectiveDouble(childComplexity), true 1145 1146 case "Query.directiveField": 1147 if e.complexity.Query.DirectiveField == nil { 1148 break 1149 } 1150 1151 return e.complexity.Query.DirectiveField(childComplexity), true 1152 1153 case "Query.directiveFieldDef": 1154 if e.complexity.Query.DirectiveFieldDef == nil { 1155 break 1156 } 1157 1158 args, err := ec.field_Query_directiveFieldDef_args(context.TODO(), rawArgs) 1159 if err != nil { 1160 return 0, false 1161 } 1162 1163 return e.complexity.Query.DirectiveFieldDef(childComplexity, args["ret"].(string)), true 1164 1165 case "Query.directiveInput": 1166 if e.complexity.Query.DirectiveInput == nil { 1167 break 1168 } 1169 1170 args, err := ec.field_Query_directiveInput_args(context.TODO(), rawArgs) 1171 if err != nil { 1172 return 0, false 1173 } 1174 1175 return e.complexity.Query.DirectiveInput(childComplexity, args["arg"].(InputDirectives)), true 1176 1177 case "Query.directiveInputNullable": 1178 if e.complexity.Query.DirectiveInputNullable == nil { 1179 break 1180 } 1181 1182 args, err := ec.field_Query_directiveInputNullable_args(context.TODO(), rawArgs) 1183 if err != nil { 1184 return 0, false 1185 } 1186 1187 return e.complexity.Query.DirectiveInputNullable(childComplexity, args["arg"].(*InputDirectives)), true 1188 1189 case "Query.directiveInputType": 1190 if e.complexity.Query.DirectiveInputType == nil { 1191 break 1192 } 1193 1194 args, err := ec.field_Query_directiveInputType_args(context.TODO(), rawArgs) 1195 if err != nil { 1196 return 0, false 1197 } 1198 1199 return e.complexity.Query.DirectiveInputType(childComplexity, args["arg"].(InnerInput)), true 1200 1201 case "Query.directiveNullableArg": 1202 if e.complexity.Query.DirectiveNullableArg == nil { 1203 break 1204 } 1205 1206 args, err := ec.field_Query_directiveNullableArg_args(context.TODO(), rawArgs) 1207 if err != nil { 1208 return 0, false 1209 } 1210 1211 return e.complexity.Query.DirectiveNullableArg(childComplexity, args["arg"].(*int), args["arg2"].(*int), args["arg3"].(*string)), true 1212 1213 case "Query.directiveObject": 1214 if e.complexity.Query.DirectiveObject == nil { 1215 break 1216 } 1217 1218 return e.complexity.Query.DirectiveObject(childComplexity), true 1219 1220 case "Query.directiveObjectWithCustomGoModel": 1221 if e.complexity.Query.DirectiveObjectWithCustomGoModel == nil { 1222 break 1223 } 1224 1225 return e.complexity.Query.DirectiveObjectWithCustomGoModel(childComplexity), true 1226 1227 case "Query.directiveUnimplemented": 1228 if e.complexity.Query.DirectiveUnimplemented == nil { 1229 break 1230 } 1231 1232 return e.complexity.Query.DirectiveUnimplemented(childComplexity), true 1233 1234 case "Query.embeddedCase1": 1235 if e.complexity.Query.EmbeddedCase1 == nil { 1236 break 1237 } 1238 1239 return e.complexity.Query.EmbeddedCase1(childComplexity), true 1240 1241 case "Query.embeddedCase2": 1242 if e.complexity.Query.EmbeddedCase2 == nil { 1243 break 1244 } 1245 1246 return e.complexity.Query.EmbeddedCase2(childComplexity), true 1247 1248 case "Query.embeddedCase3": 1249 if e.complexity.Query.EmbeddedCase3 == nil { 1250 break 1251 } 1252 1253 return e.complexity.Query.EmbeddedCase3(childComplexity), true 1254 1255 case "Query.enumInInput": 1256 if e.complexity.Query.EnumInInput == nil { 1257 break 1258 } 1259 1260 args, err := ec.field_Query_enumInInput_args(context.TODO(), rawArgs) 1261 if err != nil { 1262 return 0, false 1263 } 1264 1265 return e.complexity.Query.EnumInInput(childComplexity, args["input"].(*InputWithEnumValue)), true 1266 1267 case "Query.errorBubble": 1268 if e.complexity.Query.ErrorBubble == nil { 1269 break 1270 } 1271 1272 return e.complexity.Query.ErrorBubble(childComplexity), true 1273 1274 case "Query.errorBubbleList": 1275 if e.complexity.Query.ErrorBubbleList == nil { 1276 break 1277 } 1278 1279 return e.complexity.Query.ErrorBubbleList(childComplexity), true 1280 1281 case "Query.errorList": 1282 if e.complexity.Query.ErrorList == nil { 1283 break 1284 } 1285 1286 return e.complexity.Query.ErrorList(childComplexity), true 1287 1288 case "Query.errors": 1289 if e.complexity.Query.Errors == nil { 1290 break 1291 } 1292 1293 return e.complexity.Query.Errors(childComplexity), true 1294 1295 case "Query.fallback": 1296 if e.complexity.Query.Fallback == nil { 1297 break 1298 } 1299 1300 args, err := ec.field_Query_fallback_args(context.TODO(), rawArgs) 1301 if err != nil { 1302 return 0, false 1303 } 1304 1305 return e.complexity.Query.Fallback(childComplexity, args["arg"].(FallbackToStringEncoding)), true 1306 1307 case "Query.infinity": 1308 if e.complexity.Query.Infinity == nil { 1309 break 1310 } 1311 1312 return e.complexity.Query.Infinity(childComplexity), true 1313 1314 case "Query.inputNullableSlice": 1315 if e.complexity.Query.InputNullableSlice == nil { 1316 break 1317 } 1318 1319 args, err := ec.field_Query_inputNullableSlice_args(context.TODO(), rawArgs) 1320 if err != nil { 1321 return 0, false 1322 } 1323 1324 return e.complexity.Query.InputNullableSlice(childComplexity, args["arg"].([]string)), true 1325 1326 case "Query.inputSlice": 1327 if e.complexity.Query.InputSlice == nil { 1328 break 1329 } 1330 1331 args, err := ec.field_Query_inputSlice_args(context.TODO(), rawArgs) 1332 if err != nil { 1333 return 0, false 1334 } 1335 1336 return e.complexity.Query.InputSlice(childComplexity, args["arg"].([]string)), true 1337 1338 case "Query.invalidIdentifier": 1339 if e.complexity.Query.InvalidIdentifier == nil { 1340 break 1341 } 1342 1343 return e.complexity.Query.InvalidIdentifier(childComplexity), true 1344 1345 case "Query.issue896a": 1346 if e.complexity.Query.Issue896a == nil { 1347 break 1348 } 1349 1350 return e.complexity.Query.Issue896a(childComplexity), true 1351 1352 case "Query.mapInput": 1353 if e.complexity.Query.MapInput == nil { 1354 break 1355 } 1356 1357 args, err := ec.field_Query_mapInput_args(context.TODO(), rawArgs) 1358 if err != nil { 1359 return 0, false 1360 } 1361 1362 return e.complexity.Query.MapInput(childComplexity, args["input"].(map[string]interface{})), true 1363 1364 case "Query.mapNestedStringInterface": 1365 if e.complexity.Query.MapNestedStringInterface == nil { 1366 break 1367 } 1368 1369 args, err := ec.field_Query_mapNestedStringInterface_args(context.TODO(), rawArgs) 1370 if err != nil { 1371 return 0, false 1372 } 1373 1374 return e.complexity.Query.MapNestedStringInterface(childComplexity, args["in"].(*NestedMapInput)), true 1375 1376 case "Query.mapStringInterface": 1377 if e.complexity.Query.MapStringInterface == nil { 1378 break 1379 } 1380 1381 args, err := ec.field_Query_mapStringInterface_args(context.TODO(), rawArgs) 1382 if err != nil { 1383 return 0, false 1384 } 1385 1386 return e.complexity.Query.MapStringInterface(childComplexity, args["in"].(map[string]interface{})), true 1387 1388 case "Query.modelMethods": 1389 if e.complexity.Query.ModelMethods == nil { 1390 break 1391 } 1392 1393 return e.complexity.Query.ModelMethods(childComplexity), true 1394 1395 case "Query.nestedInputs": 1396 if e.complexity.Query.NestedInputs == nil { 1397 break 1398 } 1399 1400 args, err := ec.field_Query_nestedInputs_args(context.TODO(), rawArgs) 1401 if err != nil { 1402 return 0, false 1403 } 1404 1405 return e.complexity.Query.NestedInputs(childComplexity, args["input"].([][]*OuterInput)), true 1406 1407 case "Query.nestedOutputs": 1408 if e.complexity.Query.NestedOutputs == nil { 1409 break 1410 } 1411 1412 return e.complexity.Query.NestedOutputs(childComplexity), true 1413 1414 case "Query.noShape": 1415 if e.complexity.Query.NoShape == nil { 1416 break 1417 } 1418 1419 return e.complexity.Query.NoShape(childComplexity), true 1420 1421 case "Query.noShapeTypedNil": 1422 if e.complexity.Query.NoShapeTypedNil == nil { 1423 break 1424 } 1425 1426 return e.complexity.Query.NoShapeTypedNil(childComplexity), true 1427 1428 case "Query.node": 1429 if e.complexity.Query.Node == nil { 1430 break 1431 } 1432 1433 return e.complexity.Query.Node(childComplexity), true 1434 1435 case "Query.notAnInterface": 1436 if e.complexity.Query.NotAnInterface == nil { 1437 break 1438 } 1439 1440 return e.complexity.Query.NotAnInterface(childComplexity), true 1441 1442 case "Query.nullableArg": 1443 if e.complexity.Query.NullableArg == nil { 1444 break 1445 } 1446 1447 args, err := ec.field_Query_nullableArg_args(context.TODO(), rawArgs) 1448 if err != nil { 1449 return 0, false 1450 } 1451 1452 return e.complexity.Query.NullableArg(childComplexity, args["arg"].(*int)), true 1453 1454 case "Query.optionalUnion": 1455 if e.complexity.Query.OptionalUnion == nil { 1456 break 1457 } 1458 1459 return e.complexity.Query.OptionalUnion(childComplexity), true 1460 1461 case "Query.overlapping": 1462 if e.complexity.Query.Overlapping == nil { 1463 break 1464 } 1465 1466 return e.complexity.Query.Overlapping(childComplexity), true 1467 1468 case "Query.panics": 1469 if e.complexity.Query.Panics == nil { 1470 break 1471 } 1472 1473 return e.complexity.Query.Panics(childComplexity), true 1474 1475 case "Query.primitiveObject": 1476 if e.complexity.Query.PrimitiveObject == nil { 1477 break 1478 } 1479 1480 return e.complexity.Query.PrimitiveObject(childComplexity), true 1481 1482 case "Query.primitiveStringObject": 1483 if e.complexity.Query.PrimitiveStringObject == nil { 1484 break 1485 } 1486 1487 return e.complexity.Query.PrimitiveStringObject(childComplexity), true 1488 1489 case "Query.ptrToSliceContainer": 1490 if e.complexity.Query.PtrToSliceContainer == nil { 1491 break 1492 } 1493 1494 return e.complexity.Query.PtrToSliceContainer(childComplexity), true 1495 1496 case "Query.recursive": 1497 if e.complexity.Query.Recursive == nil { 1498 break 1499 } 1500 1501 args, err := ec.field_Query_recursive_args(context.TODO(), rawArgs) 1502 if err != nil { 1503 return 0, false 1504 } 1505 1506 return e.complexity.Query.Recursive(childComplexity, args["input"].(*RecursiveInputSlice)), true 1507 1508 case "Query.scalarSlice": 1509 if e.complexity.Query.ScalarSlice == nil { 1510 break 1511 } 1512 1513 return e.complexity.Query.ScalarSlice(childComplexity), true 1514 1515 case "Query.shapeUnion": 1516 if e.complexity.Query.ShapeUnion == nil { 1517 break 1518 } 1519 1520 return e.complexity.Query.ShapeUnion(childComplexity), true 1521 1522 case "Query.shapes": 1523 if e.complexity.Query.Shapes == nil { 1524 break 1525 } 1526 1527 return e.complexity.Query.Shapes(childComplexity), true 1528 1529 case "Query.slices": 1530 if e.complexity.Query.Slices == nil { 1531 break 1532 } 1533 1534 return e.complexity.Query.Slices(childComplexity), true 1535 1536 case "Query.stringFromContextFunction": 1537 if e.complexity.Query.StringFromContextFunction == nil { 1538 break 1539 } 1540 1541 return e.complexity.Query.StringFromContextFunction(childComplexity), true 1542 1543 case "Query.stringFromContextInterface": 1544 if e.complexity.Query.StringFromContextInterface == nil { 1545 break 1546 } 1547 1548 return e.complexity.Query.StringFromContextInterface(childComplexity), true 1549 1550 case "Query.user": 1551 if e.complexity.Query.User == nil { 1552 break 1553 } 1554 1555 args, err := ec.field_Query_user_args(context.TODO(), rawArgs) 1556 if err != nil { 1557 return 0, false 1558 } 1559 1560 return e.complexity.Query.User(childComplexity, args["id"].(int)), true 1561 1562 case "Query.vOkCaseNil": 1563 if e.complexity.Query.VOkCaseNil == nil { 1564 break 1565 } 1566 1567 return e.complexity.Query.VOkCaseNil(childComplexity), true 1568 1569 case "Query.vOkCaseValue": 1570 if e.complexity.Query.VOkCaseValue == nil { 1571 break 1572 } 1573 1574 return e.complexity.Query.VOkCaseValue(childComplexity), true 1575 1576 case "Query.valid": 1577 if e.complexity.Query.Valid == nil { 1578 break 1579 } 1580 1581 return e.complexity.Query.Valid(childComplexity), true 1582 1583 case "Query.validType": 1584 if e.complexity.Query.ValidType == nil { 1585 break 1586 } 1587 1588 return e.complexity.Query.ValidType(childComplexity), true 1589 1590 case "Query.variadicModel": 1591 if e.complexity.Query.VariadicModel == nil { 1592 break 1593 } 1594 1595 return e.complexity.Query.VariadicModel(childComplexity), true 1596 1597 case "Query.wrappedMap": 1598 if e.complexity.Query.WrappedMap == nil { 1599 break 1600 } 1601 1602 return e.complexity.Query.WrappedMap(childComplexity), true 1603 1604 case "Query.wrappedScalar": 1605 if e.complexity.Query.WrappedScalar == nil { 1606 break 1607 } 1608 1609 return e.complexity.Query.WrappedScalar(childComplexity), true 1610 1611 case "Query.wrappedSlice": 1612 if e.complexity.Query.WrappedSlice == nil { 1613 break 1614 } 1615 1616 return e.complexity.Query.WrappedSlice(childComplexity), true 1617 1618 case "Query.wrappedStruct": 1619 if e.complexity.Query.WrappedStruct == nil { 1620 break 1621 } 1622 1623 return e.complexity.Query.WrappedStruct(childComplexity), true 1624 1625 case "Rectangle.area": 1626 if e.complexity.Rectangle.Area == nil { 1627 break 1628 } 1629 1630 return e.complexity.Rectangle.Area(childComplexity), true 1631 1632 case "Rectangle.coordinates": 1633 if e.complexity.Rectangle.Coordinates == nil { 1634 break 1635 } 1636 1637 return e.complexity.Rectangle.Coordinates(childComplexity), true 1638 1639 case "Rectangle.length": 1640 if e.complexity.Rectangle.Length == nil { 1641 break 1642 } 1643 1644 return e.complexity.Rectangle.Length(childComplexity), true 1645 1646 case "Rectangle.width": 1647 if e.complexity.Rectangle.Width == nil { 1648 break 1649 } 1650 1651 return e.complexity.Rectangle.Width(childComplexity), true 1652 1653 case "Slices.test1": 1654 if e.complexity.Slices.Test1 == nil { 1655 break 1656 } 1657 1658 return e.complexity.Slices.Test1(childComplexity), true 1659 1660 case "Slices.test2": 1661 if e.complexity.Slices.Test2 == nil { 1662 break 1663 } 1664 1665 return e.complexity.Slices.Test2(childComplexity), true 1666 1667 case "Slices.test3": 1668 if e.complexity.Slices.Test3 == nil { 1669 break 1670 } 1671 1672 return e.complexity.Slices.Test3(childComplexity), true 1673 1674 case "Slices.test4": 1675 if e.complexity.Slices.Test4 == nil { 1676 break 1677 } 1678 1679 return e.complexity.Slices.Test4(childComplexity), true 1680 1681 case "Subscription.directiveArg": 1682 if e.complexity.Subscription.DirectiveArg == nil { 1683 break 1684 } 1685 1686 args, err := ec.field_Subscription_directiveArg_args(context.TODO(), rawArgs) 1687 if err != nil { 1688 return 0, false 1689 } 1690 1691 return e.complexity.Subscription.DirectiveArg(childComplexity, args["arg"].(string)), true 1692 1693 case "Subscription.directiveDouble": 1694 if e.complexity.Subscription.DirectiveDouble == nil { 1695 break 1696 } 1697 1698 return e.complexity.Subscription.DirectiveDouble(childComplexity), true 1699 1700 case "Subscription.directiveNullableArg": 1701 if e.complexity.Subscription.DirectiveNullableArg == nil { 1702 break 1703 } 1704 1705 args, err := ec.field_Subscription_directiveNullableArg_args(context.TODO(), rawArgs) 1706 if err != nil { 1707 return 0, false 1708 } 1709 1710 return e.complexity.Subscription.DirectiveNullableArg(childComplexity, args["arg"].(*int), args["arg2"].(*int), args["arg3"].(*string)), true 1711 1712 case "Subscription.directiveUnimplemented": 1713 if e.complexity.Subscription.DirectiveUnimplemented == nil { 1714 break 1715 } 1716 1717 return e.complexity.Subscription.DirectiveUnimplemented(childComplexity), true 1718 1719 case "Subscription.errorRequired": 1720 if e.complexity.Subscription.ErrorRequired == nil { 1721 break 1722 } 1723 1724 return e.complexity.Subscription.ErrorRequired(childComplexity), true 1725 1726 case "Subscription.initPayload": 1727 if e.complexity.Subscription.InitPayload == nil { 1728 break 1729 } 1730 1731 return e.complexity.Subscription.InitPayload(childComplexity), true 1732 1733 case "Subscription.issue896b": 1734 if e.complexity.Subscription.Issue896b == nil { 1735 break 1736 } 1737 1738 return e.complexity.Subscription.Issue896b(childComplexity), true 1739 1740 case "Subscription.updated": 1741 if e.complexity.Subscription.Updated == nil { 1742 break 1743 } 1744 1745 return e.complexity.Subscription.Updated(childComplexity), true 1746 1747 case "User.created": 1748 if e.complexity.User.Created == nil { 1749 break 1750 } 1751 1752 return e.complexity.User.Created(childComplexity), true 1753 1754 case "User.friends": 1755 if e.complexity.User.Friends == nil { 1756 break 1757 } 1758 1759 return e.complexity.User.Friends(childComplexity), true 1760 1761 case "User.id": 1762 if e.complexity.User.ID == nil { 1763 break 1764 } 1765 1766 return e.complexity.User.ID(childComplexity), true 1767 1768 case "User.pets": 1769 if e.complexity.User.Pets == nil { 1770 break 1771 } 1772 1773 args, err := ec.field_User_pets_args(context.TODO(), rawArgs) 1774 if err != nil { 1775 return 0, false 1776 } 1777 1778 return e.complexity.User.Pets(childComplexity, args["limit"].(*int)), true 1779 1780 case "User.updated": 1781 if e.complexity.User.Updated == nil { 1782 break 1783 } 1784 1785 return e.complexity.User.Updated(childComplexity), true 1786 1787 case "VOkCaseNil.value": 1788 if e.complexity.VOkCaseNil.Value == nil { 1789 break 1790 } 1791 1792 return e.complexity.VOkCaseNil.Value(childComplexity), true 1793 1794 case "VOkCaseValue.value": 1795 if e.complexity.VOkCaseValue.Value == nil { 1796 break 1797 } 1798 1799 return e.complexity.VOkCaseValue.Value(childComplexity), true 1800 1801 case "ValidType.differentCase": 1802 if e.complexity.ValidType.DifferentCase == nil { 1803 break 1804 } 1805 1806 return e.complexity.ValidType.DifferentCase(childComplexity), true 1807 1808 case "ValidType.different_case": 1809 if e.complexity.ValidType.DifferentCaseOld == nil { 1810 break 1811 } 1812 1813 return e.complexity.ValidType.DifferentCaseOld(childComplexity), true 1814 1815 case "ValidType.validArgs": 1816 if e.complexity.ValidType.ValidArgs == nil { 1817 break 1818 } 1819 1820 args, err := ec.field_ValidType_validArgs_args(context.TODO(), rawArgs) 1821 if err != nil { 1822 return 0, false 1823 } 1824 1825 return e.complexity.ValidType.ValidArgs(childComplexity, args["break"].(string), args["default"].(string), args["func"].(string), args["interface"].(string), args["select"].(string), args["case"].(string), args["defer"].(string), args["go"].(string), args["map"].(string), args["struct"].(string), args["chan"].(string), args["else"].(string), args["goto"].(string), args["package"].(string), args["switch"].(string), args["const"].(string), args["fallthrough"].(string), args["if"].(string), args["range"].(string), args["type"].(string), args["continue"].(string), args["for"].(string), args["import"].(string), args["return"].(string), args["var"].(string), args["_"].(string)), true 1826 1827 case "ValidType.validInputKeywords": 1828 if e.complexity.ValidType.ValidInputKeywords == nil { 1829 break 1830 } 1831 1832 args, err := ec.field_ValidType_validInputKeywords_args(context.TODO(), rawArgs) 1833 if err != nil { 1834 return 0, false 1835 } 1836 1837 return e.complexity.ValidType.ValidInputKeywords(childComplexity, args["input"].(*ValidInput)), true 1838 1839 case "VariadicModel.value": 1840 if e.complexity.VariadicModel.Value == nil { 1841 break 1842 } 1843 1844 args, err := ec.field_VariadicModel_value_args(context.TODO(), rawArgs) 1845 if err != nil { 1846 return 0, false 1847 } 1848 1849 return e.complexity.VariadicModel.Value(childComplexity, args["rank"].(int)), true 1850 1851 case "WrappedMap.get": 1852 if e.complexity.WrappedMap.Get == nil { 1853 break 1854 } 1855 1856 args, err := ec.field_WrappedMap_get_args(context.TODO(), rawArgs) 1857 if err != nil { 1858 return 0, false 1859 } 1860 1861 return e.complexity.WrappedMap.Get(childComplexity, args["key"].(string)), true 1862 1863 case "WrappedSlice.get": 1864 if e.complexity.WrappedSlice.Get == nil { 1865 break 1866 } 1867 1868 args, err := ec.field_WrappedSlice_get_args(context.TODO(), rawArgs) 1869 if err != nil { 1870 return 0, false 1871 } 1872 1873 return e.complexity.WrappedSlice.Get(childComplexity, args["idx"].(int)), true 1874 1875 case "WrappedStruct.desc": 1876 if e.complexity.WrappedStruct.Desc == nil { 1877 break 1878 } 1879 1880 return e.complexity.WrappedStruct.Desc(childComplexity), true 1881 1882 case "WrappedStruct.name": 1883 if e.complexity.WrappedStruct.Name == nil { 1884 break 1885 } 1886 1887 return e.complexity.WrappedStruct.Name(childComplexity), true 1888 1889 case "XXIt.id": 1890 if e.complexity.XXIt.ID == nil { 1891 break 1892 } 1893 1894 return e.complexity.XXIt.ID(childComplexity), true 1895 1896 case "XxIt.id": 1897 if e.complexity.XxIt.ID == nil { 1898 break 1899 } 1900 1901 return e.complexity.XxIt.ID(childComplexity), true 1902 1903 case "asdfIt.id": 1904 if e.complexity.AsdfIt.ID == nil { 1905 break 1906 } 1907 1908 return e.complexity.AsdfIt.ID(childComplexity), true 1909 1910 case "iIt.id": 1911 if e.complexity.IIt.ID == nil { 1912 break 1913 } 1914 1915 return e.complexity.IIt.ID(childComplexity), true 1916 1917 } 1918 return 0, false 1919 } 1920 1921 func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { 1922 rc := graphql.GetOperationContext(ctx) 1923 ec := executionContext{rc, e} 1924 inputUnmarshalMap := graphql.BuildUnmarshalerMap( 1925 ec.unmarshalInputDefaultInput, 1926 ec.unmarshalInputInnerDirectives, 1927 ec.unmarshalInputInnerInput, 1928 ec.unmarshalInputInputDirectives, 1929 ec.unmarshalInputInputWithEnumValue, 1930 ec.unmarshalInputNestedInput, 1931 ec.unmarshalInputNestedMapInput, 1932 ec.unmarshalInputOuterInput, 1933 ec.unmarshalInputRecursiveInputSlice, 1934 ec.unmarshalInputSpecialInput, 1935 ec.unmarshalInputUpdatePtrToPtrInner, 1936 ec.unmarshalInputUpdatePtrToPtrOuter, 1937 ec.unmarshalInputValidInput, 1938 ) 1939 first := true 1940 1941 switch rc.Operation.Operation { 1942 case ast.Query: 1943 return func(ctx context.Context) *graphql.Response { 1944 if !first { 1945 return nil 1946 } 1947 first = false 1948 ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) 1949 data := ec._Query(ctx, rc.Operation.SelectionSet) 1950 var buf bytes.Buffer 1951 data.MarshalGQL(&buf) 1952 1953 return &graphql.Response{ 1954 Data: buf.Bytes(), 1955 } 1956 } 1957 case ast.Mutation: 1958 return func(ctx context.Context) *graphql.Response { 1959 if !first { 1960 return nil 1961 } 1962 first = false 1963 ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) 1964 data := ec._Mutation(ctx, rc.Operation.SelectionSet) 1965 var buf bytes.Buffer 1966 data.MarshalGQL(&buf) 1967 1968 return &graphql.Response{ 1969 Data: buf.Bytes(), 1970 } 1971 } 1972 case ast.Subscription: 1973 next := ec._Subscription(ctx, rc.Operation.SelectionSet) 1974 1975 var buf bytes.Buffer 1976 return func(ctx context.Context) *graphql.Response { 1977 buf.Reset() 1978 data := next(ctx) 1979 1980 if data == nil { 1981 return nil 1982 } 1983 data.MarshalGQL(&buf) 1984 1985 return &graphql.Response{ 1986 Data: buf.Bytes(), 1987 } 1988 } 1989 1990 default: 1991 return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation")) 1992 } 1993 } 1994 1995 type executionContext struct { 1996 *graphql.OperationContext 1997 *executableSchema 1998 } 1999 2000 func (ec *executionContext) introspectSchema() (*introspection.Schema, error) { 2001 if ec.DisableIntrospection { 2002 return nil, errors.New("introspection disabled") 2003 } 2004 return introspection.WrapSchema(parsedSchema), nil 2005 } 2006 2007 func (ec *executionContext) introspectType(name string) (*introspection.Type, error) { 2008 if ec.DisableIntrospection { 2009 return nil, errors.New("introspection disabled") 2010 } 2011 return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil 2012 } 2013 2014 //go:embed "builtinscalar.graphql" "complexity.graphql" "defaults.graphql" "directive.graphql" "embedded.graphql" "enum.graphql" "interfaces.graphql" "issue896.graphql" "loops.graphql" "maps.graphql" "mutation_with_custom_scalar.graphql" "nulls.graphql" "panics.graphql" "primitive_objects.graphql" "ptr_to_ptr_input.graphql" "ptr_to_slice.graphql" "scalar_context.graphql" "scalar_default.graphql" "schema.graphql" "slices.graphql" "typefallback.graphql" "useptr.graphql" "v-ok.graphql" "validtypes.graphql" "variadic.graphql" "weird_type_cases.graphql" "wrapped_type.graphql" 2015 var sourcesFS embed.FS 2016 2017 func sourceData(filename string) string { 2018 data, err := sourcesFS.ReadFile(filename) 2019 if err != nil { 2020 panic(fmt.Sprintf("codegen problem: %s not available", filename)) 2021 } 2022 return string(data) 2023 } 2024 2025 var sources = []*ast.Source{ 2026 {Name: "builtinscalar.graphql", Input: sourceData("builtinscalar.graphql"), BuiltIn: false}, 2027 {Name: "complexity.graphql", Input: sourceData("complexity.graphql"), BuiltIn: false}, 2028 {Name: "defaults.graphql", Input: sourceData("defaults.graphql"), BuiltIn: false}, 2029 {Name: "directive.graphql", Input: sourceData("directive.graphql"), BuiltIn: false}, 2030 {Name: "embedded.graphql", Input: sourceData("embedded.graphql"), BuiltIn: false}, 2031 {Name: "enum.graphql", Input: sourceData("enum.graphql"), BuiltIn: false}, 2032 {Name: "interfaces.graphql", Input: sourceData("interfaces.graphql"), BuiltIn: false}, 2033 {Name: "issue896.graphql", Input: sourceData("issue896.graphql"), BuiltIn: false}, 2034 {Name: "loops.graphql", Input: sourceData("loops.graphql"), BuiltIn: false}, 2035 {Name: "maps.graphql", Input: sourceData("maps.graphql"), BuiltIn: false}, 2036 {Name: "mutation_with_custom_scalar.graphql", Input: sourceData("mutation_with_custom_scalar.graphql"), BuiltIn: false}, 2037 {Name: "nulls.graphql", Input: sourceData("nulls.graphql"), BuiltIn: false}, 2038 {Name: "panics.graphql", Input: sourceData("panics.graphql"), BuiltIn: false}, 2039 {Name: "primitive_objects.graphql", Input: sourceData("primitive_objects.graphql"), BuiltIn: false}, 2040 {Name: "ptr_to_ptr_input.graphql", Input: sourceData("ptr_to_ptr_input.graphql"), BuiltIn: false}, 2041 {Name: "ptr_to_slice.graphql", Input: sourceData("ptr_to_slice.graphql"), BuiltIn: false}, 2042 {Name: "scalar_context.graphql", Input: sourceData("scalar_context.graphql"), BuiltIn: false}, 2043 {Name: "scalar_default.graphql", Input: sourceData("scalar_default.graphql"), BuiltIn: false}, 2044 {Name: "schema.graphql", Input: sourceData("schema.graphql"), BuiltIn: false}, 2045 {Name: "slices.graphql", Input: sourceData("slices.graphql"), BuiltIn: false}, 2046 {Name: "typefallback.graphql", Input: sourceData("typefallback.graphql"), BuiltIn: false}, 2047 {Name: "useptr.graphql", Input: sourceData("useptr.graphql"), BuiltIn: false}, 2048 {Name: "v-ok.graphql", Input: sourceData("v-ok.graphql"), BuiltIn: false}, 2049 {Name: "validtypes.graphql", Input: sourceData("validtypes.graphql"), BuiltIn: false}, 2050 {Name: "variadic.graphql", Input: sourceData("variadic.graphql"), BuiltIn: false}, 2051 {Name: "weird_type_cases.graphql", Input: sourceData("weird_type_cases.graphql"), BuiltIn: false}, 2052 {Name: "wrapped_type.graphql", Input: sourceData("wrapped_type.graphql"), BuiltIn: false}, 2053 } 2054 var parsedSchema = gqlparser.MustLoadSchema(sources...)