github.com/apipluspower/gqlgen@v0.15.2/codegen/testserver/singlefile/generated.go (about) 1 // Code generated by github.com/99designs/gqlgen, DO NOT EDIT. 2 3 package singlefile 4 5 import ( 6 "bytes" 7 "context" 8 "errors" 9 "fmt" 10 "io" 11 "strconv" 12 "sync" 13 "sync/atomic" 14 "time" 15 16 introspection1 "github.com/apipluspower/gqlgen/codegen/testserver/singlefile/introspection" 17 invalid_packagename "github.com/apipluspower/gqlgen/codegen/testserver/singlefile/invalid-packagename" 18 "github.com/apipluspower/gqlgen/codegen/testserver/singlefile/otherpkg" 19 "github.com/apipluspower/gqlgen/graphql" 20 "github.com/apipluspower/gqlgen/graphql/introspection" 21 gqlparser "github.com/vektah/gqlparser/v2" 22 "github.com/vektah/gqlparser/v2/ast" 23 ) 24 25 // region ************************** generated!.gotpl ************************** 26 27 // NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface. 28 func NewExecutableSchema(cfg Config) graphql.ExecutableSchema { 29 return &executableSchema{ 30 resolvers: cfg.Resolvers, 31 directives: cfg.Directives, 32 complexity: cfg.Complexity, 33 } 34 } 35 36 type Config struct { 37 Resolvers ResolverRoot 38 Directives DirectiveRoot 39 Complexity ComplexityRoot 40 } 41 42 type ResolverRoot interface { 43 BackedByInterface() BackedByInterfaceResolver 44 Errors() ErrorsResolver 45 ForcedResolver() ForcedResolverResolver 46 ModelMethods() ModelMethodsResolver 47 Mutation() MutationResolver 48 OverlappingFields() OverlappingFieldsResolver 49 Panics() PanicsResolver 50 Primitive() PrimitiveResolver 51 PrimitiveString() PrimitiveStringResolver 52 Query() QueryResolver 53 Subscription() SubscriptionResolver 54 User() UserResolver 55 WrappedMap() WrappedMapResolver 56 WrappedSlice() WrappedSliceResolver 57 } 58 59 type DirectiveRoot struct { 60 Custom func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 61 Directive1 func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 62 Directive2 func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 63 Directive3 func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 64 Length func(ctx context.Context, obj interface{}, next graphql.Resolver, min int, max *int, message *string) (res interface{}, err error) 65 Logged func(ctx context.Context, obj interface{}, next graphql.Resolver, id string) (res interface{}, err error) 66 MakeNil func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 67 MakeTypedNil func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 68 Order1 func(ctx context.Context, obj interface{}, next graphql.Resolver, location string) (res interface{}, err error) 69 Order2 func(ctx context.Context, obj interface{}, next graphql.Resolver, location string) (res interface{}, err error) 70 Range func(ctx context.Context, obj interface{}, next graphql.Resolver, min *int, max *int) (res interface{}, err error) 71 ToNull func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 72 Unimplemented func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 73 } 74 75 type ComplexityRoot struct { 76 A struct { 77 ID func(childComplexity int) int 78 } 79 80 AIt struct { 81 ID func(childComplexity int) int 82 } 83 84 AbIt struct { 85 ID func(childComplexity int) int 86 } 87 88 Autobind struct { 89 IdInt func(childComplexity int) int 90 IdStr func(childComplexity int) int 91 Int func(childComplexity int) int 92 Int32 func(childComplexity int) int 93 Int64 func(childComplexity int) int 94 } 95 96 B struct { 97 ID func(childComplexity int) int 98 } 99 100 BackedByInterface struct { 101 ID func(childComplexity int) int 102 ThisShouldBind func(childComplexity int) int 103 ThisShouldBindWithError func(childComplexity int) int 104 } 105 106 Cat struct { 107 CatBreed func(childComplexity int) int 108 Species func(childComplexity int) int 109 } 110 111 CheckIssue896 struct { 112 ID func(childComplexity int) int 113 } 114 115 Circle struct { 116 Area func(childComplexity int) int 117 Coordinates func(childComplexity int) int 118 Radius func(childComplexity int) int 119 } 120 121 ConcreteNodeA struct { 122 Child func(childComplexity int) int 123 ID func(childComplexity int) int 124 Name func(childComplexity int) int 125 } 126 127 ConcreteNodeInterface struct { 128 Child func(childComplexity int) int 129 ID func(childComplexity int) int 130 } 131 132 Content_Post struct { 133 Foo func(childComplexity int) int 134 } 135 136 Content_User struct { 137 Foo func(childComplexity int) int 138 } 139 140 Coordinates struct { 141 X func(childComplexity int) int 142 Y func(childComplexity int) int 143 } 144 145 DefaultParametersMirror struct { 146 FalsyBoolean func(childComplexity int) int 147 TruthyBoolean func(childComplexity int) int 148 } 149 150 Dog struct { 151 DogBreed func(childComplexity int) int 152 Species func(childComplexity int) int 153 } 154 155 EmbeddedCase1 struct { 156 ExportedEmbeddedPointerExportedMethod func(childComplexity int) int 157 } 158 159 EmbeddedCase2 struct { 160 UnexportedEmbeddedPointerExportedMethod func(childComplexity int) int 161 } 162 163 EmbeddedCase3 struct { 164 UnexportedEmbeddedInterfaceExportedMethod func(childComplexity int) int 165 } 166 167 EmbeddedDefaultScalar struct { 168 Value func(childComplexity int) int 169 } 170 171 EmbeddedPointer struct { 172 ID func(childComplexity int) int 173 Title func(childComplexity int) int 174 } 175 176 Error struct { 177 ErrorOnNonRequiredField func(childComplexity int) int 178 ErrorOnRequiredField func(childComplexity int) int 179 ID func(childComplexity int) int 180 NilOnRequiredField func(childComplexity int) int 181 } 182 183 Errors struct { 184 A func(childComplexity int) int 185 B func(childComplexity int) int 186 C func(childComplexity int) int 187 D func(childComplexity int) int 188 E func(childComplexity int) int 189 } 190 191 ForcedResolver struct { 192 Field func(childComplexity int) int 193 } 194 195 InnerObject struct { 196 ID func(childComplexity int) int 197 } 198 199 InvalidIdentifier struct { 200 ID func(childComplexity int) int 201 } 202 203 It struct { 204 ID func(childComplexity int) int 205 } 206 207 LoopA struct { 208 B func(childComplexity int) int 209 } 210 211 LoopB struct { 212 A func(childComplexity int) int 213 } 214 215 Map struct { 216 ID func(childComplexity int) int 217 } 218 219 MapStringInterfaceType struct { 220 A func(childComplexity int) int 221 B func(childComplexity int) int 222 } 223 224 ModelMethods struct { 225 NoContext func(childComplexity int) int 226 ResolverField func(childComplexity int) int 227 WithContext func(childComplexity int) int 228 } 229 230 Mutation struct { 231 DefaultInput func(childComplexity int, input DefaultInput) int 232 UpdatePtrToPtr func(childComplexity int, input UpdatePtrToPtrOuter) int 233 UpdateSomething func(childComplexity int, input SpecialInput) int 234 } 235 236 ObjectDirectives struct { 237 NullableText func(childComplexity int) int 238 Order func(childComplexity int) int 239 Text func(childComplexity int) int 240 } 241 242 ObjectDirectivesWithCustomGoModel struct { 243 NullableText func(childComplexity int) int 244 } 245 246 OuterObject struct { 247 Inner func(childComplexity int) int 248 } 249 250 OverlappingFields struct { 251 Foo func(childComplexity int) int 252 NewFoo func(childComplexity int) int 253 OldFoo func(childComplexity int) int 254 } 255 256 Panics struct { 257 ArgUnmarshal func(childComplexity int, u []MarshalPanic) int 258 FieldFuncMarshal func(childComplexity int, u []MarshalPanic) int 259 FieldScalarMarshal func(childComplexity int) int 260 } 261 262 Primitive struct { 263 Squared func(childComplexity int) int 264 Value func(childComplexity int) int 265 } 266 267 PrimitiveString struct { 268 Doubled func(childComplexity int) int 269 Len func(childComplexity int) int 270 Value func(childComplexity int) int 271 } 272 273 PtrToPtrInner struct { 274 Key func(childComplexity int) int 275 Value func(childComplexity int) int 276 } 277 278 PtrToPtrOuter struct { 279 Inner func(childComplexity int) int 280 Name func(childComplexity int) int 281 StupidInner func(childComplexity int) int 282 } 283 284 PtrToSliceContainer struct { 285 PtrToSlice func(childComplexity int) int 286 } 287 288 Query struct { 289 Animal func(childComplexity int) int 290 Autobind func(childComplexity int) int 291 Collision func(childComplexity int) int 292 DefaultParameters func(childComplexity int, falsyBoolean *bool, truthyBoolean *bool) int 293 DefaultScalar func(childComplexity int, arg string) int 294 DeprecatedField func(childComplexity int) int 295 DirectiveArg func(childComplexity int, arg string) int 296 DirectiveDouble func(childComplexity int) int 297 DirectiveField func(childComplexity int) int 298 DirectiveFieldDef func(childComplexity int, ret string) int 299 DirectiveInput func(childComplexity int, arg InputDirectives) int 300 DirectiveInputNullable func(childComplexity int, arg *InputDirectives) int 301 DirectiveInputType func(childComplexity int, arg InnerInput) int 302 DirectiveNullableArg func(childComplexity int, arg *int, arg2 *int, arg3 *string) int 303 DirectiveObject func(childComplexity int) int 304 DirectiveObjectWithCustomGoModel func(childComplexity int) int 305 DirectiveUnimplemented func(childComplexity int) int 306 EmbeddedCase1 func(childComplexity int) int 307 EmbeddedCase2 func(childComplexity int) int 308 EmbeddedCase3 func(childComplexity int) int 309 EnumInInput func(childComplexity int, input *InputWithEnumValue) int 310 ErrorBubble func(childComplexity int) int 311 ErrorBubbleList func(childComplexity int) int 312 ErrorList func(childComplexity int) int 313 Errors func(childComplexity int) int 314 Fallback func(childComplexity int, arg FallbackToStringEncoding) int 315 Infinity func(childComplexity int) int 316 InputNullableSlice func(childComplexity int, arg []string) int 317 InputSlice func(childComplexity int, arg []string) int 318 InvalidIdentifier func(childComplexity int) int 319 Issue896a func(childComplexity int) int 320 MapInput func(childComplexity int, input map[string]interface{}) int 321 MapNestedStringInterface func(childComplexity int, in *NestedMapInput) int 322 MapStringInterface func(childComplexity int, in map[string]interface{}) int 323 ModelMethods func(childComplexity int) int 324 NestedInputs func(childComplexity int, input [][]*OuterInput) int 325 NestedOutputs func(childComplexity int) int 326 NoShape func(childComplexity int) int 327 NoShapeTypedNil func(childComplexity int) int 328 Node func(childComplexity int) int 329 NotAnInterface func(childComplexity int) int 330 NullableArg func(childComplexity int, arg *int) int 331 OptionalUnion func(childComplexity int) int 332 Overlapping func(childComplexity int) int 333 Panics func(childComplexity int) int 334 PrimitiveObject func(childComplexity int) int 335 PrimitiveStringObject func(childComplexity int) int 336 PtrToSliceContainer func(childComplexity int) int 337 Recursive func(childComplexity int, input *RecursiveInputSlice) int 338 ScalarSlice func(childComplexity int) int 339 ShapeUnion func(childComplexity int) int 340 Shapes func(childComplexity int) int 341 Slices func(childComplexity int) int 342 StringFromContextFunction func(childComplexity int) int 343 StringFromContextInterface func(childComplexity int) int 344 User func(childComplexity int, id int) int 345 VOkCaseNil func(childComplexity int) int 346 VOkCaseValue func(childComplexity int) int 347 Valid func(childComplexity int) int 348 ValidType func(childComplexity int) int 349 WrappedMap func(childComplexity int) int 350 WrappedScalar func(childComplexity int) int 351 WrappedSlice func(childComplexity int) int 352 WrappedStruct func(childComplexity int) int 353 } 354 355 Rectangle struct { 356 Area func(childComplexity int) int 357 Coordinates func(childComplexity int) int 358 Length func(childComplexity int) int 359 Width func(childComplexity int) int 360 } 361 362 Slices struct { 363 Test1 func(childComplexity int) int 364 Test2 func(childComplexity int) int 365 Test3 func(childComplexity int) int 366 Test4 func(childComplexity int) int 367 } 368 369 Subscription struct { 370 DirectiveArg func(childComplexity int, arg string) int 371 DirectiveDouble func(childComplexity int) int 372 DirectiveNullableArg func(childComplexity int, arg *int, arg2 *int, arg3 *string) int 373 DirectiveUnimplemented func(childComplexity int) int 374 InitPayload func(childComplexity int) int 375 Issue896b func(childComplexity int) int 376 Updated func(childComplexity int) int 377 } 378 379 User struct { 380 Created func(childComplexity int) int 381 Friends func(childComplexity int) int 382 ID func(childComplexity 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 WrappedMap struct { 402 Get func(childComplexity int, key string) int 403 } 404 405 WrappedSlice struct { 406 Get func(childComplexity int, idx int) int 407 } 408 409 WrappedStruct struct { 410 Desc func(childComplexity int) int 411 Name func(childComplexity int) int 412 } 413 414 XXIt struct { 415 ID func(childComplexity int) int 416 } 417 418 XxIt struct { 419 ID func(childComplexity int) int 420 } 421 422 AsdfIt struct { 423 ID func(childComplexity int) int 424 } 425 426 IIt struct { 427 ID func(childComplexity int) int 428 } 429 } 430 431 type BackedByInterfaceResolver interface { 432 ID(ctx context.Context, obj BackedByInterface) (string, error) 433 } 434 type ErrorsResolver interface { 435 A(ctx context.Context, obj *Errors) (*Error, error) 436 B(ctx context.Context, obj *Errors) (*Error, error) 437 C(ctx context.Context, obj *Errors) (*Error, error) 438 D(ctx context.Context, obj *Errors) (*Error, error) 439 E(ctx context.Context, obj *Errors) (*Error, error) 440 } 441 type ForcedResolverResolver interface { 442 Field(ctx context.Context, obj *ForcedResolver) (*Circle, error) 443 } 444 type ModelMethodsResolver interface { 445 ResolverField(ctx context.Context, obj *ModelMethods) (bool, error) 446 } 447 type MutationResolver interface { 448 DefaultInput(ctx context.Context, input DefaultInput) (*DefaultParametersMirror, error) 449 UpdateSomething(ctx context.Context, input SpecialInput) (string, error) 450 UpdatePtrToPtr(ctx context.Context, input UpdatePtrToPtrOuter) (*PtrToPtrOuter, error) 451 } 452 type OverlappingFieldsResolver interface { 453 OldFoo(ctx context.Context, obj *OverlappingFields) (int, error) 454 } 455 type PanicsResolver interface { 456 FieldScalarMarshal(ctx context.Context, obj *Panics) ([]MarshalPanic, error) 457 458 ArgUnmarshal(ctx context.Context, obj *Panics, u []MarshalPanic) (bool, error) 459 } 460 type PrimitiveResolver interface { 461 Value(ctx context.Context, obj *Primitive) (int, error) 462 } 463 type PrimitiveStringResolver interface { 464 Value(ctx context.Context, obj *PrimitiveString) (string, error) 465 466 Len(ctx context.Context, obj *PrimitiveString) (int, error) 467 } 468 type QueryResolver interface { 469 InvalidIdentifier(ctx context.Context) (*invalid_packagename.InvalidIdentifier, error) 470 Collision(ctx context.Context) (*introspection1.It, error) 471 MapInput(ctx context.Context, input map[string]interface{}) (*bool, error) 472 Recursive(ctx context.Context, input *RecursiveInputSlice) (*bool, error) 473 NestedInputs(ctx context.Context, input [][]*OuterInput) (*bool, error) 474 NestedOutputs(ctx context.Context) ([][]*OuterObject, error) 475 ModelMethods(ctx context.Context) (*ModelMethods, error) 476 User(ctx context.Context, id int) (*User, error) 477 NullableArg(ctx context.Context, arg *int) (*string, error) 478 InputSlice(ctx context.Context, arg []string) (bool, error) 479 InputNullableSlice(ctx context.Context, arg []string) (bool, error) 480 ShapeUnion(ctx context.Context) (ShapeUnion, error) 481 Autobind(ctx context.Context) (*Autobind, error) 482 DeprecatedField(ctx context.Context) (string, error) 483 Overlapping(ctx context.Context) (*OverlappingFields, error) 484 DefaultParameters(ctx context.Context, falsyBoolean *bool, truthyBoolean *bool) (*DefaultParametersMirror, error) 485 DirectiveArg(ctx context.Context, arg string) (*string, error) 486 DirectiveNullableArg(ctx context.Context, arg *int, arg2 *int, arg3 *string) (*string, error) 487 DirectiveInputNullable(ctx context.Context, arg *InputDirectives) (*string, error) 488 DirectiveInput(ctx context.Context, arg InputDirectives) (*string, error) 489 DirectiveInputType(ctx context.Context, arg InnerInput) (*string, error) 490 DirectiveObject(ctx context.Context) (*ObjectDirectives, error) 491 DirectiveObjectWithCustomGoModel(ctx context.Context) (*ObjectDirectivesWithCustomGoModel, error) 492 DirectiveFieldDef(ctx context.Context, ret string) (string, error) 493 DirectiveField(ctx context.Context) (*string, error) 494 DirectiveDouble(ctx context.Context) (*string, error) 495 DirectiveUnimplemented(ctx context.Context) (*string, error) 496 EmbeddedCase1(ctx context.Context) (*EmbeddedCase1, error) 497 EmbeddedCase2(ctx context.Context) (*EmbeddedCase2, error) 498 EmbeddedCase3(ctx context.Context) (*EmbeddedCase3, error) 499 EnumInInput(ctx context.Context, input *InputWithEnumValue) (EnumTest, error) 500 Shapes(ctx context.Context) ([]Shape, error) 501 NoShape(ctx context.Context) (Shape, error) 502 Node(ctx context.Context) (Node, error) 503 NoShapeTypedNil(ctx context.Context) (Shape, error) 504 Animal(ctx context.Context) (Animal, error) 505 NotAnInterface(ctx context.Context) (BackedByInterface, error) 506 Issue896a(ctx context.Context) ([]*CheckIssue896, error) 507 MapStringInterface(ctx context.Context, in map[string]interface{}) (map[string]interface{}, error) 508 MapNestedStringInterface(ctx context.Context, in *NestedMapInput) (map[string]interface{}, error) 509 ErrorBubble(ctx context.Context) (*Error, error) 510 ErrorBubbleList(ctx context.Context) ([]*Error, error) 511 ErrorList(ctx context.Context) ([]*Error, error) 512 Errors(ctx context.Context) (*Errors, error) 513 Valid(ctx context.Context) (string, error) 514 Panics(ctx context.Context) (*Panics, error) 515 PrimitiveObject(ctx context.Context) ([]Primitive, error) 516 PrimitiveStringObject(ctx context.Context) ([]PrimitiveString, error) 517 PtrToSliceContainer(ctx context.Context) (*PtrToSliceContainer, error) 518 Infinity(ctx context.Context) (float64, error) 519 StringFromContextInterface(ctx context.Context) (*StringFromContextInterface, error) 520 StringFromContextFunction(ctx context.Context) (string, error) 521 DefaultScalar(ctx context.Context, arg string) (string, error) 522 Slices(ctx context.Context) (*Slices, error) 523 ScalarSlice(ctx context.Context) ([]byte, error) 524 Fallback(ctx context.Context, arg FallbackToStringEncoding) (FallbackToStringEncoding, error) 525 OptionalUnion(ctx context.Context) (TestUnion, error) 526 VOkCaseValue(ctx context.Context) (*VOkCaseValue, error) 527 VOkCaseNil(ctx context.Context) (*VOkCaseNil, error) 528 ValidType(ctx context.Context) (*ValidType, error) 529 WrappedStruct(ctx context.Context) (*WrappedStruct, error) 530 WrappedScalar(ctx context.Context) (otherpkg.Scalar, error) 531 WrappedMap(ctx context.Context) (WrappedMap, error) 532 WrappedSlice(ctx context.Context) (WrappedSlice, error) 533 } 534 type SubscriptionResolver interface { 535 Updated(ctx context.Context) (<-chan string, error) 536 InitPayload(ctx context.Context) (<-chan string, error) 537 DirectiveArg(ctx context.Context, arg string) (<-chan *string, error) 538 DirectiveNullableArg(ctx context.Context, arg *int, arg2 *int, arg3 *string) (<-chan *string, error) 539 DirectiveDouble(ctx context.Context) (<-chan *string, error) 540 DirectiveUnimplemented(ctx context.Context) (<-chan *string, error) 541 Issue896b(ctx context.Context) (<-chan []*CheckIssue896, error) 542 } 543 type UserResolver interface { 544 Friends(ctx context.Context, obj *User) ([]*User, error) 545 } 546 type WrappedMapResolver interface { 547 Get(ctx context.Context, obj WrappedMap, key string) (string, error) 548 } 549 type WrappedSliceResolver interface { 550 Get(ctx context.Context, obj WrappedSlice, idx int) (string, error) 551 } 552 553 type executableSchema struct { 554 resolvers ResolverRoot 555 directives DirectiveRoot 556 complexity ComplexityRoot 557 } 558 559 func (e *executableSchema) Schema() *ast.Schema { 560 return parsedSchema 561 } 562 563 func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) { 564 ec := executionContext{nil, e} 565 _ = ec 566 switch typeName + "." + field { 567 568 case "A.id": 569 if e.complexity.A.ID == nil { 570 break 571 } 572 573 return e.complexity.A.ID(childComplexity), true 574 575 case "AIt.id": 576 if e.complexity.AIt.ID == nil { 577 break 578 } 579 580 return e.complexity.AIt.ID(childComplexity), true 581 582 case "AbIt.id": 583 if e.complexity.AbIt.ID == nil { 584 break 585 } 586 587 return e.complexity.AbIt.ID(childComplexity), true 588 589 case "Autobind.idInt": 590 if e.complexity.Autobind.IdInt == nil { 591 break 592 } 593 594 return e.complexity.Autobind.IdInt(childComplexity), true 595 596 case "Autobind.idStr": 597 if e.complexity.Autobind.IdStr == nil { 598 break 599 } 600 601 return e.complexity.Autobind.IdStr(childComplexity), true 602 603 case "Autobind.int": 604 if e.complexity.Autobind.Int == nil { 605 break 606 } 607 608 return e.complexity.Autobind.Int(childComplexity), true 609 610 case "Autobind.int32": 611 if e.complexity.Autobind.Int32 == nil { 612 break 613 } 614 615 return e.complexity.Autobind.Int32(childComplexity), true 616 617 case "Autobind.int64": 618 if e.complexity.Autobind.Int64 == nil { 619 break 620 } 621 622 return e.complexity.Autobind.Int64(childComplexity), true 623 624 case "B.id": 625 if e.complexity.B.ID == nil { 626 break 627 } 628 629 return e.complexity.B.ID(childComplexity), true 630 631 case "BackedByInterface.id": 632 if e.complexity.BackedByInterface.ID == nil { 633 break 634 } 635 636 return e.complexity.BackedByInterface.ID(childComplexity), true 637 638 case "BackedByInterface.thisShouldBind": 639 if e.complexity.BackedByInterface.ThisShouldBind == nil { 640 break 641 } 642 643 return e.complexity.BackedByInterface.ThisShouldBind(childComplexity), true 644 645 case "BackedByInterface.thisShouldBindWithError": 646 if e.complexity.BackedByInterface.ThisShouldBindWithError == nil { 647 break 648 } 649 650 return e.complexity.BackedByInterface.ThisShouldBindWithError(childComplexity), true 651 652 case "Cat.catBreed": 653 if e.complexity.Cat.CatBreed == nil { 654 break 655 } 656 657 return e.complexity.Cat.CatBreed(childComplexity), true 658 659 case "Cat.species": 660 if e.complexity.Cat.Species == nil { 661 break 662 } 663 664 return e.complexity.Cat.Species(childComplexity), true 665 666 case "CheckIssue896.id": 667 if e.complexity.CheckIssue896.ID == nil { 668 break 669 } 670 671 return e.complexity.CheckIssue896.ID(childComplexity), true 672 673 case "Circle.area": 674 if e.complexity.Circle.Area == nil { 675 break 676 } 677 678 return e.complexity.Circle.Area(childComplexity), true 679 680 case "Circle.coordinates": 681 if e.complexity.Circle.Coordinates == nil { 682 break 683 } 684 685 return e.complexity.Circle.Coordinates(childComplexity), true 686 687 case "Circle.radius": 688 if e.complexity.Circle.Radius == nil { 689 break 690 } 691 692 return e.complexity.Circle.Radius(childComplexity), true 693 694 case "ConcreteNodeA.child": 695 if e.complexity.ConcreteNodeA.Child == nil { 696 break 697 } 698 699 return e.complexity.ConcreteNodeA.Child(childComplexity), true 700 701 case "ConcreteNodeA.id": 702 if e.complexity.ConcreteNodeA.ID == nil { 703 break 704 } 705 706 return e.complexity.ConcreteNodeA.ID(childComplexity), true 707 708 case "ConcreteNodeA.name": 709 if e.complexity.ConcreteNodeA.Name == nil { 710 break 711 } 712 713 return e.complexity.ConcreteNodeA.Name(childComplexity), true 714 715 case "ConcreteNodeInterface.child": 716 if e.complexity.ConcreteNodeInterface.Child == nil { 717 break 718 } 719 720 return e.complexity.ConcreteNodeInterface.Child(childComplexity), true 721 722 case "ConcreteNodeInterface.id": 723 if e.complexity.ConcreteNodeInterface.ID == nil { 724 break 725 } 726 727 return e.complexity.ConcreteNodeInterface.ID(childComplexity), true 728 729 case "Content_Post.foo": 730 if e.complexity.Content_Post.Foo == nil { 731 break 732 } 733 734 return e.complexity.Content_Post.Foo(childComplexity), true 735 736 case "Content_User.foo": 737 if e.complexity.Content_User.Foo == nil { 738 break 739 } 740 741 return e.complexity.Content_User.Foo(childComplexity), true 742 743 case "Coordinates.x": 744 if e.complexity.Coordinates.X == nil { 745 break 746 } 747 748 return e.complexity.Coordinates.X(childComplexity), true 749 750 case "Coordinates.y": 751 if e.complexity.Coordinates.Y == nil { 752 break 753 } 754 755 return e.complexity.Coordinates.Y(childComplexity), true 756 757 case "DefaultParametersMirror.falsyBoolean": 758 if e.complexity.DefaultParametersMirror.FalsyBoolean == nil { 759 break 760 } 761 762 return e.complexity.DefaultParametersMirror.FalsyBoolean(childComplexity), true 763 764 case "DefaultParametersMirror.truthyBoolean": 765 if e.complexity.DefaultParametersMirror.TruthyBoolean == nil { 766 break 767 } 768 769 return e.complexity.DefaultParametersMirror.TruthyBoolean(childComplexity), true 770 771 case "Dog.dogBreed": 772 if e.complexity.Dog.DogBreed == nil { 773 break 774 } 775 776 return e.complexity.Dog.DogBreed(childComplexity), true 777 778 case "Dog.species": 779 if e.complexity.Dog.Species == nil { 780 break 781 } 782 783 return e.complexity.Dog.Species(childComplexity), true 784 785 case "EmbeddedCase1.exportedEmbeddedPointerExportedMethod": 786 if e.complexity.EmbeddedCase1.ExportedEmbeddedPointerExportedMethod == nil { 787 break 788 } 789 790 return e.complexity.EmbeddedCase1.ExportedEmbeddedPointerExportedMethod(childComplexity), true 791 792 case "EmbeddedCase2.unexportedEmbeddedPointerExportedMethod": 793 if e.complexity.EmbeddedCase2.UnexportedEmbeddedPointerExportedMethod == nil { 794 break 795 } 796 797 return e.complexity.EmbeddedCase2.UnexportedEmbeddedPointerExportedMethod(childComplexity), true 798 799 case "EmbeddedCase3.unexportedEmbeddedInterfaceExportedMethod": 800 if e.complexity.EmbeddedCase3.UnexportedEmbeddedInterfaceExportedMethod == nil { 801 break 802 } 803 804 return e.complexity.EmbeddedCase3.UnexportedEmbeddedInterfaceExportedMethod(childComplexity), true 805 806 case "EmbeddedDefaultScalar.value": 807 if e.complexity.EmbeddedDefaultScalar.Value == nil { 808 break 809 } 810 811 return e.complexity.EmbeddedDefaultScalar.Value(childComplexity), true 812 813 case "EmbeddedPointer.ID": 814 if e.complexity.EmbeddedPointer.ID == nil { 815 break 816 } 817 818 return e.complexity.EmbeddedPointer.ID(childComplexity), true 819 820 case "EmbeddedPointer.Title": 821 if e.complexity.EmbeddedPointer.Title == nil { 822 break 823 } 824 825 return e.complexity.EmbeddedPointer.Title(childComplexity), true 826 827 case "Error.errorOnNonRequiredField": 828 if e.complexity.Error.ErrorOnNonRequiredField == nil { 829 break 830 } 831 832 return e.complexity.Error.ErrorOnNonRequiredField(childComplexity), true 833 834 case "Error.errorOnRequiredField": 835 if e.complexity.Error.ErrorOnRequiredField == nil { 836 break 837 } 838 839 return e.complexity.Error.ErrorOnRequiredField(childComplexity), true 840 841 case "Error.id": 842 if e.complexity.Error.ID == nil { 843 break 844 } 845 846 return e.complexity.Error.ID(childComplexity), true 847 848 case "Error.nilOnRequiredField": 849 if e.complexity.Error.NilOnRequiredField == nil { 850 break 851 } 852 853 return e.complexity.Error.NilOnRequiredField(childComplexity), true 854 855 case "Errors.a": 856 if e.complexity.Errors.A == nil { 857 break 858 } 859 860 return e.complexity.Errors.A(childComplexity), true 861 862 case "Errors.b": 863 if e.complexity.Errors.B == nil { 864 break 865 } 866 867 return e.complexity.Errors.B(childComplexity), true 868 869 case "Errors.c": 870 if e.complexity.Errors.C == nil { 871 break 872 } 873 874 return e.complexity.Errors.C(childComplexity), true 875 876 case "Errors.d": 877 if e.complexity.Errors.D == nil { 878 break 879 } 880 881 return e.complexity.Errors.D(childComplexity), true 882 883 case "Errors.e": 884 if e.complexity.Errors.E == nil { 885 break 886 } 887 888 return e.complexity.Errors.E(childComplexity), true 889 890 case "ForcedResolver.field": 891 if e.complexity.ForcedResolver.Field == nil { 892 break 893 } 894 895 return e.complexity.ForcedResolver.Field(childComplexity), true 896 897 case "InnerObject.id": 898 if e.complexity.InnerObject.ID == nil { 899 break 900 } 901 902 return e.complexity.InnerObject.ID(childComplexity), true 903 904 case "InvalidIdentifier.id": 905 if e.complexity.InvalidIdentifier.ID == nil { 906 break 907 } 908 909 return e.complexity.InvalidIdentifier.ID(childComplexity), true 910 911 case "It.id": 912 if e.complexity.It.ID == nil { 913 break 914 } 915 916 return e.complexity.It.ID(childComplexity), true 917 918 case "LoopA.b": 919 if e.complexity.LoopA.B == nil { 920 break 921 } 922 923 return e.complexity.LoopA.B(childComplexity), true 924 925 case "LoopB.a": 926 if e.complexity.LoopB.A == nil { 927 break 928 } 929 930 return e.complexity.LoopB.A(childComplexity), true 931 932 case "Map.id": 933 if e.complexity.Map.ID == nil { 934 break 935 } 936 937 return e.complexity.Map.ID(childComplexity), true 938 939 case "MapStringInterfaceType.a": 940 if e.complexity.MapStringInterfaceType.A == nil { 941 break 942 } 943 944 return e.complexity.MapStringInterfaceType.A(childComplexity), true 945 946 case "MapStringInterfaceType.b": 947 if e.complexity.MapStringInterfaceType.B == nil { 948 break 949 } 950 951 return e.complexity.MapStringInterfaceType.B(childComplexity), true 952 953 case "ModelMethods.noContext": 954 if e.complexity.ModelMethods.NoContext == nil { 955 break 956 } 957 958 return e.complexity.ModelMethods.NoContext(childComplexity), true 959 960 case "ModelMethods.resolverField": 961 if e.complexity.ModelMethods.ResolverField == nil { 962 break 963 } 964 965 return e.complexity.ModelMethods.ResolverField(childComplexity), true 966 967 case "ModelMethods.withContext": 968 if e.complexity.ModelMethods.WithContext == nil { 969 break 970 } 971 972 return e.complexity.ModelMethods.WithContext(childComplexity), true 973 974 case "Mutation.defaultInput": 975 if e.complexity.Mutation.DefaultInput == nil { 976 break 977 } 978 979 args, err := ec.field_Mutation_defaultInput_args(context.TODO(), rawArgs) 980 if err != nil { 981 return 0, false 982 } 983 984 return e.complexity.Mutation.DefaultInput(childComplexity, args["input"].(DefaultInput)), true 985 986 case "Mutation.updatePtrToPtr": 987 if e.complexity.Mutation.UpdatePtrToPtr == nil { 988 break 989 } 990 991 args, err := ec.field_Mutation_updatePtrToPtr_args(context.TODO(), rawArgs) 992 if err != nil { 993 return 0, false 994 } 995 996 return e.complexity.Mutation.UpdatePtrToPtr(childComplexity, args["input"].(UpdatePtrToPtrOuter)), true 997 998 case "Mutation.updateSomething": 999 if e.complexity.Mutation.UpdateSomething == nil { 1000 break 1001 } 1002 1003 args, err := ec.field_Mutation_updateSomething_args(context.TODO(), rawArgs) 1004 if err != nil { 1005 return 0, false 1006 } 1007 1008 return e.complexity.Mutation.UpdateSomething(childComplexity, args["input"].(SpecialInput)), true 1009 1010 case "ObjectDirectives.nullableText": 1011 if e.complexity.ObjectDirectives.NullableText == nil { 1012 break 1013 } 1014 1015 return e.complexity.ObjectDirectives.NullableText(childComplexity), true 1016 1017 case "ObjectDirectives.order": 1018 if e.complexity.ObjectDirectives.Order == nil { 1019 break 1020 } 1021 1022 return e.complexity.ObjectDirectives.Order(childComplexity), true 1023 1024 case "ObjectDirectives.text": 1025 if e.complexity.ObjectDirectives.Text == nil { 1026 break 1027 } 1028 1029 return e.complexity.ObjectDirectives.Text(childComplexity), true 1030 1031 case "ObjectDirectivesWithCustomGoModel.nullableText": 1032 if e.complexity.ObjectDirectivesWithCustomGoModel.NullableText == nil { 1033 break 1034 } 1035 1036 return e.complexity.ObjectDirectivesWithCustomGoModel.NullableText(childComplexity), true 1037 1038 case "OuterObject.inner": 1039 if e.complexity.OuterObject.Inner == nil { 1040 break 1041 } 1042 1043 return e.complexity.OuterObject.Inner(childComplexity), true 1044 1045 case "OverlappingFields.oneFoo", "OverlappingFields.twoFoo": 1046 if e.complexity.OverlappingFields.Foo == nil { 1047 break 1048 } 1049 1050 return e.complexity.OverlappingFields.Foo(childComplexity), true 1051 1052 case "OverlappingFields.newFoo", "OverlappingFields.new_foo": 1053 if e.complexity.OverlappingFields.NewFoo == nil { 1054 break 1055 } 1056 1057 return e.complexity.OverlappingFields.NewFoo(childComplexity), true 1058 1059 case "OverlappingFields.oldFoo": 1060 if e.complexity.OverlappingFields.OldFoo == nil { 1061 break 1062 } 1063 1064 return e.complexity.OverlappingFields.OldFoo(childComplexity), true 1065 1066 case "Panics.argUnmarshal": 1067 if e.complexity.Panics.ArgUnmarshal == nil { 1068 break 1069 } 1070 1071 args, err := ec.field_Panics_argUnmarshal_args(context.TODO(), rawArgs) 1072 if err != nil { 1073 return 0, false 1074 } 1075 1076 return e.complexity.Panics.ArgUnmarshal(childComplexity, args["u"].([]MarshalPanic)), true 1077 1078 case "Panics.fieldFuncMarshal": 1079 if e.complexity.Panics.FieldFuncMarshal == nil { 1080 break 1081 } 1082 1083 args, err := ec.field_Panics_fieldFuncMarshal_args(context.TODO(), rawArgs) 1084 if err != nil { 1085 return 0, false 1086 } 1087 1088 return e.complexity.Panics.FieldFuncMarshal(childComplexity, args["u"].([]MarshalPanic)), true 1089 1090 case "Panics.fieldScalarMarshal": 1091 if e.complexity.Panics.FieldScalarMarshal == nil { 1092 break 1093 } 1094 1095 return e.complexity.Panics.FieldScalarMarshal(childComplexity), true 1096 1097 case "Primitive.squared": 1098 if e.complexity.Primitive.Squared == nil { 1099 break 1100 } 1101 1102 return e.complexity.Primitive.Squared(childComplexity), true 1103 1104 case "Primitive.value": 1105 if e.complexity.Primitive.Value == nil { 1106 break 1107 } 1108 1109 return e.complexity.Primitive.Value(childComplexity), true 1110 1111 case "PrimitiveString.doubled": 1112 if e.complexity.PrimitiveString.Doubled == nil { 1113 break 1114 } 1115 1116 return e.complexity.PrimitiveString.Doubled(childComplexity), true 1117 1118 case "PrimitiveString.len": 1119 if e.complexity.PrimitiveString.Len == nil { 1120 break 1121 } 1122 1123 return e.complexity.PrimitiveString.Len(childComplexity), true 1124 1125 case "PrimitiveString.value": 1126 if e.complexity.PrimitiveString.Value == nil { 1127 break 1128 } 1129 1130 return e.complexity.PrimitiveString.Value(childComplexity), true 1131 1132 case "PtrToPtrInner.key": 1133 if e.complexity.PtrToPtrInner.Key == nil { 1134 break 1135 } 1136 1137 return e.complexity.PtrToPtrInner.Key(childComplexity), true 1138 1139 case "PtrToPtrInner.value": 1140 if e.complexity.PtrToPtrInner.Value == nil { 1141 break 1142 } 1143 1144 return e.complexity.PtrToPtrInner.Value(childComplexity), true 1145 1146 case "PtrToPtrOuter.inner": 1147 if e.complexity.PtrToPtrOuter.Inner == nil { 1148 break 1149 } 1150 1151 return e.complexity.PtrToPtrOuter.Inner(childComplexity), true 1152 1153 case "PtrToPtrOuter.name": 1154 if e.complexity.PtrToPtrOuter.Name == nil { 1155 break 1156 } 1157 1158 return e.complexity.PtrToPtrOuter.Name(childComplexity), true 1159 1160 case "PtrToPtrOuter.stupidInner": 1161 if e.complexity.PtrToPtrOuter.StupidInner == nil { 1162 break 1163 } 1164 1165 return e.complexity.PtrToPtrOuter.StupidInner(childComplexity), true 1166 1167 case "PtrToSliceContainer.ptrToSlice": 1168 if e.complexity.PtrToSliceContainer.PtrToSlice == nil { 1169 break 1170 } 1171 1172 return e.complexity.PtrToSliceContainer.PtrToSlice(childComplexity), true 1173 1174 case "Query.animal": 1175 if e.complexity.Query.Animal == nil { 1176 break 1177 } 1178 1179 return e.complexity.Query.Animal(childComplexity), true 1180 1181 case "Query.autobind": 1182 if e.complexity.Query.Autobind == nil { 1183 break 1184 } 1185 1186 return e.complexity.Query.Autobind(childComplexity), true 1187 1188 case "Query.collision": 1189 if e.complexity.Query.Collision == nil { 1190 break 1191 } 1192 1193 return e.complexity.Query.Collision(childComplexity), true 1194 1195 case "Query.defaultParameters": 1196 if e.complexity.Query.DefaultParameters == nil { 1197 break 1198 } 1199 1200 args, err := ec.field_Query_defaultParameters_args(context.TODO(), rawArgs) 1201 if err != nil { 1202 return 0, false 1203 } 1204 1205 return e.complexity.Query.DefaultParameters(childComplexity, args["falsyBoolean"].(*bool), args["truthyBoolean"].(*bool)), true 1206 1207 case "Query.defaultScalar": 1208 if e.complexity.Query.DefaultScalar == nil { 1209 break 1210 } 1211 1212 args, err := ec.field_Query_defaultScalar_args(context.TODO(), rawArgs) 1213 if err != nil { 1214 return 0, false 1215 } 1216 1217 return e.complexity.Query.DefaultScalar(childComplexity, args["arg"].(string)), true 1218 1219 case "Query.deprecatedField": 1220 if e.complexity.Query.DeprecatedField == nil { 1221 break 1222 } 1223 1224 return e.complexity.Query.DeprecatedField(childComplexity), true 1225 1226 case "Query.directiveArg": 1227 if e.complexity.Query.DirectiveArg == nil { 1228 break 1229 } 1230 1231 args, err := ec.field_Query_directiveArg_args(context.TODO(), rawArgs) 1232 if err != nil { 1233 return 0, false 1234 } 1235 1236 return e.complexity.Query.DirectiveArg(childComplexity, args["arg"].(string)), true 1237 1238 case "Query.directiveDouble": 1239 if e.complexity.Query.DirectiveDouble == nil { 1240 break 1241 } 1242 1243 return e.complexity.Query.DirectiveDouble(childComplexity), true 1244 1245 case "Query.directiveField": 1246 if e.complexity.Query.DirectiveField == nil { 1247 break 1248 } 1249 1250 return e.complexity.Query.DirectiveField(childComplexity), true 1251 1252 case "Query.directiveFieldDef": 1253 if e.complexity.Query.DirectiveFieldDef == nil { 1254 break 1255 } 1256 1257 args, err := ec.field_Query_directiveFieldDef_args(context.TODO(), rawArgs) 1258 if err != nil { 1259 return 0, false 1260 } 1261 1262 return e.complexity.Query.DirectiveFieldDef(childComplexity, args["ret"].(string)), true 1263 1264 case "Query.directiveInput": 1265 if e.complexity.Query.DirectiveInput == nil { 1266 break 1267 } 1268 1269 args, err := ec.field_Query_directiveInput_args(context.TODO(), rawArgs) 1270 if err != nil { 1271 return 0, false 1272 } 1273 1274 return e.complexity.Query.DirectiveInput(childComplexity, args["arg"].(InputDirectives)), true 1275 1276 case "Query.directiveInputNullable": 1277 if e.complexity.Query.DirectiveInputNullable == nil { 1278 break 1279 } 1280 1281 args, err := ec.field_Query_directiveInputNullable_args(context.TODO(), rawArgs) 1282 if err != nil { 1283 return 0, false 1284 } 1285 1286 return e.complexity.Query.DirectiveInputNullable(childComplexity, args["arg"].(*InputDirectives)), true 1287 1288 case "Query.directiveInputType": 1289 if e.complexity.Query.DirectiveInputType == nil { 1290 break 1291 } 1292 1293 args, err := ec.field_Query_directiveInputType_args(context.TODO(), rawArgs) 1294 if err != nil { 1295 return 0, false 1296 } 1297 1298 return e.complexity.Query.DirectiveInputType(childComplexity, args["arg"].(InnerInput)), true 1299 1300 case "Query.directiveNullableArg": 1301 if e.complexity.Query.DirectiveNullableArg == nil { 1302 break 1303 } 1304 1305 args, err := ec.field_Query_directiveNullableArg_args(context.TODO(), rawArgs) 1306 if err != nil { 1307 return 0, false 1308 } 1309 1310 return e.complexity.Query.DirectiveNullableArg(childComplexity, args["arg"].(*int), args["arg2"].(*int), args["arg3"].(*string)), true 1311 1312 case "Query.directiveObject": 1313 if e.complexity.Query.DirectiveObject == nil { 1314 break 1315 } 1316 1317 return e.complexity.Query.DirectiveObject(childComplexity), true 1318 1319 case "Query.directiveObjectWithCustomGoModel": 1320 if e.complexity.Query.DirectiveObjectWithCustomGoModel == nil { 1321 break 1322 } 1323 1324 return e.complexity.Query.DirectiveObjectWithCustomGoModel(childComplexity), true 1325 1326 case "Query.directiveUnimplemented": 1327 if e.complexity.Query.DirectiveUnimplemented == nil { 1328 break 1329 } 1330 1331 return e.complexity.Query.DirectiveUnimplemented(childComplexity), true 1332 1333 case "Query.embeddedCase1": 1334 if e.complexity.Query.EmbeddedCase1 == nil { 1335 break 1336 } 1337 1338 return e.complexity.Query.EmbeddedCase1(childComplexity), true 1339 1340 case "Query.embeddedCase2": 1341 if e.complexity.Query.EmbeddedCase2 == nil { 1342 break 1343 } 1344 1345 return e.complexity.Query.EmbeddedCase2(childComplexity), true 1346 1347 case "Query.embeddedCase3": 1348 if e.complexity.Query.EmbeddedCase3 == nil { 1349 break 1350 } 1351 1352 return e.complexity.Query.EmbeddedCase3(childComplexity), true 1353 1354 case "Query.enumInInput": 1355 if e.complexity.Query.EnumInInput == nil { 1356 break 1357 } 1358 1359 args, err := ec.field_Query_enumInInput_args(context.TODO(), rawArgs) 1360 if err != nil { 1361 return 0, false 1362 } 1363 1364 return e.complexity.Query.EnumInInput(childComplexity, args["input"].(*InputWithEnumValue)), true 1365 1366 case "Query.errorBubble": 1367 if e.complexity.Query.ErrorBubble == nil { 1368 break 1369 } 1370 1371 return e.complexity.Query.ErrorBubble(childComplexity), true 1372 1373 case "Query.errorBubbleList": 1374 if e.complexity.Query.ErrorBubbleList == nil { 1375 break 1376 } 1377 1378 return e.complexity.Query.ErrorBubbleList(childComplexity), true 1379 1380 case "Query.errorList": 1381 if e.complexity.Query.ErrorList == nil { 1382 break 1383 } 1384 1385 return e.complexity.Query.ErrorList(childComplexity), true 1386 1387 case "Query.errors": 1388 if e.complexity.Query.Errors == nil { 1389 break 1390 } 1391 1392 return e.complexity.Query.Errors(childComplexity), true 1393 1394 case "Query.fallback": 1395 if e.complexity.Query.Fallback == nil { 1396 break 1397 } 1398 1399 args, err := ec.field_Query_fallback_args(context.TODO(), rawArgs) 1400 if err != nil { 1401 return 0, false 1402 } 1403 1404 return e.complexity.Query.Fallback(childComplexity, args["arg"].(FallbackToStringEncoding)), true 1405 1406 case "Query.infinity": 1407 if e.complexity.Query.Infinity == nil { 1408 break 1409 } 1410 1411 return e.complexity.Query.Infinity(childComplexity), true 1412 1413 case "Query.inputNullableSlice": 1414 if e.complexity.Query.InputNullableSlice == nil { 1415 break 1416 } 1417 1418 args, err := ec.field_Query_inputNullableSlice_args(context.TODO(), rawArgs) 1419 if err != nil { 1420 return 0, false 1421 } 1422 1423 return e.complexity.Query.InputNullableSlice(childComplexity, args["arg"].([]string)), true 1424 1425 case "Query.inputSlice": 1426 if e.complexity.Query.InputSlice == nil { 1427 break 1428 } 1429 1430 args, err := ec.field_Query_inputSlice_args(context.TODO(), rawArgs) 1431 if err != nil { 1432 return 0, false 1433 } 1434 1435 return e.complexity.Query.InputSlice(childComplexity, args["arg"].([]string)), true 1436 1437 case "Query.invalidIdentifier": 1438 if e.complexity.Query.InvalidIdentifier == nil { 1439 break 1440 } 1441 1442 return e.complexity.Query.InvalidIdentifier(childComplexity), true 1443 1444 case "Query.issue896a": 1445 if e.complexity.Query.Issue896a == nil { 1446 break 1447 } 1448 1449 return e.complexity.Query.Issue896a(childComplexity), true 1450 1451 case "Query.mapInput": 1452 if e.complexity.Query.MapInput == nil { 1453 break 1454 } 1455 1456 args, err := ec.field_Query_mapInput_args(context.TODO(), rawArgs) 1457 if err != nil { 1458 return 0, false 1459 } 1460 1461 return e.complexity.Query.MapInput(childComplexity, args["input"].(map[string]interface{})), true 1462 1463 case "Query.mapNestedStringInterface": 1464 if e.complexity.Query.MapNestedStringInterface == nil { 1465 break 1466 } 1467 1468 args, err := ec.field_Query_mapNestedStringInterface_args(context.TODO(), rawArgs) 1469 if err != nil { 1470 return 0, false 1471 } 1472 1473 return e.complexity.Query.MapNestedStringInterface(childComplexity, args["in"].(*NestedMapInput)), true 1474 1475 case "Query.mapStringInterface": 1476 if e.complexity.Query.MapStringInterface == nil { 1477 break 1478 } 1479 1480 args, err := ec.field_Query_mapStringInterface_args(context.TODO(), rawArgs) 1481 if err != nil { 1482 return 0, false 1483 } 1484 1485 return e.complexity.Query.MapStringInterface(childComplexity, args["in"].(map[string]interface{})), true 1486 1487 case "Query.modelMethods": 1488 if e.complexity.Query.ModelMethods == nil { 1489 break 1490 } 1491 1492 return e.complexity.Query.ModelMethods(childComplexity), true 1493 1494 case "Query.nestedInputs": 1495 if e.complexity.Query.NestedInputs == nil { 1496 break 1497 } 1498 1499 args, err := ec.field_Query_nestedInputs_args(context.TODO(), rawArgs) 1500 if err != nil { 1501 return 0, false 1502 } 1503 1504 return e.complexity.Query.NestedInputs(childComplexity, args["input"].([][]*OuterInput)), true 1505 1506 case "Query.nestedOutputs": 1507 if e.complexity.Query.NestedOutputs == nil { 1508 break 1509 } 1510 1511 return e.complexity.Query.NestedOutputs(childComplexity), true 1512 1513 case "Query.noShape": 1514 if e.complexity.Query.NoShape == nil { 1515 break 1516 } 1517 1518 return e.complexity.Query.NoShape(childComplexity), true 1519 1520 case "Query.noShapeTypedNil": 1521 if e.complexity.Query.NoShapeTypedNil == nil { 1522 break 1523 } 1524 1525 return e.complexity.Query.NoShapeTypedNil(childComplexity), true 1526 1527 case "Query.node": 1528 if e.complexity.Query.Node == nil { 1529 break 1530 } 1531 1532 return e.complexity.Query.Node(childComplexity), true 1533 1534 case "Query.notAnInterface": 1535 if e.complexity.Query.NotAnInterface == nil { 1536 break 1537 } 1538 1539 return e.complexity.Query.NotAnInterface(childComplexity), true 1540 1541 case "Query.nullableArg": 1542 if e.complexity.Query.NullableArg == nil { 1543 break 1544 } 1545 1546 args, err := ec.field_Query_nullableArg_args(context.TODO(), rawArgs) 1547 if err != nil { 1548 return 0, false 1549 } 1550 1551 return e.complexity.Query.NullableArg(childComplexity, args["arg"].(*int)), true 1552 1553 case "Query.optionalUnion": 1554 if e.complexity.Query.OptionalUnion == nil { 1555 break 1556 } 1557 1558 return e.complexity.Query.OptionalUnion(childComplexity), true 1559 1560 case "Query.overlapping": 1561 if e.complexity.Query.Overlapping == nil { 1562 break 1563 } 1564 1565 return e.complexity.Query.Overlapping(childComplexity), true 1566 1567 case "Query.panics": 1568 if e.complexity.Query.Panics == nil { 1569 break 1570 } 1571 1572 return e.complexity.Query.Panics(childComplexity), true 1573 1574 case "Query.primitiveObject": 1575 if e.complexity.Query.PrimitiveObject == nil { 1576 break 1577 } 1578 1579 return e.complexity.Query.PrimitiveObject(childComplexity), true 1580 1581 case "Query.primitiveStringObject": 1582 if e.complexity.Query.PrimitiveStringObject == nil { 1583 break 1584 } 1585 1586 return e.complexity.Query.PrimitiveStringObject(childComplexity), true 1587 1588 case "Query.ptrToSliceContainer": 1589 if e.complexity.Query.PtrToSliceContainer == nil { 1590 break 1591 } 1592 1593 return e.complexity.Query.PtrToSliceContainer(childComplexity), true 1594 1595 case "Query.recursive": 1596 if e.complexity.Query.Recursive == nil { 1597 break 1598 } 1599 1600 args, err := ec.field_Query_recursive_args(context.TODO(), rawArgs) 1601 if err != nil { 1602 return 0, false 1603 } 1604 1605 return e.complexity.Query.Recursive(childComplexity, args["input"].(*RecursiveInputSlice)), true 1606 1607 case "Query.scalarSlice": 1608 if e.complexity.Query.ScalarSlice == nil { 1609 break 1610 } 1611 1612 return e.complexity.Query.ScalarSlice(childComplexity), true 1613 1614 case "Query.shapeUnion": 1615 if e.complexity.Query.ShapeUnion == nil { 1616 break 1617 } 1618 1619 return e.complexity.Query.ShapeUnion(childComplexity), true 1620 1621 case "Query.shapes": 1622 if e.complexity.Query.Shapes == nil { 1623 break 1624 } 1625 1626 return e.complexity.Query.Shapes(childComplexity), true 1627 1628 case "Query.slices": 1629 if e.complexity.Query.Slices == nil { 1630 break 1631 } 1632 1633 return e.complexity.Query.Slices(childComplexity), true 1634 1635 case "Query.stringFromContextFunction": 1636 if e.complexity.Query.StringFromContextFunction == nil { 1637 break 1638 } 1639 1640 return e.complexity.Query.StringFromContextFunction(childComplexity), true 1641 1642 case "Query.stringFromContextInterface": 1643 if e.complexity.Query.StringFromContextInterface == nil { 1644 break 1645 } 1646 1647 return e.complexity.Query.StringFromContextInterface(childComplexity), true 1648 1649 case "Query.user": 1650 if e.complexity.Query.User == nil { 1651 break 1652 } 1653 1654 args, err := ec.field_Query_user_args(context.TODO(), rawArgs) 1655 if err != nil { 1656 return 0, false 1657 } 1658 1659 return e.complexity.Query.User(childComplexity, args["id"].(int)), true 1660 1661 case "Query.vOkCaseNil": 1662 if e.complexity.Query.VOkCaseNil == nil { 1663 break 1664 } 1665 1666 return e.complexity.Query.VOkCaseNil(childComplexity), true 1667 1668 case "Query.vOkCaseValue": 1669 if e.complexity.Query.VOkCaseValue == nil { 1670 break 1671 } 1672 1673 return e.complexity.Query.VOkCaseValue(childComplexity), true 1674 1675 case "Query.valid": 1676 if e.complexity.Query.Valid == nil { 1677 break 1678 } 1679 1680 return e.complexity.Query.Valid(childComplexity), true 1681 1682 case "Query.validType": 1683 if e.complexity.Query.ValidType == nil { 1684 break 1685 } 1686 1687 return e.complexity.Query.ValidType(childComplexity), true 1688 1689 case "Query.wrappedMap": 1690 if e.complexity.Query.WrappedMap == nil { 1691 break 1692 } 1693 1694 return e.complexity.Query.WrappedMap(childComplexity), true 1695 1696 case "Query.wrappedScalar": 1697 if e.complexity.Query.WrappedScalar == nil { 1698 break 1699 } 1700 1701 return e.complexity.Query.WrappedScalar(childComplexity), true 1702 1703 case "Query.wrappedSlice": 1704 if e.complexity.Query.WrappedSlice == nil { 1705 break 1706 } 1707 1708 return e.complexity.Query.WrappedSlice(childComplexity), true 1709 1710 case "Query.wrappedStruct": 1711 if e.complexity.Query.WrappedStruct == nil { 1712 break 1713 } 1714 1715 return e.complexity.Query.WrappedStruct(childComplexity), true 1716 1717 case "Rectangle.area": 1718 if e.complexity.Rectangle.Area == nil { 1719 break 1720 } 1721 1722 return e.complexity.Rectangle.Area(childComplexity), true 1723 1724 case "Rectangle.coordinates": 1725 if e.complexity.Rectangle.Coordinates == nil { 1726 break 1727 } 1728 1729 return e.complexity.Rectangle.Coordinates(childComplexity), true 1730 1731 case "Rectangle.length": 1732 if e.complexity.Rectangle.Length == nil { 1733 break 1734 } 1735 1736 return e.complexity.Rectangle.Length(childComplexity), true 1737 1738 case "Rectangle.width": 1739 if e.complexity.Rectangle.Width == nil { 1740 break 1741 } 1742 1743 return e.complexity.Rectangle.Width(childComplexity), true 1744 1745 case "Slices.test1": 1746 if e.complexity.Slices.Test1 == nil { 1747 break 1748 } 1749 1750 return e.complexity.Slices.Test1(childComplexity), true 1751 1752 case "Slices.test2": 1753 if e.complexity.Slices.Test2 == nil { 1754 break 1755 } 1756 1757 return e.complexity.Slices.Test2(childComplexity), true 1758 1759 case "Slices.test3": 1760 if e.complexity.Slices.Test3 == nil { 1761 break 1762 } 1763 1764 return e.complexity.Slices.Test3(childComplexity), true 1765 1766 case "Slices.test4": 1767 if e.complexity.Slices.Test4 == nil { 1768 break 1769 } 1770 1771 return e.complexity.Slices.Test4(childComplexity), true 1772 1773 case "Subscription.directiveArg": 1774 if e.complexity.Subscription.DirectiveArg == nil { 1775 break 1776 } 1777 1778 args, err := ec.field_Subscription_directiveArg_args(context.TODO(), rawArgs) 1779 if err != nil { 1780 return 0, false 1781 } 1782 1783 return e.complexity.Subscription.DirectiveArg(childComplexity, args["arg"].(string)), true 1784 1785 case "Subscription.directiveDouble": 1786 if e.complexity.Subscription.DirectiveDouble == nil { 1787 break 1788 } 1789 1790 return e.complexity.Subscription.DirectiveDouble(childComplexity), true 1791 1792 case "Subscription.directiveNullableArg": 1793 if e.complexity.Subscription.DirectiveNullableArg == nil { 1794 break 1795 } 1796 1797 args, err := ec.field_Subscription_directiveNullableArg_args(context.TODO(), rawArgs) 1798 if err != nil { 1799 return 0, false 1800 } 1801 1802 return e.complexity.Subscription.DirectiveNullableArg(childComplexity, args["arg"].(*int), args["arg2"].(*int), args["arg3"].(*string)), true 1803 1804 case "Subscription.directiveUnimplemented": 1805 if e.complexity.Subscription.DirectiveUnimplemented == nil { 1806 break 1807 } 1808 1809 return e.complexity.Subscription.DirectiveUnimplemented(childComplexity), true 1810 1811 case "Subscription.initPayload": 1812 if e.complexity.Subscription.InitPayload == nil { 1813 break 1814 } 1815 1816 return e.complexity.Subscription.InitPayload(childComplexity), true 1817 1818 case "Subscription.issue896b": 1819 if e.complexity.Subscription.Issue896b == nil { 1820 break 1821 } 1822 1823 return e.complexity.Subscription.Issue896b(childComplexity), true 1824 1825 case "Subscription.updated": 1826 if e.complexity.Subscription.Updated == nil { 1827 break 1828 } 1829 1830 return e.complexity.Subscription.Updated(childComplexity), true 1831 1832 case "User.created": 1833 if e.complexity.User.Created == nil { 1834 break 1835 } 1836 1837 return e.complexity.User.Created(childComplexity), true 1838 1839 case "User.friends": 1840 if e.complexity.User.Friends == nil { 1841 break 1842 } 1843 1844 return e.complexity.User.Friends(childComplexity), true 1845 1846 case "User.id": 1847 if e.complexity.User.ID == nil { 1848 break 1849 } 1850 1851 return e.complexity.User.ID(childComplexity), true 1852 1853 case "User.updated": 1854 if e.complexity.User.Updated == nil { 1855 break 1856 } 1857 1858 return e.complexity.User.Updated(childComplexity), true 1859 1860 case "VOkCaseNil.value": 1861 if e.complexity.VOkCaseNil.Value == nil { 1862 break 1863 } 1864 1865 return e.complexity.VOkCaseNil.Value(childComplexity), true 1866 1867 case "VOkCaseValue.value": 1868 if e.complexity.VOkCaseValue.Value == nil { 1869 break 1870 } 1871 1872 return e.complexity.VOkCaseValue.Value(childComplexity), true 1873 1874 case "ValidType.differentCase": 1875 if e.complexity.ValidType.DifferentCase == nil { 1876 break 1877 } 1878 1879 return e.complexity.ValidType.DifferentCase(childComplexity), true 1880 1881 case "ValidType.different_case": 1882 if e.complexity.ValidType.DifferentCaseOld == nil { 1883 break 1884 } 1885 1886 return e.complexity.ValidType.DifferentCaseOld(childComplexity), true 1887 1888 case "ValidType.validArgs": 1889 if e.complexity.ValidType.ValidArgs == nil { 1890 break 1891 } 1892 1893 args, err := ec.field_ValidType_validArgs_args(context.TODO(), rawArgs) 1894 if err != nil { 1895 return 0, false 1896 } 1897 1898 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 1899 1900 case "ValidType.validInputKeywords": 1901 if e.complexity.ValidType.ValidInputKeywords == nil { 1902 break 1903 } 1904 1905 args, err := ec.field_ValidType_validInputKeywords_args(context.TODO(), rawArgs) 1906 if err != nil { 1907 return 0, false 1908 } 1909 1910 return e.complexity.ValidType.ValidInputKeywords(childComplexity, args["input"].(*ValidInput)), true 1911 1912 case "WrappedMap.get": 1913 if e.complexity.WrappedMap.Get == nil { 1914 break 1915 } 1916 1917 args, err := ec.field_WrappedMap_get_args(context.TODO(), rawArgs) 1918 if err != nil { 1919 return 0, false 1920 } 1921 1922 return e.complexity.WrappedMap.Get(childComplexity, args["key"].(string)), true 1923 1924 case "WrappedSlice.get": 1925 if e.complexity.WrappedSlice.Get == nil { 1926 break 1927 } 1928 1929 args, err := ec.field_WrappedSlice_get_args(context.TODO(), rawArgs) 1930 if err != nil { 1931 return 0, false 1932 } 1933 1934 return e.complexity.WrappedSlice.Get(childComplexity, args["idx"].(int)), true 1935 1936 case "WrappedStruct.desc": 1937 if e.complexity.WrappedStruct.Desc == nil { 1938 break 1939 } 1940 1941 return e.complexity.WrappedStruct.Desc(childComplexity), true 1942 1943 case "WrappedStruct.name": 1944 if e.complexity.WrappedStruct.Name == nil { 1945 break 1946 } 1947 1948 return e.complexity.WrappedStruct.Name(childComplexity), true 1949 1950 case "XXIt.id": 1951 if e.complexity.XXIt.ID == nil { 1952 break 1953 } 1954 1955 return e.complexity.XXIt.ID(childComplexity), true 1956 1957 case "XxIt.id": 1958 if e.complexity.XxIt.ID == nil { 1959 break 1960 } 1961 1962 return e.complexity.XxIt.ID(childComplexity), true 1963 1964 case "asdfIt.id": 1965 if e.complexity.AsdfIt.ID == nil { 1966 break 1967 } 1968 1969 return e.complexity.AsdfIt.ID(childComplexity), true 1970 1971 case "iIt.id": 1972 if e.complexity.IIt.ID == nil { 1973 break 1974 } 1975 1976 return e.complexity.IIt.ID(childComplexity), true 1977 1978 } 1979 return 0, false 1980 } 1981 1982 func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { 1983 rc := graphql.GetOperationContext(ctx) 1984 ec := executionContext{rc, e} 1985 first := true 1986 1987 switch rc.Operation.Operation { 1988 case ast.Query: 1989 return func(ctx context.Context) *graphql.Response { 1990 if !first { 1991 return nil 1992 } 1993 first = false 1994 data := ec._Query(ctx, rc.Operation.SelectionSet) 1995 var buf bytes.Buffer 1996 data.MarshalGQL(&buf) 1997 1998 return &graphql.Response{ 1999 Data: buf.Bytes(), 2000 } 2001 } 2002 case ast.Mutation: 2003 return func(ctx context.Context) *graphql.Response { 2004 if !first { 2005 return nil 2006 } 2007 first = false 2008 data := ec._Mutation(ctx, rc.Operation.SelectionSet) 2009 var buf bytes.Buffer 2010 data.MarshalGQL(&buf) 2011 2012 return &graphql.Response{ 2013 Data: buf.Bytes(), 2014 } 2015 } 2016 case ast.Subscription: 2017 next := ec._Subscription(ctx, rc.Operation.SelectionSet) 2018 2019 var buf bytes.Buffer 2020 return func(ctx context.Context) *graphql.Response { 2021 buf.Reset() 2022 data := next() 2023 2024 if data == nil { 2025 return nil 2026 } 2027 data.MarshalGQL(&buf) 2028 2029 return &graphql.Response{ 2030 Data: buf.Bytes(), 2031 } 2032 } 2033 2034 default: 2035 return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation")) 2036 } 2037 } 2038 2039 type executionContext struct { 2040 *graphql.OperationContext 2041 *executableSchema 2042 } 2043 2044 func (ec *executionContext) introspectSchema() (*introspection.Schema, error) { 2045 if ec.DisableIntrospection { 2046 return nil, errors.New("introspection disabled") 2047 } 2048 return introspection.WrapSchema(parsedSchema), nil 2049 } 2050 2051 func (ec *executionContext) introspectType(name string) (*introspection.Type, error) { 2052 if ec.DisableIntrospection { 2053 return nil, errors.New("introspection disabled") 2054 } 2055 return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil 2056 } 2057 2058 var sources = []*ast.Source{ 2059 {Name: "builtinscalar.graphql", Input: ` 2060 """ 2061 Since gqlgen defines default implementation for a Map scalar, this tests that the builtin is _not_ 2062 added to the TypeMap 2063 """ 2064 type Map { 2065 id: ID! 2066 } 2067 `, BuiltIn: false}, 2068 {Name: "complexity.graphql", Input: `extend type Query { 2069 overlapping: OverlappingFields 2070 } 2071 2072 type OverlappingFields { 2073 oneFoo: Int! @goField(name: "foo") 2074 twoFoo: Int! @goField(name: "foo") 2075 oldFoo: Int! @goField(name: "foo", forceResolver: true) 2076 newFoo: Int! 2077 new_foo: Int! 2078 } 2079 `, BuiltIn: false}, 2080 {Name: "defaults.graphql", Input: `extend type Query { 2081 defaultParameters( 2082 falsyBoolean: Boolean = false 2083 truthyBoolean: Boolean = true 2084 ): DefaultParametersMirror! 2085 } 2086 2087 extend type Mutation { 2088 defaultInput(input: DefaultInput!): DefaultParametersMirror! 2089 } 2090 2091 input DefaultInput { 2092 falsyBoolean: Boolean = false 2093 truthyBoolean: Boolean = true 2094 } 2095 2096 type DefaultParametersMirror { 2097 falsyBoolean: Boolean 2098 truthyBoolean: Boolean 2099 } 2100 `, BuiltIn: false}, 2101 {Name: "directive.graphql", Input: `directive @length(min: Int!, max: Int, message: String) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | FIELD_DEFINITION 2102 directive @range(min: Int = 0, max: Int) on ARGUMENT_DEFINITION 2103 directive @custom on ARGUMENT_DEFINITION 2104 directive @logged(id: UUID!) on FIELD 2105 directive @toNull on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | FIELD_DEFINITION 2106 directive @directive1 on FIELD_DEFINITION 2107 directive @directive2 on FIELD_DEFINITION 2108 directive @directive3 on INPUT_OBJECT 2109 directive @unimplemented on FIELD_DEFINITION 2110 directive @order1(location: String!) repeatable on FIELD_DEFINITION | OBJECT 2111 directive @order2(location: String!) on OBJECT 2112 2113 extend type Query { 2114 directiveArg(arg: String! @length(min:1, max: 255, message: "invalid length")): String 2115 directiveNullableArg(arg: Int @range(min:0), arg2: Int @range, arg3: String @toNull): String 2116 directiveInputNullable(arg: InputDirectives): String 2117 directiveInput(arg: InputDirectives!): String 2118 directiveInputType(arg: InnerInput! @custom): String 2119 directiveObject: ObjectDirectives @order1(location: "Query_field") 2120 directiveObjectWithCustomGoModel: ObjectDirectivesWithCustomGoModel 2121 directiveFieldDef(ret: String!): String! @length(min: 1, message: "not valid") 2122 directiveField: String 2123 directiveDouble: String @directive1 @directive2 2124 directiveUnimplemented: String @unimplemented 2125 } 2126 2127 extend type Subscription { 2128 directiveArg(arg: String! @length(min:1, max: 255, message: "invalid length")): String 2129 directiveNullableArg(arg: Int @range(min:0), arg2: Int @range, arg3: String @toNull): String 2130 directiveDouble: String @directive1 @directive2 2131 directiveUnimplemented: String @unimplemented 2132 } 2133 2134 input InputDirectives @directive3 { 2135 text: String! @length(min: 0, max: 7, message: "not valid") 2136 nullableText: String @toNull 2137 inner: InnerDirectives! 2138 innerNullable: InnerDirectives 2139 thirdParty: ThirdParty @length(min: 0, max: 7) 2140 } 2141 2142 input InnerDirectives { 2143 message: String! @length(min: 1, message: "not valid") 2144 } 2145 2146 type ObjectDirectives @order1(location: "order1_1") @order1(location: "order1_2") @order2(location: "order2_1") { 2147 text: String! @length(min: 0, max: 7, message: "not valid") 2148 nullableText: String @toNull 2149 order: [String!]! 2150 } 2151 2152 type ObjectDirectivesWithCustomGoModel { 2153 nullableText: String @toNull 2154 } 2155 `, BuiltIn: false}, 2156 {Name: "embedded.graphql", Input: `extend type Query { 2157 embeddedCase1: EmbeddedCase1 2158 embeddedCase2: EmbeddedCase2 2159 embeddedCase3: EmbeddedCase3 2160 } 2161 2162 type EmbeddedCase1 @goModel(model:"singlefile.EmbeddedCase1") { 2163 exportedEmbeddedPointerExportedMethod: String! 2164 } 2165 2166 type EmbeddedCase2 @goModel(model:"singlefile.EmbeddedCase2") { 2167 unexportedEmbeddedPointerExportedMethod: String! 2168 } 2169 2170 type EmbeddedCase3 @goModel(model:"singlefile.EmbeddedCase3") { 2171 unexportedEmbeddedInterfaceExportedMethod: String! 2172 } 2173 `, BuiltIn: false}, 2174 {Name: "enum.graphql", Input: `enum EnumTest { 2175 OK 2176 NG 2177 } 2178 2179 input InputWithEnumValue { 2180 enum: EnumTest! 2181 } 2182 2183 extend type Query { 2184 enumInInput(input: InputWithEnumValue): EnumTest! 2185 } 2186 `, BuiltIn: false}, 2187 {Name: "interfaces.graphql", Input: `extend type Query { 2188 shapes: [Shape] 2189 noShape: Shape @makeNil 2190 node: Node! 2191 noShapeTypedNil: Shape @makeTypedNil 2192 animal: Animal @makeTypedNil 2193 notAnInterface: BackedByInterface 2194 } 2195 2196 interface Animal { 2197 species: String! 2198 } 2199 2200 type BackedByInterface { 2201 id: String! 2202 thisShouldBind: String! 2203 thisShouldBindWithError: String! 2204 } 2205 2206 type Dog implements Animal { 2207 species: String! 2208 dogBreed: String! 2209 } 2210 2211 type Cat implements Animal { 2212 species: String! 2213 catBreed: String! 2214 } 2215 2216 type Coordinates { 2217 x: Float! 2218 y: Float! 2219 } 2220 interface Shape { 2221 area: Float 2222 coordinates: Coordinates 2223 } 2224 2225 type Circle implements Shape { 2226 radius: Float 2227 area: Float 2228 coordinates: Coordinates 2229 } 2230 type Rectangle implements Shape { 2231 length: Float 2232 width: Float 2233 area: Float 2234 coordinates: Coordinates 2235 } 2236 union ShapeUnion @goModel(model: "singlefile.ShapeUnion") = Circle | Rectangle 2237 2238 directive @makeNil on FIELD_DEFINITION 2239 directive @makeTypedNil on FIELD_DEFINITION 2240 2241 interface Node { 2242 id: ID! 2243 child: Node! 2244 } 2245 2246 type ConcreteNodeA implements Node { 2247 id: ID! 2248 child: Node! 2249 name: String! 2250 } 2251 2252 " Implements the Node interface with another interface " 2253 type ConcreteNodeInterface implements Node { 2254 id: ID! 2255 child: Node! 2256 } 2257 `, BuiltIn: false}, 2258 {Name: "issue896.graphql", Input: `# This example should build stable output. If the file content starts 2259 # alternating nondeterministically between two outputs, then see 2260 # https://github.com/99designs/gqlgen/issues/896. 2261 2262 extend schema { 2263 query: Query 2264 subscription: Subscription 2265 } 2266 2267 type CheckIssue896 {id: Int} 2268 2269 extend type Query { 2270 issue896a: [CheckIssue896!] # Note the "!" or lack thereof. 2271 } 2272 2273 extend type Subscription { 2274 issue896b: [CheckIssue896] # Note the "!" or lack thereof. 2275 } 2276 `, BuiltIn: false}, 2277 {Name: "loops.graphql", Input: `type LoopA { 2278 b: LoopB! 2279 } 2280 2281 type LoopB { 2282 a: LoopA! 2283 } 2284 `, BuiltIn: false}, 2285 {Name: "maps.graphql", Input: `extend type Query { 2286 mapStringInterface(in: MapStringInterfaceInput): MapStringInterfaceType 2287 mapNestedStringInterface(in: NestedMapInput): MapStringInterfaceType 2288 } 2289 2290 type MapStringInterfaceType @goModel(model: "map[string]interface{}") { 2291 a: String 2292 b: Int 2293 } 2294 2295 input MapStringInterfaceInput @goModel(model: "map[string]interface{}") { 2296 a: String 2297 b: Int 2298 } 2299 2300 input NestedMapInput { 2301 map: MapStringInterfaceInput 2302 } 2303 `, BuiltIn: false}, 2304 {Name: "mutation_with_custom_scalar.graphql", Input: `extend type Mutation { 2305 updateSomething(input: SpecialInput!): String! 2306 } 2307 2308 scalar Email 2309 2310 input SpecialInput { 2311 nesting: NestedInput! 2312 } 2313 2314 input NestedInput { 2315 field: Email! 2316 } 2317 `, BuiltIn: false}, 2318 {Name: "nulls.graphql", Input: `extend type Query { 2319 errorBubble: Error 2320 errorBubbleList: [Error!] 2321 errorList: [Error] 2322 errors: Errors 2323 valid: String! 2324 } 2325 2326 type Errors { 2327 a: Error! 2328 b: Error! 2329 c: Error! 2330 d: Error! 2331 e: Error! 2332 } 2333 2334 type Error { 2335 id: ID! 2336 errorOnNonRequiredField: String 2337 errorOnRequiredField: String! 2338 nilOnRequiredField: String! 2339 } 2340 `, BuiltIn: false}, 2341 {Name: "panics.graphql", Input: `extend type Query { 2342 panics: Panics 2343 } 2344 2345 type Panics { 2346 fieldScalarMarshal: [MarshalPanic!]! 2347 fieldFuncMarshal(u: [MarshalPanic!]!): [MarshalPanic!]! 2348 argUnmarshal(u: [MarshalPanic!]!): Boolean! 2349 2350 } 2351 2352 scalar MarshalPanic 2353 `, BuiltIn: false}, 2354 {Name: "primitive_objects.graphql", Input: `extend type Query { 2355 primitiveObject: [Primitive!]! 2356 primitiveStringObject: [PrimitiveString!]! 2357 } 2358 2359 type Primitive { 2360 value: Int! 2361 squared: Int! 2362 } 2363 2364 type PrimitiveString { 2365 value: String! 2366 doubled: String! 2367 len: Int! 2368 } 2369 `, BuiltIn: false}, 2370 {Name: "ptr_to_ptr_input.graphql", Input: `type PtrToPtrOuter { 2371 name: String! 2372 inner: PtrToPtrInner 2373 stupidInner: PtrToPtrInner 2374 } 2375 2376 type PtrToPtrInner { 2377 key: String! 2378 value: String! 2379 } 2380 2381 input UpdatePtrToPtrOuter { 2382 name: String 2383 inner: UpdatePtrToPtrInner 2384 stupidInner: UpdatePtrToPtrInner 2385 } 2386 2387 input UpdatePtrToPtrInner { 2388 key: String 2389 value: String 2390 } 2391 2392 extend type Mutation { 2393 updatePtrToPtr(input: UpdatePtrToPtrOuter!): PtrToPtrOuter! 2394 } 2395 `, BuiltIn: false}, 2396 {Name: "ptr_to_slice.graphql", Input: `type PtrToSliceContainer { 2397 ptrToSlice: [String!] 2398 } 2399 2400 extend type Query { 2401 ptrToSliceContainer: PtrToSliceContainer! 2402 } 2403 `, BuiltIn: false}, 2404 {Name: "scalar_context.graphql", Input: `extend type Query { 2405 infinity: Float! 2406 stringFromContextInterface: StringFromContextInterface! 2407 stringFromContextFunction: StringFromContextFunction! 2408 } 2409 2410 scalar StringFromContextInterface 2411 scalar StringFromContextFunction 2412 `, BuiltIn: false}, 2413 {Name: "scalar_default.graphql", Input: `extend type Query { 2414 defaultScalar(arg: DefaultScalarImplementation! = "default"): DefaultScalarImplementation! 2415 } 2416 2417 """ This doesnt have an implementation in the typemap, so it should act like a string """ 2418 scalar DefaultScalarImplementation 2419 2420 type EmbeddedDefaultScalar { 2421 value: DefaultScalarImplementation 2422 } 2423 `, BuiltIn: false}, 2424 {Name: "schema.graphql", Input: `directive @goModel( 2425 model: String 2426 models: [String!] 2427 ) on OBJECT | INPUT_OBJECT | SCALAR | ENUM | INTERFACE | UNION 2428 directive @goField( 2429 forceResolver: Boolean 2430 name: String 2431 ) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION 2432 2433 type Query { 2434 invalidIdentifier: InvalidIdentifier 2435 collision: It 2436 mapInput(input: Changes): Boolean 2437 recursive(input: RecursiveInputSlice): Boolean 2438 nestedInputs(input: [[OuterInput]] = [[{ inner: { id: 1 } }]]): Boolean 2439 nestedOutputs: [[OuterObject]] 2440 modelMethods: ModelMethods 2441 user(id: Int!): User! 2442 nullableArg(arg: Int = 123): String 2443 inputSlice(arg: [String!]!): Boolean! 2444 inputNullableSlice(arg: [String!]): Boolean! 2445 shapeUnion: ShapeUnion! 2446 autobind: Autobind 2447 deprecatedField: String! @deprecated(reason: "test deprecated directive") 2448 } 2449 2450 type Subscription { 2451 updated: String! 2452 initPayload: String! 2453 } 2454 2455 type User { 2456 id: Int! 2457 friends: [User!]! @goField(forceResolver: true) 2458 created: Time! 2459 updated: Time 2460 } 2461 2462 type Autobind { 2463 int: Int! 2464 int32: Int! 2465 int64: Int! 2466 2467 idStr: ID! 2468 idInt: ID! 2469 } 2470 2471 type ModelMethods { 2472 resolverField: Boolean! 2473 noContext: Boolean! 2474 withContext: Boolean! 2475 } 2476 2477 type InvalidIdentifier { 2478 id: Int! 2479 } 2480 2481 type It { 2482 id: ID! 2483 } 2484 2485 input Changes @goModel(model: "map[string]interface{}") { 2486 a: Int 2487 b: Int 2488 } 2489 2490 input RecursiveInputSlice { 2491 self: [RecursiveInputSlice!] 2492 } 2493 2494 input InnerInput { 2495 id: Int! 2496 } 2497 2498 input OuterInput { 2499 inner: InnerInput! 2500 } 2501 2502 scalar ThirdParty @goModel(model:"singlefile.ThirdParty") 2503 2504 type OuterObject { 2505 inner: InnerObject! 2506 } 2507 2508 type InnerObject { 2509 id: Int! 2510 } 2511 2512 type ForcedResolver { 2513 field: Circle @goField(forceResolver: true) 2514 } 2515 2516 type EmbeddedPointer @goModel(model:"singlefile.EmbeddedPointerModel") { 2517 ID: String 2518 Title: String 2519 } 2520 2521 scalar UUID 2522 2523 enum Status { 2524 OK 2525 ERROR 2526 } 2527 2528 scalar Time 2529 `, BuiltIn: false}, 2530 {Name: "slices.graphql", Input: `extend type Query { 2531 slices: Slices 2532 scalarSlice: Bytes! 2533 } 2534 2535 type Slices { 2536 test1: [String] 2537 test2: [String!] 2538 test3: [String]! 2539 test4: [String!]! 2540 } 2541 2542 scalar Bytes 2543 `, BuiltIn: false}, 2544 {Name: "typefallback.graphql", Input: `extend type Query { 2545 fallback(arg: FallbackToStringEncoding!): FallbackToStringEncoding! 2546 } 2547 2548 enum FallbackToStringEncoding { 2549 A 2550 B 2551 C 2552 } 2553 `, BuiltIn: false}, 2554 {Name: "useptr.graphql", Input: `type A { 2555 id: ID! 2556 } 2557 2558 type B { 2559 id: ID! 2560 } 2561 2562 union TestUnion = A | B 2563 2564 extend type Query { 2565 optionalUnion: TestUnion 2566 } 2567 `, BuiltIn: false}, 2568 {Name: "v-ok.graphql", Input: `extend type Query { 2569 vOkCaseValue: VOkCaseValue 2570 vOkCaseNil: VOkCaseNil 2571 } 2572 2573 type VOkCaseValue @goModel(model:"singlefile.VOkCaseValue") { 2574 value: String 2575 } 2576 2577 type VOkCaseNil @goModel(model:"singlefile.VOkCaseNil") { 2578 value: String 2579 } 2580 `, BuiltIn: false}, 2581 {Name: "validtypes.graphql", Input: `extend type Query { 2582 validType: ValidType 2583 } 2584 2585 """ These things are all valid, but without care generate invalid go code """ 2586 type ValidType { 2587 differentCase: String! 2588 different_case: String! @goField(name:"DifferentCaseOld") 2589 validInputKeywords(input: ValidInput): Boolean! 2590 validArgs( 2591 break: String!, 2592 default: String!, 2593 func: String!, 2594 interface: String!, 2595 select: String!, 2596 case: String!, 2597 defer: String!, 2598 go: String!, 2599 map: String!, 2600 struct: String!, 2601 chan: String!, 2602 else: String!, 2603 goto: String!, 2604 package: String!, 2605 switch: String!, 2606 const: String!, 2607 fallthrough: String!, 2608 if: String!, 2609 range: String!, 2610 type: String!, 2611 continue: String!, 2612 for: String!, 2613 import: String!, 2614 return: String!, 2615 var: String!, 2616 _: String!, 2617 ): Boolean! 2618 } 2619 2620 input ValidInput { 2621 break: String! 2622 default: String! 2623 func: String! 2624 interface: String! 2625 select: String! 2626 case: String! 2627 defer: String! 2628 go: String! 2629 map: String! 2630 struct: String! 2631 chan: String! 2632 else: String! 2633 goto: String! 2634 package: String! 2635 switch: String! 2636 const: String! 2637 fallthrough: String! 2638 if: String! 2639 range: String! 2640 type: String! 2641 continue: String! 2642 for: String! 2643 import: String! 2644 return: String! 2645 var: String! 2646 _: String! @goField(name: "Underscore") 2647 } 2648 2649 # see https://github.com/99designs/gqlgen/issues/694 2650 type Content_User { 2651 foo: String 2652 } 2653 2654 type Content_Post { 2655 foo: String 2656 } 2657 2658 union Content_Child = Content_User | Content_Post 2659 `, BuiltIn: false}, 2660 {Name: "weird_type_cases.graphql", Input: `# regression test for https://github.com/99designs/gqlgen/issues/583 2661 2662 type asdfIt { id: ID! } 2663 type iIt { id: ID! } 2664 type AIt { id: ID! } 2665 type XXIt { id: ID! } 2666 type AbIt { id: ID! } 2667 type XxIt { id: ID! } 2668 `, BuiltIn: false}, 2669 {Name: "wrapped_type.graphql", Input: `# regression test for https://github.com/99designs/gqlgen/issues/721 2670 2671 extend type Query { 2672 wrappedStruct: WrappedStruct! 2673 wrappedScalar: WrappedScalar! 2674 wrappedMap: WrappedMap! 2675 wrappedSlice: WrappedSlice! 2676 } 2677 2678 type WrappedStruct { name: WrappedScalar!, desc: WrappedScalar } 2679 scalar WrappedScalar 2680 type WrappedMap { get(key: String!): String! } 2681 type WrappedSlice { get(idx: Int!): String! } 2682 `, BuiltIn: false}, 2683 } 2684 var parsedSchema = gqlparser.MustLoadSchema(sources...) 2685 2686 // endregion ************************** generated!.gotpl ************************** 2687 2688 // region ***************************** args.gotpl ***************************** 2689 2690 func (ec *executionContext) dir_length_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2691 var err error 2692 args := map[string]interface{}{} 2693 var arg0 int 2694 if tmp, ok := rawArgs["min"]; ok { 2695 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("min")) 2696 arg0, err = ec.unmarshalNInt2int(ctx, tmp) 2697 if err != nil { 2698 return nil, err 2699 } 2700 } 2701 args["min"] = arg0 2702 var arg1 *int 2703 if tmp, ok := rawArgs["max"]; ok { 2704 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("max")) 2705 arg1, err = ec.unmarshalOInt2ᚖint(ctx, tmp) 2706 if err != nil { 2707 return nil, err 2708 } 2709 } 2710 args["max"] = arg1 2711 var arg2 *string 2712 if tmp, ok := rawArgs["message"]; ok { 2713 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("message")) 2714 arg2, err = ec.unmarshalOString2ᚖstring(ctx, tmp) 2715 if err != nil { 2716 return nil, err 2717 } 2718 } 2719 args["message"] = arg2 2720 return args, nil 2721 } 2722 2723 func (ec *executionContext) dir_logged_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2724 var err error 2725 args := map[string]interface{}{} 2726 var arg0 string 2727 if tmp, ok := rawArgs["id"]; ok { 2728 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) 2729 arg0, err = ec.unmarshalNUUID2string(ctx, tmp) 2730 if err != nil { 2731 return nil, err 2732 } 2733 } 2734 args["id"] = arg0 2735 return args, nil 2736 } 2737 2738 func (ec *executionContext) dir_order1_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2739 var err error 2740 args := map[string]interface{}{} 2741 var arg0 string 2742 if tmp, ok := rawArgs["location"]; ok { 2743 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("location")) 2744 arg0, err = ec.unmarshalNString2string(ctx, tmp) 2745 if err != nil { 2746 return nil, err 2747 } 2748 } 2749 args["location"] = arg0 2750 return args, nil 2751 } 2752 2753 func (ec *executionContext) dir_order2_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2754 var err error 2755 args := map[string]interface{}{} 2756 var arg0 string 2757 if tmp, ok := rawArgs["location"]; ok { 2758 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("location")) 2759 arg0, err = ec.unmarshalNString2string(ctx, tmp) 2760 if err != nil { 2761 return nil, err 2762 } 2763 } 2764 args["location"] = arg0 2765 return args, nil 2766 } 2767 2768 func (ec *executionContext) dir_range_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2769 var err error 2770 args := map[string]interface{}{} 2771 var arg0 *int 2772 if tmp, ok := rawArgs["min"]; ok { 2773 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("min")) 2774 arg0, err = ec.unmarshalOInt2ᚖint(ctx, tmp) 2775 if err != nil { 2776 return nil, err 2777 } 2778 } 2779 args["min"] = arg0 2780 var arg1 *int 2781 if tmp, ok := rawArgs["max"]; ok { 2782 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("max")) 2783 arg1, err = ec.unmarshalOInt2ᚖint(ctx, tmp) 2784 if err != nil { 2785 return nil, err 2786 } 2787 } 2788 args["max"] = arg1 2789 return args, nil 2790 } 2791 2792 func (ec *executionContext) field_Mutation_defaultInput_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2793 var err error 2794 args := map[string]interface{}{} 2795 var arg0 DefaultInput 2796 if tmp, ok := rawArgs["input"]; ok { 2797 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 2798 arg0, err = ec.unmarshalNDefaultInput2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐDefaultInput(ctx, tmp) 2799 if err != nil { 2800 return nil, err 2801 } 2802 } 2803 args["input"] = arg0 2804 return args, nil 2805 } 2806 2807 func (ec *executionContext) field_Mutation_updatePtrToPtr_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2808 var err error 2809 args := map[string]interface{}{} 2810 var arg0 UpdatePtrToPtrOuter 2811 if tmp, ok := rawArgs["input"]; ok { 2812 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 2813 arg0, err = ec.unmarshalNUpdatePtrToPtrOuter2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrOuter(ctx, tmp) 2814 if err != nil { 2815 return nil, err 2816 } 2817 } 2818 args["input"] = arg0 2819 return args, nil 2820 } 2821 2822 func (ec *executionContext) field_Mutation_updateSomething_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2823 var err error 2824 args := map[string]interface{}{} 2825 var arg0 SpecialInput 2826 if tmp, ok := rawArgs["input"]; ok { 2827 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 2828 arg0, err = ec.unmarshalNSpecialInput2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐSpecialInput(ctx, tmp) 2829 if err != nil { 2830 return nil, err 2831 } 2832 } 2833 args["input"] = arg0 2834 return args, nil 2835 } 2836 2837 func (ec *executionContext) field_Panics_argUnmarshal_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2838 var err error 2839 args := map[string]interface{}{} 2840 var arg0 []MarshalPanic 2841 if tmp, ok := rawArgs["u"]; ok { 2842 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("u")) 2843 arg0, err = ec.unmarshalNMarshalPanic2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanicᚄ(ctx, tmp) 2844 if err != nil { 2845 return nil, err 2846 } 2847 } 2848 args["u"] = arg0 2849 return args, nil 2850 } 2851 2852 func (ec *executionContext) field_Panics_fieldFuncMarshal_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2853 var err error 2854 args := map[string]interface{}{} 2855 var arg0 []MarshalPanic 2856 if tmp, ok := rawArgs["u"]; ok { 2857 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("u")) 2858 arg0, err = ec.unmarshalNMarshalPanic2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanicᚄ(ctx, tmp) 2859 if err != nil { 2860 return nil, err 2861 } 2862 } 2863 args["u"] = arg0 2864 return args, nil 2865 } 2866 2867 func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2868 var err error 2869 args := map[string]interface{}{} 2870 var arg0 string 2871 if tmp, ok := rawArgs["name"]; ok { 2872 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) 2873 arg0, err = ec.unmarshalNString2string(ctx, tmp) 2874 if err != nil { 2875 return nil, err 2876 } 2877 } 2878 args["name"] = arg0 2879 return args, nil 2880 } 2881 2882 func (ec *executionContext) field_Query_defaultParameters_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2883 var err error 2884 args := map[string]interface{}{} 2885 var arg0 *bool 2886 if tmp, ok := rawArgs["falsyBoolean"]; ok { 2887 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("falsyBoolean")) 2888 arg0, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp) 2889 if err != nil { 2890 return nil, err 2891 } 2892 } 2893 args["falsyBoolean"] = arg0 2894 var arg1 *bool 2895 if tmp, ok := rawArgs["truthyBoolean"]; ok { 2896 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("truthyBoolean")) 2897 arg1, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp) 2898 if err != nil { 2899 return nil, err 2900 } 2901 } 2902 args["truthyBoolean"] = arg1 2903 return args, nil 2904 } 2905 2906 func (ec *executionContext) field_Query_defaultScalar_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2907 var err error 2908 args := map[string]interface{}{} 2909 var arg0 string 2910 if tmp, ok := rawArgs["arg"]; ok { 2911 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 2912 arg0, err = ec.unmarshalNDefaultScalarImplementation2string(ctx, tmp) 2913 if err != nil { 2914 return nil, err 2915 } 2916 } 2917 args["arg"] = arg0 2918 return args, nil 2919 } 2920 2921 func (ec *executionContext) field_Query_directiveArg_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2922 var err error 2923 args := map[string]interface{}{} 2924 var arg0 string 2925 if tmp, ok := rawArgs["arg"]; ok { 2926 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 2927 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalNString2string(ctx, tmp) } 2928 directive1 := func(ctx context.Context) (interface{}, error) { 2929 min, err := ec.unmarshalNInt2int(ctx, 1) 2930 if err != nil { 2931 return nil, err 2932 } 2933 max, err := ec.unmarshalOInt2ᚖint(ctx, 255) 2934 if err != nil { 2935 return nil, err 2936 } 2937 message, err := ec.unmarshalOString2ᚖstring(ctx, "invalid length") 2938 if err != nil { 2939 return nil, err 2940 } 2941 if ec.directives.Length == nil { 2942 return nil, errors.New("directive length is not implemented") 2943 } 2944 return ec.directives.Length(ctx, rawArgs, directive0, min, max, message) 2945 } 2946 2947 tmp, err = directive1(ctx) 2948 if err != nil { 2949 return nil, graphql.ErrorOnPath(ctx, err) 2950 } 2951 if data, ok := tmp.(string); ok { 2952 arg0 = data 2953 } else { 2954 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)) 2955 } 2956 } 2957 args["arg"] = arg0 2958 return args, nil 2959 } 2960 2961 func (ec *executionContext) field_Query_directiveFieldDef_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2962 var err error 2963 args := map[string]interface{}{} 2964 var arg0 string 2965 if tmp, ok := rawArgs["ret"]; ok { 2966 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ret")) 2967 arg0, err = ec.unmarshalNString2string(ctx, tmp) 2968 if err != nil { 2969 return nil, err 2970 } 2971 } 2972 args["ret"] = arg0 2973 return args, nil 2974 } 2975 2976 func (ec *executionContext) field_Query_directiveInputNullable_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2977 var err error 2978 args := map[string]interface{}{} 2979 var arg0 *InputDirectives 2980 if tmp, ok := rawArgs["arg"]; ok { 2981 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 2982 arg0, err = ec.unmarshalOInputDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInputDirectives(ctx, tmp) 2983 if err != nil { 2984 return nil, err 2985 } 2986 } 2987 args["arg"] = arg0 2988 return args, nil 2989 } 2990 2991 func (ec *executionContext) field_Query_directiveInputType_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2992 var err error 2993 args := map[string]interface{}{} 2994 var arg0 InnerInput 2995 if tmp, ok := rawArgs["arg"]; ok { 2996 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 2997 directive0 := func(ctx context.Context) (interface{}, error) { 2998 return ec.unmarshalNInnerInput2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInnerInput(ctx, tmp) 2999 } 3000 directive1 := func(ctx context.Context) (interface{}, error) { 3001 if ec.directives.Custom == nil { 3002 return nil, errors.New("directive custom is not implemented") 3003 } 3004 return ec.directives.Custom(ctx, rawArgs, directive0) 3005 } 3006 3007 tmp, err = directive1(ctx) 3008 if err != nil { 3009 return nil, graphql.ErrorOnPath(ctx, err) 3010 } 3011 if data, ok := tmp.(InnerInput); ok { 3012 arg0 = data 3013 } else { 3014 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be github.com/99designs/gqlgen/codegen/testserver/singlefile.InnerInput`, tmp)) 3015 } 3016 } 3017 args["arg"] = arg0 3018 return args, nil 3019 } 3020 3021 func (ec *executionContext) field_Query_directiveInput_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3022 var err error 3023 args := map[string]interface{}{} 3024 var arg0 InputDirectives 3025 if tmp, ok := rawArgs["arg"]; ok { 3026 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 3027 arg0, err = ec.unmarshalNInputDirectives2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInputDirectives(ctx, tmp) 3028 if err != nil { 3029 return nil, err 3030 } 3031 } 3032 args["arg"] = arg0 3033 return args, nil 3034 } 3035 3036 func (ec *executionContext) field_Query_directiveNullableArg_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3037 var err error 3038 args := map[string]interface{}{} 3039 var arg0 *int 3040 if tmp, ok := rawArgs["arg"]; ok { 3041 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 3042 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOInt2ᚖint(ctx, tmp) } 3043 directive1 := func(ctx context.Context) (interface{}, error) { 3044 min, err := ec.unmarshalOInt2ᚖint(ctx, 0) 3045 if err != nil { 3046 return nil, err 3047 } 3048 if ec.directives.Range == nil { 3049 return nil, errors.New("directive range is not implemented") 3050 } 3051 return ec.directives.Range(ctx, rawArgs, directive0, min, nil) 3052 } 3053 3054 tmp, err = directive1(ctx) 3055 if err != nil { 3056 return nil, graphql.ErrorOnPath(ctx, err) 3057 } 3058 if data, ok := tmp.(*int); ok { 3059 arg0 = data 3060 } else if tmp == nil { 3061 arg0 = nil 3062 } else { 3063 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *int`, tmp)) 3064 } 3065 } 3066 args["arg"] = arg0 3067 var arg1 *int 3068 if tmp, ok := rawArgs["arg2"]; ok { 3069 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg2")) 3070 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOInt2ᚖint(ctx, tmp) } 3071 directive1 := func(ctx context.Context) (interface{}, error) { 3072 min, err := ec.unmarshalOInt2ᚖint(ctx, 0) 3073 if err != nil { 3074 return nil, err 3075 } 3076 if ec.directives.Range == nil { 3077 return nil, errors.New("directive range is not implemented") 3078 } 3079 return ec.directives.Range(ctx, rawArgs, directive0, min, nil) 3080 } 3081 3082 tmp, err = directive1(ctx) 3083 if err != nil { 3084 return nil, graphql.ErrorOnPath(ctx, err) 3085 } 3086 if data, ok := tmp.(*int); ok { 3087 arg1 = data 3088 } else if tmp == nil { 3089 arg1 = nil 3090 } else { 3091 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *int`, tmp)) 3092 } 3093 } 3094 args["arg2"] = arg1 3095 var arg2 *string 3096 if tmp, ok := rawArgs["arg3"]; ok { 3097 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg3")) 3098 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOString2ᚖstring(ctx, tmp) } 3099 directive1 := func(ctx context.Context) (interface{}, error) { 3100 if ec.directives.ToNull == nil { 3101 return nil, errors.New("directive toNull is not implemented") 3102 } 3103 return ec.directives.ToNull(ctx, rawArgs, directive0) 3104 } 3105 3106 tmp, err = directive1(ctx) 3107 if err != nil { 3108 return nil, graphql.ErrorOnPath(ctx, err) 3109 } 3110 if data, ok := tmp.(*string); ok { 3111 arg2 = data 3112 } else if tmp == nil { 3113 arg2 = nil 3114 } else { 3115 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp)) 3116 } 3117 } 3118 args["arg3"] = arg2 3119 return args, nil 3120 } 3121 3122 func (ec *executionContext) field_Query_enumInInput_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3123 var err error 3124 args := map[string]interface{}{} 3125 var arg0 *InputWithEnumValue 3126 if tmp, ok := rawArgs["input"]; ok { 3127 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 3128 arg0, err = ec.unmarshalOInputWithEnumValue2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInputWithEnumValue(ctx, tmp) 3129 if err != nil { 3130 return nil, err 3131 } 3132 } 3133 args["input"] = arg0 3134 return args, nil 3135 } 3136 3137 func (ec *executionContext) field_Query_fallback_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3138 var err error 3139 args := map[string]interface{}{} 3140 var arg0 FallbackToStringEncoding 3141 if tmp, ok := rawArgs["arg"]; ok { 3142 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 3143 arg0, err = ec.unmarshalNFallbackToStringEncoding2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐFallbackToStringEncoding(ctx, tmp) 3144 if err != nil { 3145 return nil, err 3146 } 3147 } 3148 args["arg"] = arg0 3149 return args, nil 3150 } 3151 3152 func (ec *executionContext) field_Query_inputNullableSlice_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3153 var err error 3154 args := map[string]interface{}{} 3155 var arg0 []string 3156 if tmp, ok := rawArgs["arg"]; ok { 3157 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 3158 arg0, err = ec.unmarshalOString2ᚕstringᚄ(ctx, tmp) 3159 if err != nil { 3160 return nil, err 3161 } 3162 } 3163 args["arg"] = arg0 3164 return args, nil 3165 } 3166 3167 func (ec *executionContext) field_Query_inputSlice_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3168 var err error 3169 args := map[string]interface{}{} 3170 var arg0 []string 3171 if tmp, ok := rawArgs["arg"]; ok { 3172 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 3173 arg0, err = ec.unmarshalNString2ᚕstringᚄ(ctx, tmp) 3174 if err != nil { 3175 return nil, err 3176 } 3177 } 3178 args["arg"] = arg0 3179 return args, nil 3180 } 3181 3182 func (ec *executionContext) field_Query_mapInput_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3183 var err error 3184 args := map[string]interface{}{} 3185 var arg0 map[string]interface{} 3186 if tmp, ok := rawArgs["input"]; ok { 3187 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 3188 arg0, err = ec.unmarshalOChanges2map(ctx, tmp) 3189 if err != nil { 3190 return nil, err 3191 } 3192 } 3193 args["input"] = arg0 3194 return args, nil 3195 } 3196 3197 func (ec *executionContext) field_Query_mapNestedStringInterface_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3198 var err error 3199 args := map[string]interface{}{} 3200 var arg0 *NestedMapInput 3201 if tmp, ok := rawArgs["in"]; ok { 3202 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) 3203 arg0, err = ec.unmarshalONestedMapInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐNestedMapInput(ctx, tmp) 3204 if err != nil { 3205 return nil, err 3206 } 3207 } 3208 args["in"] = arg0 3209 return args, nil 3210 } 3211 3212 func (ec *executionContext) field_Query_mapStringInterface_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3213 var err error 3214 args := map[string]interface{}{} 3215 var arg0 map[string]interface{} 3216 if tmp, ok := rawArgs["in"]; ok { 3217 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) 3218 arg0, err = ec.unmarshalOMapStringInterfaceInput2map(ctx, tmp) 3219 if err != nil { 3220 return nil, err 3221 } 3222 } 3223 args["in"] = arg0 3224 return args, nil 3225 } 3226 3227 func (ec *executionContext) field_Query_nestedInputs_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3228 var err error 3229 args := map[string]interface{}{} 3230 var arg0 [][]*OuterInput 3231 if tmp, ok := rawArgs["input"]; ok { 3232 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 3233 arg0, err = ec.unmarshalOOuterInput2ᚕᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterInput(ctx, tmp) 3234 if err != nil { 3235 return nil, err 3236 } 3237 } 3238 args["input"] = arg0 3239 return args, nil 3240 } 3241 3242 func (ec *executionContext) field_Query_nullableArg_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3243 var err error 3244 args := map[string]interface{}{} 3245 var arg0 *int 3246 if tmp, ok := rawArgs["arg"]; ok { 3247 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 3248 arg0, err = ec.unmarshalOInt2ᚖint(ctx, tmp) 3249 if err != nil { 3250 return nil, err 3251 } 3252 } 3253 args["arg"] = arg0 3254 return args, nil 3255 } 3256 3257 func (ec *executionContext) field_Query_recursive_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3258 var err error 3259 args := map[string]interface{}{} 3260 var arg0 *RecursiveInputSlice 3261 if tmp, ok := rawArgs["input"]; ok { 3262 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 3263 arg0, err = ec.unmarshalORecursiveInputSlice2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐRecursiveInputSlice(ctx, tmp) 3264 if err != nil { 3265 return nil, err 3266 } 3267 } 3268 args["input"] = arg0 3269 return args, nil 3270 } 3271 3272 func (ec *executionContext) field_Query_user_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3273 var err error 3274 args := map[string]interface{}{} 3275 var arg0 int 3276 if tmp, ok := rawArgs["id"]; ok { 3277 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) 3278 arg0, err = ec.unmarshalNInt2int(ctx, tmp) 3279 if err != nil { 3280 return nil, err 3281 } 3282 } 3283 args["id"] = arg0 3284 return args, nil 3285 } 3286 3287 func (ec *executionContext) field_Subscription_directiveArg_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3288 var err error 3289 args := map[string]interface{}{} 3290 var arg0 string 3291 if tmp, ok := rawArgs["arg"]; ok { 3292 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 3293 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalNString2string(ctx, tmp) } 3294 directive1 := func(ctx context.Context) (interface{}, error) { 3295 min, err := ec.unmarshalNInt2int(ctx, 1) 3296 if err != nil { 3297 return nil, err 3298 } 3299 max, err := ec.unmarshalOInt2ᚖint(ctx, 255) 3300 if err != nil { 3301 return nil, err 3302 } 3303 message, err := ec.unmarshalOString2ᚖstring(ctx, "invalid length") 3304 if err != nil { 3305 return nil, err 3306 } 3307 if ec.directives.Length == nil { 3308 return nil, errors.New("directive length is not implemented") 3309 } 3310 return ec.directives.Length(ctx, rawArgs, directive0, min, max, message) 3311 } 3312 3313 tmp, err = directive1(ctx) 3314 if err != nil { 3315 return nil, graphql.ErrorOnPath(ctx, err) 3316 } 3317 if data, ok := tmp.(string); ok { 3318 arg0 = data 3319 } else { 3320 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)) 3321 } 3322 } 3323 args["arg"] = arg0 3324 return args, nil 3325 } 3326 3327 func (ec *executionContext) field_Subscription_directiveNullableArg_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3328 var err error 3329 args := map[string]interface{}{} 3330 var arg0 *int 3331 if tmp, ok := rawArgs["arg"]; ok { 3332 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 3333 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOInt2ᚖint(ctx, tmp) } 3334 directive1 := func(ctx context.Context) (interface{}, error) { 3335 min, err := ec.unmarshalOInt2ᚖint(ctx, 0) 3336 if err != nil { 3337 return nil, err 3338 } 3339 if ec.directives.Range == nil { 3340 return nil, errors.New("directive range is not implemented") 3341 } 3342 return ec.directives.Range(ctx, rawArgs, directive0, min, nil) 3343 } 3344 3345 tmp, err = directive1(ctx) 3346 if err != nil { 3347 return nil, graphql.ErrorOnPath(ctx, err) 3348 } 3349 if data, ok := tmp.(*int); ok { 3350 arg0 = data 3351 } else if tmp == nil { 3352 arg0 = nil 3353 } else { 3354 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *int`, tmp)) 3355 } 3356 } 3357 args["arg"] = arg0 3358 var arg1 *int 3359 if tmp, ok := rawArgs["arg2"]; ok { 3360 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg2")) 3361 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOInt2ᚖint(ctx, tmp) } 3362 directive1 := func(ctx context.Context) (interface{}, error) { 3363 min, err := ec.unmarshalOInt2ᚖint(ctx, 0) 3364 if err != nil { 3365 return nil, err 3366 } 3367 if ec.directives.Range == nil { 3368 return nil, errors.New("directive range is not implemented") 3369 } 3370 return ec.directives.Range(ctx, rawArgs, directive0, min, nil) 3371 } 3372 3373 tmp, err = directive1(ctx) 3374 if err != nil { 3375 return nil, graphql.ErrorOnPath(ctx, err) 3376 } 3377 if data, ok := tmp.(*int); ok { 3378 arg1 = data 3379 } else if tmp == nil { 3380 arg1 = nil 3381 } else { 3382 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *int`, tmp)) 3383 } 3384 } 3385 args["arg2"] = arg1 3386 var arg2 *string 3387 if tmp, ok := rawArgs["arg3"]; ok { 3388 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg3")) 3389 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOString2ᚖstring(ctx, tmp) } 3390 directive1 := func(ctx context.Context) (interface{}, error) { 3391 if ec.directives.ToNull == nil { 3392 return nil, errors.New("directive toNull is not implemented") 3393 } 3394 return ec.directives.ToNull(ctx, rawArgs, directive0) 3395 } 3396 3397 tmp, err = directive1(ctx) 3398 if err != nil { 3399 return nil, graphql.ErrorOnPath(ctx, err) 3400 } 3401 if data, ok := tmp.(*string); ok { 3402 arg2 = data 3403 } else if tmp == nil { 3404 arg2 = nil 3405 } else { 3406 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp)) 3407 } 3408 } 3409 args["arg3"] = arg2 3410 return args, nil 3411 } 3412 3413 func (ec *executionContext) field_ValidType_validArgs_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3414 var err error 3415 args := map[string]interface{}{} 3416 var arg0 string 3417 if tmp, ok := rawArgs["break"]; ok { 3418 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("break")) 3419 arg0, err = ec.unmarshalNString2string(ctx, tmp) 3420 if err != nil { 3421 return nil, err 3422 } 3423 } 3424 args["break"] = arg0 3425 var arg1 string 3426 if tmp, ok := rawArgs["default"]; ok { 3427 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("default")) 3428 arg1, err = ec.unmarshalNString2string(ctx, tmp) 3429 if err != nil { 3430 return nil, err 3431 } 3432 } 3433 args["default"] = arg1 3434 var arg2 string 3435 if tmp, ok := rawArgs["func"]; ok { 3436 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("func")) 3437 arg2, err = ec.unmarshalNString2string(ctx, tmp) 3438 if err != nil { 3439 return nil, err 3440 } 3441 } 3442 args["func"] = arg2 3443 var arg3 string 3444 if tmp, ok := rawArgs["interface"]; ok { 3445 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("interface")) 3446 arg3, err = ec.unmarshalNString2string(ctx, tmp) 3447 if err != nil { 3448 return nil, err 3449 } 3450 } 3451 args["interface"] = arg3 3452 var arg4 string 3453 if tmp, ok := rawArgs["select"]; ok { 3454 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("select")) 3455 arg4, err = ec.unmarshalNString2string(ctx, tmp) 3456 if err != nil { 3457 return nil, err 3458 } 3459 } 3460 args["select"] = arg4 3461 var arg5 string 3462 if tmp, ok := rawArgs["case"]; ok { 3463 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("case")) 3464 arg5, err = ec.unmarshalNString2string(ctx, tmp) 3465 if err != nil { 3466 return nil, err 3467 } 3468 } 3469 args["case"] = arg5 3470 var arg6 string 3471 if tmp, ok := rawArgs["defer"]; ok { 3472 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("defer")) 3473 arg6, err = ec.unmarshalNString2string(ctx, tmp) 3474 if err != nil { 3475 return nil, err 3476 } 3477 } 3478 args["defer"] = arg6 3479 var arg7 string 3480 if tmp, ok := rawArgs["go"]; ok { 3481 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("go")) 3482 arg7, err = ec.unmarshalNString2string(ctx, tmp) 3483 if err != nil { 3484 return nil, err 3485 } 3486 } 3487 args["go"] = arg7 3488 var arg8 string 3489 if tmp, ok := rawArgs["map"]; ok { 3490 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("map")) 3491 arg8, err = ec.unmarshalNString2string(ctx, tmp) 3492 if err != nil { 3493 return nil, err 3494 } 3495 } 3496 args["map"] = arg8 3497 var arg9 string 3498 if tmp, ok := rawArgs["struct"]; ok { 3499 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("struct")) 3500 arg9, err = ec.unmarshalNString2string(ctx, tmp) 3501 if err != nil { 3502 return nil, err 3503 } 3504 } 3505 args["struct"] = arg9 3506 var arg10 string 3507 if tmp, ok := rawArgs["chan"]; ok { 3508 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("chan")) 3509 arg10, err = ec.unmarshalNString2string(ctx, tmp) 3510 if err != nil { 3511 return nil, err 3512 } 3513 } 3514 args["chan"] = arg10 3515 var arg11 string 3516 if tmp, ok := rawArgs["else"]; ok { 3517 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("else")) 3518 arg11, err = ec.unmarshalNString2string(ctx, tmp) 3519 if err != nil { 3520 return nil, err 3521 } 3522 } 3523 args["else"] = arg11 3524 var arg12 string 3525 if tmp, ok := rawArgs["goto"]; ok { 3526 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("goto")) 3527 arg12, err = ec.unmarshalNString2string(ctx, tmp) 3528 if err != nil { 3529 return nil, err 3530 } 3531 } 3532 args["goto"] = arg12 3533 var arg13 string 3534 if tmp, ok := rawArgs["package"]; ok { 3535 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("package")) 3536 arg13, err = ec.unmarshalNString2string(ctx, tmp) 3537 if err != nil { 3538 return nil, err 3539 } 3540 } 3541 args["package"] = arg13 3542 var arg14 string 3543 if tmp, ok := rawArgs["switch"]; ok { 3544 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("switch")) 3545 arg14, err = ec.unmarshalNString2string(ctx, tmp) 3546 if err != nil { 3547 return nil, err 3548 } 3549 } 3550 args["switch"] = arg14 3551 var arg15 string 3552 if tmp, ok := rawArgs["const"]; ok { 3553 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("const")) 3554 arg15, err = ec.unmarshalNString2string(ctx, tmp) 3555 if err != nil { 3556 return nil, err 3557 } 3558 } 3559 args["const"] = arg15 3560 var arg16 string 3561 if tmp, ok := rawArgs["fallthrough"]; ok { 3562 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fallthrough")) 3563 arg16, err = ec.unmarshalNString2string(ctx, tmp) 3564 if err != nil { 3565 return nil, err 3566 } 3567 } 3568 args["fallthrough"] = arg16 3569 var arg17 string 3570 if tmp, ok := rawArgs["if"]; ok { 3571 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("if")) 3572 arg17, err = ec.unmarshalNString2string(ctx, tmp) 3573 if err != nil { 3574 return nil, err 3575 } 3576 } 3577 args["if"] = arg17 3578 var arg18 string 3579 if tmp, ok := rawArgs["range"]; ok { 3580 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("range")) 3581 arg18, err = ec.unmarshalNString2string(ctx, tmp) 3582 if err != nil { 3583 return nil, err 3584 } 3585 } 3586 args["range"] = arg18 3587 var arg19 string 3588 if tmp, ok := rawArgs["type"]; ok { 3589 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type")) 3590 arg19, err = ec.unmarshalNString2string(ctx, tmp) 3591 if err != nil { 3592 return nil, err 3593 } 3594 } 3595 args["type"] = arg19 3596 var arg20 string 3597 if tmp, ok := rawArgs["continue"]; ok { 3598 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("continue")) 3599 arg20, err = ec.unmarshalNString2string(ctx, tmp) 3600 if err != nil { 3601 return nil, err 3602 } 3603 } 3604 args["continue"] = arg20 3605 var arg21 string 3606 if tmp, ok := rawArgs["for"]; ok { 3607 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("for")) 3608 arg21, err = ec.unmarshalNString2string(ctx, tmp) 3609 if err != nil { 3610 return nil, err 3611 } 3612 } 3613 args["for"] = arg21 3614 var arg22 string 3615 if tmp, ok := rawArgs["import"]; ok { 3616 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("import")) 3617 arg22, err = ec.unmarshalNString2string(ctx, tmp) 3618 if err != nil { 3619 return nil, err 3620 } 3621 } 3622 args["import"] = arg22 3623 var arg23 string 3624 if tmp, ok := rawArgs["return"]; ok { 3625 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("return")) 3626 arg23, err = ec.unmarshalNString2string(ctx, tmp) 3627 if err != nil { 3628 return nil, err 3629 } 3630 } 3631 args["return"] = arg23 3632 var arg24 string 3633 if tmp, ok := rawArgs["var"]; ok { 3634 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("var")) 3635 arg24, err = ec.unmarshalNString2string(ctx, tmp) 3636 if err != nil { 3637 return nil, err 3638 } 3639 } 3640 args["var"] = arg24 3641 var arg25 string 3642 if tmp, ok := rawArgs["_"]; ok { 3643 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("_")) 3644 arg25, err = ec.unmarshalNString2string(ctx, tmp) 3645 if err != nil { 3646 return nil, err 3647 } 3648 } 3649 args["_"] = arg25 3650 return args, nil 3651 } 3652 3653 func (ec *executionContext) field_ValidType_validInputKeywords_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3654 var err error 3655 args := map[string]interface{}{} 3656 var arg0 *ValidInput 3657 if tmp, ok := rawArgs["input"]; ok { 3658 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 3659 arg0, err = ec.unmarshalOValidInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐValidInput(ctx, tmp) 3660 if err != nil { 3661 return nil, err 3662 } 3663 } 3664 args["input"] = arg0 3665 return args, nil 3666 } 3667 3668 func (ec *executionContext) field_WrappedMap_get_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3669 var err error 3670 args := map[string]interface{}{} 3671 var arg0 string 3672 if tmp, ok := rawArgs["key"]; ok { 3673 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) 3674 arg0, err = ec.unmarshalNString2string(ctx, tmp) 3675 if err != nil { 3676 return nil, err 3677 } 3678 } 3679 args["key"] = arg0 3680 return args, nil 3681 } 3682 3683 func (ec *executionContext) field_WrappedSlice_get_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3684 var err error 3685 args := map[string]interface{}{} 3686 var arg0 int 3687 if tmp, ok := rawArgs["idx"]; ok { 3688 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idx")) 3689 arg0, err = ec.unmarshalNInt2int(ctx, tmp) 3690 if err != nil { 3691 return nil, err 3692 } 3693 } 3694 args["idx"] = arg0 3695 return args, nil 3696 } 3697 3698 func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3699 var err error 3700 args := map[string]interface{}{} 3701 var arg0 bool 3702 if tmp, ok := rawArgs["includeDeprecated"]; ok { 3703 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) 3704 arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) 3705 if err != nil { 3706 return nil, err 3707 } 3708 } 3709 args["includeDeprecated"] = arg0 3710 return args, nil 3711 } 3712 3713 func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3714 var err error 3715 args := map[string]interface{}{} 3716 var arg0 bool 3717 if tmp, ok := rawArgs["includeDeprecated"]; ok { 3718 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) 3719 arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) 3720 if err != nil { 3721 return nil, err 3722 } 3723 } 3724 args["includeDeprecated"] = arg0 3725 return args, nil 3726 } 3727 3728 // endregion ***************************** args.gotpl ***************************** 3729 3730 // region ************************** directives.gotpl ************************** 3731 3732 func (ec *executionContext) _fieldMiddleware(ctx context.Context, obj interface{}, next graphql.Resolver) interface{} { 3733 fc := graphql.GetFieldContext(ctx) 3734 for _, d := range fc.Field.Directives { 3735 switch d.Name { 3736 case "logged": 3737 rawArgs := d.ArgumentMap(ec.Variables) 3738 args, err := ec.dir_logged_args(ctx, rawArgs) 3739 if err != nil { 3740 ec.Error(ctx, err) 3741 return nil 3742 } 3743 n := next 3744 next = func(ctx context.Context) (interface{}, error) { 3745 if ec.directives.Logged == nil { 3746 return nil, errors.New("directive logged is not implemented") 3747 } 3748 return ec.directives.Logged(ctx, obj, n, args["id"].(string)) 3749 } 3750 } 3751 } 3752 res, err := ec.ResolverMiddleware(ctx, next) 3753 if err != nil { 3754 ec.Error(ctx, err) 3755 return nil 3756 } 3757 return res 3758 } 3759 3760 // endregion ************************** directives.gotpl ************************** 3761 3762 // region **************************** field.gotpl ***************************** 3763 3764 func (ec *executionContext) _A_id(ctx context.Context, field graphql.CollectedField, obj *A) (ret graphql.Marshaler) { 3765 defer func() { 3766 if r := recover(); r != nil { 3767 ec.Error(ctx, ec.Recover(ctx, r)) 3768 ret = graphql.Null 3769 } 3770 }() 3771 fc := &graphql.FieldContext{ 3772 Object: "A", 3773 Field: field, 3774 Args: nil, 3775 IsMethod: false, 3776 IsResolver: false, 3777 } 3778 3779 ctx = graphql.WithFieldContext(ctx, fc) 3780 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 3781 ctx = rctx // use context from middleware stack in children 3782 return obj.ID, nil 3783 }) 3784 3785 if resTmp == nil { 3786 if !graphql.HasFieldError(ctx, fc) { 3787 ec.Errorf(ctx, "must not be null") 3788 } 3789 return graphql.Null 3790 } 3791 res := resTmp.(string) 3792 fc.Result = res 3793 return ec.marshalNID2string(ctx, field.Selections, res) 3794 } 3795 3796 func (ec *executionContext) _AIt_id(ctx context.Context, field graphql.CollectedField, obj *AIt) (ret graphql.Marshaler) { 3797 defer func() { 3798 if r := recover(); r != nil { 3799 ec.Error(ctx, ec.Recover(ctx, r)) 3800 ret = graphql.Null 3801 } 3802 }() 3803 fc := &graphql.FieldContext{ 3804 Object: "AIt", 3805 Field: field, 3806 Args: nil, 3807 IsMethod: false, 3808 IsResolver: false, 3809 } 3810 3811 ctx = graphql.WithFieldContext(ctx, fc) 3812 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 3813 ctx = rctx // use context from middleware stack in children 3814 return obj.ID, nil 3815 }) 3816 3817 if resTmp == nil { 3818 if !graphql.HasFieldError(ctx, fc) { 3819 ec.Errorf(ctx, "must not be null") 3820 } 3821 return graphql.Null 3822 } 3823 res := resTmp.(string) 3824 fc.Result = res 3825 return ec.marshalNID2string(ctx, field.Selections, res) 3826 } 3827 3828 func (ec *executionContext) _AbIt_id(ctx context.Context, field graphql.CollectedField, obj *AbIt) (ret graphql.Marshaler) { 3829 defer func() { 3830 if r := recover(); r != nil { 3831 ec.Error(ctx, ec.Recover(ctx, r)) 3832 ret = graphql.Null 3833 } 3834 }() 3835 fc := &graphql.FieldContext{ 3836 Object: "AbIt", 3837 Field: field, 3838 Args: nil, 3839 IsMethod: false, 3840 IsResolver: false, 3841 } 3842 3843 ctx = graphql.WithFieldContext(ctx, fc) 3844 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 3845 ctx = rctx // use context from middleware stack in children 3846 return obj.ID, nil 3847 }) 3848 3849 if resTmp == nil { 3850 if !graphql.HasFieldError(ctx, fc) { 3851 ec.Errorf(ctx, "must not be null") 3852 } 3853 return graphql.Null 3854 } 3855 res := resTmp.(string) 3856 fc.Result = res 3857 return ec.marshalNID2string(ctx, field.Selections, res) 3858 } 3859 3860 func (ec *executionContext) _Autobind_int(ctx context.Context, field graphql.CollectedField, obj *Autobind) (ret graphql.Marshaler) { 3861 defer func() { 3862 if r := recover(); r != nil { 3863 ec.Error(ctx, ec.Recover(ctx, r)) 3864 ret = graphql.Null 3865 } 3866 }() 3867 fc := &graphql.FieldContext{ 3868 Object: "Autobind", 3869 Field: field, 3870 Args: nil, 3871 IsMethod: false, 3872 IsResolver: false, 3873 } 3874 3875 ctx = graphql.WithFieldContext(ctx, fc) 3876 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 3877 ctx = rctx // use context from middleware stack in children 3878 return obj.Int, nil 3879 }) 3880 3881 if resTmp == nil { 3882 if !graphql.HasFieldError(ctx, fc) { 3883 ec.Errorf(ctx, "must not be null") 3884 } 3885 return graphql.Null 3886 } 3887 res := resTmp.(int) 3888 fc.Result = res 3889 return ec.marshalNInt2int(ctx, field.Selections, res) 3890 } 3891 3892 func (ec *executionContext) _Autobind_int32(ctx context.Context, field graphql.CollectedField, obj *Autobind) (ret graphql.Marshaler) { 3893 defer func() { 3894 if r := recover(); r != nil { 3895 ec.Error(ctx, ec.Recover(ctx, r)) 3896 ret = graphql.Null 3897 } 3898 }() 3899 fc := &graphql.FieldContext{ 3900 Object: "Autobind", 3901 Field: field, 3902 Args: nil, 3903 IsMethod: false, 3904 IsResolver: false, 3905 } 3906 3907 ctx = graphql.WithFieldContext(ctx, fc) 3908 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 3909 ctx = rctx // use context from middleware stack in children 3910 return obj.Int32, nil 3911 }) 3912 3913 if resTmp == nil { 3914 if !graphql.HasFieldError(ctx, fc) { 3915 ec.Errorf(ctx, "must not be null") 3916 } 3917 return graphql.Null 3918 } 3919 res := resTmp.(int32) 3920 fc.Result = res 3921 return ec.marshalNInt2int32(ctx, field.Selections, res) 3922 } 3923 3924 func (ec *executionContext) _Autobind_int64(ctx context.Context, field graphql.CollectedField, obj *Autobind) (ret graphql.Marshaler) { 3925 defer func() { 3926 if r := recover(); r != nil { 3927 ec.Error(ctx, ec.Recover(ctx, r)) 3928 ret = graphql.Null 3929 } 3930 }() 3931 fc := &graphql.FieldContext{ 3932 Object: "Autobind", 3933 Field: field, 3934 Args: nil, 3935 IsMethod: false, 3936 IsResolver: false, 3937 } 3938 3939 ctx = graphql.WithFieldContext(ctx, fc) 3940 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 3941 ctx = rctx // use context from middleware stack in children 3942 return obj.Int64, nil 3943 }) 3944 3945 if resTmp == nil { 3946 if !graphql.HasFieldError(ctx, fc) { 3947 ec.Errorf(ctx, "must not be null") 3948 } 3949 return graphql.Null 3950 } 3951 res := resTmp.(int64) 3952 fc.Result = res 3953 return ec.marshalNInt2int64(ctx, field.Selections, res) 3954 } 3955 3956 func (ec *executionContext) _Autobind_idStr(ctx context.Context, field graphql.CollectedField, obj *Autobind) (ret graphql.Marshaler) { 3957 defer func() { 3958 if r := recover(); r != nil { 3959 ec.Error(ctx, ec.Recover(ctx, r)) 3960 ret = graphql.Null 3961 } 3962 }() 3963 fc := &graphql.FieldContext{ 3964 Object: "Autobind", 3965 Field: field, 3966 Args: nil, 3967 IsMethod: false, 3968 IsResolver: false, 3969 } 3970 3971 ctx = graphql.WithFieldContext(ctx, fc) 3972 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 3973 ctx = rctx // use context from middleware stack in children 3974 return obj.IdStr, nil 3975 }) 3976 3977 if resTmp == nil { 3978 if !graphql.HasFieldError(ctx, fc) { 3979 ec.Errorf(ctx, "must not be null") 3980 } 3981 return graphql.Null 3982 } 3983 res := resTmp.(string) 3984 fc.Result = res 3985 return ec.marshalNID2string(ctx, field.Selections, res) 3986 } 3987 3988 func (ec *executionContext) _Autobind_idInt(ctx context.Context, field graphql.CollectedField, obj *Autobind) (ret graphql.Marshaler) { 3989 defer func() { 3990 if r := recover(); r != nil { 3991 ec.Error(ctx, ec.Recover(ctx, r)) 3992 ret = graphql.Null 3993 } 3994 }() 3995 fc := &graphql.FieldContext{ 3996 Object: "Autobind", 3997 Field: field, 3998 Args: nil, 3999 IsMethod: false, 4000 IsResolver: false, 4001 } 4002 4003 ctx = graphql.WithFieldContext(ctx, fc) 4004 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4005 ctx = rctx // use context from middleware stack in children 4006 return obj.IdInt, nil 4007 }) 4008 4009 if resTmp == nil { 4010 if !graphql.HasFieldError(ctx, fc) { 4011 ec.Errorf(ctx, "must not be null") 4012 } 4013 return graphql.Null 4014 } 4015 res := resTmp.(int) 4016 fc.Result = res 4017 return ec.marshalNID2int(ctx, field.Selections, res) 4018 } 4019 4020 func (ec *executionContext) _B_id(ctx context.Context, field graphql.CollectedField, obj *B) (ret graphql.Marshaler) { 4021 defer func() { 4022 if r := recover(); r != nil { 4023 ec.Error(ctx, ec.Recover(ctx, r)) 4024 ret = graphql.Null 4025 } 4026 }() 4027 fc := &graphql.FieldContext{ 4028 Object: "B", 4029 Field: field, 4030 Args: nil, 4031 IsMethod: false, 4032 IsResolver: false, 4033 } 4034 4035 ctx = graphql.WithFieldContext(ctx, fc) 4036 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4037 ctx = rctx // use context from middleware stack in children 4038 return obj.ID, nil 4039 }) 4040 4041 if resTmp == nil { 4042 if !graphql.HasFieldError(ctx, fc) { 4043 ec.Errorf(ctx, "must not be null") 4044 } 4045 return graphql.Null 4046 } 4047 res := resTmp.(string) 4048 fc.Result = res 4049 return ec.marshalNID2string(ctx, field.Selections, res) 4050 } 4051 4052 func (ec *executionContext) _BackedByInterface_id(ctx context.Context, field graphql.CollectedField, obj BackedByInterface) (ret graphql.Marshaler) { 4053 defer func() { 4054 if r := recover(); r != nil { 4055 ec.Error(ctx, ec.Recover(ctx, r)) 4056 ret = graphql.Null 4057 } 4058 }() 4059 fc := &graphql.FieldContext{ 4060 Object: "BackedByInterface", 4061 Field: field, 4062 Args: nil, 4063 IsMethod: true, 4064 IsResolver: true, 4065 } 4066 4067 ctx = graphql.WithFieldContext(ctx, fc) 4068 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4069 ctx = rctx // use context from middleware stack in children 4070 return ec.resolvers.BackedByInterface().ID(rctx, obj) 4071 }) 4072 4073 if resTmp == nil { 4074 if !graphql.HasFieldError(ctx, fc) { 4075 ec.Errorf(ctx, "must not be null") 4076 } 4077 return graphql.Null 4078 } 4079 res := resTmp.(string) 4080 fc.Result = res 4081 return ec.marshalNString2string(ctx, field.Selections, res) 4082 } 4083 4084 func (ec *executionContext) _BackedByInterface_thisShouldBind(ctx context.Context, field graphql.CollectedField, obj BackedByInterface) (ret graphql.Marshaler) { 4085 defer func() { 4086 if r := recover(); r != nil { 4087 ec.Error(ctx, ec.Recover(ctx, r)) 4088 ret = graphql.Null 4089 } 4090 }() 4091 fc := &graphql.FieldContext{ 4092 Object: "BackedByInterface", 4093 Field: field, 4094 Args: nil, 4095 IsMethod: true, 4096 IsResolver: false, 4097 } 4098 4099 ctx = graphql.WithFieldContext(ctx, fc) 4100 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4101 ctx = rctx // use context from middleware stack in children 4102 return obj.ThisShouldBind(), nil 4103 }) 4104 4105 if resTmp == nil { 4106 if !graphql.HasFieldError(ctx, fc) { 4107 ec.Errorf(ctx, "must not be null") 4108 } 4109 return graphql.Null 4110 } 4111 res := resTmp.(string) 4112 fc.Result = res 4113 return ec.marshalNString2string(ctx, field.Selections, res) 4114 } 4115 4116 func (ec *executionContext) _BackedByInterface_thisShouldBindWithError(ctx context.Context, field graphql.CollectedField, obj BackedByInterface) (ret graphql.Marshaler) { 4117 defer func() { 4118 if r := recover(); r != nil { 4119 ec.Error(ctx, ec.Recover(ctx, r)) 4120 ret = graphql.Null 4121 } 4122 }() 4123 fc := &graphql.FieldContext{ 4124 Object: "BackedByInterface", 4125 Field: field, 4126 Args: nil, 4127 IsMethod: true, 4128 IsResolver: false, 4129 } 4130 4131 ctx = graphql.WithFieldContext(ctx, fc) 4132 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4133 ctx = rctx // use context from middleware stack in children 4134 return obj.ThisShouldBindWithError() 4135 }) 4136 4137 if resTmp == nil { 4138 if !graphql.HasFieldError(ctx, fc) { 4139 ec.Errorf(ctx, "must not be null") 4140 } 4141 return graphql.Null 4142 } 4143 res := resTmp.(string) 4144 fc.Result = res 4145 return ec.marshalNString2string(ctx, field.Selections, res) 4146 } 4147 4148 func (ec *executionContext) _Cat_species(ctx context.Context, field graphql.CollectedField, obj *Cat) (ret graphql.Marshaler) { 4149 defer func() { 4150 if r := recover(); r != nil { 4151 ec.Error(ctx, ec.Recover(ctx, r)) 4152 ret = graphql.Null 4153 } 4154 }() 4155 fc := &graphql.FieldContext{ 4156 Object: "Cat", 4157 Field: field, 4158 Args: nil, 4159 IsMethod: false, 4160 IsResolver: false, 4161 } 4162 4163 ctx = graphql.WithFieldContext(ctx, fc) 4164 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4165 ctx = rctx // use context from middleware stack in children 4166 return obj.Species, nil 4167 }) 4168 4169 if resTmp == nil { 4170 if !graphql.HasFieldError(ctx, fc) { 4171 ec.Errorf(ctx, "must not be null") 4172 } 4173 return graphql.Null 4174 } 4175 res := resTmp.(string) 4176 fc.Result = res 4177 return ec.marshalNString2string(ctx, field.Selections, res) 4178 } 4179 4180 func (ec *executionContext) _Cat_catBreed(ctx context.Context, field graphql.CollectedField, obj *Cat) (ret graphql.Marshaler) { 4181 defer func() { 4182 if r := recover(); r != nil { 4183 ec.Error(ctx, ec.Recover(ctx, r)) 4184 ret = graphql.Null 4185 } 4186 }() 4187 fc := &graphql.FieldContext{ 4188 Object: "Cat", 4189 Field: field, 4190 Args: nil, 4191 IsMethod: false, 4192 IsResolver: false, 4193 } 4194 4195 ctx = graphql.WithFieldContext(ctx, fc) 4196 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4197 ctx = rctx // use context from middleware stack in children 4198 return obj.CatBreed, nil 4199 }) 4200 4201 if resTmp == nil { 4202 if !graphql.HasFieldError(ctx, fc) { 4203 ec.Errorf(ctx, "must not be null") 4204 } 4205 return graphql.Null 4206 } 4207 res := resTmp.(string) 4208 fc.Result = res 4209 return ec.marshalNString2string(ctx, field.Selections, res) 4210 } 4211 4212 func (ec *executionContext) _CheckIssue896_id(ctx context.Context, field graphql.CollectedField, obj *CheckIssue896) (ret graphql.Marshaler) { 4213 defer func() { 4214 if r := recover(); r != nil { 4215 ec.Error(ctx, ec.Recover(ctx, r)) 4216 ret = graphql.Null 4217 } 4218 }() 4219 fc := &graphql.FieldContext{ 4220 Object: "CheckIssue896", 4221 Field: field, 4222 Args: nil, 4223 IsMethod: false, 4224 IsResolver: false, 4225 } 4226 4227 ctx = graphql.WithFieldContext(ctx, fc) 4228 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4229 ctx = rctx // use context from middleware stack in children 4230 return obj.ID, nil 4231 }) 4232 4233 if resTmp == nil { 4234 return graphql.Null 4235 } 4236 res := resTmp.(*int) 4237 fc.Result = res 4238 return ec.marshalOInt2ᚖint(ctx, field.Selections, res) 4239 } 4240 4241 func (ec *executionContext) _Circle_radius(ctx context.Context, field graphql.CollectedField, obj *Circle) (ret graphql.Marshaler) { 4242 defer func() { 4243 if r := recover(); r != nil { 4244 ec.Error(ctx, ec.Recover(ctx, r)) 4245 ret = graphql.Null 4246 } 4247 }() 4248 fc := &graphql.FieldContext{ 4249 Object: "Circle", 4250 Field: field, 4251 Args: nil, 4252 IsMethod: false, 4253 IsResolver: false, 4254 } 4255 4256 ctx = graphql.WithFieldContext(ctx, fc) 4257 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4258 ctx = rctx // use context from middleware stack in children 4259 return obj.Radius, nil 4260 }) 4261 4262 if resTmp == nil { 4263 return graphql.Null 4264 } 4265 res := resTmp.(float64) 4266 fc.Result = res 4267 return ec.marshalOFloat2float64(ctx, field.Selections, res) 4268 } 4269 4270 func (ec *executionContext) _Circle_area(ctx context.Context, field graphql.CollectedField, obj *Circle) (ret graphql.Marshaler) { 4271 defer func() { 4272 if r := recover(); r != nil { 4273 ec.Error(ctx, ec.Recover(ctx, r)) 4274 ret = graphql.Null 4275 } 4276 }() 4277 fc := &graphql.FieldContext{ 4278 Object: "Circle", 4279 Field: field, 4280 Args: nil, 4281 IsMethod: true, 4282 IsResolver: false, 4283 } 4284 4285 ctx = graphql.WithFieldContext(ctx, fc) 4286 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4287 ctx = rctx // use context from middleware stack in children 4288 return obj.Area(), nil 4289 }) 4290 4291 if resTmp == nil { 4292 return graphql.Null 4293 } 4294 res := resTmp.(float64) 4295 fc.Result = res 4296 return ec.marshalOFloat2float64(ctx, field.Selections, res) 4297 } 4298 4299 func (ec *executionContext) _Circle_coordinates(ctx context.Context, field graphql.CollectedField, obj *Circle) (ret graphql.Marshaler) { 4300 defer func() { 4301 if r := recover(); r != nil { 4302 ec.Error(ctx, ec.Recover(ctx, r)) 4303 ret = graphql.Null 4304 } 4305 }() 4306 fc := &graphql.FieldContext{ 4307 Object: "Circle", 4308 Field: field, 4309 Args: nil, 4310 IsMethod: false, 4311 IsResolver: false, 4312 } 4313 4314 ctx = graphql.WithFieldContext(ctx, fc) 4315 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4316 ctx = rctx // use context from middleware stack in children 4317 return obj.Coordinates, nil 4318 }) 4319 4320 if resTmp == nil { 4321 return graphql.Null 4322 } 4323 res := resTmp.(Coordinates) 4324 fc.Result = res 4325 return ec.marshalOCoordinates2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCoordinates(ctx, field.Selections, res) 4326 } 4327 4328 func (ec *executionContext) _ConcreteNodeA_id(ctx context.Context, field graphql.CollectedField, obj *ConcreteNodeA) (ret graphql.Marshaler) { 4329 defer func() { 4330 if r := recover(); r != nil { 4331 ec.Error(ctx, ec.Recover(ctx, r)) 4332 ret = graphql.Null 4333 } 4334 }() 4335 fc := &graphql.FieldContext{ 4336 Object: "ConcreteNodeA", 4337 Field: field, 4338 Args: nil, 4339 IsMethod: false, 4340 IsResolver: false, 4341 } 4342 4343 ctx = graphql.WithFieldContext(ctx, fc) 4344 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4345 ctx = rctx // use context from middleware stack in children 4346 return obj.ID, nil 4347 }) 4348 4349 if resTmp == nil { 4350 if !graphql.HasFieldError(ctx, fc) { 4351 ec.Errorf(ctx, "must not be null") 4352 } 4353 return graphql.Null 4354 } 4355 res := resTmp.(string) 4356 fc.Result = res 4357 return ec.marshalNID2string(ctx, field.Selections, res) 4358 } 4359 4360 func (ec *executionContext) _ConcreteNodeA_child(ctx context.Context, field graphql.CollectedField, obj *ConcreteNodeA) (ret graphql.Marshaler) { 4361 defer func() { 4362 if r := recover(); r != nil { 4363 ec.Error(ctx, ec.Recover(ctx, r)) 4364 ret = graphql.Null 4365 } 4366 }() 4367 fc := &graphql.FieldContext{ 4368 Object: "ConcreteNodeA", 4369 Field: field, 4370 Args: nil, 4371 IsMethod: true, 4372 IsResolver: false, 4373 } 4374 4375 ctx = graphql.WithFieldContext(ctx, fc) 4376 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4377 ctx = rctx // use context from middleware stack in children 4378 return obj.Child() 4379 }) 4380 4381 if resTmp == nil { 4382 if !graphql.HasFieldError(ctx, fc) { 4383 ec.Errorf(ctx, "must not be null") 4384 } 4385 return graphql.Null 4386 } 4387 res := resTmp.(Node) 4388 fc.Result = res 4389 return ec.marshalNNode2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐNode(ctx, field.Selections, res) 4390 } 4391 4392 func (ec *executionContext) _ConcreteNodeA_name(ctx context.Context, field graphql.CollectedField, obj *ConcreteNodeA) (ret graphql.Marshaler) { 4393 defer func() { 4394 if r := recover(); r != nil { 4395 ec.Error(ctx, ec.Recover(ctx, r)) 4396 ret = graphql.Null 4397 } 4398 }() 4399 fc := &graphql.FieldContext{ 4400 Object: "ConcreteNodeA", 4401 Field: field, 4402 Args: nil, 4403 IsMethod: false, 4404 IsResolver: false, 4405 } 4406 4407 ctx = graphql.WithFieldContext(ctx, fc) 4408 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4409 ctx = rctx // use context from middleware stack in children 4410 return obj.Name, nil 4411 }) 4412 4413 if resTmp == nil { 4414 if !graphql.HasFieldError(ctx, fc) { 4415 ec.Errorf(ctx, "must not be null") 4416 } 4417 return graphql.Null 4418 } 4419 res := resTmp.(string) 4420 fc.Result = res 4421 return ec.marshalNString2string(ctx, field.Selections, res) 4422 } 4423 4424 func (ec *executionContext) _ConcreteNodeInterface_id(ctx context.Context, field graphql.CollectedField, obj ConcreteNodeInterface) (ret graphql.Marshaler) { 4425 defer func() { 4426 if r := recover(); r != nil { 4427 ec.Error(ctx, ec.Recover(ctx, r)) 4428 ret = graphql.Null 4429 } 4430 }() 4431 fc := &graphql.FieldContext{ 4432 Object: "ConcreteNodeInterface", 4433 Field: field, 4434 Args: nil, 4435 IsMethod: true, 4436 IsResolver: false, 4437 } 4438 4439 ctx = graphql.WithFieldContext(ctx, fc) 4440 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4441 ctx = rctx // use context from middleware stack in children 4442 return obj.ID(), nil 4443 }) 4444 4445 if resTmp == nil { 4446 if !graphql.HasFieldError(ctx, fc) { 4447 ec.Errorf(ctx, "must not be null") 4448 } 4449 return graphql.Null 4450 } 4451 res := resTmp.(string) 4452 fc.Result = res 4453 return ec.marshalNID2string(ctx, field.Selections, res) 4454 } 4455 4456 func (ec *executionContext) _ConcreteNodeInterface_child(ctx context.Context, field graphql.CollectedField, obj ConcreteNodeInterface) (ret graphql.Marshaler) { 4457 defer func() { 4458 if r := recover(); r != nil { 4459 ec.Error(ctx, ec.Recover(ctx, r)) 4460 ret = graphql.Null 4461 } 4462 }() 4463 fc := &graphql.FieldContext{ 4464 Object: "ConcreteNodeInterface", 4465 Field: field, 4466 Args: nil, 4467 IsMethod: true, 4468 IsResolver: false, 4469 } 4470 4471 ctx = graphql.WithFieldContext(ctx, fc) 4472 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4473 ctx = rctx // use context from middleware stack in children 4474 return obj.Child() 4475 }) 4476 4477 if resTmp == nil { 4478 if !graphql.HasFieldError(ctx, fc) { 4479 ec.Errorf(ctx, "must not be null") 4480 } 4481 return graphql.Null 4482 } 4483 res := resTmp.(Node) 4484 fc.Result = res 4485 return ec.marshalNNode2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐNode(ctx, field.Selections, res) 4486 } 4487 4488 func (ec *executionContext) _Content_Post_foo(ctx context.Context, field graphql.CollectedField, obj *ContentPost) (ret graphql.Marshaler) { 4489 defer func() { 4490 if r := recover(); r != nil { 4491 ec.Error(ctx, ec.Recover(ctx, r)) 4492 ret = graphql.Null 4493 } 4494 }() 4495 fc := &graphql.FieldContext{ 4496 Object: "Content_Post", 4497 Field: field, 4498 Args: nil, 4499 IsMethod: false, 4500 IsResolver: false, 4501 } 4502 4503 ctx = graphql.WithFieldContext(ctx, fc) 4504 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4505 ctx = rctx // use context from middleware stack in children 4506 return obj.Foo, nil 4507 }) 4508 4509 if resTmp == nil { 4510 return graphql.Null 4511 } 4512 res := resTmp.(*string) 4513 fc.Result = res 4514 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 4515 } 4516 4517 func (ec *executionContext) _Content_User_foo(ctx context.Context, field graphql.CollectedField, obj *ContentUser) (ret graphql.Marshaler) { 4518 defer func() { 4519 if r := recover(); r != nil { 4520 ec.Error(ctx, ec.Recover(ctx, r)) 4521 ret = graphql.Null 4522 } 4523 }() 4524 fc := &graphql.FieldContext{ 4525 Object: "Content_User", 4526 Field: field, 4527 Args: nil, 4528 IsMethod: false, 4529 IsResolver: false, 4530 } 4531 4532 ctx = graphql.WithFieldContext(ctx, fc) 4533 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4534 ctx = rctx // use context from middleware stack in children 4535 return obj.Foo, nil 4536 }) 4537 4538 if resTmp == nil { 4539 return graphql.Null 4540 } 4541 res := resTmp.(*string) 4542 fc.Result = res 4543 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 4544 } 4545 4546 func (ec *executionContext) _Coordinates_x(ctx context.Context, field graphql.CollectedField, obj *Coordinates) (ret graphql.Marshaler) { 4547 defer func() { 4548 if r := recover(); r != nil { 4549 ec.Error(ctx, ec.Recover(ctx, r)) 4550 ret = graphql.Null 4551 } 4552 }() 4553 fc := &graphql.FieldContext{ 4554 Object: "Coordinates", 4555 Field: field, 4556 Args: nil, 4557 IsMethod: false, 4558 IsResolver: false, 4559 } 4560 4561 ctx = graphql.WithFieldContext(ctx, fc) 4562 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4563 ctx = rctx // use context from middleware stack in children 4564 return obj.X, nil 4565 }) 4566 4567 if resTmp == nil { 4568 if !graphql.HasFieldError(ctx, fc) { 4569 ec.Errorf(ctx, "must not be null") 4570 } 4571 return graphql.Null 4572 } 4573 res := resTmp.(float64) 4574 fc.Result = res 4575 return ec.marshalNFloat2float64(ctx, field.Selections, res) 4576 } 4577 4578 func (ec *executionContext) _Coordinates_y(ctx context.Context, field graphql.CollectedField, obj *Coordinates) (ret graphql.Marshaler) { 4579 defer func() { 4580 if r := recover(); r != nil { 4581 ec.Error(ctx, ec.Recover(ctx, r)) 4582 ret = graphql.Null 4583 } 4584 }() 4585 fc := &graphql.FieldContext{ 4586 Object: "Coordinates", 4587 Field: field, 4588 Args: nil, 4589 IsMethod: false, 4590 IsResolver: false, 4591 } 4592 4593 ctx = graphql.WithFieldContext(ctx, fc) 4594 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4595 ctx = rctx // use context from middleware stack in children 4596 return obj.Y, nil 4597 }) 4598 4599 if resTmp == nil { 4600 if !graphql.HasFieldError(ctx, fc) { 4601 ec.Errorf(ctx, "must not be null") 4602 } 4603 return graphql.Null 4604 } 4605 res := resTmp.(float64) 4606 fc.Result = res 4607 return ec.marshalNFloat2float64(ctx, field.Selections, res) 4608 } 4609 4610 func (ec *executionContext) _DefaultParametersMirror_falsyBoolean(ctx context.Context, field graphql.CollectedField, obj *DefaultParametersMirror) (ret graphql.Marshaler) { 4611 defer func() { 4612 if r := recover(); r != nil { 4613 ec.Error(ctx, ec.Recover(ctx, r)) 4614 ret = graphql.Null 4615 } 4616 }() 4617 fc := &graphql.FieldContext{ 4618 Object: "DefaultParametersMirror", 4619 Field: field, 4620 Args: nil, 4621 IsMethod: false, 4622 IsResolver: false, 4623 } 4624 4625 ctx = graphql.WithFieldContext(ctx, fc) 4626 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4627 ctx = rctx // use context from middleware stack in children 4628 return obj.FalsyBoolean, nil 4629 }) 4630 4631 if resTmp == nil { 4632 return graphql.Null 4633 } 4634 res := resTmp.(*bool) 4635 fc.Result = res 4636 return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) 4637 } 4638 4639 func (ec *executionContext) _DefaultParametersMirror_truthyBoolean(ctx context.Context, field graphql.CollectedField, obj *DefaultParametersMirror) (ret graphql.Marshaler) { 4640 defer func() { 4641 if r := recover(); r != nil { 4642 ec.Error(ctx, ec.Recover(ctx, r)) 4643 ret = graphql.Null 4644 } 4645 }() 4646 fc := &graphql.FieldContext{ 4647 Object: "DefaultParametersMirror", 4648 Field: field, 4649 Args: nil, 4650 IsMethod: false, 4651 IsResolver: false, 4652 } 4653 4654 ctx = graphql.WithFieldContext(ctx, fc) 4655 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4656 ctx = rctx // use context from middleware stack in children 4657 return obj.TruthyBoolean, nil 4658 }) 4659 4660 if resTmp == nil { 4661 return graphql.Null 4662 } 4663 res := resTmp.(*bool) 4664 fc.Result = res 4665 return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) 4666 } 4667 4668 func (ec *executionContext) _Dog_species(ctx context.Context, field graphql.CollectedField, obj *Dog) (ret graphql.Marshaler) { 4669 defer func() { 4670 if r := recover(); r != nil { 4671 ec.Error(ctx, ec.Recover(ctx, r)) 4672 ret = graphql.Null 4673 } 4674 }() 4675 fc := &graphql.FieldContext{ 4676 Object: "Dog", 4677 Field: field, 4678 Args: nil, 4679 IsMethod: false, 4680 IsResolver: false, 4681 } 4682 4683 ctx = graphql.WithFieldContext(ctx, fc) 4684 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4685 ctx = rctx // use context from middleware stack in children 4686 return obj.Species, nil 4687 }) 4688 4689 if resTmp == nil { 4690 if !graphql.HasFieldError(ctx, fc) { 4691 ec.Errorf(ctx, "must not be null") 4692 } 4693 return graphql.Null 4694 } 4695 res := resTmp.(string) 4696 fc.Result = res 4697 return ec.marshalNString2string(ctx, field.Selections, res) 4698 } 4699 4700 func (ec *executionContext) _Dog_dogBreed(ctx context.Context, field graphql.CollectedField, obj *Dog) (ret graphql.Marshaler) { 4701 defer func() { 4702 if r := recover(); r != nil { 4703 ec.Error(ctx, ec.Recover(ctx, r)) 4704 ret = graphql.Null 4705 } 4706 }() 4707 fc := &graphql.FieldContext{ 4708 Object: "Dog", 4709 Field: field, 4710 Args: nil, 4711 IsMethod: false, 4712 IsResolver: false, 4713 } 4714 4715 ctx = graphql.WithFieldContext(ctx, fc) 4716 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4717 ctx = rctx // use context from middleware stack in children 4718 return obj.DogBreed, nil 4719 }) 4720 4721 if resTmp == nil { 4722 if !graphql.HasFieldError(ctx, fc) { 4723 ec.Errorf(ctx, "must not be null") 4724 } 4725 return graphql.Null 4726 } 4727 res := resTmp.(string) 4728 fc.Result = res 4729 return ec.marshalNString2string(ctx, field.Selections, res) 4730 } 4731 4732 func (ec *executionContext) _EmbeddedCase1_exportedEmbeddedPointerExportedMethod(ctx context.Context, field graphql.CollectedField, obj *EmbeddedCase1) (ret graphql.Marshaler) { 4733 defer func() { 4734 if r := recover(); r != nil { 4735 ec.Error(ctx, ec.Recover(ctx, r)) 4736 ret = graphql.Null 4737 } 4738 }() 4739 fc := &graphql.FieldContext{ 4740 Object: "EmbeddedCase1", 4741 Field: field, 4742 Args: nil, 4743 IsMethod: true, 4744 IsResolver: false, 4745 } 4746 4747 ctx = graphql.WithFieldContext(ctx, fc) 4748 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4749 ctx = rctx // use context from middleware stack in children 4750 return obj.ExportedEmbeddedPointerExportedMethod(), nil 4751 }) 4752 4753 if resTmp == nil { 4754 if !graphql.HasFieldError(ctx, fc) { 4755 ec.Errorf(ctx, "must not be null") 4756 } 4757 return graphql.Null 4758 } 4759 res := resTmp.(string) 4760 fc.Result = res 4761 return ec.marshalNString2string(ctx, field.Selections, res) 4762 } 4763 4764 func (ec *executionContext) _EmbeddedCase2_unexportedEmbeddedPointerExportedMethod(ctx context.Context, field graphql.CollectedField, obj *EmbeddedCase2) (ret graphql.Marshaler) { 4765 defer func() { 4766 if r := recover(); r != nil { 4767 ec.Error(ctx, ec.Recover(ctx, r)) 4768 ret = graphql.Null 4769 } 4770 }() 4771 fc := &graphql.FieldContext{ 4772 Object: "EmbeddedCase2", 4773 Field: field, 4774 Args: nil, 4775 IsMethod: true, 4776 IsResolver: false, 4777 } 4778 4779 ctx = graphql.WithFieldContext(ctx, fc) 4780 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4781 ctx = rctx // use context from middleware stack in children 4782 return obj.UnexportedEmbeddedPointerExportedMethod(), nil 4783 }) 4784 4785 if resTmp == nil { 4786 if !graphql.HasFieldError(ctx, fc) { 4787 ec.Errorf(ctx, "must not be null") 4788 } 4789 return graphql.Null 4790 } 4791 res := resTmp.(string) 4792 fc.Result = res 4793 return ec.marshalNString2string(ctx, field.Selections, res) 4794 } 4795 4796 func (ec *executionContext) _EmbeddedCase3_unexportedEmbeddedInterfaceExportedMethod(ctx context.Context, field graphql.CollectedField, obj *EmbeddedCase3) (ret graphql.Marshaler) { 4797 defer func() { 4798 if r := recover(); r != nil { 4799 ec.Error(ctx, ec.Recover(ctx, r)) 4800 ret = graphql.Null 4801 } 4802 }() 4803 fc := &graphql.FieldContext{ 4804 Object: "EmbeddedCase3", 4805 Field: field, 4806 Args: nil, 4807 IsMethod: true, 4808 IsResolver: false, 4809 } 4810 4811 ctx = graphql.WithFieldContext(ctx, fc) 4812 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4813 ctx = rctx // use context from middleware stack in children 4814 return obj.UnexportedEmbeddedInterfaceExportedMethod(), nil 4815 }) 4816 4817 if resTmp == nil { 4818 if !graphql.HasFieldError(ctx, fc) { 4819 ec.Errorf(ctx, "must not be null") 4820 } 4821 return graphql.Null 4822 } 4823 res := resTmp.(string) 4824 fc.Result = res 4825 return ec.marshalNString2string(ctx, field.Selections, res) 4826 } 4827 4828 func (ec *executionContext) _EmbeddedDefaultScalar_value(ctx context.Context, field graphql.CollectedField, obj *EmbeddedDefaultScalar) (ret graphql.Marshaler) { 4829 defer func() { 4830 if r := recover(); r != nil { 4831 ec.Error(ctx, ec.Recover(ctx, r)) 4832 ret = graphql.Null 4833 } 4834 }() 4835 fc := &graphql.FieldContext{ 4836 Object: "EmbeddedDefaultScalar", 4837 Field: field, 4838 Args: nil, 4839 IsMethod: false, 4840 IsResolver: false, 4841 } 4842 4843 ctx = graphql.WithFieldContext(ctx, fc) 4844 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4845 ctx = rctx // use context from middleware stack in children 4846 return obj.Value, nil 4847 }) 4848 4849 if resTmp == nil { 4850 return graphql.Null 4851 } 4852 res := resTmp.(*string) 4853 fc.Result = res 4854 return ec.marshalODefaultScalarImplementation2ᚖstring(ctx, field.Selections, res) 4855 } 4856 4857 func (ec *executionContext) _EmbeddedPointer_ID(ctx context.Context, field graphql.CollectedField, obj *EmbeddedPointerModel) (ret graphql.Marshaler) { 4858 defer func() { 4859 if r := recover(); r != nil { 4860 ec.Error(ctx, ec.Recover(ctx, r)) 4861 ret = graphql.Null 4862 } 4863 }() 4864 fc := &graphql.FieldContext{ 4865 Object: "EmbeddedPointer", 4866 Field: field, 4867 Args: nil, 4868 IsMethod: false, 4869 IsResolver: false, 4870 } 4871 4872 ctx = graphql.WithFieldContext(ctx, fc) 4873 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4874 ctx = rctx // use context from middleware stack in children 4875 return obj.ID, nil 4876 }) 4877 4878 if resTmp == nil { 4879 return graphql.Null 4880 } 4881 res := resTmp.(string) 4882 fc.Result = res 4883 return ec.marshalOString2string(ctx, field.Selections, res) 4884 } 4885 4886 func (ec *executionContext) _EmbeddedPointer_Title(ctx context.Context, field graphql.CollectedField, obj *EmbeddedPointerModel) (ret graphql.Marshaler) { 4887 defer func() { 4888 if r := recover(); r != nil { 4889 ec.Error(ctx, ec.Recover(ctx, r)) 4890 ret = graphql.Null 4891 } 4892 }() 4893 fc := &graphql.FieldContext{ 4894 Object: "EmbeddedPointer", 4895 Field: field, 4896 Args: nil, 4897 IsMethod: false, 4898 IsResolver: false, 4899 } 4900 4901 ctx = graphql.WithFieldContext(ctx, fc) 4902 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4903 ctx = rctx // use context from middleware stack in children 4904 return obj.Title, nil 4905 }) 4906 4907 if resTmp == nil { 4908 return graphql.Null 4909 } 4910 res := resTmp.(string) 4911 fc.Result = res 4912 return ec.marshalOString2string(ctx, field.Selections, res) 4913 } 4914 4915 func (ec *executionContext) _Error_id(ctx context.Context, field graphql.CollectedField, obj *Error) (ret graphql.Marshaler) { 4916 defer func() { 4917 if r := recover(); r != nil { 4918 ec.Error(ctx, ec.Recover(ctx, r)) 4919 ret = graphql.Null 4920 } 4921 }() 4922 fc := &graphql.FieldContext{ 4923 Object: "Error", 4924 Field: field, 4925 Args: nil, 4926 IsMethod: false, 4927 IsResolver: false, 4928 } 4929 4930 ctx = graphql.WithFieldContext(ctx, fc) 4931 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4932 ctx = rctx // use context from middleware stack in children 4933 return obj.ID, nil 4934 }) 4935 4936 if resTmp == nil { 4937 if !graphql.HasFieldError(ctx, fc) { 4938 ec.Errorf(ctx, "must not be null") 4939 } 4940 return graphql.Null 4941 } 4942 res := resTmp.(string) 4943 fc.Result = res 4944 return ec.marshalNID2string(ctx, field.Selections, res) 4945 } 4946 4947 func (ec *executionContext) _Error_errorOnNonRequiredField(ctx context.Context, field graphql.CollectedField, obj *Error) (ret graphql.Marshaler) { 4948 defer func() { 4949 if r := recover(); r != nil { 4950 ec.Error(ctx, ec.Recover(ctx, r)) 4951 ret = graphql.Null 4952 } 4953 }() 4954 fc := &graphql.FieldContext{ 4955 Object: "Error", 4956 Field: field, 4957 Args: nil, 4958 IsMethod: true, 4959 IsResolver: false, 4960 } 4961 4962 ctx = graphql.WithFieldContext(ctx, fc) 4963 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4964 ctx = rctx // use context from middleware stack in children 4965 return obj.ErrorOnNonRequiredField() 4966 }) 4967 4968 if resTmp == nil { 4969 return graphql.Null 4970 } 4971 res := resTmp.(string) 4972 fc.Result = res 4973 return ec.marshalOString2string(ctx, field.Selections, res) 4974 } 4975 4976 func (ec *executionContext) _Error_errorOnRequiredField(ctx context.Context, field graphql.CollectedField, obj *Error) (ret graphql.Marshaler) { 4977 defer func() { 4978 if r := recover(); r != nil { 4979 ec.Error(ctx, ec.Recover(ctx, r)) 4980 ret = graphql.Null 4981 } 4982 }() 4983 fc := &graphql.FieldContext{ 4984 Object: "Error", 4985 Field: field, 4986 Args: nil, 4987 IsMethod: true, 4988 IsResolver: false, 4989 } 4990 4991 ctx = graphql.WithFieldContext(ctx, fc) 4992 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4993 ctx = rctx // use context from middleware stack in children 4994 return obj.ErrorOnRequiredField() 4995 }) 4996 4997 if resTmp == nil { 4998 if !graphql.HasFieldError(ctx, fc) { 4999 ec.Errorf(ctx, "must not be null") 5000 } 5001 return graphql.Null 5002 } 5003 res := resTmp.(string) 5004 fc.Result = res 5005 return ec.marshalNString2string(ctx, field.Selections, res) 5006 } 5007 5008 func (ec *executionContext) _Error_nilOnRequiredField(ctx context.Context, field graphql.CollectedField, obj *Error) (ret graphql.Marshaler) { 5009 defer func() { 5010 if r := recover(); r != nil { 5011 ec.Error(ctx, ec.Recover(ctx, r)) 5012 ret = graphql.Null 5013 } 5014 }() 5015 fc := &graphql.FieldContext{ 5016 Object: "Error", 5017 Field: field, 5018 Args: nil, 5019 IsMethod: true, 5020 IsResolver: false, 5021 } 5022 5023 ctx = graphql.WithFieldContext(ctx, fc) 5024 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5025 ctx = rctx // use context from middleware stack in children 5026 return obj.NilOnRequiredField(), nil 5027 }) 5028 5029 if resTmp == nil { 5030 if !graphql.HasFieldError(ctx, fc) { 5031 ec.Errorf(ctx, "must not be null") 5032 } 5033 return graphql.Null 5034 } 5035 res := resTmp.(*string) 5036 fc.Result = res 5037 return ec.marshalNString2ᚖstring(ctx, field.Selections, res) 5038 } 5039 5040 func (ec *executionContext) _Errors_a(ctx context.Context, field graphql.CollectedField, obj *Errors) (ret graphql.Marshaler) { 5041 defer func() { 5042 if r := recover(); r != nil { 5043 ec.Error(ctx, ec.Recover(ctx, r)) 5044 ret = graphql.Null 5045 } 5046 }() 5047 fc := &graphql.FieldContext{ 5048 Object: "Errors", 5049 Field: field, 5050 Args: nil, 5051 IsMethod: true, 5052 IsResolver: true, 5053 } 5054 5055 ctx = graphql.WithFieldContext(ctx, fc) 5056 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5057 ctx = rctx // use context from middleware stack in children 5058 return ec.resolvers.Errors().A(rctx, obj) 5059 }) 5060 5061 if resTmp == nil { 5062 if !graphql.HasFieldError(ctx, fc) { 5063 ec.Errorf(ctx, "must not be null") 5064 } 5065 return graphql.Null 5066 } 5067 res := resTmp.(*Error) 5068 fc.Result = res 5069 return ec.marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx, field.Selections, res) 5070 } 5071 5072 func (ec *executionContext) _Errors_b(ctx context.Context, field graphql.CollectedField, obj *Errors) (ret graphql.Marshaler) { 5073 defer func() { 5074 if r := recover(); r != nil { 5075 ec.Error(ctx, ec.Recover(ctx, r)) 5076 ret = graphql.Null 5077 } 5078 }() 5079 fc := &graphql.FieldContext{ 5080 Object: "Errors", 5081 Field: field, 5082 Args: nil, 5083 IsMethod: true, 5084 IsResolver: true, 5085 } 5086 5087 ctx = graphql.WithFieldContext(ctx, fc) 5088 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5089 ctx = rctx // use context from middleware stack in children 5090 return ec.resolvers.Errors().B(rctx, obj) 5091 }) 5092 5093 if resTmp == nil { 5094 if !graphql.HasFieldError(ctx, fc) { 5095 ec.Errorf(ctx, "must not be null") 5096 } 5097 return graphql.Null 5098 } 5099 res := resTmp.(*Error) 5100 fc.Result = res 5101 return ec.marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx, field.Selections, res) 5102 } 5103 5104 func (ec *executionContext) _Errors_c(ctx context.Context, field graphql.CollectedField, obj *Errors) (ret graphql.Marshaler) { 5105 defer func() { 5106 if r := recover(); r != nil { 5107 ec.Error(ctx, ec.Recover(ctx, r)) 5108 ret = graphql.Null 5109 } 5110 }() 5111 fc := &graphql.FieldContext{ 5112 Object: "Errors", 5113 Field: field, 5114 Args: nil, 5115 IsMethod: true, 5116 IsResolver: true, 5117 } 5118 5119 ctx = graphql.WithFieldContext(ctx, fc) 5120 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5121 ctx = rctx // use context from middleware stack in children 5122 return ec.resolvers.Errors().C(rctx, obj) 5123 }) 5124 5125 if resTmp == nil { 5126 if !graphql.HasFieldError(ctx, fc) { 5127 ec.Errorf(ctx, "must not be null") 5128 } 5129 return graphql.Null 5130 } 5131 res := resTmp.(*Error) 5132 fc.Result = res 5133 return ec.marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx, field.Selections, res) 5134 } 5135 5136 func (ec *executionContext) _Errors_d(ctx context.Context, field graphql.CollectedField, obj *Errors) (ret graphql.Marshaler) { 5137 defer func() { 5138 if r := recover(); r != nil { 5139 ec.Error(ctx, ec.Recover(ctx, r)) 5140 ret = graphql.Null 5141 } 5142 }() 5143 fc := &graphql.FieldContext{ 5144 Object: "Errors", 5145 Field: field, 5146 Args: nil, 5147 IsMethod: true, 5148 IsResolver: true, 5149 } 5150 5151 ctx = graphql.WithFieldContext(ctx, fc) 5152 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5153 ctx = rctx // use context from middleware stack in children 5154 return ec.resolvers.Errors().D(rctx, obj) 5155 }) 5156 5157 if resTmp == nil { 5158 if !graphql.HasFieldError(ctx, fc) { 5159 ec.Errorf(ctx, "must not be null") 5160 } 5161 return graphql.Null 5162 } 5163 res := resTmp.(*Error) 5164 fc.Result = res 5165 return ec.marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx, field.Selections, res) 5166 } 5167 5168 func (ec *executionContext) _Errors_e(ctx context.Context, field graphql.CollectedField, obj *Errors) (ret graphql.Marshaler) { 5169 defer func() { 5170 if r := recover(); r != nil { 5171 ec.Error(ctx, ec.Recover(ctx, r)) 5172 ret = graphql.Null 5173 } 5174 }() 5175 fc := &graphql.FieldContext{ 5176 Object: "Errors", 5177 Field: field, 5178 Args: nil, 5179 IsMethod: true, 5180 IsResolver: true, 5181 } 5182 5183 ctx = graphql.WithFieldContext(ctx, fc) 5184 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5185 ctx = rctx // use context from middleware stack in children 5186 return ec.resolvers.Errors().E(rctx, obj) 5187 }) 5188 5189 if resTmp == nil { 5190 if !graphql.HasFieldError(ctx, fc) { 5191 ec.Errorf(ctx, "must not be null") 5192 } 5193 return graphql.Null 5194 } 5195 res := resTmp.(*Error) 5196 fc.Result = res 5197 return ec.marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx, field.Selections, res) 5198 } 5199 5200 func (ec *executionContext) _ForcedResolver_field(ctx context.Context, field graphql.CollectedField, obj *ForcedResolver) (ret graphql.Marshaler) { 5201 defer func() { 5202 if r := recover(); r != nil { 5203 ec.Error(ctx, ec.Recover(ctx, r)) 5204 ret = graphql.Null 5205 } 5206 }() 5207 fc := &graphql.FieldContext{ 5208 Object: "ForcedResolver", 5209 Field: field, 5210 Args: nil, 5211 IsMethod: true, 5212 IsResolver: true, 5213 } 5214 5215 ctx = graphql.WithFieldContext(ctx, fc) 5216 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5217 ctx = rctx // use context from middleware stack in children 5218 return ec.resolvers.ForcedResolver().Field(rctx, obj) 5219 }) 5220 5221 if resTmp == nil { 5222 return graphql.Null 5223 } 5224 res := resTmp.(*Circle) 5225 fc.Result = res 5226 return ec.marshalOCircle2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCircle(ctx, field.Selections, res) 5227 } 5228 5229 func (ec *executionContext) _InnerObject_id(ctx context.Context, field graphql.CollectedField, obj *InnerObject) (ret graphql.Marshaler) { 5230 defer func() { 5231 if r := recover(); r != nil { 5232 ec.Error(ctx, ec.Recover(ctx, r)) 5233 ret = graphql.Null 5234 } 5235 }() 5236 fc := &graphql.FieldContext{ 5237 Object: "InnerObject", 5238 Field: field, 5239 Args: nil, 5240 IsMethod: false, 5241 IsResolver: false, 5242 } 5243 5244 ctx = graphql.WithFieldContext(ctx, fc) 5245 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5246 ctx = rctx // use context from middleware stack in children 5247 return obj.ID, nil 5248 }) 5249 5250 if resTmp == nil { 5251 if !graphql.HasFieldError(ctx, fc) { 5252 ec.Errorf(ctx, "must not be null") 5253 } 5254 return graphql.Null 5255 } 5256 res := resTmp.(int) 5257 fc.Result = res 5258 return ec.marshalNInt2int(ctx, field.Selections, res) 5259 } 5260 5261 func (ec *executionContext) _InvalidIdentifier_id(ctx context.Context, field graphql.CollectedField, obj *invalid_packagename.InvalidIdentifier) (ret graphql.Marshaler) { 5262 defer func() { 5263 if r := recover(); r != nil { 5264 ec.Error(ctx, ec.Recover(ctx, r)) 5265 ret = graphql.Null 5266 } 5267 }() 5268 fc := &graphql.FieldContext{ 5269 Object: "InvalidIdentifier", 5270 Field: field, 5271 Args: nil, 5272 IsMethod: false, 5273 IsResolver: false, 5274 } 5275 5276 ctx = graphql.WithFieldContext(ctx, fc) 5277 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5278 ctx = rctx // use context from middleware stack in children 5279 return obj.ID, nil 5280 }) 5281 5282 if resTmp == nil { 5283 if !graphql.HasFieldError(ctx, fc) { 5284 ec.Errorf(ctx, "must not be null") 5285 } 5286 return graphql.Null 5287 } 5288 res := resTmp.(int) 5289 fc.Result = res 5290 return ec.marshalNInt2int(ctx, field.Selections, res) 5291 } 5292 5293 func (ec *executionContext) _It_id(ctx context.Context, field graphql.CollectedField, obj *introspection1.It) (ret graphql.Marshaler) { 5294 defer func() { 5295 if r := recover(); r != nil { 5296 ec.Error(ctx, ec.Recover(ctx, r)) 5297 ret = graphql.Null 5298 } 5299 }() 5300 fc := &graphql.FieldContext{ 5301 Object: "It", 5302 Field: field, 5303 Args: nil, 5304 IsMethod: false, 5305 IsResolver: false, 5306 } 5307 5308 ctx = graphql.WithFieldContext(ctx, fc) 5309 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5310 ctx = rctx // use context from middleware stack in children 5311 return obj.ID, nil 5312 }) 5313 5314 if resTmp == nil { 5315 if !graphql.HasFieldError(ctx, fc) { 5316 ec.Errorf(ctx, "must not be null") 5317 } 5318 return graphql.Null 5319 } 5320 res := resTmp.(string) 5321 fc.Result = res 5322 return ec.marshalNID2string(ctx, field.Selections, res) 5323 } 5324 5325 func (ec *executionContext) _LoopA_b(ctx context.Context, field graphql.CollectedField, obj *LoopA) (ret graphql.Marshaler) { 5326 defer func() { 5327 if r := recover(); r != nil { 5328 ec.Error(ctx, ec.Recover(ctx, r)) 5329 ret = graphql.Null 5330 } 5331 }() 5332 fc := &graphql.FieldContext{ 5333 Object: "LoopA", 5334 Field: field, 5335 Args: nil, 5336 IsMethod: false, 5337 IsResolver: false, 5338 } 5339 5340 ctx = graphql.WithFieldContext(ctx, fc) 5341 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5342 ctx = rctx // use context from middleware stack in children 5343 return obj.B, nil 5344 }) 5345 5346 if resTmp == nil { 5347 if !graphql.HasFieldError(ctx, fc) { 5348 ec.Errorf(ctx, "must not be null") 5349 } 5350 return graphql.Null 5351 } 5352 res := resTmp.(*LoopB) 5353 fc.Result = res 5354 return ec.marshalNLoopB2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐLoopB(ctx, field.Selections, res) 5355 } 5356 5357 func (ec *executionContext) _LoopB_a(ctx context.Context, field graphql.CollectedField, obj *LoopB) (ret graphql.Marshaler) { 5358 defer func() { 5359 if r := recover(); r != nil { 5360 ec.Error(ctx, ec.Recover(ctx, r)) 5361 ret = graphql.Null 5362 } 5363 }() 5364 fc := &graphql.FieldContext{ 5365 Object: "LoopB", 5366 Field: field, 5367 Args: nil, 5368 IsMethod: false, 5369 IsResolver: false, 5370 } 5371 5372 ctx = graphql.WithFieldContext(ctx, fc) 5373 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5374 ctx = rctx // use context from middleware stack in children 5375 return obj.A, nil 5376 }) 5377 5378 if resTmp == nil { 5379 if !graphql.HasFieldError(ctx, fc) { 5380 ec.Errorf(ctx, "must not be null") 5381 } 5382 return graphql.Null 5383 } 5384 res := resTmp.(*LoopA) 5385 fc.Result = res 5386 return ec.marshalNLoopA2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐLoopA(ctx, field.Selections, res) 5387 } 5388 5389 func (ec *executionContext) _Map_id(ctx context.Context, field graphql.CollectedField, obj *Map) (ret graphql.Marshaler) { 5390 defer func() { 5391 if r := recover(); r != nil { 5392 ec.Error(ctx, ec.Recover(ctx, r)) 5393 ret = graphql.Null 5394 } 5395 }() 5396 fc := &graphql.FieldContext{ 5397 Object: "Map", 5398 Field: field, 5399 Args: nil, 5400 IsMethod: false, 5401 IsResolver: false, 5402 } 5403 5404 ctx = graphql.WithFieldContext(ctx, fc) 5405 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5406 ctx = rctx // use context from middleware stack in children 5407 return obj.ID, nil 5408 }) 5409 5410 if resTmp == nil { 5411 if !graphql.HasFieldError(ctx, fc) { 5412 ec.Errorf(ctx, "must not be null") 5413 } 5414 return graphql.Null 5415 } 5416 res := resTmp.(string) 5417 fc.Result = res 5418 return ec.marshalNID2string(ctx, field.Selections, res) 5419 } 5420 5421 func (ec *executionContext) _MapStringInterfaceType_a(ctx context.Context, field graphql.CollectedField, obj map[string]interface{}) (ret graphql.Marshaler) { 5422 defer func() { 5423 if r := recover(); r != nil { 5424 ec.Error(ctx, ec.Recover(ctx, r)) 5425 ret = graphql.Null 5426 } 5427 }() 5428 fc := &graphql.FieldContext{ 5429 Object: "MapStringInterfaceType", 5430 Field: field, 5431 Args: nil, 5432 IsMethod: false, 5433 IsResolver: false, 5434 } 5435 5436 ctx = graphql.WithFieldContext(ctx, fc) 5437 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5438 ctx = rctx // use context from middleware stack in children 5439 switch v := obj["a"].(type) { 5440 case *string: 5441 return v, nil 5442 case string: 5443 return &v, nil 5444 case nil: 5445 return (*string)(nil), nil 5446 default: 5447 return nil, fmt.Errorf("unexpected type %T for field %s", v, "a") 5448 } 5449 }) 5450 5451 if resTmp == nil { 5452 return graphql.Null 5453 } 5454 res := resTmp.(*string) 5455 fc.Result = res 5456 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 5457 } 5458 5459 func (ec *executionContext) _MapStringInterfaceType_b(ctx context.Context, field graphql.CollectedField, obj map[string]interface{}) (ret graphql.Marshaler) { 5460 defer func() { 5461 if r := recover(); r != nil { 5462 ec.Error(ctx, ec.Recover(ctx, r)) 5463 ret = graphql.Null 5464 } 5465 }() 5466 fc := &graphql.FieldContext{ 5467 Object: "MapStringInterfaceType", 5468 Field: field, 5469 Args: nil, 5470 IsMethod: false, 5471 IsResolver: false, 5472 } 5473 5474 ctx = graphql.WithFieldContext(ctx, fc) 5475 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5476 ctx = rctx // use context from middleware stack in children 5477 switch v := obj["b"].(type) { 5478 case *int: 5479 return v, nil 5480 case int: 5481 return &v, nil 5482 case nil: 5483 return (*int)(nil), nil 5484 default: 5485 return nil, fmt.Errorf("unexpected type %T for field %s", v, "b") 5486 } 5487 }) 5488 5489 if resTmp == nil { 5490 return graphql.Null 5491 } 5492 res := resTmp.(*int) 5493 fc.Result = res 5494 return ec.marshalOInt2ᚖint(ctx, field.Selections, res) 5495 } 5496 5497 func (ec *executionContext) _ModelMethods_resolverField(ctx context.Context, field graphql.CollectedField, obj *ModelMethods) (ret graphql.Marshaler) { 5498 defer func() { 5499 if r := recover(); r != nil { 5500 ec.Error(ctx, ec.Recover(ctx, r)) 5501 ret = graphql.Null 5502 } 5503 }() 5504 fc := &graphql.FieldContext{ 5505 Object: "ModelMethods", 5506 Field: field, 5507 Args: nil, 5508 IsMethod: true, 5509 IsResolver: true, 5510 } 5511 5512 ctx = graphql.WithFieldContext(ctx, fc) 5513 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5514 ctx = rctx // use context from middleware stack in children 5515 return ec.resolvers.ModelMethods().ResolverField(rctx, obj) 5516 }) 5517 5518 if resTmp == nil { 5519 if !graphql.HasFieldError(ctx, fc) { 5520 ec.Errorf(ctx, "must not be null") 5521 } 5522 return graphql.Null 5523 } 5524 res := resTmp.(bool) 5525 fc.Result = res 5526 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 5527 } 5528 5529 func (ec *executionContext) _ModelMethods_noContext(ctx context.Context, field graphql.CollectedField, obj *ModelMethods) (ret graphql.Marshaler) { 5530 defer func() { 5531 if r := recover(); r != nil { 5532 ec.Error(ctx, ec.Recover(ctx, r)) 5533 ret = graphql.Null 5534 } 5535 }() 5536 fc := &graphql.FieldContext{ 5537 Object: "ModelMethods", 5538 Field: field, 5539 Args: nil, 5540 IsMethod: true, 5541 IsResolver: false, 5542 } 5543 5544 ctx = graphql.WithFieldContext(ctx, fc) 5545 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5546 ctx = rctx // use context from middleware stack in children 5547 return obj.NoContext(), nil 5548 }) 5549 5550 if resTmp == nil { 5551 if !graphql.HasFieldError(ctx, fc) { 5552 ec.Errorf(ctx, "must not be null") 5553 } 5554 return graphql.Null 5555 } 5556 res := resTmp.(bool) 5557 fc.Result = res 5558 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 5559 } 5560 5561 func (ec *executionContext) _ModelMethods_withContext(ctx context.Context, field graphql.CollectedField, obj *ModelMethods) (ret graphql.Marshaler) { 5562 defer func() { 5563 if r := recover(); r != nil { 5564 ec.Error(ctx, ec.Recover(ctx, r)) 5565 ret = graphql.Null 5566 } 5567 }() 5568 fc := &graphql.FieldContext{ 5569 Object: "ModelMethods", 5570 Field: field, 5571 Args: nil, 5572 IsMethod: true, 5573 IsResolver: false, 5574 } 5575 5576 ctx = graphql.WithFieldContext(ctx, fc) 5577 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5578 ctx = rctx // use context from middleware stack in children 5579 return obj.WithContext(ctx), nil 5580 }) 5581 5582 if resTmp == nil { 5583 if !graphql.HasFieldError(ctx, fc) { 5584 ec.Errorf(ctx, "must not be null") 5585 } 5586 return graphql.Null 5587 } 5588 res := resTmp.(bool) 5589 fc.Result = res 5590 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 5591 } 5592 5593 func (ec *executionContext) _Mutation_defaultInput(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 5594 defer func() { 5595 if r := recover(); r != nil { 5596 ec.Error(ctx, ec.Recover(ctx, r)) 5597 ret = graphql.Null 5598 } 5599 }() 5600 fc := &graphql.FieldContext{ 5601 Object: "Mutation", 5602 Field: field, 5603 Args: nil, 5604 IsMethod: true, 5605 IsResolver: true, 5606 } 5607 5608 ctx = graphql.WithFieldContext(ctx, fc) 5609 rawArgs := field.ArgumentMap(ec.Variables) 5610 args, err := ec.field_Mutation_defaultInput_args(ctx, rawArgs) 5611 if err != nil { 5612 ec.Error(ctx, err) 5613 return graphql.Null 5614 } 5615 fc.Args = args 5616 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 5617 ctx = rctx // use context from middleware stack in children 5618 return ec.resolvers.Mutation().DefaultInput(rctx, args["input"].(DefaultInput)) 5619 }) 5620 5621 if resTmp == nil { 5622 if !graphql.HasFieldError(ctx, fc) { 5623 ec.Errorf(ctx, "must not be null") 5624 } 5625 return graphql.Null 5626 } 5627 res := resTmp.(*DefaultParametersMirror) 5628 fc.Result = res 5629 return ec.marshalNDefaultParametersMirror2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐDefaultParametersMirror(ctx, field.Selections, res) 5630 } 5631 5632 func (ec *executionContext) _Mutation_updateSomething(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 5633 defer func() { 5634 if r := recover(); r != nil { 5635 ec.Error(ctx, ec.Recover(ctx, r)) 5636 ret = graphql.Null 5637 } 5638 }() 5639 fc := &graphql.FieldContext{ 5640 Object: "Mutation", 5641 Field: field, 5642 Args: nil, 5643 IsMethod: true, 5644 IsResolver: true, 5645 } 5646 5647 ctx = graphql.WithFieldContext(ctx, fc) 5648 rawArgs := field.ArgumentMap(ec.Variables) 5649 args, err := ec.field_Mutation_updateSomething_args(ctx, rawArgs) 5650 if err != nil { 5651 ec.Error(ctx, err) 5652 return graphql.Null 5653 } 5654 fc.Args = args 5655 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 5656 ctx = rctx // use context from middleware stack in children 5657 return ec.resolvers.Mutation().UpdateSomething(rctx, args["input"].(SpecialInput)) 5658 }) 5659 5660 if resTmp == nil { 5661 if !graphql.HasFieldError(ctx, fc) { 5662 ec.Errorf(ctx, "must not be null") 5663 } 5664 return graphql.Null 5665 } 5666 res := resTmp.(string) 5667 fc.Result = res 5668 return ec.marshalNString2string(ctx, field.Selections, res) 5669 } 5670 5671 func (ec *executionContext) _Mutation_updatePtrToPtr(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 5672 defer func() { 5673 if r := recover(); r != nil { 5674 ec.Error(ctx, ec.Recover(ctx, r)) 5675 ret = graphql.Null 5676 } 5677 }() 5678 fc := &graphql.FieldContext{ 5679 Object: "Mutation", 5680 Field: field, 5681 Args: nil, 5682 IsMethod: true, 5683 IsResolver: true, 5684 } 5685 5686 ctx = graphql.WithFieldContext(ctx, fc) 5687 rawArgs := field.ArgumentMap(ec.Variables) 5688 args, err := ec.field_Mutation_updatePtrToPtr_args(ctx, rawArgs) 5689 if err != nil { 5690 ec.Error(ctx, err) 5691 return graphql.Null 5692 } 5693 fc.Args = args 5694 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 5695 ctx = rctx // use context from middleware stack in children 5696 return ec.resolvers.Mutation().UpdatePtrToPtr(rctx, args["input"].(UpdatePtrToPtrOuter)) 5697 }) 5698 5699 if resTmp == nil { 5700 if !graphql.HasFieldError(ctx, fc) { 5701 ec.Errorf(ctx, "must not be null") 5702 } 5703 return graphql.Null 5704 } 5705 res := resTmp.(*PtrToPtrOuter) 5706 fc.Result = res 5707 return ec.marshalNPtrToPtrOuter2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrOuter(ctx, field.Selections, res) 5708 } 5709 5710 func (ec *executionContext) _ObjectDirectives_text(ctx context.Context, field graphql.CollectedField, obj *ObjectDirectives) (ret graphql.Marshaler) { 5711 defer func() { 5712 if r := recover(); r != nil { 5713 ec.Error(ctx, ec.Recover(ctx, r)) 5714 ret = graphql.Null 5715 } 5716 }() 5717 fc := &graphql.FieldContext{ 5718 Object: "ObjectDirectives", 5719 Field: field, 5720 Args: nil, 5721 IsMethod: false, 5722 IsResolver: false, 5723 } 5724 5725 ctx = graphql.WithFieldContext(ctx, fc) 5726 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5727 directive0 := func(rctx context.Context) (interface{}, error) { 5728 ctx = rctx // use context from middleware stack in children 5729 return obj.Text, nil 5730 } 5731 directive1 := func(ctx context.Context) (interface{}, error) { 5732 min, err := ec.unmarshalNInt2int(ctx, 0) 5733 if err != nil { 5734 return nil, err 5735 } 5736 max, err := ec.unmarshalOInt2ᚖint(ctx, 7) 5737 if err != nil { 5738 return nil, err 5739 } 5740 message, err := ec.unmarshalOString2ᚖstring(ctx, "not valid") 5741 if err != nil { 5742 return nil, err 5743 } 5744 if ec.directives.Length == nil { 5745 return nil, errors.New("directive length is not implemented") 5746 } 5747 return ec.directives.Length(ctx, obj, directive0, min, max, message) 5748 } 5749 5750 tmp, err := directive1(rctx) 5751 if err != nil { 5752 return nil, graphql.ErrorOnPath(ctx, err) 5753 } 5754 if tmp == nil { 5755 return nil, nil 5756 } 5757 if data, ok := tmp.(string); ok { 5758 return data, nil 5759 } 5760 return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp) 5761 }) 5762 5763 if resTmp == nil { 5764 if !graphql.HasFieldError(ctx, fc) { 5765 ec.Errorf(ctx, "must not be null") 5766 } 5767 return graphql.Null 5768 } 5769 res := resTmp.(string) 5770 fc.Result = res 5771 return ec.marshalNString2string(ctx, field.Selections, res) 5772 } 5773 5774 func (ec *executionContext) _ObjectDirectives_nullableText(ctx context.Context, field graphql.CollectedField, obj *ObjectDirectives) (ret graphql.Marshaler) { 5775 defer func() { 5776 if r := recover(); r != nil { 5777 ec.Error(ctx, ec.Recover(ctx, r)) 5778 ret = graphql.Null 5779 } 5780 }() 5781 fc := &graphql.FieldContext{ 5782 Object: "ObjectDirectives", 5783 Field: field, 5784 Args: nil, 5785 IsMethod: false, 5786 IsResolver: false, 5787 } 5788 5789 ctx = graphql.WithFieldContext(ctx, fc) 5790 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5791 directive0 := func(rctx context.Context) (interface{}, error) { 5792 ctx = rctx // use context from middleware stack in children 5793 return obj.NullableText, nil 5794 } 5795 directive1 := func(ctx context.Context) (interface{}, error) { 5796 if ec.directives.ToNull == nil { 5797 return nil, errors.New("directive toNull is not implemented") 5798 } 5799 return ec.directives.ToNull(ctx, obj, directive0) 5800 } 5801 5802 tmp, err := directive1(rctx) 5803 if err != nil { 5804 return nil, graphql.ErrorOnPath(ctx, err) 5805 } 5806 if tmp == nil { 5807 return nil, nil 5808 } 5809 if data, ok := tmp.(*string); ok { 5810 return data, nil 5811 } 5812 return nil, fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp) 5813 }) 5814 5815 if resTmp == nil { 5816 return graphql.Null 5817 } 5818 res := resTmp.(*string) 5819 fc.Result = res 5820 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 5821 } 5822 5823 func (ec *executionContext) _ObjectDirectives_order(ctx context.Context, field graphql.CollectedField, obj *ObjectDirectives) (ret graphql.Marshaler) { 5824 defer func() { 5825 if r := recover(); r != nil { 5826 ec.Error(ctx, ec.Recover(ctx, r)) 5827 ret = graphql.Null 5828 } 5829 }() 5830 fc := &graphql.FieldContext{ 5831 Object: "ObjectDirectives", 5832 Field: field, 5833 Args: nil, 5834 IsMethod: false, 5835 IsResolver: false, 5836 } 5837 5838 ctx = graphql.WithFieldContext(ctx, fc) 5839 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5840 ctx = rctx // use context from middleware stack in children 5841 return obj.Order, nil 5842 }) 5843 5844 if resTmp == nil { 5845 if !graphql.HasFieldError(ctx, fc) { 5846 ec.Errorf(ctx, "must not be null") 5847 } 5848 return graphql.Null 5849 } 5850 res := resTmp.([]string) 5851 fc.Result = res 5852 return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) 5853 } 5854 5855 func (ec *executionContext) _ObjectDirectivesWithCustomGoModel_nullableText(ctx context.Context, field graphql.CollectedField, obj *ObjectDirectivesWithCustomGoModel) (ret graphql.Marshaler) { 5856 defer func() { 5857 if r := recover(); r != nil { 5858 ec.Error(ctx, ec.Recover(ctx, r)) 5859 ret = graphql.Null 5860 } 5861 }() 5862 fc := &graphql.FieldContext{ 5863 Object: "ObjectDirectivesWithCustomGoModel", 5864 Field: field, 5865 Args: nil, 5866 IsMethod: false, 5867 IsResolver: false, 5868 } 5869 5870 ctx = graphql.WithFieldContext(ctx, fc) 5871 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5872 directive0 := func(rctx context.Context) (interface{}, error) { 5873 ctx = rctx // use context from middleware stack in children 5874 return obj.NullableText, nil 5875 } 5876 directive1 := func(ctx context.Context) (interface{}, error) { 5877 if ec.directives.ToNull == nil { 5878 return nil, errors.New("directive toNull is not implemented") 5879 } 5880 return ec.directives.ToNull(ctx, obj, directive0) 5881 } 5882 5883 tmp, err := directive1(rctx) 5884 if err != nil { 5885 return nil, graphql.ErrorOnPath(ctx, err) 5886 } 5887 if tmp == nil { 5888 return nil, nil 5889 } 5890 if data, ok := tmp.(string); ok { 5891 return data, nil 5892 } 5893 return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp) 5894 }) 5895 5896 if resTmp == nil { 5897 return graphql.Null 5898 } 5899 res := resTmp.(string) 5900 fc.Result = res 5901 return ec.marshalOString2string(ctx, field.Selections, res) 5902 } 5903 5904 func (ec *executionContext) _OuterObject_inner(ctx context.Context, field graphql.CollectedField, obj *OuterObject) (ret graphql.Marshaler) { 5905 defer func() { 5906 if r := recover(); r != nil { 5907 ec.Error(ctx, ec.Recover(ctx, r)) 5908 ret = graphql.Null 5909 } 5910 }() 5911 fc := &graphql.FieldContext{ 5912 Object: "OuterObject", 5913 Field: field, 5914 Args: nil, 5915 IsMethod: false, 5916 IsResolver: false, 5917 } 5918 5919 ctx = graphql.WithFieldContext(ctx, fc) 5920 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5921 ctx = rctx // use context from middleware stack in children 5922 return obj.Inner, nil 5923 }) 5924 5925 if resTmp == nil { 5926 if !graphql.HasFieldError(ctx, fc) { 5927 ec.Errorf(ctx, "must not be null") 5928 } 5929 return graphql.Null 5930 } 5931 res := resTmp.(*InnerObject) 5932 fc.Result = res 5933 return ec.marshalNInnerObject2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInnerObject(ctx, field.Selections, res) 5934 } 5935 5936 func (ec *executionContext) _OverlappingFields_oneFoo(ctx context.Context, field graphql.CollectedField, obj *OverlappingFields) (ret graphql.Marshaler) { 5937 defer func() { 5938 if r := recover(); r != nil { 5939 ec.Error(ctx, ec.Recover(ctx, r)) 5940 ret = graphql.Null 5941 } 5942 }() 5943 fc := &graphql.FieldContext{ 5944 Object: "OverlappingFields", 5945 Field: field, 5946 Args: nil, 5947 IsMethod: false, 5948 IsResolver: false, 5949 } 5950 5951 ctx = graphql.WithFieldContext(ctx, fc) 5952 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5953 ctx = rctx // use context from middleware stack in children 5954 return obj.Foo, nil 5955 }) 5956 5957 if resTmp == nil { 5958 if !graphql.HasFieldError(ctx, fc) { 5959 ec.Errorf(ctx, "must not be null") 5960 } 5961 return graphql.Null 5962 } 5963 res := resTmp.(int) 5964 fc.Result = res 5965 return ec.marshalNInt2int(ctx, field.Selections, res) 5966 } 5967 5968 func (ec *executionContext) _OverlappingFields_twoFoo(ctx context.Context, field graphql.CollectedField, obj *OverlappingFields) (ret graphql.Marshaler) { 5969 defer func() { 5970 if r := recover(); r != nil { 5971 ec.Error(ctx, ec.Recover(ctx, r)) 5972 ret = graphql.Null 5973 } 5974 }() 5975 fc := &graphql.FieldContext{ 5976 Object: "OverlappingFields", 5977 Field: field, 5978 Args: nil, 5979 IsMethod: false, 5980 IsResolver: false, 5981 } 5982 5983 ctx = graphql.WithFieldContext(ctx, fc) 5984 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5985 ctx = rctx // use context from middleware stack in children 5986 return obj.Foo, nil 5987 }) 5988 5989 if resTmp == nil { 5990 if !graphql.HasFieldError(ctx, fc) { 5991 ec.Errorf(ctx, "must not be null") 5992 } 5993 return graphql.Null 5994 } 5995 res := resTmp.(int) 5996 fc.Result = res 5997 return ec.marshalNInt2int(ctx, field.Selections, res) 5998 } 5999 6000 func (ec *executionContext) _OverlappingFields_oldFoo(ctx context.Context, field graphql.CollectedField, obj *OverlappingFields) (ret graphql.Marshaler) { 6001 defer func() { 6002 if r := recover(); r != nil { 6003 ec.Error(ctx, ec.Recover(ctx, r)) 6004 ret = graphql.Null 6005 } 6006 }() 6007 fc := &graphql.FieldContext{ 6008 Object: "OverlappingFields", 6009 Field: field, 6010 Args: nil, 6011 IsMethod: true, 6012 IsResolver: true, 6013 } 6014 6015 ctx = graphql.WithFieldContext(ctx, fc) 6016 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6017 ctx = rctx // use context from middleware stack in children 6018 return ec.resolvers.OverlappingFields().OldFoo(rctx, obj) 6019 }) 6020 6021 if resTmp == nil { 6022 if !graphql.HasFieldError(ctx, fc) { 6023 ec.Errorf(ctx, "must not be null") 6024 } 6025 return graphql.Null 6026 } 6027 res := resTmp.(int) 6028 fc.Result = res 6029 return ec.marshalNInt2int(ctx, field.Selections, res) 6030 } 6031 6032 func (ec *executionContext) _OverlappingFields_newFoo(ctx context.Context, field graphql.CollectedField, obj *OverlappingFields) (ret graphql.Marshaler) { 6033 defer func() { 6034 if r := recover(); r != nil { 6035 ec.Error(ctx, ec.Recover(ctx, r)) 6036 ret = graphql.Null 6037 } 6038 }() 6039 fc := &graphql.FieldContext{ 6040 Object: "OverlappingFields", 6041 Field: field, 6042 Args: nil, 6043 IsMethod: false, 6044 IsResolver: false, 6045 } 6046 6047 ctx = graphql.WithFieldContext(ctx, fc) 6048 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6049 ctx = rctx // use context from middleware stack in children 6050 return obj.NewFoo, nil 6051 }) 6052 6053 if resTmp == nil { 6054 if !graphql.HasFieldError(ctx, fc) { 6055 ec.Errorf(ctx, "must not be null") 6056 } 6057 return graphql.Null 6058 } 6059 res := resTmp.(int) 6060 fc.Result = res 6061 return ec.marshalNInt2int(ctx, field.Selections, res) 6062 } 6063 6064 func (ec *executionContext) _OverlappingFields_new_foo(ctx context.Context, field graphql.CollectedField, obj *OverlappingFields) (ret graphql.Marshaler) { 6065 defer func() { 6066 if r := recover(); r != nil { 6067 ec.Error(ctx, ec.Recover(ctx, r)) 6068 ret = graphql.Null 6069 } 6070 }() 6071 fc := &graphql.FieldContext{ 6072 Object: "OverlappingFields", 6073 Field: field, 6074 Args: nil, 6075 IsMethod: false, 6076 IsResolver: false, 6077 } 6078 6079 ctx = graphql.WithFieldContext(ctx, fc) 6080 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6081 ctx = rctx // use context from middleware stack in children 6082 return obj.NewFoo, nil 6083 }) 6084 6085 if resTmp == nil { 6086 if !graphql.HasFieldError(ctx, fc) { 6087 ec.Errorf(ctx, "must not be null") 6088 } 6089 return graphql.Null 6090 } 6091 res := resTmp.(int) 6092 fc.Result = res 6093 return ec.marshalNInt2int(ctx, field.Selections, res) 6094 } 6095 6096 func (ec *executionContext) _Panics_fieldScalarMarshal(ctx context.Context, field graphql.CollectedField, obj *Panics) (ret graphql.Marshaler) { 6097 defer func() { 6098 if r := recover(); r != nil { 6099 ec.Error(ctx, ec.Recover(ctx, r)) 6100 ret = graphql.Null 6101 } 6102 }() 6103 fc := &graphql.FieldContext{ 6104 Object: "Panics", 6105 Field: field, 6106 Args: nil, 6107 IsMethod: true, 6108 IsResolver: true, 6109 } 6110 6111 ctx = graphql.WithFieldContext(ctx, fc) 6112 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6113 ctx = rctx // use context from middleware stack in children 6114 return ec.resolvers.Panics().FieldScalarMarshal(rctx, obj) 6115 }) 6116 6117 if resTmp == nil { 6118 if !graphql.HasFieldError(ctx, fc) { 6119 ec.Errorf(ctx, "must not be null") 6120 } 6121 return graphql.Null 6122 } 6123 res := resTmp.([]MarshalPanic) 6124 fc.Result = res 6125 return ec.marshalNMarshalPanic2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanicᚄ(ctx, field.Selections, res) 6126 } 6127 6128 func (ec *executionContext) _Panics_fieldFuncMarshal(ctx context.Context, field graphql.CollectedField, obj *Panics) (ret graphql.Marshaler) { 6129 defer func() { 6130 if r := recover(); r != nil { 6131 ec.Error(ctx, ec.Recover(ctx, r)) 6132 ret = graphql.Null 6133 } 6134 }() 6135 fc := &graphql.FieldContext{ 6136 Object: "Panics", 6137 Field: field, 6138 Args: nil, 6139 IsMethod: true, 6140 IsResolver: false, 6141 } 6142 6143 ctx = graphql.WithFieldContext(ctx, fc) 6144 rawArgs := field.ArgumentMap(ec.Variables) 6145 args, err := ec.field_Panics_fieldFuncMarshal_args(ctx, rawArgs) 6146 if err != nil { 6147 ec.Error(ctx, err) 6148 return graphql.Null 6149 } 6150 fc.Args = args 6151 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6152 ctx = rctx // use context from middleware stack in children 6153 return obj.FieldFuncMarshal(ctx, args["u"].([]MarshalPanic)), nil 6154 }) 6155 6156 if resTmp == nil { 6157 if !graphql.HasFieldError(ctx, fc) { 6158 ec.Errorf(ctx, "must not be null") 6159 } 6160 return graphql.Null 6161 } 6162 res := resTmp.([]MarshalPanic) 6163 fc.Result = res 6164 return ec.marshalNMarshalPanic2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanicᚄ(ctx, field.Selections, res) 6165 } 6166 6167 func (ec *executionContext) _Panics_argUnmarshal(ctx context.Context, field graphql.CollectedField, obj *Panics) (ret graphql.Marshaler) { 6168 defer func() { 6169 if r := recover(); r != nil { 6170 ec.Error(ctx, ec.Recover(ctx, r)) 6171 ret = graphql.Null 6172 } 6173 }() 6174 fc := &graphql.FieldContext{ 6175 Object: "Panics", 6176 Field: field, 6177 Args: nil, 6178 IsMethod: true, 6179 IsResolver: true, 6180 } 6181 6182 ctx = graphql.WithFieldContext(ctx, fc) 6183 rawArgs := field.ArgumentMap(ec.Variables) 6184 args, err := ec.field_Panics_argUnmarshal_args(ctx, rawArgs) 6185 if err != nil { 6186 ec.Error(ctx, err) 6187 return graphql.Null 6188 } 6189 fc.Args = args 6190 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6191 ctx = rctx // use context from middleware stack in children 6192 return ec.resolvers.Panics().ArgUnmarshal(rctx, obj, args["u"].([]MarshalPanic)) 6193 }) 6194 6195 if resTmp == nil { 6196 if !graphql.HasFieldError(ctx, fc) { 6197 ec.Errorf(ctx, "must not be null") 6198 } 6199 return graphql.Null 6200 } 6201 res := resTmp.(bool) 6202 fc.Result = res 6203 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 6204 } 6205 6206 func (ec *executionContext) _Primitive_value(ctx context.Context, field graphql.CollectedField, obj *Primitive) (ret graphql.Marshaler) { 6207 defer func() { 6208 if r := recover(); r != nil { 6209 ec.Error(ctx, ec.Recover(ctx, r)) 6210 ret = graphql.Null 6211 } 6212 }() 6213 fc := &graphql.FieldContext{ 6214 Object: "Primitive", 6215 Field: field, 6216 Args: nil, 6217 IsMethod: true, 6218 IsResolver: true, 6219 } 6220 6221 ctx = graphql.WithFieldContext(ctx, fc) 6222 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6223 ctx = rctx // use context from middleware stack in children 6224 return ec.resolvers.Primitive().Value(rctx, obj) 6225 }) 6226 6227 if resTmp == nil { 6228 if !graphql.HasFieldError(ctx, fc) { 6229 ec.Errorf(ctx, "must not be null") 6230 } 6231 return graphql.Null 6232 } 6233 res := resTmp.(int) 6234 fc.Result = res 6235 return ec.marshalNInt2int(ctx, field.Selections, res) 6236 } 6237 6238 func (ec *executionContext) _Primitive_squared(ctx context.Context, field graphql.CollectedField, obj *Primitive) (ret graphql.Marshaler) { 6239 defer func() { 6240 if r := recover(); r != nil { 6241 ec.Error(ctx, ec.Recover(ctx, r)) 6242 ret = graphql.Null 6243 } 6244 }() 6245 fc := &graphql.FieldContext{ 6246 Object: "Primitive", 6247 Field: field, 6248 Args: nil, 6249 IsMethod: true, 6250 IsResolver: false, 6251 } 6252 6253 ctx = graphql.WithFieldContext(ctx, fc) 6254 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6255 ctx = rctx // use context from middleware stack in children 6256 return obj.Squared(), nil 6257 }) 6258 6259 if resTmp == nil { 6260 if !graphql.HasFieldError(ctx, fc) { 6261 ec.Errorf(ctx, "must not be null") 6262 } 6263 return graphql.Null 6264 } 6265 res := resTmp.(int) 6266 fc.Result = res 6267 return ec.marshalNInt2int(ctx, field.Selections, res) 6268 } 6269 6270 func (ec *executionContext) _PrimitiveString_value(ctx context.Context, field graphql.CollectedField, obj *PrimitiveString) (ret graphql.Marshaler) { 6271 defer func() { 6272 if r := recover(); r != nil { 6273 ec.Error(ctx, ec.Recover(ctx, r)) 6274 ret = graphql.Null 6275 } 6276 }() 6277 fc := &graphql.FieldContext{ 6278 Object: "PrimitiveString", 6279 Field: field, 6280 Args: nil, 6281 IsMethod: true, 6282 IsResolver: true, 6283 } 6284 6285 ctx = graphql.WithFieldContext(ctx, fc) 6286 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6287 ctx = rctx // use context from middleware stack in children 6288 return ec.resolvers.PrimitiveString().Value(rctx, obj) 6289 }) 6290 6291 if resTmp == nil { 6292 if !graphql.HasFieldError(ctx, fc) { 6293 ec.Errorf(ctx, "must not be null") 6294 } 6295 return graphql.Null 6296 } 6297 res := resTmp.(string) 6298 fc.Result = res 6299 return ec.marshalNString2string(ctx, field.Selections, res) 6300 } 6301 6302 func (ec *executionContext) _PrimitiveString_doubled(ctx context.Context, field graphql.CollectedField, obj *PrimitiveString) (ret graphql.Marshaler) { 6303 defer func() { 6304 if r := recover(); r != nil { 6305 ec.Error(ctx, ec.Recover(ctx, r)) 6306 ret = graphql.Null 6307 } 6308 }() 6309 fc := &graphql.FieldContext{ 6310 Object: "PrimitiveString", 6311 Field: field, 6312 Args: nil, 6313 IsMethod: true, 6314 IsResolver: false, 6315 } 6316 6317 ctx = graphql.WithFieldContext(ctx, fc) 6318 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6319 ctx = rctx // use context from middleware stack in children 6320 return obj.Doubled(), nil 6321 }) 6322 6323 if resTmp == nil { 6324 if !graphql.HasFieldError(ctx, fc) { 6325 ec.Errorf(ctx, "must not be null") 6326 } 6327 return graphql.Null 6328 } 6329 res := resTmp.(string) 6330 fc.Result = res 6331 return ec.marshalNString2string(ctx, field.Selections, res) 6332 } 6333 6334 func (ec *executionContext) _PrimitiveString_len(ctx context.Context, field graphql.CollectedField, obj *PrimitiveString) (ret graphql.Marshaler) { 6335 defer func() { 6336 if r := recover(); r != nil { 6337 ec.Error(ctx, ec.Recover(ctx, r)) 6338 ret = graphql.Null 6339 } 6340 }() 6341 fc := &graphql.FieldContext{ 6342 Object: "PrimitiveString", 6343 Field: field, 6344 Args: nil, 6345 IsMethod: true, 6346 IsResolver: true, 6347 } 6348 6349 ctx = graphql.WithFieldContext(ctx, fc) 6350 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6351 ctx = rctx // use context from middleware stack in children 6352 return ec.resolvers.PrimitiveString().Len(rctx, obj) 6353 }) 6354 6355 if resTmp == nil { 6356 if !graphql.HasFieldError(ctx, fc) { 6357 ec.Errorf(ctx, "must not be null") 6358 } 6359 return graphql.Null 6360 } 6361 res := resTmp.(int) 6362 fc.Result = res 6363 return ec.marshalNInt2int(ctx, field.Selections, res) 6364 } 6365 6366 func (ec *executionContext) _PtrToPtrInner_key(ctx context.Context, field graphql.CollectedField, obj *PtrToPtrInner) (ret graphql.Marshaler) { 6367 defer func() { 6368 if r := recover(); r != nil { 6369 ec.Error(ctx, ec.Recover(ctx, r)) 6370 ret = graphql.Null 6371 } 6372 }() 6373 fc := &graphql.FieldContext{ 6374 Object: "PtrToPtrInner", 6375 Field: field, 6376 Args: nil, 6377 IsMethod: false, 6378 IsResolver: false, 6379 } 6380 6381 ctx = graphql.WithFieldContext(ctx, fc) 6382 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6383 ctx = rctx // use context from middleware stack in children 6384 return obj.Key, nil 6385 }) 6386 6387 if resTmp == nil { 6388 if !graphql.HasFieldError(ctx, fc) { 6389 ec.Errorf(ctx, "must not be null") 6390 } 6391 return graphql.Null 6392 } 6393 res := resTmp.(string) 6394 fc.Result = res 6395 return ec.marshalNString2string(ctx, field.Selections, res) 6396 } 6397 6398 func (ec *executionContext) _PtrToPtrInner_value(ctx context.Context, field graphql.CollectedField, obj *PtrToPtrInner) (ret graphql.Marshaler) { 6399 defer func() { 6400 if r := recover(); r != nil { 6401 ec.Error(ctx, ec.Recover(ctx, r)) 6402 ret = graphql.Null 6403 } 6404 }() 6405 fc := &graphql.FieldContext{ 6406 Object: "PtrToPtrInner", 6407 Field: field, 6408 Args: nil, 6409 IsMethod: false, 6410 IsResolver: false, 6411 } 6412 6413 ctx = graphql.WithFieldContext(ctx, fc) 6414 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6415 ctx = rctx // use context from middleware stack in children 6416 return obj.Value, nil 6417 }) 6418 6419 if resTmp == nil { 6420 if !graphql.HasFieldError(ctx, fc) { 6421 ec.Errorf(ctx, "must not be null") 6422 } 6423 return graphql.Null 6424 } 6425 res := resTmp.(string) 6426 fc.Result = res 6427 return ec.marshalNString2string(ctx, field.Selections, res) 6428 } 6429 6430 func (ec *executionContext) _PtrToPtrOuter_name(ctx context.Context, field graphql.CollectedField, obj *PtrToPtrOuter) (ret graphql.Marshaler) { 6431 defer func() { 6432 if r := recover(); r != nil { 6433 ec.Error(ctx, ec.Recover(ctx, r)) 6434 ret = graphql.Null 6435 } 6436 }() 6437 fc := &graphql.FieldContext{ 6438 Object: "PtrToPtrOuter", 6439 Field: field, 6440 Args: nil, 6441 IsMethod: false, 6442 IsResolver: false, 6443 } 6444 6445 ctx = graphql.WithFieldContext(ctx, fc) 6446 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6447 ctx = rctx // use context from middleware stack in children 6448 return obj.Name, nil 6449 }) 6450 6451 if resTmp == nil { 6452 if !graphql.HasFieldError(ctx, fc) { 6453 ec.Errorf(ctx, "must not be null") 6454 } 6455 return graphql.Null 6456 } 6457 res := resTmp.(string) 6458 fc.Result = res 6459 return ec.marshalNString2string(ctx, field.Selections, res) 6460 } 6461 6462 func (ec *executionContext) _PtrToPtrOuter_inner(ctx context.Context, field graphql.CollectedField, obj *PtrToPtrOuter) (ret graphql.Marshaler) { 6463 defer func() { 6464 if r := recover(); r != nil { 6465 ec.Error(ctx, ec.Recover(ctx, r)) 6466 ret = graphql.Null 6467 } 6468 }() 6469 fc := &graphql.FieldContext{ 6470 Object: "PtrToPtrOuter", 6471 Field: field, 6472 Args: nil, 6473 IsMethod: false, 6474 IsResolver: false, 6475 } 6476 6477 ctx = graphql.WithFieldContext(ctx, fc) 6478 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6479 ctx = rctx // use context from middleware stack in children 6480 return obj.Inner, nil 6481 }) 6482 6483 if resTmp == nil { 6484 return graphql.Null 6485 } 6486 res := resTmp.(*PtrToPtrInner) 6487 fc.Result = res 6488 return ec.marshalOPtrToPtrInner2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, field.Selections, res) 6489 } 6490 6491 func (ec *executionContext) _PtrToPtrOuter_stupidInner(ctx context.Context, field graphql.CollectedField, obj *PtrToPtrOuter) (ret graphql.Marshaler) { 6492 defer func() { 6493 if r := recover(); r != nil { 6494 ec.Error(ctx, ec.Recover(ctx, r)) 6495 ret = graphql.Null 6496 } 6497 }() 6498 fc := &graphql.FieldContext{ 6499 Object: "PtrToPtrOuter", 6500 Field: field, 6501 Args: nil, 6502 IsMethod: false, 6503 IsResolver: false, 6504 } 6505 6506 ctx = graphql.WithFieldContext(ctx, fc) 6507 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6508 ctx = rctx // use context from middleware stack in children 6509 return obj.StupidInner, nil 6510 }) 6511 6512 if resTmp == nil { 6513 return graphql.Null 6514 } 6515 res := resTmp.(*******PtrToPtrInner) 6516 fc.Result = res 6517 return ec.marshalOPtrToPtrInner2ᚖᚖᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, field.Selections, res) 6518 } 6519 6520 func (ec *executionContext) _PtrToSliceContainer_ptrToSlice(ctx context.Context, field graphql.CollectedField, obj *PtrToSliceContainer) (ret graphql.Marshaler) { 6521 defer func() { 6522 if r := recover(); r != nil { 6523 ec.Error(ctx, ec.Recover(ctx, r)) 6524 ret = graphql.Null 6525 } 6526 }() 6527 fc := &graphql.FieldContext{ 6528 Object: "PtrToSliceContainer", 6529 Field: field, 6530 Args: nil, 6531 IsMethod: false, 6532 IsResolver: false, 6533 } 6534 6535 ctx = graphql.WithFieldContext(ctx, fc) 6536 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6537 ctx = rctx // use context from middleware stack in children 6538 return obj.PtrToSlice, nil 6539 }) 6540 6541 if resTmp == nil { 6542 return graphql.Null 6543 } 6544 res := resTmp.(*[]string) 6545 fc.Result = res 6546 return ec.marshalOString2ᚖᚕstringᚄ(ctx, field.Selections, res) 6547 } 6548 6549 func (ec *executionContext) _Query_invalidIdentifier(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 6550 defer func() { 6551 if r := recover(); r != nil { 6552 ec.Error(ctx, ec.Recover(ctx, r)) 6553 ret = graphql.Null 6554 } 6555 }() 6556 fc := &graphql.FieldContext{ 6557 Object: "Query", 6558 Field: field, 6559 Args: nil, 6560 IsMethod: true, 6561 IsResolver: true, 6562 } 6563 6564 ctx = graphql.WithFieldContext(ctx, fc) 6565 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 6566 ctx = rctx // use context from middleware stack in children 6567 return ec.resolvers.Query().InvalidIdentifier(rctx) 6568 }) 6569 6570 if resTmp == nil { 6571 return graphql.Null 6572 } 6573 res := resTmp.(*invalid_packagename.InvalidIdentifier) 6574 fc.Result = res 6575 return ec.marshalOInvalidIdentifier2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚋinvalidᚑpackagenameᚐInvalidIdentifier(ctx, field.Selections, res) 6576 } 6577 6578 func (ec *executionContext) _Query_collision(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 6579 defer func() { 6580 if r := recover(); r != nil { 6581 ec.Error(ctx, ec.Recover(ctx, r)) 6582 ret = graphql.Null 6583 } 6584 }() 6585 fc := &graphql.FieldContext{ 6586 Object: "Query", 6587 Field: field, 6588 Args: nil, 6589 IsMethod: true, 6590 IsResolver: true, 6591 } 6592 6593 ctx = graphql.WithFieldContext(ctx, fc) 6594 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 6595 ctx = rctx // use context from middleware stack in children 6596 return ec.resolvers.Query().Collision(rctx) 6597 }) 6598 6599 if resTmp == nil { 6600 return graphql.Null 6601 } 6602 res := resTmp.(*introspection1.It) 6603 fc.Result = res 6604 return ec.marshalOIt2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚋintrospectionᚐIt(ctx, field.Selections, res) 6605 } 6606 6607 func (ec *executionContext) _Query_mapInput(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 6608 defer func() { 6609 if r := recover(); r != nil { 6610 ec.Error(ctx, ec.Recover(ctx, r)) 6611 ret = graphql.Null 6612 } 6613 }() 6614 fc := &graphql.FieldContext{ 6615 Object: "Query", 6616 Field: field, 6617 Args: nil, 6618 IsMethod: true, 6619 IsResolver: true, 6620 } 6621 6622 ctx = graphql.WithFieldContext(ctx, fc) 6623 rawArgs := field.ArgumentMap(ec.Variables) 6624 args, err := ec.field_Query_mapInput_args(ctx, rawArgs) 6625 if err != nil { 6626 ec.Error(ctx, err) 6627 return graphql.Null 6628 } 6629 fc.Args = args 6630 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 6631 ctx = rctx // use context from middleware stack in children 6632 return ec.resolvers.Query().MapInput(rctx, args["input"].(map[string]interface{})) 6633 }) 6634 6635 if resTmp == nil { 6636 return graphql.Null 6637 } 6638 res := resTmp.(*bool) 6639 fc.Result = res 6640 return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) 6641 } 6642 6643 func (ec *executionContext) _Query_recursive(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 6644 defer func() { 6645 if r := recover(); r != nil { 6646 ec.Error(ctx, ec.Recover(ctx, r)) 6647 ret = graphql.Null 6648 } 6649 }() 6650 fc := &graphql.FieldContext{ 6651 Object: "Query", 6652 Field: field, 6653 Args: nil, 6654 IsMethod: true, 6655 IsResolver: true, 6656 } 6657 6658 ctx = graphql.WithFieldContext(ctx, fc) 6659 rawArgs := field.ArgumentMap(ec.Variables) 6660 args, err := ec.field_Query_recursive_args(ctx, rawArgs) 6661 if err != nil { 6662 ec.Error(ctx, err) 6663 return graphql.Null 6664 } 6665 fc.Args = args 6666 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 6667 ctx = rctx // use context from middleware stack in children 6668 return ec.resolvers.Query().Recursive(rctx, args["input"].(*RecursiveInputSlice)) 6669 }) 6670 6671 if resTmp == nil { 6672 return graphql.Null 6673 } 6674 res := resTmp.(*bool) 6675 fc.Result = res 6676 return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) 6677 } 6678 6679 func (ec *executionContext) _Query_nestedInputs(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 6680 defer func() { 6681 if r := recover(); r != nil { 6682 ec.Error(ctx, ec.Recover(ctx, r)) 6683 ret = graphql.Null 6684 } 6685 }() 6686 fc := &graphql.FieldContext{ 6687 Object: "Query", 6688 Field: field, 6689 Args: nil, 6690 IsMethod: true, 6691 IsResolver: true, 6692 } 6693 6694 ctx = graphql.WithFieldContext(ctx, fc) 6695 rawArgs := field.ArgumentMap(ec.Variables) 6696 args, err := ec.field_Query_nestedInputs_args(ctx, rawArgs) 6697 if err != nil { 6698 ec.Error(ctx, err) 6699 return graphql.Null 6700 } 6701 fc.Args = args 6702 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 6703 ctx = rctx // use context from middleware stack in children 6704 return ec.resolvers.Query().NestedInputs(rctx, args["input"].([][]*OuterInput)) 6705 }) 6706 6707 if resTmp == nil { 6708 return graphql.Null 6709 } 6710 res := resTmp.(*bool) 6711 fc.Result = res 6712 return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) 6713 } 6714 6715 func (ec *executionContext) _Query_nestedOutputs(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 6716 defer func() { 6717 if r := recover(); r != nil { 6718 ec.Error(ctx, ec.Recover(ctx, r)) 6719 ret = graphql.Null 6720 } 6721 }() 6722 fc := &graphql.FieldContext{ 6723 Object: "Query", 6724 Field: field, 6725 Args: nil, 6726 IsMethod: true, 6727 IsResolver: true, 6728 } 6729 6730 ctx = graphql.WithFieldContext(ctx, fc) 6731 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 6732 ctx = rctx // use context from middleware stack in children 6733 return ec.resolvers.Query().NestedOutputs(rctx) 6734 }) 6735 6736 if resTmp == nil { 6737 return graphql.Null 6738 } 6739 res := resTmp.([][]*OuterObject) 6740 fc.Result = res 6741 return ec.marshalOOuterObject2ᚕᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterObject(ctx, field.Selections, res) 6742 } 6743 6744 func (ec *executionContext) _Query_modelMethods(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 6745 defer func() { 6746 if r := recover(); r != nil { 6747 ec.Error(ctx, ec.Recover(ctx, r)) 6748 ret = graphql.Null 6749 } 6750 }() 6751 fc := &graphql.FieldContext{ 6752 Object: "Query", 6753 Field: field, 6754 Args: nil, 6755 IsMethod: true, 6756 IsResolver: true, 6757 } 6758 6759 ctx = graphql.WithFieldContext(ctx, fc) 6760 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 6761 ctx = rctx // use context from middleware stack in children 6762 return ec.resolvers.Query().ModelMethods(rctx) 6763 }) 6764 6765 if resTmp == nil { 6766 return graphql.Null 6767 } 6768 res := resTmp.(*ModelMethods) 6769 fc.Result = res 6770 return ec.marshalOModelMethods2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐModelMethods(ctx, field.Selections, res) 6771 } 6772 6773 func (ec *executionContext) _Query_user(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 6774 defer func() { 6775 if r := recover(); r != nil { 6776 ec.Error(ctx, ec.Recover(ctx, r)) 6777 ret = graphql.Null 6778 } 6779 }() 6780 fc := &graphql.FieldContext{ 6781 Object: "Query", 6782 Field: field, 6783 Args: nil, 6784 IsMethod: true, 6785 IsResolver: true, 6786 } 6787 6788 ctx = graphql.WithFieldContext(ctx, fc) 6789 rawArgs := field.ArgumentMap(ec.Variables) 6790 args, err := ec.field_Query_user_args(ctx, rawArgs) 6791 if err != nil { 6792 ec.Error(ctx, err) 6793 return graphql.Null 6794 } 6795 fc.Args = args 6796 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 6797 ctx = rctx // use context from middleware stack in children 6798 return ec.resolvers.Query().User(rctx, args["id"].(int)) 6799 }) 6800 6801 if resTmp == nil { 6802 if !graphql.HasFieldError(ctx, fc) { 6803 ec.Errorf(ctx, "must not be null") 6804 } 6805 return graphql.Null 6806 } 6807 res := resTmp.(*User) 6808 fc.Result = res 6809 return ec.marshalNUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUser(ctx, field.Selections, res) 6810 } 6811 6812 func (ec *executionContext) _Query_nullableArg(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 6813 defer func() { 6814 if r := recover(); r != nil { 6815 ec.Error(ctx, ec.Recover(ctx, r)) 6816 ret = graphql.Null 6817 } 6818 }() 6819 fc := &graphql.FieldContext{ 6820 Object: "Query", 6821 Field: field, 6822 Args: nil, 6823 IsMethod: true, 6824 IsResolver: true, 6825 } 6826 6827 ctx = graphql.WithFieldContext(ctx, fc) 6828 rawArgs := field.ArgumentMap(ec.Variables) 6829 args, err := ec.field_Query_nullableArg_args(ctx, rawArgs) 6830 if err != nil { 6831 ec.Error(ctx, err) 6832 return graphql.Null 6833 } 6834 fc.Args = args 6835 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 6836 ctx = rctx // use context from middleware stack in children 6837 return ec.resolvers.Query().NullableArg(rctx, args["arg"].(*int)) 6838 }) 6839 6840 if resTmp == nil { 6841 return graphql.Null 6842 } 6843 res := resTmp.(*string) 6844 fc.Result = res 6845 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 6846 } 6847 6848 func (ec *executionContext) _Query_inputSlice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 6849 defer func() { 6850 if r := recover(); r != nil { 6851 ec.Error(ctx, ec.Recover(ctx, r)) 6852 ret = graphql.Null 6853 } 6854 }() 6855 fc := &graphql.FieldContext{ 6856 Object: "Query", 6857 Field: field, 6858 Args: nil, 6859 IsMethod: true, 6860 IsResolver: true, 6861 } 6862 6863 ctx = graphql.WithFieldContext(ctx, fc) 6864 rawArgs := field.ArgumentMap(ec.Variables) 6865 args, err := ec.field_Query_inputSlice_args(ctx, rawArgs) 6866 if err != nil { 6867 ec.Error(ctx, err) 6868 return graphql.Null 6869 } 6870 fc.Args = args 6871 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 6872 ctx = rctx // use context from middleware stack in children 6873 return ec.resolvers.Query().InputSlice(rctx, args["arg"].([]string)) 6874 }) 6875 6876 if resTmp == nil { 6877 if !graphql.HasFieldError(ctx, fc) { 6878 ec.Errorf(ctx, "must not be null") 6879 } 6880 return graphql.Null 6881 } 6882 res := resTmp.(bool) 6883 fc.Result = res 6884 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 6885 } 6886 6887 func (ec *executionContext) _Query_inputNullableSlice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 6888 defer func() { 6889 if r := recover(); r != nil { 6890 ec.Error(ctx, ec.Recover(ctx, r)) 6891 ret = graphql.Null 6892 } 6893 }() 6894 fc := &graphql.FieldContext{ 6895 Object: "Query", 6896 Field: field, 6897 Args: nil, 6898 IsMethod: true, 6899 IsResolver: true, 6900 } 6901 6902 ctx = graphql.WithFieldContext(ctx, fc) 6903 rawArgs := field.ArgumentMap(ec.Variables) 6904 args, err := ec.field_Query_inputNullableSlice_args(ctx, rawArgs) 6905 if err != nil { 6906 ec.Error(ctx, err) 6907 return graphql.Null 6908 } 6909 fc.Args = args 6910 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 6911 ctx = rctx // use context from middleware stack in children 6912 return ec.resolvers.Query().InputNullableSlice(rctx, args["arg"].([]string)) 6913 }) 6914 6915 if resTmp == nil { 6916 if !graphql.HasFieldError(ctx, fc) { 6917 ec.Errorf(ctx, "must not be null") 6918 } 6919 return graphql.Null 6920 } 6921 res := resTmp.(bool) 6922 fc.Result = res 6923 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 6924 } 6925 6926 func (ec *executionContext) _Query_shapeUnion(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 6927 defer func() { 6928 if r := recover(); r != nil { 6929 ec.Error(ctx, ec.Recover(ctx, r)) 6930 ret = graphql.Null 6931 } 6932 }() 6933 fc := &graphql.FieldContext{ 6934 Object: "Query", 6935 Field: field, 6936 Args: nil, 6937 IsMethod: true, 6938 IsResolver: true, 6939 } 6940 6941 ctx = graphql.WithFieldContext(ctx, fc) 6942 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 6943 ctx = rctx // use context from middleware stack in children 6944 return ec.resolvers.Query().ShapeUnion(rctx) 6945 }) 6946 6947 if resTmp == nil { 6948 if !graphql.HasFieldError(ctx, fc) { 6949 ec.Errorf(ctx, "must not be null") 6950 } 6951 return graphql.Null 6952 } 6953 res := resTmp.(ShapeUnion) 6954 fc.Result = res 6955 return ec.marshalNShapeUnion2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐShapeUnion(ctx, field.Selections, res) 6956 } 6957 6958 func (ec *executionContext) _Query_autobind(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 6959 defer func() { 6960 if r := recover(); r != nil { 6961 ec.Error(ctx, ec.Recover(ctx, r)) 6962 ret = graphql.Null 6963 } 6964 }() 6965 fc := &graphql.FieldContext{ 6966 Object: "Query", 6967 Field: field, 6968 Args: nil, 6969 IsMethod: true, 6970 IsResolver: true, 6971 } 6972 6973 ctx = graphql.WithFieldContext(ctx, fc) 6974 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 6975 ctx = rctx // use context from middleware stack in children 6976 return ec.resolvers.Query().Autobind(rctx) 6977 }) 6978 6979 if resTmp == nil { 6980 return graphql.Null 6981 } 6982 res := resTmp.(*Autobind) 6983 fc.Result = res 6984 return ec.marshalOAutobind2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐAutobind(ctx, field.Selections, res) 6985 } 6986 6987 func (ec *executionContext) _Query_deprecatedField(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 6988 defer func() { 6989 if r := recover(); r != nil { 6990 ec.Error(ctx, ec.Recover(ctx, r)) 6991 ret = graphql.Null 6992 } 6993 }() 6994 fc := &graphql.FieldContext{ 6995 Object: "Query", 6996 Field: field, 6997 Args: nil, 6998 IsMethod: true, 6999 IsResolver: true, 7000 } 7001 7002 ctx = graphql.WithFieldContext(ctx, fc) 7003 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7004 ctx = rctx // use context from middleware stack in children 7005 return ec.resolvers.Query().DeprecatedField(rctx) 7006 }) 7007 7008 if resTmp == nil { 7009 if !graphql.HasFieldError(ctx, fc) { 7010 ec.Errorf(ctx, "must not be null") 7011 } 7012 return graphql.Null 7013 } 7014 res := resTmp.(string) 7015 fc.Result = res 7016 return ec.marshalNString2string(ctx, field.Selections, res) 7017 } 7018 7019 func (ec *executionContext) _Query_overlapping(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7020 defer func() { 7021 if r := recover(); r != nil { 7022 ec.Error(ctx, ec.Recover(ctx, r)) 7023 ret = graphql.Null 7024 } 7025 }() 7026 fc := &graphql.FieldContext{ 7027 Object: "Query", 7028 Field: field, 7029 Args: nil, 7030 IsMethod: true, 7031 IsResolver: true, 7032 } 7033 7034 ctx = graphql.WithFieldContext(ctx, fc) 7035 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7036 ctx = rctx // use context from middleware stack in children 7037 return ec.resolvers.Query().Overlapping(rctx) 7038 }) 7039 7040 if resTmp == nil { 7041 return graphql.Null 7042 } 7043 res := resTmp.(*OverlappingFields) 7044 fc.Result = res 7045 return ec.marshalOOverlappingFields2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOverlappingFields(ctx, field.Selections, res) 7046 } 7047 7048 func (ec *executionContext) _Query_defaultParameters(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7049 defer func() { 7050 if r := recover(); r != nil { 7051 ec.Error(ctx, ec.Recover(ctx, r)) 7052 ret = graphql.Null 7053 } 7054 }() 7055 fc := &graphql.FieldContext{ 7056 Object: "Query", 7057 Field: field, 7058 Args: nil, 7059 IsMethod: true, 7060 IsResolver: true, 7061 } 7062 7063 ctx = graphql.WithFieldContext(ctx, fc) 7064 rawArgs := field.ArgumentMap(ec.Variables) 7065 args, err := ec.field_Query_defaultParameters_args(ctx, rawArgs) 7066 if err != nil { 7067 ec.Error(ctx, err) 7068 return graphql.Null 7069 } 7070 fc.Args = args 7071 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7072 ctx = rctx // use context from middleware stack in children 7073 return ec.resolvers.Query().DefaultParameters(rctx, args["falsyBoolean"].(*bool), args["truthyBoolean"].(*bool)) 7074 }) 7075 7076 if resTmp == nil { 7077 if !graphql.HasFieldError(ctx, fc) { 7078 ec.Errorf(ctx, "must not be null") 7079 } 7080 return graphql.Null 7081 } 7082 res := resTmp.(*DefaultParametersMirror) 7083 fc.Result = res 7084 return ec.marshalNDefaultParametersMirror2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐDefaultParametersMirror(ctx, field.Selections, res) 7085 } 7086 7087 func (ec *executionContext) _Query_directiveArg(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7088 defer func() { 7089 if r := recover(); r != nil { 7090 ec.Error(ctx, ec.Recover(ctx, r)) 7091 ret = graphql.Null 7092 } 7093 }() 7094 fc := &graphql.FieldContext{ 7095 Object: "Query", 7096 Field: field, 7097 Args: nil, 7098 IsMethod: true, 7099 IsResolver: true, 7100 } 7101 7102 ctx = graphql.WithFieldContext(ctx, fc) 7103 rawArgs := field.ArgumentMap(ec.Variables) 7104 args, err := ec.field_Query_directiveArg_args(ctx, rawArgs) 7105 if err != nil { 7106 ec.Error(ctx, err) 7107 return graphql.Null 7108 } 7109 fc.Args = args 7110 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7111 ctx = rctx // use context from middleware stack in children 7112 return ec.resolvers.Query().DirectiveArg(rctx, args["arg"].(string)) 7113 }) 7114 7115 if resTmp == nil { 7116 return graphql.Null 7117 } 7118 res := resTmp.(*string) 7119 fc.Result = res 7120 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 7121 } 7122 7123 func (ec *executionContext) _Query_directiveNullableArg(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7124 defer func() { 7125 if r := recover(); r != nil { 7126 ec.Error(ctx, ec.Recover(ctx, r)) 7127 ret = graphql.Null 7128 } 7129 }() 7130 fc := &graphql.FieldContext{ 7131 Object: "Query", 7132 Field: field, 7133 Args: nil, 7134 IsMethod: true, 7135 IsResolver: true, 7136 } 7137 7138 ctx = graphql.WithFieldContext(ctx, fc) 7139 rawArgs := field.ArgumentMap(ec.Variables) 7140 args, err := ec.field_Query_directiveNullableArg_args(ctx, rawArgs) 7141 if err != nil { 7142 ec.Error(ctx, err) 7143 return graphql.Null 7144 } 7145 fc.Args = args 7146 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7147 ctx = rctx // use context from middleware stack in children 7148 return ec.resolvers.Query().DirectiveNullableArg(rctx, args["arg"].(*int), args["arg2"].(*int), args["arg3"].(*string)) 7149 }) 7150 7151 if resTmp == nil { 7152 return graphql.Null 7153 } 7154 res := resTmp.(*string) 7155 fc.Result = res 7156 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 7157 } 7158 7159 func (ec *executionContext) _Query_directiveInputNullable(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7160 defer func() { 7161 if r := recover(); r != nil { 7162 ec.Error(ctx, ec.Recover(ctx, r)) 7163 ret = graphql.Null 7164 } 7165 }() 7166 fc := &graphql.FieldContext{ 7167 Object: "Query", 7168 Field: field, 7169 Args: nil, 7170 IsMethod: true, 7171 IsResolver: true, 7172 } 7173 7174 ctx = graphql.WithFieldContext(ctx, fc) 7175 rawArgs := field.ArgumentMap(ec.Variables) 7176 args, err := ec.field_Query_directiveInputNullable_args(ctx, rawArgs) 7177 if err != nil { 7178 ec.Error(ctx, err) 7179 return graphql.Null 7180 } 7181 fc.Args = args 7182 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7183 ctx = rctx // use context from middleware stack in children 7184 return ec.resolvers.Query().DirectiveInputNullable(rctx, args["arg"].(*InputDirectives)) 7185 }) 7186 7187 if resTmp == nil { 7188 return graphql.Null 7189 } 7190 res := resTmp.(*string) 7191 fc.Result = res 7192 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 7193 } 7194 7195 func (ec *executionContext) _Query_directiveInput(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7196 defer func() { 7197 if r := recover(); r != nil { 7198 ec.Error(ctx, ec.Recover(ctx, r)) 7199 ret = graphql.Null 7200 } 7201 }() 7202 fc := &graphql.FieldContext{ 7203 Object: "Query", 7204 Field: field, 7205 Args: nil, 7206 IsMethod: true, 7207 IsResolver: true, 7208 } 7209 7210 ctx = graphql.WithFieldContext(ctx, fc) 7211 rawArgs := field.ArgumentMap(ec.Variables) 7212 args, err := ec.field_Query_directiveInput_args(ctx, rawArgs) 7213 if err != nil { 7214 ec.Error(ctx, err) 7215 return graphql.Null 7216 } 7217 fc.Args = args 7218 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7219 ctx = rctx // use context from middleware stack in children 7220 return ec.resolvers.Query().DirectiveInput(rctx, args["arg"].(InputDirectives)) 7221 }) 7222 7223 if resTmp == nil { 7224 return graphql.Null 7225 } 7226 res := resTmp.(*string) 7227 fc.Result = res 7228 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 7229 } 7230 7231 func (ec *executionContext) _Query_directiveInputType(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7232 defer func() { 7233 if r := recover(); r != nil { 7234 ec.Error(ctx, ec.Recover(ctx, r)) 7235 ret = graphql.Null 7236 } 7237 }() 7238 fc := &graphql.FieldContext{ 7239 Object: "Query", 7240 Field: field, 7241 Args: nil, 7242 IsMethod: true, 7243 IsResolver: true, 7244 } 7245 7246 ctx = graphql.WithFieldContext(ctx, fc) 7247 rawArgs := field.ArgumentMap(ec.Variables) 7248 args, err := ec.field_Query_directiveInputType_args(ctx, rawArgs) 7249 if err != nil { 7250 ec.Error(ctx, err) 7251 return graphql.Null 7252 } 7253 fc.Args = args 7254 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7255 ctx = rctx // use context from middleware stack in children 7256 return ec.resolvers.Query().DirectiveInputType(rctx, args["arg"].(InnerInput)) 7257 }) 7258 7259 if resTmp == nil { 7260 return graphql.Null 7261 } 7262 res := resTmp.(*string) 7263 fc.Result = res 7264 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 7265 } 7266 7267 func (ec *executionContext) _Query_directiveObject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7268 defer func() { 7269 if r := recover(); r != nil { 7270 ec.Error(ctx, ec.Recover(ctx, r)) 7271 ret = graphql.Null 7272 } 7273 }() 7274 fc := &graphql.FieldContext{ 7275 Object: "Query", 7276 Field: field, 7277 Args: nil, 7278 IsMethod: true, 7279 IsResolver: true, 7280 } 7281 7282 ctx = graphql.WithFieldContext(ctx, fc) 7283 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7284 directive0 := func(rctx context.Context) (interface{}, error) { 7285 ctx = rctx // use context from middleware stack in children 7286 return ec.resolvers.Query().DirectiveObject(rctx) 7287 } 7288 directive1 := func(ctx context.Context) (interface{}, error) { 7289 location, err := ec.unmarshalNString2string(ctx, "order1_1") 7290 if err != nil { 7291 return nil, err 7292 } 7293 if ec.directives.Order1 == nil { 7294 return nil, errors.New("directive order1 is not implemented") 7295 } 7296 return ec.directives.Order1(ctx, nil, directive0, location) 7297 } 7298 directive2 := func(ctx context.Context) (interface{}, error) { 7299 location, err := ec.unmarshalNString2string(ctx, "order1_2") 7300 if err != nil { 7301 return nil, err 7302 } 7303 if ec.directives.Order1 == nil { 7304 return nil, errors.New("directive order1 is not implemented") 7305 } 7306 return ec.directives.Order1(ctx, nil, directive1, location) 7307 } 7308 directive3 := func(ctx context.Context) (interface{}, error) { 7309 location, err := ec.unmarshalNString2string(ctx, "order2_1") 7310 if err != nil { 7311 return nil, err 7312 } 7313 if ec.directives.Order2 == nil { 7314 return nil, errors.New("directive order2 is not implemented") 7315 } 7316 return ec.directives.Order2(ctx, nil, directive2, location) 7317 } 7318 directive4 := func(ctx context.Context) (interface{}, error) { 7319 location, err := ec.unmarshalNString2string(ctx, "Query_field") 7320 if err != nil { 7321 return nil, err 7322 } 7323 if ec.directives.Order1 == nil { 7324 return nil, errors.New("directive order1 is not implemented") 7325 } 7326 return ec.directives.Order1(ctx, nil, directive3, location) 7327 } 7328 7329 tmp, err := directive4(rctx) 7330 if err != nil { 7331 return nil, graphql.ErrorOnPath(ctx, err) 7332 } 7333 if tmp == nil { 7334 return nil, nil 7335 } 7336 if data, ok := tmp.(*ObjectDirectives); ok { 7337 return data, nil 7338 } 7339 return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/99designs/gqlgen/codegen/testserver/singlefile.ObjectDirectives`, tmp) 7340 }) 7341 7342 if resTmp == nil { 7343 return graphql.Null 7344 } 7345 res := resTmp.(*ObjectDirectives) 7346 fc.Result = res 7347 return ec.marshalOObjectDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐObjectDirectives(ctx, field.Selections, res) 7348 } 7349 7350 func (ec *executionContext) _Query_directiveObjectWithCustomGoModel(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7351 defer func() { 7352 if r := recover(); r != nil { 7353 ec.Error(ctx, ec.Recover(ctx, r)) 7354 ret = graphql.Null 7355 } 7356 }() 7357 fc := &graphql.FieldContext{ 7358 Object: "Query", 7359 Field: field, 7360 Args: nil, 7361 IsMethod: true, 7362 IsResolver: true, 7363 } 7364 7365 ctx = graphql.WithFieldContext(ctx, fc) 7366 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7367 ctx = rctx // use context from middleware stack in children 7368 return ec.resolvers.Query().DirectiveObjectWithCustomGoModel(rctx) 7369 }) 7370 7371 if resTmp == nil { 7372 return graphql.Null 7373 } 7374 res := resTmp.(*ObjectDirectivesWithCustomGoModel) 7375 fc.Result = res 7376 return ec.marshalOObjectDirectivesWithCustomGoModel2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐObjectDirectivesWithCustomGoModel(ctx, field.Selections, res) 7377 } 7378 7379 func (ec *executionContext) _Query_directiveFieldDef(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7380 defer func() { 7381 if r := recover(); r != nil { 7382 ec.Error(ctx, ec.Recover(ctx, r)) 7383 ret = graphql.Null 7384 } 7385 }() 7386 fc := &graphql.FieldContext{ 7387 Object: "Query", 7388 Field: field, 7389 Args: nil, 7390 IsMethod: true, 7391 IsResolver: true, 7392 } 7393 7394 ctx = graphql.WithFieldContext(ctx, fc) 7395 rawArgs := field.ArgumentMap(ec.Variables) 7396 args, err := ec.field_Query_directiveFieldDef_args(ctx, rawArgs) 7397 if err != nil { 7398 ec.Error(ctx, err) 7399 return graphql.Null 7400 } 7401 fc.Args = args 7402 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7403 directive0 := func(rctx context.Context) (interface{}, error) { 7404 ctx = rctx // use context from middleware stack in children 7405 return ec.resolvers.Query().DirectiveFieldDef(rctx, args["ret"].(string)) 7406 } 7407 directive1 := func(ctx context.Context) (interface{}, error) { 7408 min, err := ec.unmarshalNInt2int(ctx, 1) 7409 if err != nil { 7410 return nil, err 7411 } 7412 message, err := ec.unmarshalOString2ᚖstring(ctx, "not valid") 7413 if err != nil { 7414 return nil, err 7415 } 7416 if ec.directives.Length == nil { 7417 return nil, errors.New("directive length is not implemented") 7418 } 7419 return ec.directives.Length(ctx, nil, directive0, min, nil, message) 7420 } 7421 7422 tmp, err := directive1(rctx) 7423 if err != nil { 7424 return nil, graphql.ErrorOnPath(ctx, err) 7425 } 7426 if tmp == nil { 7427 return nil, nil 7428 } 7429 if data, ok := tmp.(string); ok { 7430 return data, nil 7431 } 7432 return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp) 7433 }) 7434 7435 if resTmp == nil { 7436 if !graphql.HasFieldError(ctx, fc) { 7437 ec.Errorf(ctx, "must not be null") 7438 } 7439 return graphql.Null 7440 } 7441 res := resTmp.(string) 7442 fc.Result = res 7443 return ec.marshalNString2string(ctx, field.Selections, res) 7444 } 7445 7446 func (ec *executionContext) _Query_directiveField(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7447 defer func() { 7448 if r := recover(); r != nil { 7449 ec.Error(ctx, ec.Recover(ctx, r)) 7450 ret = graphql.Null 7451 } 7452 }() 7453 fc := &graphql.FieldContext{ 7454 Object: "Query", 7455 Field: field, 7456 Args: nil, 7457 IsMethod: true, 7458 IsResolver: true, 7459 } 7460 7461 ctx = graphql.WithFieldContext(ctx, fc) 7462 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7463 ctx = rctx // use context from middleware stack in children 7464 return ec.resolvers.Query().DirectiveField(rctx) 7465 }) 7466 7467 if resTmp == nil { 7468 return graphql.Null 7469 } 7470 res := resTmp.(*string) 7471 fc.Result = res 7472 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 7473 } 7474 7475 func (ec *executionContext) _Query_directiveDouble(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7476 defer func() { 7477 if r := recover(); r != nil { 7478 ec.Error(ctx, ec.Recover(ctx, r)) 7479 ret = graphql.Null 7480 } 7481 }() 7482 fc := &graphql.FieldContext{ 7483 Object: "Query", 7484 Field: field, 7485 Args: nil, 7486 IsMethod: true, 7487 IsResolver: true, 7488 } 7489 7490 ctx = graphql.WithFieldContext(ctx, fc) 7491 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7492 directive0 := func(rctx context.Context) (interface{}, error) { 7493 ctx = rctx // use context from middleware stack in children 7494 return ec.resolvers.Query().DirectiveDouble(rctx) 7495 } 7496 directive1 := func(ctx context.Context) (interface{}, error) { 7497 if ec.directives.Directive1 == nil { 7498 return nil, errors.New("directive directive1 is not implemented") 7499 } 7500 return ec.directives.Directive1(ctx, nil, directive0) 7501 } 7502 directive2 := func(ctx context.Context) (interface{}, error) { 7503 if ec.directives.Directive2 == nil { 7504 return nil, errors.New("directive directive2 is not implemented") 7505 } 7506 return ec.directives.Directive2(ctx, nil, directive1) 7507 } 7508 7509 tmp, err := directive2(rctx) 7510 if err != nil { 7511 return nil, graphql.ErrorOnPath(ctx, err) 7512 } 7513 if tmp == nil { 7514 return nil, nil 7515 } 7516 if data, ok := tmp.(*string); ok { 7517 return data, nil 7518 } 7519 return nil, fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp) 7520 }) 7521 7522 if resTmp == nil { 7523 return graphql.Null 7524 } 7525 res := resTmp.(*string) 7526 fc.Result = res 7527 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 7528 } 7529 7530 func (ec *executionContext) _Query_directiveUnimplemented(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7531 defer func() { 7532 if r := recover(); r != nil { 7533 ec.Error(ctx, ec.Recover(ctx, r)) 7534 ret = graphql.Null 7535 } 7536 }() 7537 fc := &graphql.FieldContext{ 7538 Object: "Query", 7539 Field: field, 7540 Args: nil, 7541 IsMethod: true, 7542 IsResolver: true, 7543 } 7544 7545 ctx = graphql.WithFieldContext(ctx, fc) 7546 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7547 directive0 := func(rctx context.Context) (interface{}, error) { 7548 ctx = rctx // use context from middleware stack in children 7549 return ec.resolvers.Query().DirectiveUnimplemented(rctx) 7550 } 7551 directive1 := func(ctx context.Context) (interface{}, error) { 7552 if ec.directives.Unimplemented == nil { 7553 return nil, errors.New("directive unimplemented is not implemented") 7554 } 7555 return ec.directives.Unimplemented(ctx, nil, directive0) 7556 } 7557 7558 tmp, err := directive1(rctx) 7559 if err != nil { 7560 return nil, graphql.ErrorOnPath(ctx, err) 7561 } 7562 if tmp == nil { 7563 return nil, nil 7564 } 7565 if data, ok := tmp.(*string); ok { 7566 return data, nil 7567 } 7568 return nil, fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp) 7569 }) 7570 7571 if resTmp == nil { 7572 return graphql.Null 7573 } 7574 res := resTmp.(*string) 7575 fc.Result = res 7576 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 7577 } 7578 7579 func (ec *executionContext) _Query_embeddedCase1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7580 defer func() { 7581 if r := recover(); r != nil { 7582 ec.Error(ctx, ec.Recover(ctx, r)) 7583 ret = graphql.Null 7584 } 7585 }() 7586 fc := &graphql.FieldContext{ 7587 Object: "Query", 7588 Field: field, 7589 Args: nil, 7590 IsMethod: true, 7591 IsResolver: true, 7592 } 7593 7594 ctx = graphql.WithFieldContext(ctx, fc) 7595 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7596 ctx = rctx // use context from middleware stack in children 7597 return ec.resolvers.Query().EmbeddedCase1(rctx) 7598 }) 7599 7600 if resTmp == nil { 7601 return graphql.Null 7602 } 7603 res := resTmp.(*EmbeddedCase1) 7604 fc.Result = res 7605 return ec.marshalOEmbeddedCase12ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEmbeddedCase1(ctx, field.Selections, res) 7606 } 7607 7608 func (ec *executionContext) _Query_embeddedCase2(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7609 defer func() { 7610 if r := recover(); r != nil { 7611 ec.Error(ctx, ec.Recover(ctx, r)) 7612 ret = graphql.Null 7613 } 7614 }() 7615 fc := &graphql.FieldContext{ 7616 Object: "Query", 7617 Field: field, 7618 Args: nil, 7619 IsMethod: true, 7620 IsResolver: true, 7621 } 7622 7623 ctx = graphql.WithFieldContext(ctx, fc) 7624 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7625 ctx = rctx // use context from middleware stack in children 7626 return ec.resolvers.Query().EmbeddedCase2(rctx) 7627 }) 7628 7629 if resTmp == nil { 7630 return graphql.Null 7631 } 7632 res := resTmp.(*EmbeddedCase2) 7633 fc.Result = res 7634 return ec.marshalOEmbeddedCase22ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEmbeddedCase2(ctx, field.Selections, res) 7635 } 7636 7637 func (ec *executionContext) _Query_embeddedCase3(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7638 defer func() { 7639 if r := recover(); r != nil { 7640 ec.Error(ctx, ec.Recover(ctx, r)) 7641 ret = graphql.Null 7642 } 7643 }() 7644 fc := &graphql.FieldContext{ 7645 Object: "Query", 7646 Field: field, 7647 Args: nil, 7648 IsMethod: true, 7649 IsResolver: true, 7650 } 7651 7652 ctx = graphql.WithFieldContext(ctx, fc) 7653 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7654 ctx = rctx // use context from middleware stack in children 7655 return ec.resolvers.Query().EmbeddedCase3(rctx) 7656 }) 7657 7658 if resTmp == nil { 7659 return graphql.Null 7660 } 7661 res := resTmp.(*EmbeddedCase3) 7662 fc.Result = res 7663 return ec.marshalOEmbeddedCase32ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEmbeddedCase3(ctx, field.Selections, res) 7664 } 7665 7666 func (ec *executionContext) _Query_enumInInput(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7667 defer func() { 7668 if r := recover(); r != nil { 7669 ec.Error(ctx, ec.Recover(ctx, r)) 7670 ret = graphql.Null 7671 } 7672 }() 7673 fc := &graphql.FieldContext{ 7674 Object: "Query", 7675 Field: field, 7676 Args: nil, 7677 IsMethod: true, 7678 IsResolver: true, 7679 } 7680 7681 ctx = graphql.WithFieldContext(ctx, fc) 7682 rawArgs := field.ArgumentMap(ec.Variables) 7683 args, err := ec.field_Query_enumInInput_args(ctx, rawArgs) 7684 if err != nil { 7685 ec.Error(ctx, err) 7686 return graphql.Null 7687 } 7688 fc.Args = args 7689 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7690 ctx = rctx // use context from middleware stack in children 7691 return ec.resolvers.Query().EnumInInput(rctx, args["input"].(*InputWithEnumValue)) 7692 }) 7693 7694 if resTmp == nil { 7695 if !graphql.HasFieldError(ctx, fc) { 7696 ec.Errorf(ctx, "must not be null") 7697 } 7698 return graphql.Null 7699 } 7700 res := resTmp.(EnumTest) 7701 fc.Result = res 7702 return ec.marshalNEnumTest2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEnumTest(ctx, field.Selections, res) 7703 } 7704 7705 func (ec *executionContext) _Query_shapes(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7706 defer func() { 7707 if r := recover(); r != nil { 7708 ec.Error(ctx, ec.Recover(ctx, r)) 7709 ret = graphql.Null 7710 } 7711 }() 7712 fc := &graphql.FieldContext{ 7713 Object: "Query", 7714 Field: field, 7715 Args: nil, 7716 IsMethod: true, 7717 IsResolver: true, 7718 } 7719 7720 ctx = graphql.WithFieldContext(ctx, fc) 7721 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7722 ctx = rctx // use context from middleware stack in children 7723 return ec.resolvers.Query().Shapes(rctx) 7724 }) 7725 7726 if resTmp == nil { 7727 return graphql.Null 7728 } 7729 res := resTmp.([]Shape) 7730 fc.Result = res 7731 return ec.marshalOShape2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐShape(ctx, field.Selections, res) 7732 } 7733 7734 func (ec *executionContext) _Query_noShape(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7735 defer func() { 7736 if r := recover(); r != nil { 7737 ec.Error(ctx, ec.Recover(ctx, r)) 7738 ret = graphql.Null 7739 } 7740 }() 7741 fc := &graphql.FieldContext{ 7742 Object: "Query", 7743 Field: field, 7744 Args: nil, 7745 IsMethod: true, 7746 IsResolver: true, 7747 } 7748 7749 ctx = graphql.WithFieldContext(ctx, fc) 7750 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7751 directive0 := func(rctx context.Context) (interface{}, error) { 7752 ctx = rctx // use context from middleware stack in children 7753 return ec.resolvers.Query().NoShape(rctx) 7754 } 7755 directive1 := func(ctx context.Context) (interface{}, error) { 7756 if ec.directives.MakeNil == nil { 7757 return nil, errors.New("directive makeNil is not implemented") 7758 } 7759 return ec.directives.MakeNil(ctx, nil, directive0) 7760 } 7761 7762 tmp, err := directive1(rctx) 7763 if err != nil { 7764 return nil, graphql.ErrorOnPath(ctx, err) 7765 } 7766 if tmp == nil { 7767 return nil, nil 7768 } 7769 if data, ok := tmp.(Shape); ok { 7770 return data, nil 7771 } 7772 return nil, fmt.Errorf(`unexpected type %T from directive, should be github.com/99designs/gqlgen/codegen/testserver/singlefile.Shape`, tmp) 7773 }) 7774 7775 if resTmp == nil { 7776 return graphql.Null 7777 } 7778 res := resTmp.(Shape) 7779 fc.Result = res 7780 return ec.marshalOShape2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐShape(ctx, field.Selections, res) 7781 } 7782 7783 func (ec *executionContext) _Query_node(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7784 defer func() { 7785 if r := recover(); r != nil { 7786 ec.Error(ctx, ec.Recover(ctx, r)) 7787 ret = graphql.Null 7788 } 7789 }() 7790 fc := &graphql.FieldContext{ 7791 Object: "Query", 7792 Field: field, 7793 Args: nil, 7794 IsMethod: true, 7795 IsResolver: true, 7796 } 7797 7798 ctx = graphql.WithFieldContext(ctx, fc) 7799 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7800 ctx = rctx // use context from middleware stack in children 7801 return ec.resolvers.Query().Node(rctx) 7802 }) 7803 7804 if resTmp == nil { 7805 if !graphql.HasFieldError(ctx, fc) { 7806 ec.Errorf(ctx, "must not be null") 7807 } 7808 return graphql.Null 7809 } 7810 res := resTmp.(Node) 7811 fc.Result = res 7812 return ec.marshalNNode2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐNode(ctx, field.Selections, res) 7813 } 7814 7815 func (ec *executionContext) _Query_noShapeTypedNil(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7816 defer func() { 7817 if r := recover(); r != nil { 7818 ec.Error(ctx, ec.Recover(ctx, r)) 7819 ret = graphql.Null 7820 } 7821 }() 7822 fc := &graphql.FieldContext{ 7823 Object: "Query", 7824 Field: field, 7825 Args: nil, 7826 IsMethod: true, 7827 IsResolver: true, 7828 } 7829 7830 ctx = graphql.WithFieldContext(ctx, fc) 7831 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7832 directive0 := func(rctx context.Context) (interface{}, error) { 7833 ctx = rctx // use context from middleware stack in children 7834 return ec.resolvers.Query().NoShapeTypedNil(rctx) 7835 } 7836 directive1 := func(ctx context.Context) (interface{}, error) { 7837 if ec.directives.MakeTypedNil == nil { 7838 return nil, errors.New("directive makeTypedNil is not implemented") 7839 } 7840 return ec.directives.MakeTypedNil(ctx, nil, directive0) 7841 } 7842 7843 tmp, err := directive1(rctx) 7844 if err != nil { 7845 return nil, graphql.ErrorOnPath(ctx, err) 7846 } 7847 if tmp == nil { 7848 return nil, nil 7849 } 7850 if data, ok := tmp.(Shape); ok { 7851 return data, nil 7852 } 7853 return nil, fmt.Errorf(`unexpected type %T from directive, should be github.com/99designs/gqlgen/codegen/testserver/singlefile.Shape`, tmp) 7854 }) 7855 7856 if resTmp == nil { 7857 return graphql.Null 7858 } 7859 res := resTmp.(Shape) 7860 fc.Result = res 7861 return ec.marshalOShape2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐShape(ctx, field.Selections, res) 7862 } 7863 7864 func (ec *executionContext) _Query_animal(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7865 defer func() { 7866 if r := recover(); r != nil { 7867 ec.Error(ctx, ec.Recover(ctx, r)) 7868 ret = graphql.Null 7869 } 7870 }() 7871 fc := &graphql.FieldContext{ 7872 Object: "Query", 7873 Field: field, 7874 Args: nil, 7875 IsMethod: true, 7876 IsResolver: true, 7877 } 7878 7879 ctx = graphql.WithFieldContext(ctx, fc) 7880 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7881 directive0 := func(rctx context.Context) (interface{}, error) { 7882 ctx = rctx // use context from middleware stack in children 7883 return ec.resolvers.Query().Animal(rctx) 7884 } 7885 directive1 := func(ctx context.Context) (interface{}, error) { 7886 if ec.directives.MakeTypedNil == nil { 7887 return nil, errors.New("directive makeTypedNil is not implemented") 7888 } 7889 return ec.directives.MakeTypedNil(ctx, nil, directive0) 7890 } 7891 7892 tmp, err := directive1(rctx) 7893 if err != nil { 7894 return nil, graphql.ErrorOnPath(ctx, err) 7895 } 7896 if tmp == nil { 7897 return nil, nil 7898 } 7899 if data, ok := tmp.(Animal); ok { 7900 return data, nil 7901 } 7902 return nil, fmt.Errorf(`unexpected type %T from directive, should be github.com/99designs/gqlgen/codegen/testserver/singlefile.Animal`, tmp) 7903 }) 7904 7905 if resTmp == nil { 7906 return graphql.Null 7907 } 7908 res := resTmp.(Animal) 7909 fc.Result = res 7910 return ec.marshalOAnimal2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐAnimal(ctx, field.Selections, res) 7911 } 7912 7913 func (ec *executionContext) _Query_notAnInterface(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7914 defer func() { 7915 if r := recover(); r != nil { 7916 ec.Error(ctx, ec.Recover(ctx, r)) 7917 ret = graphql.Null 7918 } 7919 }() 7920 fc := &graphql.FieldContext{ 7921 Object: "Query", 7922 Field: field, 7923 Args: nil, 7924 IsMethod: true, 7925 IsResolver: true, 7926 } 7927 7928 ctx = graphql.WithFieldContext(ctx, fc) 7929 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7930 ctx = rctx // use context from middleware stack in children 7931 return ec.resolvers.Query().NotAnInterface(rctx) 7932 }) 7933 7934 if resTmp == nil { 7935 return graphql.Null 7936 } 7937 res := resTmp.(BackedByInterface) 7938 fc.Result = res 7939 return ec.marshalOBackedByInterface2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐBackedByInterface(ctx, field.Selections, res) 7940 } 7941 7942 func (ec *executionContext) _Query_issue896a(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7943 defer func() { 7944 if r := recover(); r != nil { 7945 ec.Error(ctx, ec.Recover(ctx, r)) 7946 ret = graphql.Null 7947 } 7948 }() 7949 fc := &graphql.FieldContext{ 7950 Object: "Query", 7951 Field: field, 7952 Args: nil, 7953 IsMethod: true, 7954 IsResolver: true, 7955 } 7956 7957 ctx = graphql.WithFieldContext(ctx, fc) 7958 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7959 ctx = rctx // use context from middleware stack in children 7960 return ec.resolvers.Query().Issue896a(rctx) 7961 }) 7962 7963 if resTmp == nil { 7964 return graphql.Null 7965 } 7966 res := resTmp.([]*CheckIssue896) 7967 fc.Result = res 7968 return ec.marshalOCheckIssue8962ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896ᚄ(ctx, field.Selections, res) 7969 } 7970 7971 func (ec *executionContext) _Query_mapStringInterface(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7972 defer func() { 7973 if r := recover(); r != nil { 7974 ec.Error(ctx, ec.Recover(ctx, r)) 7975 ret = graphql.Null 7976 } 7977 }() 7978 fc := &graphql.FieldContext{ 7979 Object: "Query", 7980 Field: field, 7981 Args: nil, 7982 IsMethod: true, 7983 IsResolver: true, 7984 } 7985 7986 ctx = graphql.WithFieldContext(ctx, fc) 7987 rawArgs := field.ArgumentMap(ec.Variables) 7988 args, err := ec.field_Query_mapStringInterface_args(ctx, rawArgs) 7989 if err != nil { 7990 ec.Error(ctx, err) 7991 return graphql.Null 7992 } 7993 fc.Args = args 7994 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7995 ctx = rctx // use context from middleware stack in children 7996 return ec.resolvers.Query().MapStringInterface(rctx, args["in"].(map[string]interface{})) 7997 }) 7998 7999 if resTmp == nil { 8000 return graphql.Null 8001 } 8002 res := resTmp.(map[string]interface{}) 8003 fc.Result = res 8004 return ec.marshalOMapStringInterfaceType2map(ctx, field.Selections, res) 8005 } 8006 8007 func (ec *executionContext) _Query_mapNestedStringInterface(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8008 defer func() { 8009 if r := recover(); r != nil { 8010 ec.Error(ctx, ec.Recover(ctx, r)) 8011 ret = graphql.Null 8012 } 8013 }() 8014 fc := &graphql.FieldContext{ 8015 Object: "Query", 8016 Field: field, 8017 Args: nil, 8018 IsMethod: true, 8019 IsResolver: true, 8020 } 8021 8022 ctx = graphql.WithFieldContext(ctx, fc) 8023 rawArgs := field.ArgumentMap(ec.Variables) 8024 args, err := ec.field_Query_mapNestedStringInterface_args(ctx, rawArgs) 8025 if err != nil { 8026 ec.Error(ctx, err) 8027 return graphql.Null 8028 } 8029 fc.Args = args 8030 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8031 ctx = rctx // use context from middleware stack in children 8032 return ec.resolvers.Query().MapNestedStringInterface(rctx, args["in"].(*NestedMapInput)) 8033 }) 8034 8035 if resTmp == nil { 8036 return graphql.Null 8037 } 8038 res := resTmp.(map[string]interface{}) 8039 fc.Result = res 8040 return ec.marshalOMapStringInterfaceType2map(ctx, field.Selections, res) 8041 } 8042 8043 func (ec *executionContext) _Query_errorBubble(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8044 defer func() { 8045 if r := recover(); r != nil { 8046 ec.Error(ctx, ec.Recover(ctx, r)) 8047 ret = graphql.Null 8048 } 8049 }() 8050 fc := &graphql.FieldContext{ 8051 Object: "Query", 8052 Field: field, 8053 Args: nil, 8054 IsMethod: true, 8055 IsResolver: true, 8056 } 8057 8058 ctx = graphql.WithFieldContext(ctx, fc) 8059 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8060 ctx = rctx // use context from middleware stack in children 8061 return ec.resolvers.Query().ErrorBubble(rctx) 8062 }) 8063 8064 if resTmp == nil { 8065 return graphql.Null 8066 } 8067 res := resTmp.(*Error) 8068 fc.Result = res 8069 return ec.marshalOError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx, field.Selections, res) 8070 } 8071 8072 func (ec *executionContext) _Query_errorBubbleList(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8073 defer func() { 8074 if r := recover(); r != nil { 8075 ec.Error(ctx, ec.Recover(ctx, r)) 8076 ret = graphql.Null 8077 } 8078 }() 8079 fc := &graphql.FieldContext{ 8080 Object: "Query", 8081 Field: field, 8082 Args: nil, 8083 IsMethod: true, 8084 IsResolver: true, 8085 } 8086 8087 ctx = graphql.WithFieldContext(ctx, fc) 8088 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8089 ctx = rctx // use context from middleware stack in children 8090 return ec.resolvers.Query().ErrorBubbleList(rctx) 8091 }) 8092 8093 if resTmp == nil { 8094 return graphql.Null 8095 } 8096 res := resTmp.([]*Error) 8097 fc.Result = res 8098 return ec.marshalOError2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐErrorᚄ(ctx, field.Selections, res) 8099 } 8100 8101 func (ec *executionContext) _Query_errorList(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8102 defer func() { 8103 if r := recover(); r != nil { 8104 ec.Error(ctx, ec.Recover(ctx, r)) 8105 ret = graphql.Null 8106 } 8107 }() 8108 fc := &graphql.FieldContext{ 8109 Object: "Query", 8110 Field: field, 8111 Args: nil, 8112 IsMethod: true, 8113 IsResolver: true, 8114 } 8115 8116 ctx = graphql.WithFieldContext(ctx, fc) 8117 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8118 ctx = rctx // use context from middleware stack in children 8119 return ec.resolvers.Query().ErrorList(rctx) 8120 }) 8121 8122 if resTmp == nil { 8123 return graphql.Null 8124 } 8125 res := resTmp.([]*Error) 8126 fc.Result = res 8127 return ec.marshalOError2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx, field.Selections, res) 8128 } 8129 8130 func (ec *executionContext) _Query_errors(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8131 defer func() { 8132 if r := recover(); r != nil { 8133 ec.Error(ctx, ec.Recover(ctx, r)) 8134 ret = graphql.Null 8135 } 8136 }() 8137 fc := &graphql.FieldContext{ 8138 Object: "Query", 8139 Field: field, 8140 Args: nil, 8141 IsMethod: true, 8142 IsResolver: true, 8143 } 8144 8145 ctx = graphql.WithFieldContext(ctx, fc) 8146 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8147 ctx = rctx // use context from middleware stack in children 8148 return ec.resolvers.Query().Errors(rctx) 8149 }) 8150 8151 if resTmp == nil { 8152 return graphql.Null 8153 } 8154 res := resTmp.(*Errors) 8155 fc.Result = res 8156 return ec.marshalOErrors2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐErrors(ctx, field.Selections, res) 8157 } 8158 8159 func (ec *executionContext) _Query_valid(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8160 defer func() { 8161 if r := recover(); r != nil { 8162 ec.Error(ctx, ec.Recover(ctx, r)) 8163 ret = graphql.Null 8164 } 8165 }() 8166 fc := &graphql.FieldContext{ 8167 Object: "Query", 8168 Field: field, 8169 Args: nil, 8170 IsMethod: true, 8171 IsResolver: true, 8172 } 8173 8174 ctx = graphql.WithFieldContext(ctx, fc) 8175 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8176 ctx = rctx // use context from middleware stack in children 8177 return ec.resolvers.Query().Valid(rctx) 8178 }) 8179 8180 if resTmp == nil { 8181 if !graphql.HasFieldError(ctx, fc) { 8182 ec.Errorf(ctx, "must not be null") 8183 } 8184 return graphql.Null 8185 } 8186 res := resTmp.(string) 8187 fc.Result = res 8188 return ec.marshalNString2string(ctx, field.Selections, res) 8189 } 8190 8191 func (ec *executionContext) _Query_panics(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8192 defer func() { 8193 if r := recover(); r != nil { 8194 ec.Error(ctx, ec.Recover(ctx, r)) 8195 ret = graphql.Null 8196 } 8197 }() 8198 fc := &graphql.FieldContext{ 8199 Object: "Query", 8200 Field: field, 8201 Args: nil, 8202 IsMethod: true, 8203 IsResolver: true, 8204 } 8205 8206 ctx = graphql.WithFieldContext(ctx, fc) 8207 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8208 ctx = rctx // use context from middleware stack in children 8209 return ec.resolvers.Query().Panics(rctx) 8210 }) 8211 8212 if resTmp == nil { 8213 return graphql.Null 8214 } 8215 res := resTmp.(*Panics) 8216 fc.Result = res 8217 return ec.marshalOPanics2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPanics(ctx, field.Selections, res) 8218 } 8219 8220 func (ec *executionContext) _Query_primitiveObject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8221 defer func() { 8222 if r := recover(); r != nil { 8223 ec.Error(ctx, ec.Recover(ctx, r)) 8224 ret = graphql.Null 8225 } 8226 }() 8227 fc := &graphql.FieldContext{ 8228 Object: "Query", 8229 Field: field, 8230 Args: nil, 8231 IsMethod: true, 8232 IsResolver: true, 8233 } 8234 8235 ctx = graphql.WithFieldContext(ctx, fc) 8236 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8237 ctx = rctx // use context from middleware stack in children 8238 return ec.resolvers.Query().PrimitiveObject(rctx) 8239 }) 8240 8241 if resTmp == nil { 8242 if !graphql.HasFieldError(ctx, fc) { 8243 ec.Errorf(ctx, "must not be null") 8244 } 8245 return graphql.Null 8246 } 8247 res := resTmp.([]Primitive) 8248 fc.Result = res 8249 return ec.marshalNPrimitive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitiveᚄ(ctx, field.Selections, res) 8250 } 8251 8252 func (ec *executionContext) _Query_primitiveStringObject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8253 defer func() { 8254 if r := recover(); r != nil { 8255 ec.Error(ctx, ec.Recover(ctx, r)) 8256 ret = graphql.Null 8257 } 8258 }() 8259 fc := &graphql.FieldContext{ 8260 Object: "Query", 8261 Field: field, 8262 Args: nil, 8263 IsMethod: true, 8264 IsResolver: true, 8265 } 8266 8267 ctx = graphql.WithFieldContext(ctx, fc) 8268 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8269 ctx = rctx // use context from middleware stack in children 8270 return ec.resolvers.Query().PrimitiveStringObject(rctx) 8271 }) 8272 8273 if resTmp == nil { 8274 if !graphql.HasFieldError(ctx, fc) { 8275 ec.Errorf(ctx, "must not be null") 8276 } 8277 return graphql.Null 8278 } 8279 res := resTmp.([]PrimitiveString) 8280 fc.Result = res 8281 return ec.marshalNPrimitiveString2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitiveStringᚄ(ctx, field.Selections, res) 8282 } 8283 8284 func (ec *executionContext) _Query_ptrToSliceContainer(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8285 defer func() { 8286 if r := recover(); r != nil { 8287 ec.Error(ctx, ec.Recover(ctx, r)) 8288 ret = graphql.Null 8289 } 8290 }() 8291 fc := &graphql.FieldContext{ 8292 Object: "Query", 8293 Field: field, 8294 Args: nil, 8295 IsMethod: true, 8296 IsResolver: true, 8297 } 8298 8299 ctx = graphql.WithFieldContext(ctx, fc) 8300 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8301 ctx = rctx // use context from middleware stack in children 8302 return ec.resolvers.Query().PtrToSliceContainer(rctx) 8303 }) 8304 8305 if resTmp == nil { 8306 if !graphql.HasFieldError(ctx, fc) { 8307 ec.Errorf(ctx, "must not be null") 8308 } 8309 return graphql.Null 8310 } 8311 res := resTmp.(*PtrToSliceContainer) 8312 fc.Result = res 8313 return ec.marshalNPtrToSliceContainer2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToSliceContainer(ctx, field.Selections, res) 8314 } 8315 8316 func (ec *executionContext) _Query_infinity(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8317 defer func() { 8318 if r := recover(); r != nil { 8319 ec.Error(ctx, ec.Recover(ctx, r)) 8320 ret = graphql.Null 8321 } 8322 }() 8323 fc := &graphql.FieldContext{ 8324 Object: "Query", 8325 Field: field, 8326 Args: nil, 8327 IsMethod: true, 8328 IsResolver: true, 8329 } 8330 8331 ctx = graphql.WithFieldContext(ctx, fc) 8332 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8333 ctx = rctx // use context from middleware stack in children 8334 return ec.resolvers.Query().Infinity(rctx) 8335 }) 8336 8337 if resTmp == nil { 8338 if !graphql.HasFieldError(ctx, fc) { 8339 ec.Errorf(ctx, "must not be null") 8340 } 8341 return graphql.Null 8342 } 8343 res := resTmp.(float64) 8344 fc.Result = res 8345 return ec.marshalNFloat2float64(ctx, field.Selections, res) 8346 } 8347 8348 func (ec *executionContext) _Query_stringFromContextInterface(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8349 defer func() { 8350 if r := recover(); r != nil { 8351 ec.Error(ctx, ec.Recover(ctx, r)) 8352 ret = graphql.Null 8353 } 8354 }() 8355 fc := &graphql.FieldContext{ 8356 Object: "Query", 8357 Field: field, 8358 Args: nil, 8359 IsMethod: true, 8360 IsResolver: true, 8361 } 8362 8363 ctx = graphql.WithFieldContext(ctx, fc) 8364 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8365 ctx = rctx // use context from middleware stack in children 8366 return ec.resolvers.Query().StringFromContextInterface(rctx) 8367 }) 8368 8369 if resTmp == nil { 8370 if !graphql.HasFieldError(ctx, fc) { 8371 ec.Errorf(ctx, "must not be null") 8372 } 8373 return graphql.Null 8374 } 8375 res := resTmp.(*StringFromContextInterface) 8376 fc.Result = res 8377 return ec.marshalNStringFromContextInterface2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐStringFromContextInterface(ctx, field.Selections, res) 8378 } 8379 8380 func (ec *executionContext) _Query_stringFromContextFunction(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8381 defer func() { 8382 if r := recover(); r != nil { 8383 ec.Error(ctx, ec.Recover(ctx, r)) 8384 ret = graphql.Null 8385 } 8386 }() 8387 fc := &graphql.FieldContext{ 8388 Object: "Query", 8389 Field: field, 8390 Args: nil, 8391 IsMethod: true, 8392 IsResolver: true, 8393 } 8394 8395 ctx = graphql.WithFieldContext(ctx, fc) 8396 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8397 ctx = rctx // use context from middleware stack in children 8398 return ec.resolvers.Query().StringFromContextFunction(rctx) 8399 }) 8400 8401 if resTmp == nil { 8402 if !graphql.HasFieldError(ctx, fc) { 8403 ec.Errorf(ctx, "must not be null") 8404 } 8405 return graphql.Null 8406 } 8407 res := resTmp.(string) 8408 fc.Result = res 8409 return ec.marshalNStringFromContextFunction2string(ctx, field.Selections, res) 8410 } 8411 8412 func (ec *executionContext) _Query_defaultScalar(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8413 defer func() { 8414 if r := recover(); r != nil { 8415 ec.Error(ctx, ec.Recover(ctx, r)) 8416 ret = graphql.Null 8417 } 8418 }() 8419 fc := &graphql.FieldContext{ 8420 Object: "Query", 8421 Field: field, 8422 Args: nil, 8423 IsMethod: true, 8424 IsResolver: true, 8425 } 8426 8427 ctx = graphql.WithFieldContext(ctx, fc) 8428 rawArgs := field.ArgumentMap(ec.Variables) 8429 args, err := ec.field_Query_defaultScalar_args(ctx, rawArgs) 8430 if err != nil { 8431 ec.Error(ctx, err) 8432 return graphql.Null 8433 } 8434 fc.Args = args 8435 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8436 ctx = rctx // use context from middleware stack in children 8437 return ec.resolvers.Query().DefaultScalar(rctx, args["arg"].(string)) 8438 }) 8439 8440 if resTmp == nil { 8441 if !graphql.HasFieldError(ctx, fc) { 8442 ec.Errorf(ctx, "must not be null") 8443 } 8444 return graphql.Null 8445 } 8446 res := resTmp.(string) 8447 fc.Result = res 8448 return ec.marshalNDefaultScalarImplementation2string(ctx, field.Selections, res) 8449 } 8450 8451 func (ec *executionContext) _Query_slices(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8452 defer func() { 8453 if r := recover(); r != nil { 8454 ec.Error(ctx, ec.Recover(ctx, r)) 8455 ret = graphql.Null 8456 } 8457 }() 8458 fc := &graphql.FieldContext{ 8459 Object: "Query", 8460 Field: field, 8461 Args: nil, 8462 IsMethod: true, 8463 IsResolver: true, 8464 } 8465 8466 ctx = graphql.WithFieldContext(ctx, fc) 8467 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8468 ctx = rctx // use context from middleware stack in children 8469 return ec.resolvers.Query().Slices(rctx) 8470 }) 8471 8472 if resTmp == nil { 8473 return graphql.Null 8474 } 8475 res := resTmp.(*Slices) 8476 fc.Result = res 8477 return ec.marshalOSlices2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐSlices(ctx, field.Selections, res) 8478 } 8479 8480 func (ec *executionContext) _Query_scalarSlice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8481 defer func() { 8482 if r := recover(); r != nil { 8483 ec.Error(ctx, ec.Recover(ctx, r)) 8484 ret = graphql.Null 8485 } 8486 }() 8487 fc := &graphql.FieldContext{ 8488 Object: "Query", 8489 Field: field, 8490 Args: nil, 8491 IsMethod: true, 8492 IsResolver: true, 8493 } 8494 8495 ctx = graphql.WithFieldContext(ctx, fc) 8496 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8497 ctx = rctx // use context from middleware stack in children 8498 return ec.resolvers.Query().ScalarSlice(rctx) 8499 }) 8500 8501 if resTmp == nil { 8502 if !graphql.HasFieldError(ctx, fc) { 8503 ec.Errorf(ctx, "must not be null") 8504 } 8505 return graphql.Null 8506 } 8507 res := resTmp.([]byte) 8508 fc.Result = res 8509 return ec.marshalNBytes2ᚕbyte(ctx, field.Selections, res) 8510 } 8511 8512 func (ec *executionContext) _Query_fallback(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8513 defer func() { 8514 if r := recover(); r != nil { 8515 ec.Error(ctx, ec.Recover(ctx, r)) 8516 ret = graphql.Null 8517 } 8518 }() 8519 fc := &graphql.FieldContext{ 8520 Object: "Query", 8521 Field: field, 8522 Args: nil, 8523 IsMethod: true, 8524 IsResolver: true, 8525 } 8526 8527 ctx = graphql.WithFieldContext(ctx, fc) 8528 rawArgs := field.ArgumentMap(ec.Variables) 8529 args, err := ec.field_Query_fallback_args(ctx, rawArgs) 8530 if err != nil { 8531 ec.Error(ctx, err) 8532 return graphql.Null 8533 } 8534 fc.Args = args 8535 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8536 ctx = rctx // use context from middleware stack in children 8537 return ec.resolvers.Query().Fallback(rctx, args["arg"].(FallbackToStringEncoding)) 8538 }) 8539 8540 if resTmp == nil { 8541 if !graphql.HasFieldError(ctx, fc) { 8542 ec.Errorf(ctx, "must not be null") 8543 } 8544 return graphql.Null 8545 } 8546 res := resTmp.(FallbackToStringEncoding) 8547 fc.Result = res 8548 return ec.marshalNFallbackToStringEncoding2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐFallbackToStringEncoding(ctx, field.Selections, res) 8549 } 8550 8551 func (ec *executionContext) _Query_optionalUnion(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8552 defer func() { 8553 if r := recover(); r != nil { 8554 ec.Error(ctx, ec.Recover(ctx, r)) 8555 ret = graphql.Null 8556 } 8557 }() 8558 fc := &graphql.FieldContext{ 8559 Object: "Query", 8560 Field: field, 8561 Args: nil, 8562 IsMethod: true, 8563 IsResolver: true, 8564 } 8565 8566 ctx = graphql.WithFieldContext(ctx, fc) 8567 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8568 ctx = rctx // use context from middleware stack in children 8569 return ec.resolvers.Query().OptionalUnion(rctx) 8570 }) 8571 8572 if resTmp == nil { 8573 return graphql.Null 8574 } 8575 res := resTmp.(TestUnion) 8576 fc.Result = res 8577 return ec.marshalOTestUnion2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐTestUnion(ctx, field.Selections, res) 8578 } 8579 8580 func (ec *executionContext) _Query_vOkCaseValue(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8581 defer func() { 8582 if r := recover(); r != nil { 8583 ec.Error(ctx, ec.Recover(ctx, r)) 8584 ret = graphql.Null 8585 } 8586 }() 8587 fc := &graphql.FieldContext{ 8588 Object: "Query", 8589 Field: field, 8590 Args: nil, 8591 IsMethod: true, 8592 IsResolver: true, 8593 } 8594 8595 ctx = graphql.WithFieldContext(ctx, fc) 8596 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8597 ctx = rctx // use context from middleware stack in children 8598 return ec.resolvers.Query().VOkCaseValue(rctx) 8599 }) 8600 8601 if resTmp == nil { 8602 return graphql.Null 8603 } 8604 res := resTmp.(*VOkCaseValue) 8605 fc.Result = res 8606 return ec.marshalOVOkCaseValue2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐVOkCaseValue(ctx, field.Selections, res) 8607 } 8608 8609 func (ec *executionContext) _Query_vOkCaseNil(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8610 defer func() { 8611 if r := recover(); r != nil { 8612 ec.Error(ctx, ec.Recover(ctx, r)) 8613 ret = graphql.Null 8614 } 8615 }() 8616 fc := &graphql.FieldContext{ 8617 Object: "Query", 8618 Field: field, 8619 Args: nil, 8620 IsMethod: true, 8621 IsResolver: true, 8622 } 8623 8624 ctx = graphql.WithFieldContext(ctx, fc) 8625 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8626 ctx = rctx // use context from middleware stack in children 8627 return ec.resolvers.Query().VOkCaseNil(rctx) 8628 }) 8629 8630 if resTmp == nil { 8631 return graphql.Null 8632 } 8633 res := resTmp.(*VOkCaseNil) 8634 fc.Result = res 8635 return ec.marshalOVOkCaseNil2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐVOkCaseNil(ctx, field.Selections, res) 8636 } 8637 8638 func (ec *executionContext) _Query_validType(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8639 defer func() { 8640 if r := recover(); r != nil { 8641 ec.Error(ctx, ec.Recover(ctx, r)) 8642 ret = graphql.Null 8643 } 8644 }() 8645 fc := &graphql.FieldContext{ 8646 Object: "Query", 8647 Field: field, 8648 Args: nil, 8649 IsMethod: true, 8650 IsResolver: true, 8651 } 8652 8653 ctx = graphql.WithFieldContext(ctx, fc) 8654 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8655 ctx = rctx // use context from middleware stack in children 8656 return ec.resolvers.Query().ValidType(rctx) 8657 }) 8658 8659 if resTmp == nil { 8660 return graphql.Null 8661 } 8662 res := resTmp.(*ValidType) 8663 fc.Result = res 8664 return ec.marshalOValidType2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐValidType(ctx, field.Selections, res) 8665 } 8666 8667 func (ec *executionContext) _Query_wrappedStruct(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8668 defer func() { 8669 if r := recover(); r != nil { 8670 ec.Error(ctx, ec.Recover(ctx, r)) 8671 ret = graphql.Null 8672 } 8673 }() 8674 fc := &graphql.FieldContext{ 8675 Object: "Query", 8676 Field: field, 8677 Args: nil, 8678 IsMethod: true, 8679 IsResolver: true, 8680 } 8681 8682 ctx = graphql.WithFieldContext(ctx, fc) 8683 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8684 ctx = rctx // use context from middleware stack in children 8685 return ec.resolvers.Query().WrappedStruct(rctx) 8686 }) 8687 8688 if resTmp == nil { 8689 if !graphql.HasFieldError(ctx, fc) { 8690 ec.Errorf(ctx, "must not be null") 8691 } 8692 return graphql.Null 8693 } 8694 res := resTmp.(*WrappedStruct) 8695 fc.Result = res 8696 return ec.marshalNWrappedStruct2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐWrappedStruct(ctx, field.Selections, res) 8697 } 8698 8699 func (ec *executionContext) _Query_wrappedScalar(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8700 defer func() { 8701 if r := recover(); r != nil { 8702 ec.Error(ctx, ec.Recover(ctx, r)) 8703 ret = graphql.Null 8704 } 8705 }() 8706 fc := &graphql.FieldContext{ 8707 Object: "Query", 8708 Field: field, 8709 Args: nil, 8710 IsMethod: true, 8711 IsResolver: true, 8712 } 8713 8714 ctx = graphql.WithFieldContext(ctx, fc) 8715 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8716 ctx = rctx // use context from middleware stack in children 8717 return ec.resolvers.Query().WrappedScalar(rctx) 8718 }) 8719 8720 if resTmp == nil { 8721 if !graphql.HasFieldError(ctx, fc) { 8722 ec.Errorf(ctx, "must not be null") 8723 } 8724 return graphql.Null 8725 } 8726 res := resTmp.(otherpkg.Scalar) 8727 fc.Result = res 8728 return ec.marshalNWrappedScalar2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚋotherpkgᚐScalar(ctx, field.Selections, res) 8729 } 8730 8731 func (ec *executionContext) _Query_wrappedMap(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8732 defer func() { 8733 if r := recover(); r != nil { 8734 ec.Error(ctx, ec.Recover(ctx, r)) 8735 ret = graphql.Null 8736 } 8737 }() 8738 fc := &graphql.FieldContext{ 8739 Object: "Query", 8740 Field: field, 8741 Args: nil, 8742 IsMethod: true, 8743 IsResolver: true, 8744 } 8745 8746 ctx = graphql.WithFieldContext(ctx, fc) 8747 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8748 ctx = rctx // use context from middleware stack in children 8749 return ec.resolvers.Query().WrappedMap(rctx) 8750 }) 8751 8752 if resTmp == nil { 8753 if !graphql.HasFieldError(ctx, fc) { 8754 ec.Errorf(ctx, "must not be null") 8755 } 8756 return graphql.Null 8757 } 8758 res := resTmp.(WrappedMap) 8759 fc.Result = res 8760 return ec.marshalNWrappedMap2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐWrappedMap(ctx, field.Selections, res) 8761 } 8762 8763 func (ec *executionContext) _Query_wrappedSlice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8764 defer func() { 8765 if r := recover(); r != nil { 8766 ec.Error(ctx, ec.Recover(ctx, r)) 8767 ret = graphql.Null 8768 } 8769 }() 8770 fc := &graphql.FieldContext{ 8771 Object: "Query", 8772 Field: field, 8773 Args: nil, 8774 IsMethod: true, 8775 IsResolver: true, 8776 } 8777 8778 ctx = graphql.WithFieldContext(ctx, fc) 8779 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8780 ctx = rctx // use context from middleware stack in children 8781 return ec.resolvers.Query().WrappedSlice(rctx) 8782 }) 8783 8784 if resTmp == nil { 8785 if !graphql.HasFieldError(ctx, fc) { 8786 ec.Errorf(ctx, "must not be null") 8787 } 8788 return graphql.Null 8789 } 8790 res := resTmp.(WrappedSlice) 8791 fc.Result = res 8792 return ec.marshalNWrappedSlice2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐWrappedSlice(ctx, field.Selections, res) 8793 } 8794 8795 func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8796 defer func() { 8797 if r := recover(); r != nil { 8798 ec.Error(ctx, ec.Recover(ctx, r)) 8799 ret = graphql.Null 8800 } 8801 }() 8802 fc := &graphql.FieldContext{ 8803 Object: "Query", 8804 Field: field, 8805 Args: nil, 8806 IsMethod: true, 8807 IsResolver: false, 8808 } 8809 8810 ctx = graphql.WithFieldContext(ctx, fc) 8811 rawArgs := field.ArgumentMap(ec.Variables) 8812 args, err := ec.field_Query___type_args(ctx, rawArgs) 8813 if err != nil { 8814 ec.Error(ctx, err) 8815 return graphql.Null 8816 } 8817 fc.Args = args 8818 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8819 ctx = rctx // use context from middleware stack in children 8820 return ec.introspectType(args["name"].(string)) 8821 }) 8822 8823 if resTmp == nil { 8824 return graphql.Null 8825 } 8826 res := resTmp.(*introspection.Type) 8827 fc.Result = res 8828 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 8829 } 8830 8831 func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8832 defer func() { 8833 if r := recover(); r != nil { 8834 ec.Error(ctx, ec.Recover(ctx, r)) 8835 ret = graphql.Null 8836 } 8837 }() 8838 fc := &graphql.FieldContext{ 8839 Object: "Query", 8840 Field: field, 8841 Args: nil, 8842 IsMethod: true, 8843 IsResolver: false, 8844 } 8845 8846 ctx = graphql.WithFieldContext(ctx, fc) 8847 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8848 ctx = rctx // use context from middleware stack in children 8849 return ec.introspectSchema() 8850 }) 8851 8852 if resTmp == nil { 8853 return graphql.Null 8854 } 8855 res := resTmp.(*introspection.Schema) 8856 fc.Result = res 8857 return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) 8858 } 8859 8860 func (ec *executionContext) _Rectangle_length(ctx context.Context, field graphql.CollectedField, obj *Rectangle) (ret graphql.Marshaler) { 8861 defer func() { 8862 if r := recover(); r != nil { 8863 ec.Error(ctx, ec.Recover(ctx, r)) 8864 ret = graphql.Null 8865 } 8866 }() 8867 fc := &graphql.FieldContext{ 8868 Object: "Rectangle", 8869 Field: field, 8870 Args: nil, 8871 IsMethod: false, 8872 IsResolver: false, 8873 } 8874 8875 ctx = graphql.WithFieldContext(ctx, fc) 8876 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 8877 ctx = rctx // use context from middleware stack in children 8878 return obj.Length, nil 8879 }) 8880 8881 if resTmp == nil { 8882 return graphql.Null 8883 } 8884 res := resTmp.(float64) 8885 fc.Result = res 8886 return ec.marshalOFloat2float64(ctx, field.Selections, res) 8887 } 8888 8889 func (ec *executionContext) _Rectangle_width(ctx context.Context, field graphql.CollectedField, obj *Rectangle) (ret graphql.Marshaler) { 8890 defer func() { 8891 if r := recover(); r != nil { 8892 ec.Error(ctx, ec.Recover(ctx, r)) 8893 ret = graphql.Null 8894 } 8895 }() 8896 fc := &graphql.FieldContext{ 8897 Object: "Rectangle", 8898 Field: field, 8899 Args: nil, 8900 IsMethod: false, 8901 IsResolver: false, 8902 } 8903 8904 ctx = graphql.WithFieldContext(ctx, fc) 8905 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 8906 ctx = rctx // use context from middleware stack in children 8907 return obj.Width, nil 8908 }) 8909 8910 if resTmp == nil { 8911 return graphql.Null 8912 } 8913 res := resTmp.(float64) 8914 fc.Result = res 8915 return ec.marshalOFloat2float64(ctx, field.Selections, res) 8916 } 8917 8918 func (ec *executionContext) _Rectangle_area(ctx context.Context, field graphql.CollectedField, obj *Rectangle) (ret graphql.Marshaler) { 8919 defer func() { 8920 if r := recover(); r != nil { 8921 ec.Error(ctx, ec.Recover(ctx, r)) 8922 ret = graphql.Null 8923 } 8924 }() 8925 fc := &graphql.FieldContext{ 8926 Object: "Rectangle", 8927 Field: field, 8928 Args: nil, 8929 IsMethod: true, 8930 IsResolver: false, 8931 } 8932 8933 ctx = graphql.WithFieldContext(ctx, fc) 8934 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 8935 ctx = rctx // use context from middleware stack in children 8936 return obj.Area(), nil 8937 }) 8938 8939 if resTmp == nil { 8940 return graphql.Null 8941 } 8942 res := resTmp.(float64) 8943 fc.Result = res 8944 return ec.marshalOFloat2float64(ctx, field.Selections, res) 8945 } 8946 8947 func (ec *executionContext) _Rectangle_coordinates(ctx context.Context, field graphql.CollectedField, obj *Rectangle) (ret graphql.Marshaler) { 8948 defer func() { 8949 if r := recover(); r != nil { 8950 ec.Error(ctx, ec.Recover(ctx, r)) 8951 ret = graphql.Null 8952 } 8953 }() 8954 fc := &graphql.FieldContext{ 8955 Object: "Rectangle", 8956 Field: field, 8957 Args: nil, 8958 IsMethod: false, 8959 IsResolver: false, 8960 } 8961 8962 ctx = graphql.WithFieldContext(ctx, fc) 8963 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 8964 ctx = rctx // use context from middleware stack in children 8965 return obj.Coordinates, nil 8966 }) 8967 8968 if resTmp == nil { 8969 return graphql.Null 8970 } 8971 res := resTmp.(Coordinates) 8972 fc.Result = res 8973 return ec.marshalOCoordinates2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCoordinates(ctx, field.Selections, res) 8974 } 8975 8976 func (ec *executionContext) _Slices_test1(ctx context.Context, field graphql.CollectedField, obj *Slices) (ret graphql.Marshaler) { 8977 defer func() { 8978 if r := recover(); r != nil { 8979 ec.Error(ctx, ec.Recover(ctx, r)) 8980 ret = graphql.Null 8981 } 8982 }() 8983 fc := &graphql.FieldContext{ 8984 Object: "Slices", 8985 Field: field, 8986 Args: nil, 8987 IsMethod: false, 8988 IsResolver: false, 8989 } 8990 8991 ctx = graphql.WithFieldContext(ctx, fc) 8992 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 8993 ctx = rctx // use context from middleware stack in children 8994 return obj.Test1, nil 8995 }) 8996 8997 if resTmp == nil { 8998 return graphql.Null 8999 } 9000 res := resTmp.([]*string) 9001 fc.Result = res 9002 return ec.marshalOString2ᚕᚖstring(ctx, field.Selections, res) 9003 } 9004 9005 func (ec *executionContext) _Slices_test2(ctx context.Context, field graphql.CollectedField, obj *Slices) (ret graphql.Marshaler) { 9006 defer func() { 9007 if r := recover(); r != nil { 9008 ec.Error(ctx, ec.Recover(ctx, r)) 9009 ret = graphql.Null 9010 } 9011 }() 9012 fc := &graphql.FieldContext{ 9013 Object: "Slices", 9014 Field: field, 9015 Args: nil, 9016 IsMethod: false, 9017 IsResolver: false, 9018 } 9019 9020 ctx = graphql.WithFieldContext(ctx, fc) 9021 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 9022 ctx = rctx // use context from middleware stack in children 9023 return obj.Test2, nil 9024 }) 9025 9026 if resTmp == nil { 9027 return graphql.Null 9028 } 9029 res := resTmp.([]string) 9030 fc.Result = res 9031 return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) 9032 } 9033 9034 func (ec *executionContext) _Slices_test3(ctx context.Context, field graphql.CollectedField, obj *Slices) (ret graphql.Marshaler) { 9035 defer func() { 9036 if r := recover(); r != nil { 9037 ec.Error(ctx, ec.Recover(ctx, r)) 9038 ret = graphql.Null 9039 } 9040 }() 9041 fc := &graphql.FieldContext{ 9042 Object: "Slices", 9043 Field: field, 9044 Args: nil, 9045 IsMethod: false, 9046 IsResolver: false, 9047 } 9048 9049 ctx = graphql.WithFieldContext(ctx, fc) 9050 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 9051 ctx = rctx // use context from middleware stack in children 9052 return obj.Test3, nil 9053 }) 9054 9055 if resTmp == nil { 9056 if !graphql.HasFieldError(ctx, fc) { 9057 ec.Errorf(ctx, "must not be null") 9058 } 9059 return graphql.Null 9060 } 9061 res := resTmp.([]*string) 9062 fc.Result = res 9063 return ec.marshalNString2ᚕᚖstring(ctx, field.Selections, res) 9064 } 9065 9066 func (ec *executionContext) _Slices_test4(ctx context.Context, field graphql.CollectedField, obj *Slices) (ret graphql.Marshaler) { 9067 defer func() { 9068 if r := recover(); r != nil { 9069 ec.Error(ctx, ec.Recover(ctx, r)) 9070 ret = graphql.Null 9071 } 9072 }() 9073 fc := &graphql.FieldContext{ 9074 Object: "Slices", 9075 Field: field, 9076 Args: nil, 9077 IsMethod: false, 9078 IsResolver: false, 9079 } 9080 9081 ctx = graphql.WithFieldContext(ctx, fc) 9082 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 9083 ctx = rctx // use context from middleware stack in children 9084 return obj.Test4, nil 9085 }) 9086 9087 if resTmp == nil { 9088 if !graphql.HasFieldError(ctx, fc) { 9089 ec.Errorf(ctx, "must not be null") 9090 } 9091 return graphql.Null 9092 } 9093 res := resTmp.([]string) 9094 fc.Result = res 9095 return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) 9096 } 9097 9098 func (ec *executionContext) _Subscription_updated(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { 9099 defer func() { 9100 if r := recover(); r != nil { 9101 ec.Error(ctx, ec.Recover(ctx, r)) 9102 ret = nil 9103 } 9104 }() 9105 fc := &graphql.FieldContext{ 9106 Object: "Subscription", 9107 Field: field, 9108 Args: nil, 9109 IsMethod: true, 9110 IsResolver: true, 9111 } 9112 9113 ctx = graphql.WithFieldContext(ctx, fc) 9114 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9115 ctx = rctx // use context from middleware stack in children 9116 return ec.resolvers.Subscription().Updated(rctx) 9117 }) 9118 9119 if resTmp == nil { 9120 if !graphql.HasFieldError(ctx, fc) { 9121 ec.Errorf(ctx, "must not be null") 9122 } 9123 return nil 9124 } 9125 return func() graphql.Marshaler { 9126 res, ok := <-resTmp.(<-chan string) 9127 if !ok { 9128 return nil 9129 } 9130 return graphql.WriterFunc(func(w io.Writer) { 9131 w.Write([]byte{'{'}) 9132 graphql.MarshalString(field.Alias).MarshalGQL(w) 9133 w.Write([]byte{':'}) 9134 ec.marshalNString2string(ctx, field.Selections, res).MarshalGQL(w) 9135 w.Write([]byte{'}'}) 9136 }) 9137 } 9138 } 9139 9140 func (ec *executionContext) _Subscription_initPayload(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { 9141 defer func() { 9142 if r := recover(); r != nil { 9143 ec.Error(ctx, ec.Recover(ctx, r)) 9144 ret = nil 9145 } 9146 }() 9147 fc := &graphql.FieldContext{ 9148 Object: "Subscription", 9149 Field: field, 9150 Args: nil, 9151 IsMethod: true, 9152 IsResolver: true, 9153 } 9154 9155 ctx = graphql.WithFieldContext(ctx, fc) 9156 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9157 ctx = rctx // use context from middleware stack in children 9158 return ec.resolvers.Subscription().InitPayload(rctx) 9159 }) 9160 9161 if resTmp == nil { 9162 if !graphql.HasFieldError(ctx, fc) { 9163 ec.Errorf(ctx, "must not be null") 9164 } 9165 return nil 9166 } 9167 return func() graphql.Marshaler { 9168 res, ok := <-resTmp.(<-chan string) 9169 if !ok { 9170 return nil 9171 } 9172 return graphql.WriterFunc(func(w io.Writer) { 9173 w.Write([]byte{'{'}) 9174 graphql.MarshalString(field.Alias).MarshalGQL(w) 9175 w.Write([]byte{':'}) 9176 ec.marshalNString2string(ctx, field.Selections, res).MarshalGQL(w) 9177 w.Write([]byte{'}'}) 9178 }) 9179 } 9180 } 9181 9182 func (ec *executionContext) _Subscription_directiveArg(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { 9183 defer func() { 9184 if r := recover(); r != nil { 9185 ec.Error(ctx, ec.Recover(ctx, r)) 9186 ret = nil 9187 } 9188 }() 9189 fc := &graphql.FieldContext{ 9190 Object: "Subscription", 9191 Field: field, 9192 Args: nil, 9193 IsMethod: true, 9194 IsResolver: true, 9195 } 9196 9197 ctx = graphql.WithFieldContext(ctx, fc) 9198 rawArgs := field.ArgumentMap(ec.Variables) 9199 args, err := ec.field_Subscription_directiveArg_args(ctx, rawArgs) 9200 if err != nil { 9201 ec.Error(ctx, err) 9202 return nil 9203 } 9204 fc.Args = args 9205 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9206 ctx = rctx // use context from middleware stack in children 9207 return ec.resolvers.Subscription().DirectiveArg(rctx, args["arg"].(string)) 9208 }) 9209 9210 if resTmp == nil { 9211 return nil 9212 } 9213 return func() graphql.Marshaler { 9214 res, ok := <-resTmp.(<-chan *string) 9215 if !ok { 9216 return nil 9217 } 9218 return graphql.WriterFunc(func(w io.Writer) { 9219 w.Write([]byte{'{'}) 9220 graphql.MarshalString(field.Alias).MarshalGQL(w) 9221 w.Write([]byte{':'}) 9222 ec.marshalOString2ᚖstring(ctx, field.Selections, res).MarshalGQL(w) 9223 w.Write([]byte{'}'}) 9224 }) 9225 } 9226 } 9227 9228 func (ec *executionContext) _Subscription_directiveNullableArg(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { 9229 defer func() { 9230 if r := recover(); r != nil { 9231 ec.Error(ctx, ec.Recover(ctx, r)) 9232 ret = nil 9233 } 9234 }() 9235 fc := &graphql.FieldContext{ 9236 Object: "Subscription", 9237 Field: field, 9238 Args: nil, 9239 IsMethod: true, 9240 IsResolver: true, 9241 } 9242 9243 ctx = graphql.WithFieldContext(ctx, fc) 9244 rawArgs := field.ArgumentMap(ec.Variables) 9245 args, err := ec.field_Subscription_directiveNullableArg_args(ctx, rawArgs) 9246 if err != nil { 9247 ec.Error(ctx, err) 9248 return nil 9249 } 9250 fc.Args = args 9251 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9252 ctx = rctx // use context from middleware stack in children 9253 return ec.resolvers.Subscription().DirectiveNullableArg(rctx, args["arg"].(*int), args["arg2"].(*int), args["arg3"].(*string)) 9254 }) 9255 9256 if resTmp == nil { 9257 return nil 9258 } 9259 return func() graphql.Marshaler { 9260 res, ok := <-resTmp.(<-chan *string) 9261 if !ok { 9262 return nil 9263 } 9264 return graphql.WriterFunc(func(w io.Writer) { 9265 w.Write([]byte{'{'}) 9266 graphql.MarshalString(field.Alias).MarshalGQL(w) 9267 w.Write([]byte{':'}) 9268 ec.marshalOString2ᚖstring(ctx, field.Selections, res).MarshalGQL(w) 9269 w.Write([]byte{'}'}) 9270 }) 9271 } 9272 } 9273 9274 func (ec *executionContext) _Subscription_directiveDouble(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { 9275 defer func() { 9276 if r := recover(); r != nil { 9277 ec.Error(ctx, ec.Recover(ctx, r)) 9278 ret = nil 9279 } 9280 }() 9281 fc := &graphql.FieldContext{ 9282 Object: "Subscription", 9283 Field: field, 9284 Args: nil, 9285 IsMethod: true, 9286 IsResolver: true, 9287 } 9288 9289 ctx = graphql.WithFieldContext(ctx, fc) 9290 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9291 directive0 := func(rctx context.Context) (interface{}, error) { 9292 ctx = rctx // use context from middleware stack in children 9293 return ec.resolvers.Subscription().DirectiveDouble(rctx) 9294 } 9295 directive1 := func(ctx context.Context) (interface{}, error) { 9296 if ec.directives.Directive1 == nil { 9297 return nil, errors.New("directive directive1 is not implemented") 9298 } 9299 return ec.directives.Directive1(ctx, nil, directive0) 9300 } 9301 directive2 := func(ctx context.Context) (interface{}, error) { 9302 if ec.directives.Directive2 == nil { 9303 return nil, errors.New("directive directive2 is not implemented") 9304 } 9305 return ec.directives.Directive2(ctx, nil, directive1) 9306 } 9307 9308 tmp, err := directive2(rctx) 9309 if err != nil { 9310 return nil, graphql.ErrorOnPath(ctx, err) 9311 } 9312 if tmp == nil { 9313 return nil, nil 9314 } 9315 if data, ok := tmp.(<-chan *string); ok { 9316 return data, nil 9317 } 9318 return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *string`, tmp) 9319 }) 9320 9321 if resTmp == nil { 9322 return nil 9323 } 9324 return func() graphql.Marshaler { 9325 res, ok := <-resTmp.(<-chan *string) 9326 if !ok { 9327 return nil 9328 } 9329 return graphql.WriterFunc(func(w io.Writer) { 9330 w.Write([]byte{'{'}) 9331 graphql.MarshalString(field.Alias).MarshalGQL(w) 9332 w.Write([]byte{':'}) 9333 ec.marshalOString2ᚖstring(ctx, field.Selections, res).MarshalGQL(w) 9334 w.Write([]byte{'}'}) 9335 }) 9336 } 9337 } 9338 9339 func (ec *executionContext) _Subscription_directiveUnimplemented(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { 9340 defer func() { 9341 if r := recover(); r != nil { 9342 ec.Error(ctx, ec.Recover(ctx, r)) 9343 ret = nil 9344 } 9345 }() 9346 fc := &graphql.FieldContext{ 9347 Object: "Subscription", 9348 Field: field, 9349 Args: nil, 9350 IsMethod: true, 9351 IsResolver: true, 9352 } 9353 9354 ctx = graphql.WithFieldContext(ctx, fc) 9355 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9356 directive0 := func(rctx context.Context) (interface{}, error) { 9357 ctx = rctx // use context from middleware stack in children 9358 return ec.resolvers.Subscription().DirectiveUnimplemented(rctx) 9359 } 9360 directive1 := func(ctx context.Context) (interface{}, error) { 9361 if ec.directives.Unimplemented == nil { 9362 return nil, errors.New("directive unimplemented is not implemented") 9363 } 9364 return ec.directives.Unimplemented(ctx, nil, directive0) 9365 } 9366 9367 tmp, err := directive1(rctx) 9368 if err != nil { 9369 return nil, graphql.ErrorOnPath(ctx, err) 9370 } 9371 if tmp == nil { 9372 return nil, nil 9373 } 9374 if data, ok := tmp.(<-chan *string); ok { 9375 return data, nil 9376 } 9377 return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *string`, tmp) 9378 }) 9379 9380 if resTmp == nil { 9381 return nil 9382 } 9383 return func() graphql.Marshaler { 9384 res, ok := <-resTmp.(<-chan *string) 9385 if !ok { 9386 return nil 9387 } 9388 return graphql.WriterFunc(func(w io.Writer) { 9389 w.Write([]byte{'{'}) 9390 graphql.MarshalString(field.Alias).MarshalGQL(w) 9391 w.Write([]byte{':'}) 9392 ec.marshalOString2ᚖstring(ctx, field.Selections, res).MarshalGQL(w) 9393 w.Write([]byte{'}'}) 9394 }) 9395 } 9396 } 9397 9398 func (ec *executionContext) _Subscription_issue896b(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { 9399 defer func() { 9400 if r := recover(); r != nil { 9401 ec.Error(ctx, ec.Recover(ctx, r)) 9402 ret = nil 9403 } 9404 }() 9405 fc := &graphql.FieldContext{ 9406 Object: "Subscription", 9407 Field: field, 9408 Args: nil, 9409 IsMethod: true, 9410 IsResolver: true, 9411 } 9412 9413 ctx = graphql.WithFieldContext(ctx, fc) 9414 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9415 ctx = rctx // use context from middleware stack in children 9416 return ec.resolvers.Subscription().Issue896b(rctx) 9417 }) 9418 9419 if resTmp == nil { 9420 return nil 9421 } 9422 return func() graphql.Marshaler { 9423 res, ok := <-resTmp.(<-chan []*CheckIssue896) 9424 if !ok { 9425 return nil 9426 } 9427 return graphql.WriterFunc(func(w io.Writer) { 9428 w.Write([]byte{'{'}) 9429 graphql.MarshalString(field.Alias).MarshalGQL(w) 9430 w.Write([]byte{':'}) 9431 ec.marshalOCheckIssue8962ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896(ctx, field.Selections, res).MarshalGQL(w) 9432 w.Write([]byte{'}'}) 9433 }) 9434 } 9435 } 9436 9437 func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { 9438 defer func() { 9439 if r := recover(); r != nil { 9440 ec.Error(ctx, ec.Recover(ctx, r)) 9441 ret = graphql.Null 9442 } 9443 }() 9444 fc := &graphql.FieldContext{ 9445 Object: "User", 9446 Field: field, 9447 Args: nil, 9448 IsMethod: false, 9449 IsResolver: false, 9450 } 9451 9452 ctx = graphql.WithFieldContext(ctx, fc) 9453 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 9454 ctx = rctx // use context from middleware stack in children 9455 return obj.ID, nil 9456 }) 9457 9458 if resTmp == nil { 9459 if !graphql.HasFieldError(ctx, fc) { 9460 ec.Errorf(ctx, "must not be null") 9461 } 9462 return graphql.Null 9463 } 9464 res := resTmp.(int) 9465 fc.Result = res 9466 return ec.marshalNInt2int(ctx, field.Selections, res) 9467 } 9468 9469 func (ec *executionContext) _User_friends(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { 9470 defer func() { 9471 if r := recover(); r != nil { 9472 ec.Error(ctx, ec.Recover(ctx, r)) 9473 ret = graphql.Null 9474 } 9475 }() 9476 fc := &graphql.FieldContext{ 9477 Object: "User", 9478 Field: field, 9479 Args: nil, 9480 IsMethod: true, 9481 IsResolver: true, 9482 } 9483 9484 ctx = graphql.WithFieldContext(ctx, fc) 9485 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 9486 ctx = rctx // use context from middleware stack in children 9487 return ec.resolvers.User().Friends(rctx, obj) 9488 }) 9489 9490 if resTmp == nil { 9491 if !graphql.HasFieldError(ctx, fc) { 9492 ec.Errorf(ctx, "must not be null") 9493 } 9494 return graphql.Null 9495 } 9496 res := resTmp.([]*User) 9497 fc.Result = res 9498 return ec.marshalNUser2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUserᚄ(ctx, field.Selections, res) 9499 } 9500 9501 func (ec *executionContext) _User_created(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { 9502 defer func() { 9503 if r := recover(); r != nil { 9504 ec.Error(ctx, ec.Recover(ctx, r)) 9505 ret = graphql.Null 9506 } 9507 }() 9508 fc := &graphql.FieldContext{ 9509 Object: "User", 9510 Field: field, 9511 Args: nil, 9512 IsMethod: false, 9513 IsResolver: false, 9514 } 9515 9516 ctx = graphql.WithFieldContext(ctx, fc) 9517 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 9518 ctx = rctx // use context from middleware stack in children 9519 return obj.Created, nil 9520 }) 9521 9522 if resTmp == nil { 9523 if !graphql.HasFieldError(ctx, fc) { 9524 ec.Errorf(ctx, "must not be null") 9525 } 9526 return graphql.Null 9527 } 9528 res := resTmp.(time.Time) 9529 fc.Result = res 9530 return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) 9531 } 9532 9533 func (ec *executionContext) _User_updated(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { 9534 defer func() { 9535 if r := recover(); r != nil { 9536 ec.Error(ctx, ec.Recover(ctx, r)) 9537 ret = graphql.Null 9538 } 9539 }() 9540 fc := &graphql.FieldContext{ 9541 Object: "User", 9542 Field: field, 9543 Args: nil, 9544 IsMethod: false, 9545 IsResolver: false, 9546 } 9547 9548 ctx = graphql.WithFieldContext(ctx, fc) 9549 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 9550 ctx = rctx // use context from middleware stack in children 9551 return obj.Updated, nil 9552 }) 9553 9554 if resTmp == nil { 9555 return graphql.Null 9556 } 9557 res := resTmp.(*time.Time) 9558 fc.Result = res 9559 return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res) 9560 } 9561 9562 func (ec *executionContext) _VOkCaseNil_value(ctx context.Context, field graphql.CollectedField, obj *VOkCaseNil) (ret graphql.Marshaler) { 9563 defer func() { 9564 if r := recover(); r != nil { 9565 ec.Error(ctx, ec.Recover(ctx, r)) 9566 ret = graphql.Null 9567 } 9568 }() 9569 fc := &graphql.FieldContext{ 9570 Object: "VOkCaseNil", 9571 Field: field, 9572 Args: nil, 9573 IsMethod: true, 9574 IsResolver: false, 9575 } 9576 9577 ctx = graphql.WithFieldContext(ctx, fc) 9578 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 9579 ctx = rctx // use context from middleware stack in children 9580 v, ok := obj.Value() 9581 if !ok { 9582 return nil, nil 9583 } 9584 return v, nil 9585 }) 9586 9587 if resTmp == nil { 9588 return graphql.Null 9589 } 9590 res := resTmp.(string) 9591 fc.Result = res 9592 return ec.marshalOString2string(ctx, field.Selections, res) 9593 } 9594 9595 func (ec *executionContext) _VOkCaseValue_value(ctx context.Context, field graphql.CollectedField, obj *VOkCaseValue) (ret graphql.Marshaler) { 9596 defer func() { 9597 if r := recover(); r != nil { 9598 ec.Error(ctx, ec.Recover(ctx, r)) 9599 ret = graphql.Null 9600 } 9601 }() 9602 fc := &graphql.FieldContext{ 9603 Object: "VOkCaseValue", 9604 Field: field, 9605 Args: nil, 9606 IsMethod: true, 9607 IsResolver: false, 9608 } 9609 9610 ctx = graphql.WithFieldContext(ctx, fc) 9611 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 9612 ctx = rctx // use context from middleware stack in children 9613 v, ok := obj.Value() 9614 if !ok { 9615 return nil, nil 9616 } 9617 return v, nil 9618 }) 9619 9620 if resTmp == nil { 9621 return graphql.Null 9622 } 9623 res := resTmp.(string) 9624 fc.Result = res 9625 return ec.marshalOString2string(ctx, field.Selections, res) 9626 } 9627 9628 func (ec *executionContext) _ValidType_differentCase(ctx context.Context, field graphql.CollectedField, obj *ValidType) (ret graphql.Marshaler) { 9629 defer func() { 9630 if r := recover(); r != nil { 9631 ec.Error(ctx, ec.Recover(ctx, r)) 9632 ret = graphql.Null 9633 } 9634 }() 9635 fc := &graphql.FieldContext{ 9636 Object: "ValidType", 9637 Field: field, 9638 Args: nil, 9639 IsMethod: false, 9640 IsResolver: false, 9641 } 9642 9643 ctx = graphql.WithFieldContext(ctx, fc) 9644 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 9645 ctx = rctx // use context from middleware stack in children 9646 return obj.DifferentCase, nil 9647 }) 9648 9649 if resTmp == nil { 9650 if !graphql.HasFieldError(ctx, fc) { 9651 ec.Errorf(ctx, "must not be null") 9652 } 9653 return graphql.Null 9654 } 9655 res := resTmp.(string) 9656 fc.Result = res 9657 return ec.marshalNString2string(ctx, field.Selections, res) 9658 } 9659 9660 func (ec *executionContext) _ValidType_different_case(ctx context.Context, field graphql.CollectedField, obj *ValidType) (ret graphql.Marshaler) { 9661 defer func() { 9662 if r := recover(); r != nil { 9663 ec.Error(ctx, ec.Recover(ctx, r)) 9664 ret = graphql.Null 9665 } 9666 }() 9667 fc := &graphql.FieldContext{ 9668 Object: "ValidType", 9669 Field: field, 9670 Args: nil, 9671 IsMethod: false, 9672 IsResolver: false, 9673 } 9674 9675 ctx = graphql.WithFieldContext(ctx, fc) 9676 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 9677 ctx = rctx // use context from middleware stack in children 9678 return obj.DifferentCaseOld, nil 9679 }) 9680 9681 if resTmp == nil { 9682 if !graphql.HasFieldError(ctx, fc) { 9683 ec.Errorf(ctx, "must not be null") 9684 } 9685 return graphql.Null 9686 } 9687 res := resTmp.(string) 9688 fc.Result = res 9689 return ec.marshalNString2string(ctx, field.Selections, res) 9690 } 9691 9692 func (ec *executionContext) _ValidType_validInputKeywords(ctx context.Context, field graphql.CollectedField, obj *ValidType) (ret graphql.Marshaler) { 9693 defer func() { 9694 if r := recover(); r != nil { 9695 ec.Error(ctx, ec.Recover(ctx, r)) 9696 ret = graphql.Null 9697 } 9698 }() 9699 fc := &graphql.FieldContext{ 9700 Object: "ValidType", 9701 Field: field, 9702 Args: nil, 9703 IsMethod: false, 9704 IsResolver: false, 9705 } 9706 9707 ctx = graphql.WithFieldContext(ctx, fc) 9708 rawArgs := field.ArgumentMap(ec.Variables) 9709 args, err := ec.field_ValidType_validInputKeywords_args(ctx, rawArgs) 9710 if err != nil { 9711 ec.Error(ctx, err) 9712 return graphql.Null 9713 } 9714 fc.Args = args 9715 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 9716 ctx = rctx // use context from middleware stack in children 9717 return obj.ValidInputKeywords, nil 9718 }) 9719 9720 if resTmp == nil { 9721 if !graphql.HasFieldError(ctx, fc) { 9722 ec.Errorf(ctx, "must not be null") 9723 } 9724 return graphql.Null 9725 } 9726 res := resTmp.(bool) 9727 fc.Result = res 9728 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 9729 } 9730 9731 func (ec *executionContext) _ValidType_validArgs(ctx context.Context, field graphql.CollectedField, obj *ValidType) (ret graphql.Marshaler) { 9732 defer func() { 9733 if r := recover(); r != nil { 9734 ec.Error(ctx, ec.Recover(ctx, r)) 9735 ret = graphql.Null 9736 } 9737 }() 9738 fc := &graphql.FieldContext{ 9739 Object: "ValidType", 9740 Field: field, 9741 Args: nil, 9742 IsMethod: false, 9743 IsResolver: false, 9744 } 9745 9746 ctx = graphql.WithFieldContext(ctx, fc) 9747 rawArgs := field.ArgumentMap(ec.Variables) 9748 args, err := ec.field_ValidType_validArgs_args(ctx, rawArgs) 9749 if err != nil { 9750 ec.Error(ctx, err) 9751 return graphql.Null 9752 } 9753 fc.Args = args 9754 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 9755 ctx = rctx // use context from middleware stack in children 9756 return obj.ValidArgs, nil 9757 }) 9758 9759 if resTmp == nil { 9760 if !graphql.HasFieldError(ctx, fc) { 9761 ec.Errorf(ctx, "must not be null") 9762 } 9763 return graphql.Null 9764 } 9765 res := resTmp.(bool) 9766 fc.Result = res 9767 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 9768 } 9769 9770 func (ec *executionContext) _WrappedMap_get(ctx context.Context, field graphql.CollectedField, obj WrappedMap) (ret graphql.Marshaler) { 9771 defer func() { 9772 if r := recover(); r != nil { 9773 ec.Error(ctx, ec.Recover(ctx, r)) 9774 ret = graphql.Null 9775 } 9776 }() 9777 fc := &graphql.FieldContext{ 9778 Object: "WrappedMap", 9779 Field: field, 9780 Args: nil, 9781 IsMethod: true, 9782 IsResolver: true, 9783 } 9784 9785 ctx = graphql.WithFieldContext(ctx, fc) 9786 rawArgs := field.ArgumentMap(ec.Variables) 9787 args, err := ec.field_WrappedMap_get_args(ctx, rawArgs) 9788 if err != nil { 9789 ec.Error(ctx, err) 9790 return graphql.Null 9791 } 9792 fc.Args = args 9793 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 9794 ctx = rctx // use context from middleware stack in children 9795 return ec.resolvers.WrappedMap().Get(rctx, obj, args["key"].(string)) 9796 }) 9797 9798 if resTmp == nil { 9799 if !graphql.HasFieldError(ctx, fc) { 9800 ec.Errorf(ctx, "must not be null") 9801 } 9802 return graphql.Null 9803 } 9804 res := resTmp.(string) 9805 fc.Result = res 9806 return ec.marshalNString2string(ctx, field.Selections, res) 9807 } 9808 9809 func (ec *executionContext) _WrappedSlice_get(ctx context.Context, field graphql.CollectedField, obj WrappedSlice) (ret graphql.Marshaler) { 9810 defer func() { 9811 if r := recover(); r != nil { 9812 ec.Error(ctx, ec.Recover(ctx, r)) 9813 ret = graphql.Null 9814 } 9815 }() 9816 fc := &graphql.FieldContext{ 9817 Object: "WrappedSlice", 9818 Field: field, 9819 Args: nil, 9820 IsMethod: true, 9821 IsResolver: true, 9822 } 9823 9824 ctx = graphql.WithFieldContext(ctx, fc) 9825 rawArgs := field.ArgumentMap(ec.Variables) 9826 args, err := ec.field_WrappedSlice_get_args(ctx, rawArgs) 9827 if err != nil { 9828 ec.Error(ctx, err) 9829 return graphql.Null 9830 } 9831 fc.Args = args 9832 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 9833 ctx = rctx // use context from middleware stack in children 9834 return ec.resolvers.WrappedSlice().Get(rctx, obj, args["idx"].(int)) 9835 }) 9836 9837 if resTmp == nil { 9838 if !graphql.HasFieldError(ctx, fc) { 9839 ec.Errorf(ctx, "must not be null") 9840 } 9841 return graphql.Null 9842 } 9843 res := resTmp.(string) 9844 fc.Result = res 9845 return ec.marshalNString2string(ctx, field.Selections, res) 9846 } 9847 9848 func (ec *executionContext) _WrappedStruct_name(ctx context.Context, field graphql.CollectedField, obj *WrappedStruct) (ret graphql.Marshaler) { 9849 defer func() { 9850 if r := recover(); r != nil { 9851 ec.Error(ctx, ec.Recover(ctx, r)) 9852 ret = graphql.Null 9853 } 9854 }() 9855 fc := &graphql.FieldContext{ 9856 Object: "WrappedStruct", 9857 Field: field, 9858 Args: nil, 9859 IsMethod: false, 9860 IsResolver: false, 9861 } 9862 9863 ctx = graphql.WithFieldContext(ctx, fc) 9864 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 9865 ctx = rctx // use context from middleware stack in children 9866 return obj.Name, nil 9867 }) 9868 9869 if resTmp == nil { 9870 if !graphql.HasFieldError(ctx, fc) { 9871 ec.Errorf(ctx, "must not be null") 9872 } 9873 return graphql.Null 9874 } 9875 res := resTmp.(otherpkg.Scalar) 9876 fc.Result = res 9877 return ec.marshalNWrappedScalar2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚋotherpkgᚐScalar(ctx, field.Selections, res) 9878 } 9879 9880 func (ec *executionContext) _WrappedStruct_desc(ctx context.Context, field graphql.CollectedField, obj *WrappedStruct) (ret graphql.Marshaler) { 9881 defer func() { 9882 if r := recover(); r != nil { 9883 ec.Error(ctx, ec.Recover(ctx, r)) 9884 ret = graphql.Null 9885 } 9886 }() 9887 fc := &graphql.FieldContext{ 9888 Object: "WrappedStruct", 9889 Field: field, 9890 Args: nil, 9891 IsMethod: false, 9892 IsResolver: false, 9893 } 9894 9895 ctx = graphql.WithFieldContext(ctx, fc) 9896 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 9897 ctx = rctx // use context from middleware stack in children 9898 return obj.Desc, nil 9899 }) 9900 9901 if resTmp == nil { 9902 return graphql.Null 9903 } 9904 res := resTmp.(*otherpkg.Scalar) 9905 fc.Result = res 9906 return ec.marshalOWrappedScalar2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚋotherpkgᚐScalar(ctx, field.Selections, res) 9907 } 9908 9909 func (ec *executionContext) _XXIt_id(ctx context.Context, field graphql.CollectedField, obj *XXIt) (ret graphql.Marshaler) { 9910 defer func() { 9911 if r := recover(); r != nil { 9912 ec.Error(ctx, ec.Recover(ctx, r)) 9913 ret = graphql.Null 9914 } 9915 }() 9916 fc := &graphql.FieldContext{ 9917 Object: "XXIt", 9918 Field: field, 9919 Args: nil, 9920 IsMethod: false, 9921 IsResolver: false, 9922 } 9923 9924 ctx = graphql.WithFieldContext(ctx, fc) 9925 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 9926 ctx = rctx // use context from middleware stack in children 9927 return obj.ID, nil 9928 }) 9929 9930 if resTmp == nil { 9931 if !graphql.HasFieldError(ctx, fc) { 9932 ec.Errorf(ctx, "must not be null") 9933 } 9934 return graphql.Null 9935 } 9936 res := resTmp.(string) 9937 fc.Result = res 9938 return ec.marshalNID2string(ctx, field.Selections, res) 9939 } 9940 9941 func (ec *executionContext) _XxIt_id(ctx context.Context, field graphql.CollectedField, obj *XxIt) (ret graphql.Marshaler) { 9942 defer func() { 9943 if r := recover(); r != nil { 9944 ec.Error(ctx, ec.Recover(ctx, r)) 9945 ret = graphql.Null 9946 } 9947 }() 9948 fc := &graphql.FieldContext{ 9949 Object: "XxIt", 9950 Field: field, 9951 Args: nil, 9952 IsMethod: false, 9953 IsResolver: false, 9954 } 9955 9956 ctx = graphql.WithFieldContext(ctx, fc) 9957 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 9958 ctx = rctx // use context from middleware stack in children 9959 return obj.ID, nil 9960 }) 9961 9962 if resTmp == nil { 9963 if !graphql.HasFieldError(ctx, fc) { 9964 ec.Errorf(ctx, "must not be null") 9965 } 9966 return graphql.Null 9967 } 9968 res := resTmp.(string) 9969 fc.Result = res 9970 return ec.marshalNID2string(ctx, field.Selections, res) 9971 } 9972 9973 func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 9974 defer func() { 9975 if r := recover(); r != nil { 9976 ec.Error(ctx, ec.Recover(ctx, r)) 9977 ret = graphql.Null 9978 } 9979 }() 9980 fc := &graphql.FieldContext{ 9981 Object: "__Directive", 9982 Field: field, 9983 Args: nil, 9984 IsMethod: false, 9985 IsResolver: false, 9986 } 9987 9988 ctx = graphql.WithFieldContext(ctx, fc) 9989 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 9990 ctx = rctx // use context from middleware stack in children 9991 return obj.Name, nil 9992 }) 9993 9994 if resTmp == nil { 9995 if !graphql.HasFieldError(ctx, fc) { 9996 ec.Errorf(ctx, "must not be null") 9997 } 9998 return graphql.Null 9999 } 10000 res := resTmp.(string) 10001 fc.Result = res 10002 return ec.marshalNString2string(ctx, field.Selections, res) 10003 } 10004 10005 func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 10006 defer func() { 10007 if r := recover(); r != nil { 10008 ec.Error(ctx, ec.Recover(ctx, r)) 10009 ret = graphql.Null 10010 } 10011 }() 10012 fc := &graphql.FieldContext{ 10013 Object: "__Directive", 10014 Field: field, 10015 Args: nil, 10016 IsMethod: false, 10017 IsResolver: false, 10018 } 10019 10020 ctx = graphql.WithFieldContext(ctx, fc) 10021 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10022 ctx = rctx // use context from middleware stack in children 10023 return obj.Description, nil 10024 }) 10025 10026 if resTmp == nil { 10027 return graphql.Null 10028 } 10029 res := resTmp.(string) 10030 fc.Result = res 10031 return ec.marshalOString2string(ctx, field.Selections, res) 10032 } 10033 10034 func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 10035 defer func() { 10036 if r := recover(); r != nil { 10037 ec.Error(ctx, ec.Recover(ctx, r)) 10038 ret = graphql.Null 10039 } 10040 }() 10041 fc := &graphql.FieldContext{ 10042 Object: "__Directive", 10043 Field: field, 10044 Args: nil, 10045 IsMethod: false, 10046 IsResolver: false, 10047 } 10048 10049 ctx = graphql.WithFieldContext(ctx, fc) 10050 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10051 ctx = rctx // use context from middleware stack in children 10052 return obj.Locations, nil 10053 }) 10054 10055 if resTmp == nil { 10056 if !graphql.HasFieldError(ctx, fc) { 10057 ec.Errorf(ctx, "must not be null") 10058 } 10059 return graphql.Null 10060 } 10061 res := resTmp.([]string) 10062 fc.Result = res 10063 return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) 10064 } 10065 10066 func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 10067 defer func() { 10068 if r := recover(); r != nil { 10069 ec.Error(ctx, ec.Recover(ctx, r)) 10070 ret = graphql.Null 10071 } 10072 }() 10073 fc := &graphql.FieldContext{ 10074 Object: "__Directive", 10075 Field: field, 10076 Args: nil, 10077 IsMethod: false, 10078 IsResolver: false, 10079 } 10080 10081 ctx = graphql.WithFieldContext(ctx, fc) 10082 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10083 ctx = rctx // use context from middleware stack in children 10084 return obj.Args, nil 10085 }) 10086 10087 if resTmp == nil { 10088 if !graphql.HasFieldError(ctx, fc) { 10089 ec.Errorf(ctx, "must not be null") 10090 } 10091 return graphql.Null 10092 } 10093 res := resTmp.([]introspection.InputValue) 10094 fc.Result = res 10095 return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 10096 } 10097 10098 func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 10099 defer func() { 10100 if r := recover(); r != nil { 10101 ec.Error(ctx, ec.Recover(ctx, r)) 10102 ret = graphql.Null 10103 } 10104 }() 10105 fc := &graphql.FieldContext{ 10106 Object: "__Directive", 10107 Field: field, 10108 Args: nil, 10109 IsMethod: false, 10110 IsResolver: false, 10111 } 10112 10113 ctx = graphql.WithFieldContext(ctx, fc) 10114 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10115 ctx = rctx // use context from middleware stack in children 10116 return obj.IsRepeatable, nil 10117 }) 10118 10119 if resTmp == nil { 10120 if !graphql.HasFieldError(ctx, fc) { 10121 ec.Errorf(ctx, "must not be null") 10122 } 10123 return graphql.Null 10124 } 10125 res := resTmp.(bool) 10126 fc.Result = res 10127 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 10128 } 10129 10130 func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 10131 defer func() { 10132 if r := recover(); r != nil { 10133 ec.Error(ctx, ec.Recover(ctx, r)) 10134 ret = graphql.Null 10135 } 10136 }() 10137 fc := &graphql.FieldContext{ 10138 Object: "__EnumValue", 10139 Field: field, 10140 Args: nil, 10141 IsMethod: false, 10142 IsResolver: false, 10143 } 10144 10145 ctx = graphql.WithFieldContext(ctx, fc) 10146 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10147 ctx = rctx // use context from middleware stack in children 10148 return obj.Name, nil 10149 }) 10150 10151 if resTmp == nil { 10152 if !graphql.HasFieldError(ctx, fc) { 10153 ec.Errorf(ctx, "must not be null") 10154 } 10155 return graphql.Null 10156 } 10157 res := resTmp.(string) 10158 fc.Result = res 10159 return ec.marshalNString2string(ctx, field.Selections, res) 10160 } 10161 10162 func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 10163 defer func() { 10164 if r := recover(); r != nil { 10165 ec.Error(ctx, ec.Recover(ctx, r)) 10166 ret = graphql.Null 10167 } 10168 }() 10169 fc := &graphql.FieldContext{ 10170 Object: "__EnumValue", 10171 Field: field, 10172 Args: nil, 10173 IsMethod: false, 10174 IsResolver: false, 10175 } 10176 10177 ctx = graphql.WithFieldContext(ctx, fc) 10178 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10179 ctx = rctx // use context from middleware stack in children 10180 return obj.Description, nil 10181 }) 10182 10183 if resTmp == nil { 10184 return graphql.Null 10185 } 10186 res := resTmp.(string) 10187 fc.Result = res 10188 return ec.marshalOString2string(ctx, field.Selections, res) 10189 } 10190 10191 func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 10192 defer func() { 10193 if r := recover(); r != nil { 10194 ec.Error(ctx, ec.Recover(ctx, r)) 10195 ret = graphql.Null 10196 } 10197 }() 10198 fc := &graphql.FieldContext{ 10199 Object: "__EnumValue", 10200 Field: field, 10201 Args: nil, 10202 IsMethod: true, 10203 IsResolver: false, 10204 } 10205 10206 ctx = graphql.WithFieldContext(ctx, fc) 10207 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10208 ctx = rctx // use context from middleware stack in children 10209 return obj.IsDeprecated(), nil 10210 }) 10211 10212 if resTmp == nil { 10213 if !graphql.HasFieldError(ctx, fc) { 10214 ec.Errorf(ctx, "must not be null") 10215 } 10216 return graphql.Null 10217 } 10218 res := resTmp.(bool) 10219 fc.Result = res 10220 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 10221 } 10222 10223 func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 10224 defer func() { 10225 if r := recover(); r != nil { 10226 ec.Error(ctx, ec.Recover(ctx, r)) 10227 ret = graphql.Null 10228 } 10229 }() 10230 fc := &graphql.FieldContext{ 10231 Object: "__EnumValue", 10232 Field: field, 10233 Args: nil, 10234 IsMethod: true, 10235 IsResolver: false, 10236 } 10237 10238 ctx = graphql.WithFieldContext(ctx, fc) 10239 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10240 ctx = rctx // use context from middleware stack in children 10241 return obj.DeprecationReason(), nil 10242 }) 10243 10244 if resTmp == nil { 10245 return graphql.Null 10246 } 10247 res := resTmp.(*string) 10248 fc.Result = res 10249 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 10250 } 10251 10252 func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 10253 defer func() { 10254 if r := recover(); r != nil { 10255 ec.Error(ctx, ec.Recover(ctx, r)) 10256 ret = graphql.Null 10257 } 10258 }() 10259 fc := &graphql.FieldContext{ 10260 Object: "__Field", 10261 Field: field, 10262 Args: nil, 10263 IsMethod: false, 10264 IsResolver: false, 10265 } 10266 10267 ctx = graphql.WithFieldContext(ctx, fc) 10268 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10269 ctx = rctx // use context from middleware stack in children 10270 return obj.Name, nil 10271 }) 10272 10273 if resTmp == nil { 10274 if !graphql.HasFieldError(ctx, fc) { 10275 ec.Errorf(ctx, "must not be null") 10276 } 10277 return graphql.Null 10278 } 10279 res := resTmp.(string) 10280 fc.Result = res 10281 return ec.marshalNString2string(ctx, field.Selections, res) 10282 } 10283 10284 func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 10285 defer func() { 10286 if r := recover(); r != nil { 10287 ec.Error(ctx, ec.Recover(ctx, r)) 10288 ret = graphql.Null 10289 } 10290 }() 10291 fc := &graphql.FieldContext{ 10292 Object: "__Field", 10293 Field: field, 10294 Args: nil, 10295 IsMethod: false, 10296 IsResolver: false, 10297 } 10298 10299 ctx = graphql.WithFieldContext(ctx, fc) 10300 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10301 ctx = rctx // use context from middleware stack in children 10302 return obj.Description, nil 10303 }) 10304 10305 if resTmp == nil { 10306 return graphql.Null 10307 } 10308 res := resTmp.(string) 10309 fc.Result = res 10310 return ec.marshalOString2string(ctx, field.Selections, res) 10311 } 10312 10313 func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 10314 defer func() { 10315 if r := recover(); r != nil { 10316 ec.Error(ctx, ec.Recover(ctx, r)) 10317 ret = graphql.Null 10318 } 10319 }() 10320 fc := &graphql.FieldContext{ 10321 Object: "__Field", 10322 Field: field, 10323 Args: nil, 10324 IsMethod: false, 10325 IsResolver: false, 10326 } 10327 10328 ctx = graphql.WithFieldContext(ctx, fc) 10329 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10330 ctx = rctx // use context from middleware stack in children 10331 return obj.Args, nil 10332 }) 10333 10334 if resTmp == nil { 10335 if !graphql.HasFieldError(ctx, fc) { 10336 ec.Errorf(ctx, "must not be null") 10337 } 10338 return graphql.Null 10339 } 10340 res := resTmp.([]introspection.InputValue) 10341 fc.Result = res 10342 return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 10343 } 10344 10345 func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 10346 defer func() { 10347 if r := recover(); r != nil { 10348 ec.Error(ctx, ec.Recover(ctx, r)) 10349 ret = graphql.Null 10350 } 10351 }() 10352 fc := &graphql.FieldContext{ 10353 Object: "__Field", 10354 Field: field, 10355 Args: nil, 10356 IsMethod: false, 10357 IsResolver: false, 10358 } 10359 10360 ctx = graphql.WithFieldContext(ctx, fc) 10361 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10362 ctx = rctx // use context from middleware stack in children 10363 return obj.Type, nil 10364 }) 10365 10366 if resTmp == nil { 10367 if !graphql.HasFieldError(ctx, fc) { 10368 ec.Errorf(ctx, "must not be null") 10369 } 10370 return graphql.Null 10371 } 10372 res := resTmp.(*introspection.Type) 10373 fc.Result = res 10374 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 10375 } 10376 10377 func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 10378 defer func() { 10379 if r := recover(); r != nil { 10380 ec.Error(ctx, ec.Recover(ctx, r)) 10381 ret = graphql.Null 10382 } 10383 }() 10384 fc := &graphql.FieldContext{ 10385 Object: "__Field", 10386 Field: field, 10387 Args: nil, 10388 IsMethod: true, 10389 IsResolver: false, 10390 } 10391 10392 ctx = graphql.WithFieldContext(ctx, fc) 10393 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10394 ctx = rctx // use context from middleware stack in children 10395 return obj.IsDeprecated(), nil 10396 }) 10397 10398 if resTmp == nil { 10399 if !graphql.HasFieldError(ctx, fc) { 10400 ec.Errorf(ctx, "must not be null") 10401 } 10402 return graphql.Null 10403 } 10404 res := resTmp.(bool) 10405 fc.Result = res 10406 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 10407 } 10408 10409 func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 10410 defer func() { 10411 if r := recover(); r != nil { 10412 ec.Error(ctx, ec.Recover(ctx, r)) 10413 ret = graphql.Null 10414 } 10415 }() 10416 fc := &graphql.FieldContext{ 10417 Object: "__Field", 10418 Field: field, 10419 Args: nil, 10420 IsMethod: true, 10421 IsResolver: false, 10422 } 10423 10424 ctx = graphql.WithFieldContext(ctx, fc) 10425 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10426 ctx = rctx // use context from middleware stack in children 10427 return obj.DeprecationReason(), nil 10428 }) 10429 10430 if resTmp == nil { 10431 return graphql.Null 10432 } 10433 res := resTmp.(*string) 10434 fc.Result = res 10435 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 10436 } 10437 10438 func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 10439 defer func() { 10440 if r := recover(); r != nil { 10441 ec.Error(ctx, ec.Recover(ctx, r)) 10442 ret = graphql.Null 10443 } 10444 }() 10445 fc := &graphql.FieldContext{ 10446 Object: "__InputValue", 10447 Field: field, 10448 Args: nil, 10449 IsMethod: false, 10450 IsResolver: false, 10451 } 10452 10453 ctx = graphql.WithFieldContext(ctx, fc) 10454 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10455 ctx = rctx // use context from middleware stack in children 10456 return obj.Name, nil 10457 }) 10458 10459 if resTmp == nil { 10460 if !graphql.HasFieldError(ctx, fc) { 10461 ec.Errorf(ctx, "must not be null") 10462 } 10463 return graphql.Null 10464 } 10465 res := resTmp.(string) 10466 fc.Result = res 10467 return ec.marshalNString2string(ctx, field.Selections, res) 10468 } 10469 10470 func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 10471 defer func() { 10472 if r := recover(); r != nil { 10473 ec.Error(ctx, ec.Recover(ctx, r)) 10474 ret = graphql.Null 10475 } 10476 }() 10477 fc := &graphql.FieldContext{ 10478 Object: "__InputValue", 10479 Field: field, 10480 Args: nil, 10481 IsMethod: false, 10482 IsResolver: false, 10483 } 10484 10485 ctx = graphql.WithFieldContext(ctx, fc) 10486 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10487 ctx = rctx // use context from middleware stack in children 10488 return obj.Description, nil 10489 }) 10490 10491 if resTmp == nil { 10492 return graphql.Null 10493 } 10494 res := resTmp.(string) 10495 fc.Result = res 10496 return ec.marshalOString2string(ctx, field.Selections, res) 10497 } 10498 10499 func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 10500 defer func() { 10501 if r := recover(); r != nil { 10502 ec.Error(ctx, ec.Recover(ctx, r)) 10503 ret = graphql.Null 10504 } 10505 }() 10506 fc := &graphql.FieldContext{ 10507 Object: "__InputValue", 10508 Field: field, 10509 Args: nil, 10510 IsMethod: false, 10511 IsResolver: false, 10512 } 10513 10514 ctx = graphql.WithFieldContext(ctx, fc) 10515 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10516 ctx = rctx // use context from middleware stack in children 10517 return obj.Type, nil 10518 }) 10519 10520 if resTmp == nil { 10521 if !graphql.HasFieldError(ctx, fc) { 10522 ec.Errorf(ctx, "must not be null") 10523 } 10524 return graphql.Null 10525 } 10526 res := resTmp.(*introspection.Type) 10527 fc.Result = res 10528 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 10529 } 10530 10531 func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 10532 defer func() { 10533 if r := recover(); r != nil { 10534 ec.Error(ctx, ec.Recover(ctx, r)) 10535 ret = graphql.Null 10536 } 10537 }() 10538 fc := &graphql.FieldContext{ 10539 Object: "__InputValue", 10540 Field: field, 10541 Args: nil, 10542 IsMethod: false, 10543 IsResolver: false, 10544 } 10545 10546 ctx = graphql.WithFieldContext(ctx, fc) 10547 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10548 ctx = rctx // use context from middleware stack in children 10549 return obj.DefaultValue, nil 10550 }) 10551 10552 if resTmp == nil { 10553 return graphql.Null 10554 } 10555 res := resTmp.(*string) 10556 fc.Result = res 10557 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 10558 } 10559 10560 func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 10561 defer func() { 10562 if r := recover(); r != nil { 10563 ec.Error(ctx, ec.Recover(ctx, r)) 10564 ret = graphql.Null 10565 } 10566 }() 10567 fc := &graphql.FieldContext{ 10568 Object: "__Schema", 10569 Field: field, 10570 Args: nil, 10571 IsMethod: true, 10572 IsResolver: false, 10573 } 10574 10575 ctx = graphql.WithFieldContext(ctx, fc) 10576 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10577 ctx = rctx // use context from middleware stack in children 10578 return obj.Types(), nil 10579 }) 10580 10581 if resTmp == nil { 10582 if !graphql.HasFieldError(ctx, fc) { 10583 ec.Errorf(ctx, "must not be null") 10584 } 10585 return graphql.Null 10586 } 10587 res := resTmp.([]introspection.Type) 10588 fc.Result = res 10589 return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 10590 } 10591 10592 func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 10593 defer func() { 10594 if r := recover(); r != nil { 10595 ec.Error(ctx, ec.Recover(ctx, r)) 10596 ret = graphql.Null 10597 } 10598 }() 10599 fc := &graphql.FieldContext{ 10600 Object: "__Schema", 10601 Field: field, 10602 Args: nil, 10603 IsMethod: true, 10604 IsResolver: false, 10605 } 10606 10607 ctx = graphql.WithFieldContext(ctx, fc) 10608 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10609 ctx = rctx // use context from middleware stack in children 10610 return obj.QueryType(), nil 10611 }) 10612 10613 if resTmp == nil { 10614 if !graphql.HasFieldError(ctx, fc) { 10615 ec.Errorf(ctx, "must not be null") 10616 } 10617 return graphql.Null 10618 } 10619 res := resTmp.(*introspection.Type) 10620 fc.Result = res 10621 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 10622 } 10623 10624 func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 10625 defer func() { 10626 if r := recover(); r != nil { 10627 ec.Error(ctx, ec.Recover(ctx, r)) 10628 ret = graphql.Null 10629 } 10630 }() 10631 fc := &graphql.FieldContext{ 10632 Object: "__Schema", 10633 Field: field, 10634 Args: nil, 10635 IsMethod: true, 10636 IsResolver: false, 10637 } 10638 10639 ctx = graphql.WithFieldContext(ctx, fc) 10640 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10641 ctx = rctx // use context from middleware stack in children 10642 return obj.MutationType(), nil 10643 }) 10644 10645 if resTmp == nil { 10646 return graphql.Null 10647 } 10648 res := resTmp.(*introspection.Type) 10649 fc.Result = res 10650 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 10651 } 10652 10653 func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 10654 defer func() { 10655 if r := recover(); r != nil { 10656 ec.Error(ctx, ec.Recover(ctx, r)) 10657 ret = graphql.Null 10658 } 10659 }() 10660 fc := &graphql.FieldContext{ 10661 Object: "__Schema", 10662 Field: field, 10663 Args: nil, 10664 IsMethod: true, 10665 IsResolver: false, 10666 } 10667 10668 ctx = graphql.WithFieldContext(ctx, fc) 10669 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10670 ctx = rctx // use context from middleware stack in children 10671 return obj.SubscriptionType(), nil 10672 }) 10673 10674 if resTmp == nil { 10675 return graphql.Null 10676 } 10677 res := resTmp.(*introspection.Type) 10678 fc.Result = res 10679 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 10680 } 10681 10682 func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 10683 defer func() { 10684 if r := recover(); r != nil { 10685 ec.Error(ctx, ec.Recover(ctx, r)) 10686 ret = graphql.Null 10687 } 10688 }() 10689 fc := &graphql.FieldContext{ 10690 Object: "__Schema", 10691 Field: field, 10692 Args: nil, 10693 IsMethod: true, 10694 IsResolver: false, 10695 } 10696 10697 ctx = graphql.WithFieldContext(ctx, fc) 10698 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10699 ctx = rctx // use context from middleware stack in children 10700 return obj.Directives(), nil 10701 }) 10702 10703 if resTmp == nil { 10704 if !graphql.HasFieldError(ctx, fc) { 10705 ec.Errorf(ctx, "must not be null") 10706 } 10707 return graphql.Null 10708 } 10709 res := resTmp.([]introspection.Directive) 10710 fc.Result = res 10711 return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) 10712 } 10713 10714 func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 10715 defer func() { 10716 if r := recover(); r != nil { 10717 ec.Error(ctx, ec.Recover(ctx, r)) 10718 ret = graphql.Null 10719 } 10720 }() 10721 fc := &graphql.FieldContext{ 10722 Object: "__Type", 10723 Field: field, 10724 Args: nil, 10725 IsMethod: true, 10726 IsResolver: false, 10727 } 10728 10729 ctx = graphql.WithFieldContext(ctx, fc) 10730 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10731 ctx = rctx // use context from middleware stack in children 10732 return obj.Kind(), nil 10733 }) 10734 10735 if resTmp == nil { 10736 if !graphql.HasFieldError(ctx, fc) { 10737 ec.Errorf(ctx, "must not be null") 10738 } 10739 return graphql.Null 10740 } 10741 res := resTmp.(string) 10742 fc.Result = res 10743 return ec.marshalN__TypeKind2string(ctx, field.Selections, res) 10744 } 10745 10746 func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 10747 defer func() { 10748 if r := recover(); r != nil { 10749 ec.Error(ctx, ec.Recover(ctx, r)) 10750 ret = graphql.Null 10751 } 10752 }() 10753 fc := &graphql.FieldContext{ 10754 Object: "__Type", 10755 Field: field, 10756 Args: nil, 10757 IsMethod: true, 10758 IsResolver: false, 10759 } 10760 10761 ctx = graphql.WithFieldContext(ctx, fc) 10762 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10763 ctx = rctx // use context from middleware stack in children 10764 return obj.Name(), nil 10765 }) 10766 10767 if resTmp == nil { 10768 return graphql.Null 10769 } 10770 res := resTmp.(*string) 10771 fc.Result = res 10772 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 10773 } 10774 10775 func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 10776 defer func() { 10777 if r := recover(); r != nil { 10778 ec.Error(ctx, ec.Recover(ctx, r)) 10779 ret = graphql.Null 10780 } 10781 }() 10782 fc := &graphql.FieldContext{ 10783 Object: "__Type", 10784 Field: field, 10785 Args: nil, 10786 IsMethod: true, 10787 IsResolver: false, 10788 } 10789 10790 ctx = graphql.WithFieldContext(ctx, fc) 10791 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10792 ctx = rctx // use context from middleware stack in children 10793 return obj.Description(), nil 10794 }) 10795 10796 if resTmp == nil { 10797 return graphql.Null 10798 } 10799 res := resTmp.(string) 10800 fc.Result = res 10801 return ec.marshalOString2string(ctx, field.Selections, res) 10802 } 10803 10804 func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 10805 defer func() { 10806 if r := recover(); r != nil { 10807 ec.Error(ctx, ec.Recover(ctx, r)) 10808 ret = graphql.Null 10809 } 10810 }() 10811 fc := &graphql.FieldContext{ 10812 Object: "__Type", 10813 Field: field, 10814 Args: nil, 10815 IsMethod: true, 10816 IsResolver: false, 10817 } 10818 10819 ctx = graphql.WithFieldContext(ctx, fc) 10820 rawArgs := field.ArgumentMap(ec.Variables) 10821 args, err := ec.field___Type_fields_args(ctx, rawArgs) 10822 if err != nil { 10823 ec.Error(ctx, err) 10824 return graphql.Null 10825 } 10826 fc.Args = args 10827 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10828 ctx = rctx // use context from middleware stack in children 10829 return obj.Fields(args["includeDeprecated"].(bool)), nil 10830 }) 10831 10832 if resTmp == nil { 10833 return graphql.Null 10834 } 10835 res := resTmp.([]introspection.Field) 10836 fc.Result = res 10837 return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) 10838 } 10839 10840 func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 10841 defer func() { 10842 if r := recover(); r != nil { 10843 ec.Error(ctx, ec.Recover(ctx, r)) 10844 ret = graphql.Null 10845 } 10846 }() 10847 fc := &graphql.FieldContext{ 10848 Object: "__Type", 10849 Field: field, 10850 Args: nil, 10851 IsMethod: true, 10852 IsResolver: false, 10853 } 10854 10855 ctx = graphql.WithFieldContext(ctx, fc) 10856 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10857 ctx = rctx // use context from middleware stack in children 10858 return obj.Interfaces(), nil 10859 }) 10860 10861 if resTmp == nil { 10862 return graphql.Null 10863 } 10864 res := resTmp.([]introspection.Type) 10865 fc.Result = res 10866 return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 10867 } 10868 10869 func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 10870 defer func() { 10871 if r := recover(); r != nil { 10872 ec.Error(ctx, ec.Recover(ctx, r)) 10873 ret = graphql.Null 10874 } 10875 }() 10876 fc := &graphql.FieldContext{ 10877 Object: "__Type", 10878 Field: field, 10879 Args: nil, 10880 IsMethod: true, 10881 IsResolver: false, 10882 } 10883 10884 ctx = graphql.WithFieldContext(ctx, fc) 10885 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10886 ctx = rctx // use context from middleware stack in children 10887 return obj.PossibleTypes(), nil 10888 }) 10889 10890 if resTmp == nil { 10891 return graphql.Null 10892 } 10893 res := resTmp.([]introspection.Type) 10894 fc.Result = res 10895 return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 10896 } 10897 10898 func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 10899 defer func() { 10900 if r := recover(); r != nil { 10901 ec.Error(ctx, ec.Recover(ctx, r)) 10902 ret = graphql.Null 10903 } 10904 }() 10905 fc := &graphql.FieldContext{ 10906 Object: "__Type", 10907 Field: field, 10908 Args: nil, 10909 IsMethod: true, 10910 IsResolver: false, 10911 } 10912 10913 ctx = graphql.WithFieldContext(ctx, fc) 10914 rawArgs := field.ArgumentMap(ec.Variables) 10915 args, err := ec.field___Type_enumValues_args(ctx, rawArgs) 10916 if err != nil { 10917 ec.Error(ctx, err) 10918 return graphql.Null 10919 } 10920 fc.Args = args 10921 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10922 ctx = rctx // use context from middleware stack in children 10923 return obj.EnumValues(args["includeDeprecated"].(bool)), nil 10924 }) 10925 10926 if resTmp == nil { 10927 return graphql.Null 10928 } 10929 res := resTmp.([]introspection.EnumValue) 10930 fc.Result = res 10931 return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) 10932 } 10933 10934 func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 10935 defer func() { 10936 if r := recover(); r != nil { 10937 ec.Error(ctx, ec.Recover(ctx, r)) 10938 ret = graphql.Null 10939 } 10940 }() 10941 fc := &graphql.FieldContext{ 10942 Object: "__Type", 10943 Field: field, 10944 Args: nil, 10945 IsMethod: true, 10946 IsResolver: false, 10947 } 10948 10949 ctx = graphql.WithFieldContext(ctx, fc) 10950 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10951 ctx = rctx // use context from middleware stack in children 10952 return obj.InputFields(), nil 10953 }) 10954 10955 if resTmp == nil { 10956 return graphql.Null 10957 } 10958 res := resTmp.([]introspection.InputValue) 10959 fc.Result = res 10960 return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 10961 } 10962 10963 func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 10964 defer func() { 10965 if r := recover(); r != nil { 10966 ec.Error(ctx, ec.Recover(ctx, r)) 10967 ret = graphql.Null 10968 } 10969 }() 10970 fc := &graphql.FieldContext{ 10971 Object: "__Type", 10972 Field: field, 10973 Args: nil, 10974 IsMethod: true, 10975 IsResolver: false, 10976 } 10977 10978 ctx = graphql.WithFieldContext(ctx, fc) 10979 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10980 ctx = rctx // use context from middleware stack in children 10981 return obj.OfType(), nil 10982 }) 10983 10984 if resTmp == nil { 10985 return graphql.Null 10986 } 10987 res := resTmp.(*introspection.Type) 10988 fc.Result = res 10989 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 10990 } 10991 10992 func (ec *executionContext) _asdfIt_id(ctx context.Context, field graphql.CollectedField, obj *AsdfIt) (ret graphql.Marshaler) { 10993 defer func() { 10994 if r := recover(); r != nil { 10995 ec.Error(ctx, ec.Recover(ctx, r)) 10996 ret = graphql.Null 10997 } 10998 }() 10999 fc := &graphql.FieldContext{ 11000 Object: "asdfIt", 11001 Field: field, 11002 Args: nil, 11003 IsMethod: false, 11004 IsResolver: false, 11005 } 11006 11007 ctx = graphql.WithFieldContext(ctx, fc) 11008 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 11009 ctx = rctx // use context from middleware stack in children 11010 return obj.ID, nil 11011 }) 11012 11013 if resTmp == nil { 11014 if !graphql.HasFieldError(ctx, fc) { 11015 ec.Errorf(ctx, "must not be null") 11016 } 11017 return graphql.Null 11018 } 11019 res := resTmp.(string) 11020 fc.Result = res 11021 return ec.marshalNID2string(ctx, field.Selections, res) 11022 } 11023 11024 func (ec *executionContext) _iIt_id(ctx context.Context, field graphql.CollectedField, obj *IIt) (ret graphql.Marshaler) { 11025 defer func() { 11026 if r := recover(); r != nil { 11027 ec.Error(ctx, ec.Recover(ctx, r)) 11028 ret = graphql.Null 11029 } 11030 }() 11031 fc := &graphql.FieldContext{ 11032 Object: "iIt", 11033 Field: field, 11034 Args: nil, 11035 IsMethod: false, 11036 IsResolver: false, 11037 } 11038 11039 ctx = graphql.WithFieldContext(ctx, fc) 11040 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 11041 ctx = rctx // use context from middleware stack in children 11042 return obj.ID, nil 11043 }) 11044 11045 if resTmp == nil { 11046 if !graphql.HasFieldError(ctx, fc) { 11047 ec.Errorf(ctx, "must not be null") 11048 } 11049 return graphql.Null 11050 } 11051 res := resTmp.(string) 11052 fc.Result = res 11053 return ec.marshalNID2string(ctx, field.Selections, res) 11054 } 11055 11056 // endregion **************************** field.gotpl ***************************** 11057 11058 // region **************************** input.gotpl ***************************** 11059 11060 func (ec *executionContext) unmarshalInputDefaultInput(ctx context.Context, obj interface{}) (DefaultInput, error) { 11061 var it DefaultInput 11062 asMap := map[string]interface{}{} 11063 for k, v := range obj.(map[string]interface{}) { 11064 asMap[k] = v 11065 } 11066 11067 if _, present := asMap["falsyBoolean"]; !present { 11068 asMap["falsyBoolean"] = false 11069 } 11070 if _, present := asMap["truthyBoolean"]; !present { 11071 asMap["truthyBoolean"] = true 11072 } 11073 11074 for k, v := range asMap { 11075 switch k { 11076 case "falsyBoolean": 11077 var err error 11078 11079 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("falsyBoolean")) 11080 it.FalsyBoolean, err = ec.unmarshalOBoolean2ᚖbool(ctx, v) 11081 if err != nil { 11082 return it, err 11083 } 11084 case "truthyBoolean": 11085 var err error 11086 11087 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("truthyBoolean")) 11088 it.TruthyBoolean, err = ec.unmarshalOBoolean2ᚖbool(ctx, v) 11089 if err != nil { 11090 return it, err 11091 } 11092 } 11093 } 11094 11095 return it, nil 11096 } 11097 11098 func (ec *executionContext) unmarshalInputInnerDirectives(ctx context.Context, obj interface{}) (InnerDirectives, error) { 11099 var it InnerDirectives 11100 asMap := map[string]interface{}{} 11101 for k, v := range obj.(map[string]interface{}) { 11102 asMap[k] = v 11103 } 11104 11105 for k, v := range asMap { 11106 switch k { 11107 case "message": 11108 var err error 11109 11110 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("message")) 11111 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalNString2string(ctx, v) } 11112 directive1 := func(ctx context.Context) (interface{}, error) { 11113 min, err := ec.unmarshalNInt2int(ctx, 1) 11114 if err != nil { 11115 return nil, err 11116 } 11117 message, err := ec.unmarshalOString2ᚖstring(ctx, "not valid") 11118 if err != nil { 11119 return nil, err 11120 } 11121 if ec.directives.Length == nil { 11122 return nil, errors.New("directive length is not implemented") 11123 } 11124 return ec.directives.Length(ctx, obj, directive0, min, nil, message) 11125 } 11126 11127 tmp, err := directive1(ctx) 11128 if err != nil { 11129 return it, graphql.ErrorOnPath(ctx, err) 11130 } 11131 if data, ok := tmp.(string); ok { 11132 it.Message = data 11133 } else { 11134 err := fmt.Errorf(`unexpected type %T from directive, should be string`, tmp) 11135 return it, graphql.ErrorOnPath(ctx, err) 11136 } 11137 } 11138 } 11139 11140 return it, nil 11141 } 11142 11143 func (ec *executionContext) unmarshalInputInnerInput(ctx context.Context, obj interface{}) (InnerInput, error) { 11144 var it InnerInput 11145 asMap := map[string]interface{}{} 11146 for k, v := range obj.(map[string]interface{}) { 11147 asMap[k] = v 11148 } 11149 11150 for k, v := range asMap { 11151 switch k { 11152 case "id": 11153 var err error 11154 11155 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) 11156 it.ID, err = ec.unmarshalNInt2int(ctx, v) 11157 if err != nil { 11158 return it, err 11159 } 11160 } 11161 } 11162 11163 return it, nil 11164 } 11165 11166 func (ec *executionContext) unmarshalInputInputDirectives(ctx context.Context, obj interface{}) (InputDirectives, error) { 11167 var it InputDirectives 11168 asMap := map[string]interface{}{} 11169 for k, v := range obj.(map[string]interface{}) { 11170 asMap[k] = v 11171 } 11172 11173 for k, v := range asMap { 11174 switch k { 11175 case "text": 11176 var err error 11177 11178 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text")) 11179 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalNString2string(ctx, v) } 11180 directive1 := func(ctx context.Context) (interface{}, error) { 11181 if ec.directives.Directive3 == nil { 11182 return nil, errors.New("directive directive3 is not implemented") 11183 } 11184 return ec.directives.Directive3(ctx, obj, directive0) 11185 } 11186 directive2 := func(ctx context.Context) (interface{}, error) { 11187 min, err := ec.unmarshalNInt2int(ctx, 0) 11188 if err != nil { 11189 return nil, err 11190 } 11191 max, err := ec.unmarshalOInt2ᚖint(ctx, 7) 11192 if err != nil { 11193 return nil, err 11194 } 11195 message, err := ec.unmarshalOString2ᚖstring(ctx, "not valid") 11196 if err != nil { 11197 return nil, err 11198 } 11199 if ec.directives.Length == nil { 11200 return nil, errors.New("directive length is not implemented") 11201 } 11202 return ec.directives.Length(ctx, obj, directive1, min, max, message) 11203 } 11204 11205 tmp, err := directive2(ctx) 11206 if err != nil { 11207 return it, graphql.ErrorOnPath(ctx, err) 11208 } 11209 if data, ok := tmp.(string); ok { 11210 it.Text = data 11211 } else { 11212 err := fmt.Errorf(`unexpected type %T from directive, should be string`, tmp) 11213 return it, graphql.ErrorOnPath(ctx, err) 11214 } 11215 case "nullableText": 11216 var err error 11217 11218 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nullableText")) 11219 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOString2ᚖstring(ctx, v) } 11220 directive1 := func(ctx context.Context) (interface{}, error) { 11221 if ec.directives.Directive3 == nil { 11222 return nil, errors.New("directive directive3 is not implemented") 11223 } 11224 return ec.directives.Directive3(ctx, obj, directive0) 11225 } 11226 directive2 := func(ctx context.Context) (interface{}, error) { 11227 if ec.directives.ToNull == nil { 11228 return nil, errors.New("directive toNull is not implemented") 11229 } 11230 return ec.directives.ToNull(ctx, obj, directive1) 11231 } 11232 11233 tmp, err := directive2(ctx) 11234 if err != nil { 11235 return it, graphql.ErrorOnPath(ctx, err) 11236 } 11237 if data, ok := tmp.(*string); ok { 11238 it.NullableText = data 11239 } else if tmp == nil { 11240 it.NullableText = nil 11241 } else { 11242 err := fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp) 11243 return it, graphql.ErrorOnPath(ctx, err) 11244 } 11245 case "inner": 11246 var err error 11247 11248 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("inner")) 11249 directive0 := func(ctx context.Context) (interface{}, error) { 11250 return ec.unmarshalNInnerDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInnerDirectives(ctx, v) 11251 } 11252 directive1 := func(ctx context.Context) (interface{}, error) { 11253 if ec.directives.Directive3 == nil { 11254 return nil, errors.New("directive directive3 is not implemented") 11255 } 11256 return ec.directives.Directive3(ctx, obj, directive0) 11257 } 11258 11259 tmp, err := directive1(ctx) 11260 if err != nil { 11261 return it, graphql.ErrorOnPath(ctx, err) 11262 } 11263 if data, ok := tmp.(*InnerDirectives); ok { 11264 it.Inner = data 11265 } else if tmp == nil { 11266 it.Inner = nil 11267 } else { 11268 err := fmt.Errorf(`unexpected type %T from directive, should be *github.com/99designs/gqlgen/codegen/testserver/singlefile.InnerDirectives`, tmp) 11269 return it, graphql.ErrorOnPath(ctx, err) 11270 } 11271 case "innerNullable": 11272 var err error 11273 11274 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("innerNullable")) 11275 directive0 := func(ctx context.Context) (interface{}, error) { 11276 return ec.unmarshalOInnerDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInnerDirectives(ctx, v) 11277 } 11278 directive1 := func(ctx context.Context) (interface{}, error) { 11279 if ec.directives.Directive3 == nil { 11280 return nil, errors.New("directive directive3 is not implemented") 11281 } 11282 return ec.directives.Directive3(ctx, obj, directive0) 11283 } 11284 11285 tmp, err := directive1(ctx) 11286 if err != nil { 11287 return it, graphql.ErrorOnPath(ctx, err) 11288 } 11289 if data, ok := tmp.(*InnerDirectives); ok { 11290 it.InnerNullable = data 11291 } else if tmp == nil { 11292 it.InnerNullable = nil 11293 } else { 11294 err := fmt.Errorf(`unexpected type %T from directive, should be *github.com/99designs/gqlgen/codegen/testserver/singlefile.InnerDirectives`, tmp) 11295 return it, graphql.ErrorOnPath(ctx, err) 11296 } 11297 case "thirdParty": 11298 var err error 11299 11300 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("thirdParty")) 11301 directive0 := func(ctx context.Context) (interface{}, error) { 11302 return ec.unmarshalOThirdParty2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐThirdParty(ctx, v) 11303 } 11304 directive1 := func(ctx context.Context) (interface{}, error) { 11305 if ec.directives.Directive3 == nil { 11306 return nil, errors.New("directive directive3 is not implemented") 11307 } 11308 return ec.directives.Directive3(ctx, obj, directive0) 11309 } 11310 directive2 := func(ctx context.Context) (interface{}, error) { 11311 min, err := ec.unmarshalNInt2int(ctx, 0) 11312 if err != nil { 11313 return nil, err 11314 } 11315 max, err := ec.unmarshalOInt2ᚖint(ctx, 7) 11316 if err != nil { 11317 return nil, err 11318 } 11319 if ec.directives.Length == nil { 11320 return nil, errors.New("directive length is not implemented") 11321 } 11322 return ec.directives.Length(ctx, obj, directive1, min, max, nil) 11323 } 11324 11325 tmp, err := directive2(ctx) 11326 if err != nil { 11327 return it, graphql.ErrorOnPath(ctx, err) 11328 } 11329 if data, ok := tmp.(*ThirdParty); ok { 11330 it.ThirdParty = data 11331 } else if tmp == nil { 11332 it.ThirdParty = nil 11333 } else { 11334 err := fmt.Errorf(`unexpected type %T from directive, should be *github.com/99designs/gqlgen/codegen/testserver/singlefile.ThirdParty`, tmp) 11335 return it, graphql.ErrorOnPath(ctx, err) 11336 } 11337 } 11338 } 11339 11340 return it, nil 11341 } 11342 11343 func (ec *executionContext) unmarshalInputInputWithEnumValue(ctx context.Context, obj interface{}) (InputWithEnumValue, error) { 11344 var it InputWithEnumValue 11345 asMap := map[string]interface{}{} 11346 for k, v := range obj.(map[string]interface{}) { 11347 asMap[k] = v 11348 } 11349 11350 for k, v := range asMap { 11351 switch k { 11352 case "enum": 11353 var err error 11354 11355 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("enum")) 11356 it.Enum, err = ec.unmarshalNEnumTest2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEnumTest(ctx, v) 11357 if err != nil { 11358 return it, err 11359 } 11360 } 11361 } 11362 11363 return it, nil 11364 } 11365 11366 func (ec *executionContext) unmarshalInputNestedInput(ctx context.Context, obj interface{}) (NestedInput, error) { 11367 var it NestedInput 11368 asMap := map[string]interface{}{} 11369 for k, v := range obj.(map[string]interface{}) { 11370 asMap[k] = v 11371 } 11372 11373 for k, v := range asMap { 11374 switch k { 11375 case "field": 11376 var err error 11377 11378 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) 11379 it.Field, err = ec.unmarshalNEmail2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEmail(ctx, v) 11380 if err != nil { 11381 return it, err 11382 } 11383 } 11384 } 11385 11386 return it, nil 11387 } 11388 11389 func (ec *executionContext) unmarshalInputNestedMapInput(ctx context.Context, obj interface{}) (NestedMapInput, error) { 11390 var it NestedMapInput 11391 asMap := map[string]interface{}{} 11392 for k, v := range obj.(map[string]interface{}) { 11393 asMap[k] = v 11394 } 11395 11396 for k, v := range asMap { 11397 switch k { 11398 case "map": 11399 var err error 11400 11401 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("map")) 11402 it.Map, err = ec.unmarshalOMapStringInterfaceInput2map(ctx, v) 11403 if err != nil { 11404 return it, err 11405 } 11406 } 11407 } 11408 11409 return it, nil 11410 } 11411 11412 func (ec *executionContext) unmarshalInputOuterInput(ctx context.Context, obj interface{}) (OuterInput, error) { 11413 var it OuterInput 11414 asMap := map[string]interface{}{} 11415 for k, v := range obj.(map[string]interface{}) { 11416 asMap[k] = v 11417 } 11418 11419 for k, v := range asMap { 11420 switch k { 11421 case "inner": 11422 var err error 11423 11424 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("inner")) 11425 it.Inner, err = ec.unmarshalNInnerInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInnerInput(ctx, v) 11426 if err != nil { 11427 return it, err 11428 } 11429 } 11430 } 11431 11432 return it, nil 11433 } 11434 11435 func (ec *executionContext) unmarshalInputRecursiveInputSlice(ctx context.Context, obj interface{}) (RecursiveInputSlice, error) { 11436 var it RecursiveInputSlice 11437 asMap := map[string]interface{}{} 11438 for k, v := range obj.(map[string]interface{}) { 11439 asMap[k] = v 11440 } 11441 11442 for k, v := range asMap { 11443 switch k { 11444 case "self": 11445 var err error 11446 11447 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("self")) 11448 it.Self, err = ec.unmarshalORecursiveInputSlice2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐRecursiveInputSliceᚄ(ctx, v) 11449 if err != nil { 11450 return it, err 11451 } 11452 } 11453 } 11454 11455 return it, nil 11456 } 11457 11458 func (ec *executionContext) unmarshalInputSpecialInput(ctx context.Context, obj interface{}) (SpecialInput, error) { 11459 var it SpecialInput 11460 asMap := map[string]interface{}{} 11461 for k, v := range obj.(map[string]interface{}) { 11462 asMap[k] = v 11463 } 11464 11465 for k, v := range asMap { 11466 switch k { 11467 case "nesting": 11468 var err error 11469 11470 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nesting")) 11471 it.Nesting, err = ec.unmarshalNNestedInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐNestedInput(ctx, v) 11472 if err != nil { 11473 return it, err 11474 } 11475 } 11476 } 11477 11478 return it, nil 11479 } 11480 11481 func (ec *executionContext) unmarshalInputUpdatePtrToPtrInner(ctx context.Context, obj interface{}) (UpdatePtrToPtrInner, error) { 11482 var it UpdatePtrToPtrInner 11483 asMap := map[string]interface{}{} 11484 for k, v := range obj.(map[string]interface{}) { 11485 asMap[k] = v 11486 } 11487 11488 for k, v := range asMap { 11489 switch k { 11490 case "key": 11491 var err error 11492 11493 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) 11494 it.Key, err = ec.unmarshalOString2ᚖstring(ctx, v) 11495 if err != nil { 11496 return it, err 11497 } 11498 case "value": 11499 var err error 11500 11501 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) 11502 it.Value, err = ec.unmarshalOString2ᚖstring(ctx, v) 11503 if err != nil { 11504 return it, err 11505 } 11506 } 11507 } 11508 11509 return it, nil 11510 } 11511 11512 func (ec *executionContext) unmarshalInputUpdatePtrToPtrOuter(ctx context.Context, obj interface{}) (UpdatePtrToPtrOuter, error) { 11513 var it UpdatePtrToPtrOuter 11514 asMap := map[string]interface{}{} 11515 for k, v := range obj.(map[string]interface{}) { 11516 asMap[k] = v 11517 } 11518 11519 for k, v := range asMap { 11520 switch k { 11521 case "name": 11522 var err error 11523 11524 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) 11525 it.Name, err = ec.unmarshalOString2ᚖstring(ctx, v) 11526 if err != nil { 11527 return it, err 11528 } 11529 case "inner": 11530 var err error 11531 11532 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("inner")) 11533 it.Inner, err = ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 11534 if err != nil { 11535 return it, err 11536 } 11537 case "stupidInner": 11538 var err error 11539 11540 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("stupidInner")) 11541 it.StupidInner, err = ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 11542 if err != nil { 11543 return it, err 11544 } 11545 } 11546 } 11547 11548 return it, nil 11549 } 11550 11551 func (ec *executionContext) unmarshalInputValidInput(ctx context.Context, obj interface{}) (ValidInput, error) { 11552 var it ValidInput 11553 asMap := map[string]interface{}{} 11554 for k, v := range obj.(map[string]interface{}) { 11555 asMap[k] = v 11556 } 11557 11558 for k, v := range asMap { 11559 switch k { 11560 case "break": 11561 var err error 11562 11563 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("break")) 11564 it.Break, err = ec.unmarshalNString2string(ctx, v) 11565 if err != nil { 11566 return it, err 11567 } 11568 case "default": 11569 var err error 11570 11571 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("default")) 11572 it.Default, err = ec.unmarshalNString2string(ctx, v) 11573 if err != nil { 11574 return it, err 11575 } 11576 case "func": 11577 var err error 11578 11579 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("func")) 11580 it.Func, err = ec.unmarshalNString2string(ctx, v) 11581 if err != nil { 11582 return it, err 11583 } 11584 case "interface": 11585 var err error 11586 11587 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("interface")) 11588 it.Interface, err = ec.unmarshalNString2string(ctx, v) 11589 if err != nil { 11590 return it, err 11591 } 11592 case "select": 11593 var err error 11594 11595 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("select")) 11596 it.Select, err = ec.unmarshalNString2string(ctx, v) 11597 if err != nil { 11598 return it, err 11599 } 11600 case "case": 11601 var err error 11602 11603 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("case")) 11604 it.Case, err = ec.unmarshalNString2string(ctx, v) 11605 if err != nil { 11606 return it, err 11607 } 11608 case "defer": 11609 var err error 11610 11611 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("defer")) 11612 it.Defer, err = ec.unmarshalNString2string(ctx, v) 11613 if err != nil { 11614 return it, err 11615 } 11616 case "go": 11617 var err error 11618 11619 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("go")) 11620 it.Go, err = ec.unmarshalNString2string(ctx, v) 11621 if err != nil { 11622 return it, err 11623 } 11624 case "map": 11625 var err error 11626 11627 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("map")) 11628 it.Map, err = ec.unmarshalNString2string(ctx, v) 11629 if err != nil { 11630 return it, err 11631 } 11632 case "struct": 11633 var err error 11634 11635 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("struct")) 11636 it.Struct, err = ec.unmarshalNString2string(ctx, v) 11637 if err != nil { 11638 return it, err 11639 } 11640 case "chan": 11641 var err error 11642 11643 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("chan")) 11644 it.Chan, err = ec.unmarshalNString2string(ctx, v) 11645 if err != nil { 11646 return it, err 11647 } 11648 case "else": 11649 var err error 11650 11651 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("else")) 11652 it.Else, err = ec.unmarshalNString2string(ctx, v) 11653 if err != nil { 11654 return it, err 11655 } 11656 case "goto": 11657 var err error 11658 11659 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("goto")) 11660 it.Goto, err = ec.unmarshalNString2string(ctx, v) 11661 if err != nil { 11662 return it, err 11663 } 11664 case "package": 11665 var err error 11666 11667 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("package")) 11668 it.Package, err = ec.unmarshalNString2string(ctx, v) 11669 if err != nil { 11670 return it, err 11671 } 11672 case "switch": 11673 var err error 11674 11675 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("switch")) 11676 it.Switch, err = ec.unmarshalNString2string(ctx, v) 11677 if err != nil { 11678 return it, err 11679 } 11680 case "const": 11681 var err error 11682 11683 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("const")) 11684 it.Const, err = ec.unmarshalNString2string(ctx, v) 11685 if err != nil { 11686 return it, err 11687 } 11688 case "fallthrough": 11689 var err error 11690 11691 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fallthrough")) 11692 it.Fallthrough, err = ec.unmarshalNString2string(ctx, v) 11693 if err != nil { 11694 return it, err 11695 } 11696 case "if": 11697 var err error 11698 11699 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("if")) 11700 it.If, err = ec.unmarshalNString2string(ctx, v) 11701 if err != nil { 11702 return it, err 11703 } 11704 case "range": 11705 var err error 11706 11707 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("range")) 11708 it.Range, err = ec.unmarshalNString2string(ctx, v) 11709 if err != nil { 11710 return it, err 11711 } 11712 case "type": 11713 var err error 11714 11715 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type")) 11716 it.Type, err = ec.unmarshalNString2string(ctx, v) 11717 if err != nil { 11718 return it, err 11719 } 11720 case "continue": 11721 var err error 11722 11723 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("continue")) 11724 it.Continue, err = ec.unmarshalNString2string(ctx, v) 11725 if err != nil { 11726 return it, err 11727 } 11728 case "for": 11729 var err error 11730 11731 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("for")) 11732 it.For, err = ec.unmarshalNString2string(ctx, v) 11733 if err != nil { 11734 return it, err 11735 } 11736 case "import": 11737 var err error 11738 11739 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("import")) 11740 it.Import, err = ec.unmarshalNString2string(ctx, v) 11741 if err != nil { 11742 return it, err 11743 } 11744 case "return": 11745 var err error 11746 11747 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("return")) 11748 it.Return, err = ec.unmarshalNString2string(ctx, v) 11749 if err != nil { 11750 return it, err 11751 } 11752 case "var": 11753 var err error 11754 11755 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("var")) 11756 it.Var, err = ec.unmarshalNString2string(ctx, v) 11757 if err != nil { 11758 return it, err 11759 } 11760 case "_": 11761 var err error 11762 11763 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("_")) 11764 it.Underscore, err = ec.unmarshalNString2string(ctx, v) 11765 if err != nil { 11766 return it, err 11767 } 11768 } 11769 } 11770 11771 return it, nil 11772 } 11773 11774 // endregion **************************** input.gotpl ***************************** 11775 11776 // region ************************** interface.gotpl *************************** 11777 11778 func (ec *executionContext) _Animal(ctx context.Context, sel ast.SelectionSet, obj Animal) graphql.Marshaler { 11779 switch obj := (obj).(type) { 11780 case nil: 11781 return graphql.Null 11782 case Dog: 11783 return ec._Dog(ctx, sel, &obj) 11784 case *Dog: 11785 if obj == nil { 11786 return graphql.Null 11787 } 11788 return ec._Dog(ctx, sel, obj) 11789 case Cat: 11790 return ec._Cat(ctx, sel, &obj) 11791 case *Cat: 11792 if obj == nil { 11793 return graphql.Null 11794 } 11795 return ec._Cat(ctx, sel, obj) 11796 default: 11797 panic(fmt.Errorf("unexpected type %T", obj)) 11798 } 11799 } 11800 11801 func (ec *executionContext) _Content_Child(ctx context.Context, sel ast.SelectionSet, obj ContentChild) graphql.Marshaler { 11802 switch obj := (obj).(type) { 11803 case nil: 11804 return graphql.Null 11805 case ContentUser: 11806 return ec._Content_User(ctx, sel, &obj) 11807 case *ContentUser: 11808 if obj == nil { 11809 return graphql.Null 11810 } 11811 return ec._Content_User(ctx, sel, obj) 11812 case ContentPost: 11813 return ec._Content_Post(ctx, sel, &obj) 11814 case *ContentPost: 11815 if obj == nil { 11816 return graphql.Null 11817 } 11818 return ec._Content_Post(ctx, sel, obj) 11819 default: 11820 panic(fmt.Errorf("unexpected type %T", obj)) 11821 } 11822 } 11823 11824 func (ec *executionContext) _Node(ctx context.Context, sel ast.SelectionSet, obj Node) graphql.Marshaler { 11825 switch obj := (obj).(type) { 11826 case nil: 11827 return graphql.Null 11828 case *ConcreteNodeA: 11829 if obj == nil { 11830 return graphql.Null 11831 } 11832 return ec._ConcreteNodeA(ctx, sel, obj) 11833 case ConcreteNodeInterface: 11834 if obj == nil { 11835 return graphql.Null 11836 } 11837 return ec._ConcreteNodeInterface(ctx, sel, obj) 11838 default: 11839 panic(fmt.Errorf("unexpected type %T", obj)) 11840 } 11841 } 11842 11843 func (ec *executionContext) _Shape(ctx context.Context, sel ast.SelectionSet, obj Shape) graphql.Marshaler { 11844 switch obj := (obj).(type) { 11845 case nil: 11846 return graphql.Null 11847 case *Circle: 11848 if obj == nil { 11849 return graphql.Null 11850 } 11851 return ec._Circle(ctx, sel, obj) 11852 case *Rectangle: 11853 if obj == nil { 11854 return graphql.Null 11855 } 11856 return ec._Rectangle(ctx, sel, obj) 11857 default: 11858 panic(fmt.Errorf("unexpected type %T", obj)) 11859 } 11860 } 11861 11862 func (ec *executionContext) _ShapeUnion(ctx context.Context, sel ast.SelectionSet, obj ShapeUnion) graphql.Marshaler { 11863 switch obj := (obj).(type) { 11864 case nil: 11865 return graphql.Null 11866 case *Circle: 11867 if obj == nil { 11868 return graphql.Null 11869 } 11870 return ec._Circle(ctx, sel, obj) 11871 case *Rectangle: 11872 if obj == nil { 11873 return graphql.Null 11874 } 11875 return ec._Rectangle(ctx, sel, obj) 11876 default: 11877 panic(fmt.Errorf("unexpected type %T", obj)) 11878 } 11879 } 11880 11881 func (ec *executionContext) _TestUnion(ctx context.Context, sel ast.SelectionSet, obj TestUnion) graphql.Marshaler { 11882 switch obj := (obj).(type) { 11883 case nil: 11884 return graphql.Null 11885 case A: 11886 return ec._A(ctx, sel, &obj) 11887 case *A: 11888 if obj == nil { 11889 return graphql.Null 11890 } 11891 return ec._A(ctx, sel, obj) 11892 case B: 11893 return ec._B(ctx, sel, &obj) 11894 case *B: 11895 if obj == nil { 11896 return graphql.Null 11897 } 11898 return ec._B(ctx, sel, obj) 11899 default: 11900 panic(fmt.Errorf("unexpected type %T", obj)) 11901 } 11902 } 11903 11904 // endregion ************************** interface.gotpl *************************** 11905 11906 // region **************************** object.gotpl **************************** 11907 11908 var aImplementors = []string{"A", "TestUnion"} 11909 11910 func (ec *executionContext) _A(ctx context.Context, sel ast.SelectionSet, obj *A) graphql.Marshaler { 11911 fields := graphql.CollectFields(ec.OperationContext, sel, aImplementors) 11912 out := graphql.NewFieldSet(fields) 11913 var invalids uint32 11914 for i, field := range fields { 11915 switch field.Name { 11916 case "__typename": 11917 out.Values[i] = graphql.MarshalString("A") 11918 case "id": 11919 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 11920 return ec._A_id(ctx, field, obj) 11921 } 11922 11923 out.Values[i] = innerFunc(ctx) 11924 11925 if out.Values[i] == graphql.Null { 11926 invalids++ 11927 } 11928 default: 11929 panic("unknown field " + strconv.Quote(field.Name)) 11930 } 11931 } 11932 out.Dispatch() 11933 if invalids > 0 { 11934 return graphql.Null 11935 } 11936 return out 11937 } 11938 11939 var aItImplementors = []string{"AIt"} 11940 11941 func (ec *executionContext) _AIt(ctx context.Context, sel ast.SelectionSet, obj *AIt) graphql.Marshaler { 11942 fields := graphql.CollectFields(ec.OperationContext, sel, aItImplementors) 11943 out := graphql.NewFieldSet(fields) 11944 var invalids uint32 11945 for i, field := range fields { 11946 switch field.Name { 11947 case "__typename": 11948 out.Values[i] = graphql.MarshalString("AIt") 11949 case "id": 11950 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 11951 return ec._AIt_id(ctx, field, obj) 11952 } 11953 11954 out.Values[i] = innerFunc(ctx) 11955 11956 if out.Values[i] == graphql.Null { 11957 invalids++ 11958 } 11959 default: 11960 panic("unknown field " + strconv.Quote(field.Name)) 11961 } 11962 } 11963 out.Dispatch() 11964 if invalids > 0 { 11965 return graphql.Null 11966 } 11967 return out 11968 } 11969 11970 var abItImplementors = []string{"AbIt"} 11971 11972 func (ec *executionContext) _AbIt(ctx context.Context, sel ast.SelectionSet, obj *AbIt) graphql.Marshaler { 11973 fields := graphql.CollectFields(ec.OperationContext, sel, abItImplementors) 11974 out := graphql.NewFieldSet(fields) 11975 var invalids uint32 11976 for i, field := range fields { 11977 switch field.Name { 11978 case "__typename": 11979 out.Values[i] = graphql.MarshalString("AbIt") 11980 case "id": 11981 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 11982 return ec._AbIt_id(ctx, field, obj) 11983 } 11984 11985 out.Values[i] = innerFunc(ctx) 11986 11987 if out.Values[i] == graphql.Null { 11988 invalids++ 11989 } 11990 default: 11991 panic("unknown field " + strconv.Quote(field.Name)) 11992 } 11993 } 11994 out.Dispatch() 11995 if invalids > 0 { 11996 return graphql.Null 11997 } 11998 return out 11999 } 12000 12001 var autobindImplementors = []string{"Autobind"} 12002 12003 func (ec *executionContext) _Autobind(ctx context.Context, sel ast.SelectionSet, obj *Autobind) graphql.Marshaler { 12004 fields := graphql.CollectFields(ec.OperationContext, sel, autobindImplementors) 12005 out := graphql.NewFieldSet(fields) 12006 var invalids uint32 12007 for i, field := range fields { 12008 switch field.Name { 12009 case "__typename": 12010 out.Values[i] = graphql.MarshalString("Autobind") 12011 case "int": 12012 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12013 return ec._Autobind_int(ctx, field, obj) 12014 } 12015 12016 out.Values[i] = innerFunc(ctx) 12017 12018 if out.Values[i] == graphql.Null { 12019 invalids++ 12020 } 12021 case "int32": 12022 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12023 return ec._Autobind_int32(ctx, field, obj) 12024 } 12025 12026 out.Values[i] = innerFunc(ctx) 12027 12028 if out.Values[i] == graphql.Null { 12029 invalids++ 12030 } 12031 case "int64": 12032 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12033 return ec._Autobind_int64(ctx, field, obj) 12034 } 12035 12036 out.Values[i] = innerFunc(ctx) 12037 12038 if out.Values[i] == graphql.Null { 12039 invalids++ 12040 } 12041 case "idStr": 12042 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12043 return ec._Autobind_idStr(ctx, field, obj) 12044 } 12045 12046 out.Values[i] = innerFunc(ctx) 12047 12048 if out.Values[i] == graphql.Null { 12049 invalids++ 12050 } 12051 case "idInt": 12052 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12053 return ec._Autobind_idInt(ctx, field, obj) 12054 } 12055 12056 out.Values[i] = innerFunc(ctx) 12057 12058 if out.Values[i] == graphql.Null { 12059 invalids++ 12060 } 12061 default: 12062 panic("unknown field " + strconv.Quote(field.Name)) 12063 } 12064 } 12065 out.Dispatch() 12066 if invalids > 0 { 12067 return graphql.Null 12068 } 12069 return out 12070 } 12071 12072 var bImplementors = []string{"B", "TestUnion"} 12073 12074 func (ec *executionContext) _B(ctx context.Context, sel ast.SelectionSet, obj *B) graphql.Marshaler { 12075 fields := graphql.CollectFields(ec.OperationContext, sel, bImplementors) 12076 out := graphql.NewFieldSet(fields) 12077 var invalids uint32 12078 for i, field := range fields { 12079 switch field.Name { 12080 case "__typename": 12081 out.Values[i] = graphql.MarshalString("B") 12082 case "id": 12083 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12084 return ec._B_id(ctx, field, obj) 12085 } 12086 12087 out.Values[i] = innerFunc(ctx) 12088 12089 if out.Values[i] == graphql.Null { 12090 invalids++ 12091 } 12092 default: 12093 panic("unknown field " + strconv.Quote(field.Name)) 12094 } 12095 } 12096 out.Dispatch() 12097 if invalids > 0 { 12098 return graphql.Null 12099 } 12100 return out 12101 } 12102 12103 var backedByInterfaceImplementors = []string{"BackedByInterface"} 12104 12105 func (ec *executionContext) _BackedByInterface(ctx context.Context, sel ast.SelectionSet, obj BackedByInterface) graphql.Marshaler { 12106 fields := graphql.CollectFields(ec.OperationContext, sel, backedByInterfaceImplementors) 12107 out := graphql.NewFieldSet(fields) 12108 var invalids uint32 12109 for i, field := range fields { 12110 switch field.Name { 12111 case "__typename": 12112 out.Values[i] = graphql.MarshalString("BackedByInterface") 12113 case "id": 12114 field := field 12115 12116 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12117 defer func() { 12118 if r := recover(); r != nil { 12119 ec.Error(ctx, ec.Recover(ctx, r)) 12120 } 12121 }() 12122 res = ec._BackedByInterface_id(ctx, field, obj) 12123 if res == graphql.Null { 12124 atomic.AddUint32(&invalids, 1) 12125 } 12126 return res 12127 } 12128 12129 out.Concurrently(i, func() graphql.Marshaler { 12130 return innerFunc(ctx) 12131 12132 }) 12133 case "thisShouldBind": 12134 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12135 return ec._BackedByInterface_thisShouldBind(ctx, field, obj) 12136 } 12137 12138 out.Values[i] = innerFunc(ctx) 12139 12140 if out.Values[i] == graphql.Null { 12141 atomic.AddUint32(&invalids, 1) 12142 } 12143 case "thisShouldBindWithError": 12144 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12145 return ec._BackedByInterface_thisShouldBindWithError(ctx, field, obj) 12146 } 12147 12148 out.Values[i] = innerFunc(ctx) 12149 12150 if out.Values[i] == graphql.Null { 12151 atomic.AddUint32(&invalids, 1) 12152 } 12153 default: 12154 panic("unknown field " + strconv.Quote(field.Name)) 12155 } 12156 } 12157 out.Dispatch() 12158 if invalids > 0 { 12159 return graphql.Null 12160 } 12161 return out 12162 } 12163 12164 var catImplementors = []string{"Cat", "Animal"} 12165 12166 func (ec *executionContext) _Cat(ctx context.Context, sel ast.SelectionSet, obj *Cat) graphql.Marshaler { 12167 fields := graphql.CollectFields(ec.OperationContext, sel, catImplementors) 12168 out := graphql.NewFieldSet(fields) 12169 var invalids uint32 12170 for i, field := range fields { 12171 switch field.Name { 12172 case "__typename": 12173 out.Values[i] = graphql.MarshalString("Cat") 12174 case "species": 12175 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12176 return ec._Cat_species(ctx, field, obj) 12177 } 12178 12179 out.Values[i] = innerFunc(ctx) 12180 12181 if out.Values[i] == graphql.Null { 12182 invalids++ 12183 } 12184 case "catBreed": 12185 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12186 return ec._Cat_catBreed(ctx, field, obj) 12187 } 12188 12189 out.Values[i] = innerFunc(ctx) 12190 12191 if out.Values[i] == graphql.Null { 12192 invalids++ 12193 } 12194 default: 12195 panic("unknown field " + strconv.Quote(field.Name)) 12196 } 12197 } 12198 out.Dispatch() 12199 if invalids > 0 { 12200 return graphql.Null 12201 } 12202 return out 12203 } 12204 12205 var checkIssue896Implementors = []string{"CheckIssue896"} 12206 12207 func (ec *executionContext) _CheckIssue896(ctx context.Context, sel ast.SelectionSet, obj *CheckIssue896) graphql.Marshaler { 12208 fields := graphql.CollectFields(ec.OperationContext, sel, checkIssue896Implementors) 12209 out := graphql.NewFieldSet(fields) 12210 var invalids uint32 12211 for i, field := range fields { 12212 switch field.Name { 12213 case "__typename": 12214 out.Values[i] = graphql.MarshalString("CheckIssue896") 12215 case "id": 12216 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12217 return ec._CheckIssue896_id(ctx, field, obj) 12218 } 12219 12220 out.Values[i] = innerFunc(ctx) 12221 12222 default: 12223 panic("unknown field " + strconv.Quote(field.Name)) 12224 } 12225 } 12226 out.Dispatch() 12227 if invalids > 0 { 12228 return graphql.Null 12229 } 12230 return out 12231 } 12232 12233 var circleImplementors = []string{"Circle", "Shape", "ShapeUnion"} 12234 12235 func (ec *executionContext) _Circle(ctx context.Context, sel ast.SelectionSet, obj *Circle) graphql.Marshaler { 12236 fields := graphql.CollectFields(ec.OperationContext, sel, circleImplementors) 12237 out := graphql.NewFieldSet(fields) 12238 var invalids uint32 12239 for i, field := range fields { 12240 switch field.Name { 12241 case "__typename": 12242 out.Values[i] = graphql.MarshalString("Circle") 12243 case "radius": 12244 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12245 return ec._Circle_radius(ctx, field, obj) 12246 } 12247 12248 out.Values[i] = innerFunc(ctx) 12249 12250 case "area": 12251 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12252 return ec._Circle_area(ctx, field, obj) 12253 } 12254 12255 out.Values[i] = innerFunc(ctx) 12256 12257 case "coordinates": 12258 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12259 return ec._Circle_coordinates(ctx, field, obj) 12260 } 12261 12262 out.Values[i] = innerFunc(ctx) 12263 12264 default: 12265 panic("unknown field " + strconv.Quote(field.Name)) 12266 } 12267 } 12268 out.Dispatch() 12269 if invalids > 0 { 12270 return graphql.Null 12271 } 12272 return out 12273 } 12274 12275 var concreteNodeAImplementors = []string{"ConcreteNodeA", "Node"} 12276 12277 func (ec *executionContext) _ConcreteNodeA(ctx context.Context, sel ast.SelectionSet, obj *ConcreteNodeA) graphql.Marshaler { 12278 fields := graphql.CollectFields(ec.OperationContext, sel, concreteNodeAImplementors) 12279 out := graphql.NewFieldSet(fields) 12280 var invalids uint32 12281 for i, field := range fields { 12282 switch field.Name { 12283 case "__typename": 12284 out.Values[i] = graphql.MarshalString("ConcreteNodeA") 12285 case "id": 12286 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12287 return ec._ConcreteNodeA_id(ctx, field, obj) 12288 } 12289 12290 out.Values[i] = innerFunc(ctx) 12291 12292 if out.Values[i] == graphql.Null { 12293 invalids++ 12294 } 12295 case "child": 12296 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12297 return ec._ConcreteNodeA_child(ctx, field, obj) 12298 } 12299 12300 out.Values[i] = innerFunc(ctx) 12301 12302 if out.Values[i] == graphql.Null { 12303 invalids++ 12304 } 12305 case "name": 12306 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12307 return ec._ConcreteNodeA_name(ctx, field, obj) 12308 } 12309 12310 out.Values[i] = innerFunc(ctx) 12311 12312 if out.Values[i] == graphql.Null { 12313 invalids++ 12314 } 12315 default: 12316 panic("unknown field " + strconv.Quote(field.Name)) 12317 } 12318 } 12319 out.Dispatch() 12320 if invalids > 0 { 12321 return graphql.Null 12322 } 12323 return out 12324 } 12325 12326 var concreteNodeInterfaceImplementors = []string{"ConcreteNodeInterface", "Node"} 12327 12328 func (ec *executionContext) _ConcreteNodeInterface(ctx context.Context, sel ast.SelectionSet, obj ConcreteNodeInterface) graphql.Marshaler { 12329 fields := graphql.CollectFields(ec.OperationContext, sel, concreteNodeInterfaceImplementors) 12330 out := graphql.NewFieldSet(fields) 12331 var invalids uint32 12332 for i, field := range fields { 12333 switch field.Name { 12334 case "__typename": 12335 out.Values[i] = graphql.MarshalString("ConcreteNodeInterface") 12336 case "id": 12337 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12338 return ec._ConcreteNodeInterface_id(ctx, field, obj) 12339 } 12340 12341 out.Values[i] = innerFunc(ctx) 12342 12343 if out.Values[i] == graphql.Null { 12344 invalids++ 12345 } 12346 case "child": 12347 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12348 return ec._ConcreteNodeInterface_child(ctx, field, obj) 12349 } 12350 12351 out.Values[i] = innerFunc(ctx) 12352 12353 if out.Values[i] == graphql.Null { 12354 invalids++ 12355 } 12356 default: 12357 panic("unknown field " + strconv.Quote(field.Name)) 12358 } 12359 } 12360 out.Dispatch() 12361 if invalids > 0 { 12362 return graphql.Null 12363 } 12364 return out 12365 } 12366 12367 var content_PostImplementors = []string{"Content_Post", "Content_Child"} 12368 12369 func (ec *executionContext) _Content_Post(ctx context.Context, sel ast.SelectionSet, obj *ContentPost) graphql.Marshaler { 12370 fields := graphql.CollectFields(ec.OperationContext, sel, content_PostImplementors) 12371 out := graphql.NewFieldSet(fields) 12372 var invalids uint32 12373 for i, field := range fields { 12374 switch field.Name { 12375 case "__typename": 12376 out.Values[i] = graphql.MarshalString("Content_Post") 12377 case "foo": 12378 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12379 return ec._Content_Post_foo(ctx, field, obj) 12380 } 12381 12382 out.Values[i] = innerFunc(ctx) 12383 12384 default: 12385 panic("unknown field " + strconv.Quote(field.Name)) 12386 } 12387 } 12388 out.Dispatch() 12389 if invalids > 0 { 12390 return graphql.Null 12391 } 12392 return out 12393 } 12394 12395 var content_UserImplementors = []string{"Content_User", "Content_Child"} 12396 12397 func (ec *executionContext) _Content_User(ctx context.Context, sel ast.SelectionSet, obj *ContentUser) graphql.Marshaler { 12398 fields := graphql.CollectFields(ec.OperationContext, sel, content_UserImplementors) 12399 out := graphql.NewFieldSet(fields) 12400 var invalids uint32 12401 for i, field := range fields { 12402 switch field.Name { 12403 case "__typename": 12404 out.Values[i] = graphql.MarshalString("Content_User") 12405 case "foo": 12406 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12407 return ec._Content_User_foo(ctx, field, obj) 12408 } 12409 12410 out.Values[i] = innerFunc(ctx) 12411 12412 default: 12413 panic("unknown field " + strconv.Quote(field.Name)) 12414 } 12415 } 12416 out.Dispatch() 12417 if invalids > 0 { 12418 return graphql.Null 12419 } 12420 return out 12421 } 12422 12423 var coordinatesImplementors = []string{"Coordinates"} 12424 12425 func (ec *executionContext) _Coordinates(ctx context.Context, sel ast.SelectionSet, obj *Coordinates) graphql.Marshaler { 12426 fields := graphql.CollectFields(ec.OperationContext, sel, coordinatesImplementors) 12427 out := graphql.NewFieldSet(fields) 12428 var invalids uint32 12429 for i, field := range fields { 12430 switch field.Name { 12431 case "__typename": 12432 out.Values[i] = graphql.MarshalString("Coordinates") 12433 case "x": 12434 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12435 return ec._Coordinates_x(ctx, field, obj) 12436 } 12437 12438 out.Values[i] = innerFunc(ctx) 12439 12440 if out.Values[i] == graphql.Null { 12441 invalids++ 12442 } 12443 case "y": 12444 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12445 return ec._Coordinates_y(ctx, field, obj) 12446 } 12447 12448 out.Values[i] = innerFunc(ctx) 12449 12450 if out.Values[i] == graphql.Null { 12451 invalids++ 12452 } 12453 default: 12454 panic("unknown field " + strconv.Quote(field.Name)) 12455 } 12456 } 12457 out.Dispatch() 12458 if invalids > 0 { 12459 return graphql.Null 12460 } 12461 return out 12462 } 12463 12464 var defaultParametersMirrorImplementors = []string{"DefaultParametersMirror"} 12465 12466 func (ec *executionContext) _DefaultParametersMirror(ctx context.Context, sel ast.SelectionSet, obj *DefaultParametersMirror) graphql.Marshaler { 12467 fields := graphql.CollectFields(ec.OperationContext, sel, defaultParametersMirrorImplementors) 12468 out := graphql.NewFieldSet(fields) 12469 var invalids uint32 12470 for i, field := range fields { 12471 switch field.Name { 12472 case "__typename": 12473 out.Values[i] = graphql.MarshalString("DefaultParametersMirror") 12474 case "falsyBoolean": 12475 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12476 return ec._DefaultParametersMirror_falsyBoolean(ctx, field, obj) 12477 } 12478 12479 out.Values[i] = innerFunc(ctx) 12480 12481 case "truthyBoolean": 12482 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12483 return ec._DefaultParametersMirror_truthyBoolean(ctx, field, obj) 12484 } 12485 12486 out.Values[i] = innerFunc(ctx) 12487 12488 default: 12489 panic("unknown field " + strconv.Quote(field.Name)) 12490 } 12491 } 12492 out.Dispatch() 12493 if invalids > 0 { 12494 return graphql.Null 12495 } 12496 return out 12497 } 12498 12499 var dogImplementors = []string{"Dog", "Animal"} 12500 12501 func (ec *executionContext) _Dog(ctx context.Context, sel ast.SelectionSet, obj *Dog) graphql.Marshaler { 12502 fields := graphql.CollectFields(ec.OperationContext, sel, dogImplementors) 12503 out := graphql.NewFieldSet(fields) 12504 var invalids uint32 12505 for i, field := range fields { 12506 switch field.Name { 12507 case "__typename": 12508 out.Values[i] = graphql.MarshalString("Dog") 12509 case "species": 12510 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12511 return ec._Dog_species(ctx, field, obj) 12512 } 12513 12514 out.Values[i] = innerFunc(ctx) 12515 12516 if out.Values[i] == graphql.Null { 12517 invalids++ 12518 } 12519 case "dogBreed": 12520 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12521 return ec._Dog_dogBreed(ctx, field, obj) 12522 } 12523 12524 out.Values[i] = innerFunc(ctx) 12525 12526 if out.Values[i] == graphql.Null { 12527 invalids++ 12528 } 12529 default: 12530 panic("unknown field " + strconv.Quote(field.Name)) 12531 } 12532 } 12533 out.Dispatch() 12534 if invalids > 0 { 12535 return graphql.Null 12536 } 12537 return out 12538 } 12539 12540 var embeddedCase1Implementors = []string{"EmbeddedCase1"} 12541 12542 func (ec *executionContext) _EmbeddedCase1(ctx context.Context, sel ast.SelectionSet, obj *EmbeddedCase1) graphql.Marshaler { 12543 fields := graphql.CollectFields(ec.OperationContext, sel, embeddedCase1Implementors) 12544 out := graphql.NewFieldSet(fields) 12545 var invalids uint32 12546 for i, field := range fields { 12547 switch field.Name { 12548 case "__typename": 12549 out.Values[i] = graphql.MarshalString("EmbeddedCase1") 12550 case "exportedEmbeddedPointerExportedMethod": 12551 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12552 return ec._EmbeddedCase1_exportedEmbeddedPointerExportedMethod(ctx, field, obj) 12553 } 12554 12555 out.Values[i] = innerFunc(ctx) 12556 12557 if out.Values[i] == graphql.Null { 12558 invalids++ 12559 } 12560 default: 12561 panic("unknown field " + strconv.Quote(field.Name)) 12562 } 12563 } 12564 out.Dispatch() 12565 if invalids > 0 { 12566 return graphql.Null 12567 } 12568 return out 12569 } 12570 12571 var embeddedCase2Implementors = []string{"EmbeddedCase2"} 12572 12573 func (ec *executionContext) _EmbeddedCase2(ctx context.Context, sel ast.SelectionSet, obj *EmbeddedCase2) graphql.Marshaler { 12574 fields := graphql.CollectFields(ec.OperationContext, sel, embeddedCase2Implementors) 12575 out := graphql.NewFieldSet(fields) 12576 var invalids uint32 12577 for i, field := range fields { 12578 switch field.Name { 12579 case "__typename": 12580 out.Values[i] = graphql.MarshalString("EmbeddedCase2") 12581 case "unexportedEmbeddedPointerExportedMethod": 12582 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12583 return ec._EmbeddedCase2_unexportedEmbeddedPointerExportedMethod(ctx, field, obj) 12584 } 12585 12586 out.Values[i] = innerFunc(ctx) 12587 12588 if out.Values[i] == graphql.Null { 12589 invalids++ 12590 } 12591 default: 12592 panic("unknown field " + strconv.Quote(field.Name)) 12593 } 12594 } 12595 out.Dispatch() 12596 if invalids > 0 { 12597 return graphql.Null 12598 } 12599 return out 12600 } 12601 12602 var embeddedCase3Implementors = []string{"EmbeddedCase3"} 12603 12604 func (ec *executionContext) _EmbeddedCase3(ctx context.Context, sel ast.SelectionSet, obj *EmbeddedCase3) graphql.Marshaler { 12605 fields := graphql.CollectFields(ec.OperationContext, sel, embeddedCase3Implementors) 12606 out := graphql.NewFieldSet(fields) 12607 var invalids uint32 12608 for i, field := range fields { 12609 switch field.Name { 12610 case "__typename": 12611 out.Values[i] = graphql.MarshalString("EmbeddedCase3") 12612 case "unexportedEmbeddedInterfaceExportedMethod": 12613 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12614 return ec._EmbeddedCase3_unexportedEmbeddedInterfaceExportedMethod(ctx, field, obj) 12615 } 12616 12617 out.Values[i] = innerFunc(ctx) 12618 12619 if out.Values[i] == graphql.Null { 12620 invalids++ 12621 } 12622 default: 12623 panic("unknown field " + strconv.Quote(field.Name)) 12624 } 12625 } 12626 out.Dispatch() 12627 if invalids > 0 { 12628 return graphql.Null 12629 } 12630 return out 12631 } 12632 12633 var embeddedDefaultScalarImplementors = []string{"EmbeddedDefaultScalar"} 12634 12635 func (ec *executionContext) _EmbeddedDefaultScalar(ctx context.Context, sel ast.SelectionSet, obj *EmbeddedDefaultScalar) graphql.Marshaler { 12636 fields := graphql.CollectFields(ec.OperationContext, sel, embeddedDefaultScalarImplementors) 12637 out := graphql.NewFieldSet(fields) 12638 var invalids uint32 12639 for i, field := range fields { 12640 switch field.Name { 12641 case "__typename": 12642 out.Values[i] = graphql.MarshalString("EmbeddedDefaultScalar") 12643 case "value": 12644 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12645 return ec._EmbeddedDefaultScalar_value(ctx, field, obj) 12646 } 12647 12648 out.Values[i] = innerFunc(ctx) 12649 12650 default: 12651 panic("unknown field " + strconv.Quote(field.Name)) 12652 } 12653 } 12654 out.Dispatch() 12655 if invalids > 0 { 12656 return graphql.Null 12657 } 12658 return out 12659 } 12660 12661 var embeddedPointerImplementors = []string{"EmbeddedPointer"} 12662 12663 func (ec *executionContext) _EmbeddedPointer(ctx context.Context, sel ast.SelectionSet, obj *EmbeddedPointerModel) graphql.Marshaler { 12664 fields := graphql.CollectFields(ec.OperationContext, sel, embeddedPointerImplementors) 12665 out := graphql.NewFieldSet(fields) 12666 var invalids uint32 12667 for i, field := range fields { 12668 switch field.Name { 12669 case "__typename": 12670 out.Values[i] = graphql.MarshalString("EmbeddedPointer") 12671 case "ID": 12672 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12673 return ec._EmbeddedPointer_ID(ctx, field, obj) 12674 } 12675 12676 out.Values[i] = innerFunc(ctx) 12677 12678 case "Title": 12679 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12680 return ec._EmbeddedPointer_Title(ctx, field, obj) 12681 } 12682 12683 out.Values[i] = innerFunc(ctx) 12684 12685 default: 12686 panic("unknown field " + strconv.Quote(field.Name)) 12687 } 12688 } 12689 out.Dispatch() 12690 if invalids > 0 { 12691 return graphql.Null 12692 } 12693 return out 12694 } 12695 12696 var errorImplementors = []string{"Error"} 12697 12698 func (ec *executionContext) _Error(ctx context.Context, sel ast.SelectionSet, obj *Error) graphql.Marshaler { 12699 fields := graphql.CollectFields(ec.OperationContext, sel, errorImplementors) 12700 out := graphql.NewFieldSet(fields) 12701 var invalids uint32 12702 for i, field := range fields { 12703 switch field.Name { 12704 case "__typename": 12705 out.Values[i] = graphql.MarshalString("Error") 12706 case "id": 12707 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12708 return ec._Error_id(ctx, field, obj) 12709 } 12710 12711 out.Values[i] = innerFunc(ctx) 12712 12713 if out.Values[i] == graphql.Null { 12714 invalids++ 12715 } 12716 case "errorOnNonRequiredField": 12717 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12718 return ec._Error_errorOnNonRequiredField(ctx, field, obj) 12719 } 12720 12721 out.Values[i] = innerFunc(ctx) 12722 12723 case "errorOnRequiredField": 12724 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12725 return ec._Error_errorOnRequiredField(ctx, field, obj) 12726 } 12727 12728 out.Values[i] = innerFunc(ctx) 12729 12730 if out.Values[i] == graphql.Null { 12731 invalids++ 12732 } 12733 case "nilOnRequiredField": 12734 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12735 return ec._Error_nilOnRequiredField(ctx, field, obj) 12736 } 12737 12738 out.Values[i] = innerFunc(ctx) 12739 12740 if out.Values[i] == graphql.Null { 12741 invalids++ 12742 } 12743 default: 12744 panic("unknown field " + strconv.Quote(field.Name)) 12745 } 12746 } 12747 out.Dispatch() 12748 if invalids > 0 { 12749 return graphql.Null 12750 } 12751 return out 12752 } 12753 12754 var errorsImplementors = []string{"Errors"} 12755 12756 func (ec *executionContext) _Errors(ctx context.Context, sel ast.SelectionSet, obj *Errors) graphql.Marshaler { 12757 fields := graphql.CollectFields(ec.OperationContext, sel, errorsImplementors) 12758 out := graphql.NewFieldSet(fields) 12759 var invalids uint32 12760 for i, field := range fields { 12761 switch field.Name { 12762 case "__typename": 12763 out.Values[i] = graphql.MarshalString("Errors") 12764 case "a": 12765 field := field 12766 12767 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12768 defer func() { 12769 if r := recover(); r != nil { 12770 ec.Error(ctx, ec.Recover(ctx, r)) 12771 } 12772 }() 12773 res = ec._Errors_a(ctx, field, obj) 12774 if res == graphql.Null { 12775 atomic.AddUint32(&invalids, 1) 12776 } 12777 return res 12778 } 12779 12780 out.Concurrently(i, func() graphql.Marshaler { 12781 return innerFunc(ctx) 12782 12783 }) 12784 case "b": 12785 field := field 12786 12787 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12788 defer func() { 12789 if r := recover(); r != nil { 12790 ec.Error(ctx, ec.Recover(ctx, r)) 12791 } 12792 }() 12793 res = ec._Errors_b(ctx, field, obj) 12794 if res == graphql.Null { 12795 atomic.AddUint32(&invalids, 1) 12796 } 12797 return res 12798 } 12799 12800 out.Concurrently(i, func() graphql.Marshaler { 12801 return innerFunc(ctx) 12802 12803 }) 12804 case "c": 12805 field := field 12806 12807 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12808 defer func() { 12809 if r := recover(); r != nil { 12810 ec.Error(ctx, ec.Recover(ctx, r)) 12811 } 12812 }() 12813 res = ec._Errors_c(ctx, field, obj) 12814 if res == graphql.Null { 12815 atomic.AddUint32(&invalids, 1) 12816 } 12817 return res 12818 } 12819 12820 out.Concurrently(i, func() graphql.Marshaler { 12821 return innerFunc(ctx) 12822 12823 }) 12824 case "d": 12825 field := field 12826 12827 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12828 defer func() { 12829 if r := recover(); r != nil { 12830 ec.Error(ctx, ec.Recover(ctx, r)) 12831 } 12832 }() 12833 res = ec._Errors_d(ctx, field, obj) 12834 if res == graphql.Null { 12835 atomic.AddUint32(&invalids, 1) 12836 } 12837 return res 12838 } 12839 12840 out.Concurrently(i, func() graphql.Marshaler { 12841 return innerFunc(ctx) 12842 12843 }) 12844 case "e": 12845 field := field 12846 12847 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12848 defer func() { 12849 if r := recover(); r != nil { 12850 ec.Error(ctx, ec.Recover(ctx, r)) 12851 } 12852 }() 12853 res = ec._Errors_e(ctx, field, obj) 12854 if res == graphql.Null { 12855 atomic.AddUint32(&invalids, 1) 12856 } 12857 return res 12858 } 12859 12860 out.Concurrently(i, func() graphql.Marshaler { 12861 return innerFunc(ctx) 12862 12863 }) 12864 default: 12865 panic("unknown field " + strconv.Quote(field.Name)) 12866 } 12867 } 12868 out.Dispatch() 12869 if invalids > 0 { 12870 return graphql.Null 12871 } 12872 return out 12873 } 12874 12875 var forcedResolverImplementors = []string{"ForcedResolver"} 12876 12877 func (ec *executionContext) _ForcedResolver(ctx context.Context, sel ast.SelectionSet, obj *ForcedResolver) graphql.Marshaler { 12878 fields := graphql.CollectFields(ec.OperationContext, sel, forcedResolverImplementors) 12879 out := graphql.NewFieldSet(fields) 12880 var invalids uint32 12881 for i, field := range fields { 12882 switch field.Name { 12883 case "__typename": 12884 out.Values[i] = graphql.MarshalString("ForcedResolver") 12885 case "field": 12886 field := field 12887 12888 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12889 defer func() { 12890 if r := recover(); r != nil { 12891 ec.Error(ctx, ec.Recover(ctx, r)) 12892 } 12893 }() 12894 res = ec._ForcedResolver_field(ctx, field, obj) 12895 return res 12896 } 12897 12898 out.Concurrently(i, func() graphql.Marshaler { 12899 return innerFunc(ctx) 12900 12901 }) 12902 default: 12903 panic("unknown field " + strconv.Quote(field.Name)) 12904 } 12905 } 12906 out.Dispatch() 12907 if invalids > 0 { 12908 return graphql.Null 12909 } 12910 return out 12911 } 12912 12913 var innerObjectImplementors = []string{"InnerObject"} 12914 12915 func (ec *executionContext) _InnerObject(ctx context.Context, sel ast.SelectionSet, obj *InnerObject) graphql.Marshaler { 12916 fields := graphql.CollectFields(ec.OperationContext, sel, innerObjectImplementors) 12917 out := graphql.NewFieldSet(fields) 12918 var invalids uint32 12919 for i, field := range fields { 12920 switch field.Name { 12921 case "__typename": 12922 out.Values[i] = graphql.MarshalString("InnerObject") 12923 case "id": 12924 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12925 return ec._InnerObject_id(ctx, field, obj) 12926 } 12927 12928 out.Values[i] = innerFunc(ctx) 12929 12930 if out.Values[i] == graphql.Null { 12931 invalids++ 12932 } 12933 default: 12934 panic("unknown field " + strconv.Quote(field.Name)) 12935 } 12936 } 12937 out.Dispatch() 12938 if invalids > 0 { 12939 return graphql.Null 12940 } 12941 return out 12942 } 12943 12944 var invalidIdentifierImplementors = []string{"InvalidIdentifier"} 12945 12946 func (ec *executionContext) _InvalidIdentifier(ctx context.Context, sel ast.SelectionSet, obj *invalid_packagename.InvalidIdentifier) graphql.Marshaler { 12947 fields := graphql.CollectFields(ec.OperationContext, sel, invalidIdentifierImplementors) 12948 out := graphql.NewFieldSet(fields) 12949 var invalids uint32 12950 for i, field := range fields { 12951 switch field.Name { 12952 case "__typename": 12953 out.Values[i] = graphql.MarshalString("InvalidIdentifier") 12954 case "id": 12955 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12956 return ec._InvalidIdentifier_id(ctx, field, obj) 12957 } 12958 12959 out.Values[i] = innerFunc(ctx) 12960 12961 if out.Values[i] == graphql.Null { 12962 invalids++ 12963 } 12964 default: 12965 panic("unknown field " + strconv.Quote(field.Name)) 12966 } 12967 } 12968 out.Dispatch() 12969 if invalids > 0 { 12970 return graphql.Null 12971 } 12972 return out 12973 } 12974 12975 var itImplementors = []string{"It"} 12976 12977 func (ec *executionContext) _It(ctx context.Context, sel ast.SelectionSet, obj *introspection1.It) graphql.Marshaler { 12978 fields := graphql.CollectFields(ec.OperationContext, sel, itImplementors) 12979 out := graphql.NewFieldSet(fields) 12980 var invalids uint32 12981 for i, field := range fields { 12982 switch field.Name { 12983 case "__typename": 12984 out.Values[i] = graphql.MarshalString("It") 12985 case "id": 12986 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 12987 return ec._It_id(ctx, field, obj) 12988 } 12989 12990 out.Values[i] = innerFunc(ctx) 12991 12992 if out.Values[i] == graphql.Null { 12993 invalids++ 12994 } 12995 default: 12996 panic("unknown field " + strconv.Quote(field.Name)) 12997 } 12998 } 12999 out.Dispatch() 13000 if invalids > 0 { 13001 return graphql.Null 13002 } 13003 return out 13004 } 13005 13006 var loopAImplementors = []string{"LoopA"} 13007 13008 func (ec *executionContext) _LoopA(ctx context.Context, sel ast.SelectionSet, obj *LoopA) graphql.Marshaler { 13009 fields := graphql.CollectFields(ec.OperationContext, sel, loopAImplementors) 13010 out := graphql.NewFieldSet(fields) 13011 var invalids uint32 13012 for i, field := range fields { 13013 switch field.Name { 13014 case "__typename": 13015 out.Values[i] = graphql.MarshalString("LoopA") 13016 case "b": 13017 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13018 return ec._LoopA_b(ctx, field, obj) 13019 } 13020 13021 out.Values[i] = innerFunc(ctx) 13022 13023 if out.Values[i] == graphql.Null { 13024 invalids++ 13025 } 13026 default: 13027 panic("unknown field " + strconv.Quote(field.Name)) 13028 } 13029 } 13030 out.Dispatch() 13031 if invalids > 0 { 13032 return graphql.Null 13033 } 13034 return out 13035 } 13036 13037 var loopBImplementors = []string{"LoopB"} 13038 13039 func (ec *executionContext) _LoopB(ctx context.Context, sel ast.SelectionSet, obj *LoopB) graphql.Marshaler { 13040 fields := graphql.CollectFields(ec.OperationContext, sel, loopBImplementors) 13041 out := graphql.NewFieldSet(fields) 13042 var invalids uint32 13043 for i, field := range fields { 13044 switch field.Name { 13045 case "__typename": 13046 out.Values[i] = graphql.MarshalString("LoopB") 13047 case "a": 13048 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13049 return ec._LoopB_a(ctx, field, obj) 13050 } 13051 13052 out.Values[i] = innerFunc(ctx) 13053 13054 if out.Values[i] == graphql.Null { 13055 invalids++ 13056 } 13057 default: 13058 panic("unknown field " + strconv.Quote(field.Name)) 13059 } 13060 } 13061 out.Dispatch() 13062 if invalids > 0 { 13063 return graphql.Null 13064 } 13065 return out 13066 } 13067 13068 var mapImplementors = []string{"Map"} 13069 13070 func (ec *executionContext) _Map(ctx context.Context, sel ast.SelectionSet, obj *Map) graphql.Marshaler { 13071 fields := graphql.CollectFields(ec.OperationContext, sel, mapImplementors) 13072 out := graphql.NewFieldSet(fields) 13073 var invalids uint32 13074 for i, field := range fields { 13075 switch field.Name { 13076 case "__typename": 13077 out.Values[i] = graphql.MarshalString("Map") 13078 case "id": 13079 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13080 return ec._Map_id(ctx, field, obj) 13081 } 13082 13083 out.Values[i] = innerFunc(ctx) 13084 13085 if out.Values[i] == graphql.Null { 13086 invalids++ 13087 } 13088 default: 13089 panic("unknown field " + strconv.Quote(field.Name)) 13090 } 13091 } 13092 out.Dispatch() 13093 if invalids > 0 { 13094 return graphql.Null 13095 } 13096 return out 13097 } 13098 13099 var mapStringInterfaceTypeImplementors = []string{"MapStringInterfaceType"} 13100 13101 func (ec *executionContext) _MapStringInterfaceType(ctx context.Context, sel ast.SelectionSet, obj map[string]interface{}) graphql.Marshaler { 13102 fields := graphql.CollectFields(ec.OperationContext, sel, mapStringInterfaceTypeImplementors) 13103 out := graphql.NewFieldSet(fields) 13104 var invalids uint32 13105 for i, field := range fields { 13106 switch field.Name { 13107 case "__typename": 13108 out.Values[i] = graphql.MarshalString("MapStringInterfaceType") 13109 case "a": 13110 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13111 return ec._MapStringInterfaceType_a(ctx, field, obj) 13112 } 13113 13114 out.Values[i] = innerFunc(ctx) 13115 13116 case "b": 13117 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13118 return ec._MapStringInterfaceType_b(ctx, field, obj) 13119 } 13120 13121 out.Values[i] = innerFunc(ctx) 13122 13123 default: 13124 panic("unknown field " + strconv.Quote(field.Name)) 13125 } 13126 } 13127 out.Dispatch() 13128 if invalids > 0 { 13129 return graphql.Null 13130 } 13131 return out 13132 } 13133 13134 var modelMethodsImplementors = []string{"ModelMethods"} 13135 13136 func (ec *executionContext) _ModelMethods(ctx context.Context, sel ast.SelectionSet, obj *ModelMethods) graphql.Marshaler { 13137 fields := graphql.CollectFields(ec.OperationContext, sel, modelMethodsImplementors) 13138 out := graphql.NewFieldSet(fields) 13139 var invalids uint32 13140 for i, field := range fields { 13141 switch field.Name { 13142 case "__typename": 13143 out.Values[i] = graphql.MarshalString("ModelMethods") 13144 case "resolverField": 13145 field := field 13146 13147 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13148 defer func() { 13149 if r := recover(); r != nil { 13150 ec.Error(ctx, ec.Recover(ctx, r)) 13151 } 13152 }() 13153 res = ec._ModelMethods_resolverField(ctx, field, obj) 13154 if res == graphql.Null { 13155 atomic.AddUint32(&invalids, 1) 13156 } 13157 return res 13158 } 13159 13160 out.Concurrently(i, func() graphql.Marshaler { 13161 return innerFunc(ctx) 13162 13163 }) 13164 case "noContext": 13165 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13166 return ec._ModelMethods_noContext(ctx, field, obj) 13167 } 13168 13169 out.Values[i] = innerFunc(ctx) 13170 13171 if out.Values[i] == graphql.Null { 13172 atomic.AddUint32(&invalids, 1) 13173 } 13174 case "withContext": 13175 field := field 13176 13177 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13178 defer func() { 13179 if r := recover(); r != nil { 13180 ec.Error(ctx, ec.Recover(ctx, r)) 13181 } 13182 }() 13183 res = ec._ModelMethods_withContext(ctx, field, obj) 13184 if res == graphql.Null { 13185 atomic.AddUint32(&invalids, 1) 13186 } 13187 return res 13188 } 13189 13190 out.Concurrently(i, func() graphql.Marshaler { 13191 return innerFunc(ctx) 13192 13193 }) 13194 default: 13195 panic("unknown field " + strconv.Quote(field.Name)) 13196 } 13197 } 13198 out.Dispatch() 13199 if invalids > 0 { 13200 return graphql.Null 13201 } 13202 return out 13203 } 13204 13205 var mutationImplementors = []string{"Mutation"} 13206 13207 func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { 13208 fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors) 13209 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ 13210 Object: "Mutation", 13211 }) 13212 13213 out := graphql.NewFieldSet(fields) 13214 var invalids uint32 13215 for i, field := range fields { 13216 innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ 13217 Object: field.Name, 13218 Field: field, 13219 }) 13220 13221 switch field.Name { 13222 case "__typename": 13223 out.Values[i] = graphql.MarshalString("Mutation") 13224 case "defaultInput": 13225 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13226 return ec._Mutation_defaultInput(ctx, field) 13227 } 13228 13229 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, innerFunc) 13230 13231 if out.Values[i] == graphql.Null { 13232 invalids++ 13233 } 13234 case "updateSomething": 13235 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13236 return ec._Mutation_updateSomething(ctx, field) 13237 } 13238 13239 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, innerFunc) 13240 13241 if out.Values[i] == graphql.Null { 13242 invalids++ 13243 } 13244 case "updatePtrToPtr": 13245 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13246 return ec._Mutation_updatePtrToPtr(ctx, field) 13247 } 13248 13249 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, innerFunc) 13250 13251 if out.Values[i] == graphql.Null { 13252 invalids++ 13253 } 13254 default: 13255 panic("unknown field " + strconv.Quote(field.Name)) 13256 } 13257 } 13258 out.Dispatch() 13259 if invalids > 0 { 13260 return graphql.Null 13261 } 13262 return out 13263 } 13264 13265 var objectDirectivesImplementors = []string{"ObjectDirectives"} 13266 13267 func (ec *executionContext) _ObjectDirectives(ctx context.Context, sel ast.SelectionSet, obj *ObjectDirectives) graphql.Marshaler { 13268 fields := graphql.CollectFields(ec.OperationContext, sel, objectDirectivesImplementors) 13269 out := graphql.NewFieldSet(fields) 13270 var invalids uint32 13271 for i, field := range fields { 13272 switch field.Name { 13273 case "__typename": 13274 out.Values[i] = graphql.MarshalString("ObjectDirectives") 13275 case "text": 13276 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13277 return ec._ObjectDirectives_text(ctx, field, obj) 13278 } 13279 13280 out.Values[i] = innerFunc(ctx) 13281 13282 if out.Values[i] == graphql.Null { 13283 invalids++ 13284 } 13285 case "nullableText": 13286 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13287 return ec._ObjectDirectives_nullableText(ctx, field, obj) 13288 } 13289 13290 out.Values[i] = innerFunc(ctx) 13291 13292 case "order": 13293 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13294 return ec._ObjectDirectives_order(ctx, field, obj) 13295 } 13296 13297 out.Values[i] = innerFunc(ctx) 13298 13299 if out.Values[i] == graphql.Null { 13300 invalids++ 13301 } 13302 default: 13303 panic("unknown field " + strconv.Quote(field.Name)) 13304 } 13305 } 13306 out.Dispatch() 13307 if invalids > 0 { 13308 return graphql.Null 13309 } 13310 return out 13311 } 13312 13313 var objectDirectivesWithCustomGoModelImplementors = []string{"ObjectDirectivesWithCustomGoModel"} 13314 13315 func (ec *executionContext) _ObjectDirectivesWithCustomGoModel(ctx context.Context, sel ast.SelectionSet, obj *ObjectDirectivesWithCustomGoModel) graphql.Marshaler { 13316 fields := graphql.CollectFields(ec.OperationContext, sel, objectDirectivesWithCustomGoModelImplementors) 13317 out := graphql.NewFieldSet(fields) 13318 var invalids uint32 13319 for i, field := range fields { 13320 switch field.Name { 13321 case "__typename": 13322 out.Values[i] = graphql.MarshalString("ObjectDirectivesWithCustomGoModel") 13323 case "nullableText": 13324 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13325 return ec._ObjectDirectivesWithCustomGoModel_nullableText(ctx, field, obj) 13326 } 13327 13328 out.Values[i] = innerFunc(ctx) 13329 13330 default: 13331 panic("unknown field " + strconv.Quote(field.Name)) 13332 } 13333 } 13334 out.Dispatch() 13335 if invalids > 0 { 13336 return graphql.Null 13337 } 13338 return out 13339 } 13340 13341 var outerObjectImplementors = []string{"OuterObject"} 13342 13343 func (ec *executionContext) _OuterObject(ctx context.Context, sel ast.SelectionSet, obj *OuterObject) graphql.Marshaler { 13344 fields := graphql.CollectFields(ec.OperationContext, sel, outerObjectImplementors) 13345 out := graphql.NewFieldSet(fields) 13346 var invalids uint32 13347 for i, field := range fields { 13348 switch field.Name { 13349 case "__typename": 13350 out.Values[i] = graphql.MarshalString("OuterObject") 13351 case "inner": 13352 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13353 return ec._OuterObject_inner(ctx, field, obj) 13354 } 13355 13356 out.Values[i] = innerFunc(ctx) 13357 13358 if out.Values[i] == graphql.Null { 13359 invalids++ 13360 } 13361 default: 13362 panic("unknown field " + strconv.Quote(field.Name)) 13363 } 13364 } 13365 out.Dispatch() 13366 if invalids > 0 { 13367 return graphql.Null 13368 } 13369 return out 13370 } 13371 13372 var overlappingFieldsImplementors = []string{"OverlappingFields"} 13373 13374 func (ec *executionContext) _OverlappingFields(ctx context.Context, sel ast.SelectionSet, obj *OverlappingFields) graphql.Marshaler { 13375 fields := graphql.CollectFields(ec.OperationContext, sel, overlappingFieldsImplementors) 13376 out := graphql.NewFieldSet(fields) 13377 var invalids uint32 13378 for i, field := range fields { 13379 switch field.Name { 13380 case "__typename": 13381 out.Values[i] = graphql.MarshalString("OverlappingFields") 13382 case "oneFoo": 13383 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13384 return ec._OverlappingFields_oneFoo(ctx, field, obj) 13385 } 13386 13387 out.Values[i] = innerFunc(ctx) 13388 13389 if out.Values[i] == graphql.Null { 13390 atomic.AddUint32(&invalids, 1) 13391 } 13392 case "twoFoo": 13393 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13394 return ec._OverlappingFields_twoFoo(ctx, field, obj) 13395 } 13396 13397 out.Values[i] = innerFunc(ctx) 13398 13399 if out.Values[i] == graphql.Null { 13400 atomic.AddUint32(&invalids, 1) 13401 } 13402 case "oldFoo": 13403 field := field 13404 13405 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13406 defer func() { 13407 if r := recover(); r != nil { 13408 ec.Error(ctx, ec.Recover(ctx, r)) 13409 } 13410 }() 13411 res = ec._OverlappingFields_oldFoo(ctx, field, obj) 13412 if res == graphql.Null { 13413 atomic.AddUint32(&invalids, 1) 13414 } 13415 return res 13416 } 13417 13418 out.Concurrently(i, func() graphql.Marshaler { 13419 return innerFunc(ctx) 13420 13421 }) 13422 case "newFoo": 13423 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13424 return ec._OverlappingFields_newFoo(ctx, field, obj) 13425 } 13426 13427 out.Values[i] = innerFunc(ctx) 13428 13429 if out.Values[i] == graphql.Null { 13430 atomic.AddUint32(&invalids, 1) 13431 } 13432 case "new_foo": 13433 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13434 return ec._OverlappingFields_new_foo(ctx, field, obj) 13435 } 13436 13437 out.Values[i] = innerFunc(ctx) 13438 13439 if out.Values[i] == graphql.Null { 13440 atomic.AddUint32(&invalids, 1) 13441 } 13442 default: 13443 panic("unknown field " + strconv.Quote(field.Name)) 13444 } 13445 } 13446 out.Dispatch() 13447 if invalids > 0 { 13448 return graphql.Null 13449 } 13450 return out 13451 } 13452 13453 var panicsImplementors = []string{"Panics"} 13454 13455 func (ec *executionContext) _Panics(ctx context.Context, sel ast.SelectionSet, obj *Panics) graphql.Marshaler { 13456 fields := graphql.CollectFields(ec.OperationContext, sel, panicsImplementors) 13457 out := graphql.NewFieldSet(fields) 13458 var invalids uint32 13459 for i, field := range fields { 13460 switch field.Name { 13461 case "__typename": 13462 out.Values[i] = graphql.MarshalString("Panics") 13463 case "fieldScalarMarshal": 13464 field := field 13465 13466 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13467 defer func() { 13468 if r := recover(); r != nil { 13469 ec.Error(ctx, ec.Recover(ctx, r)) 13470 } 13471 }() 13472 res = ec._Panics_fieldScalarMarshal(ctx, field, obj) 13473 if res == graphql.Null { 13474 atomic.AddUint32(&invalids, 1) 13475 } 13476 return res 13477 } 13478 13479 out.Concurrently(i, func() graphql.Marshaler { 13480 return innerFunc(ctx) 13481 13482 }) 13483 case "fieldFuncMarshal": 13484 field := field 13485 13486 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13487 defer func() { 13488 if r := recover(); r != nil { 13489 ec.Error(ctx, ec.Recover(ctx, r)) 13490 } 13491 }() 13492 res = ec._Panics_fieldFuncMarshal(ctx, field, obj) 13493 if res == graphql.Null { 13494 atomic.AddUint32(&invalids, 1) 13495 } 13496 return res 13497 } 13498 13499 out.Concurrently(i, func() graphql.Marshaler { 13500 return innerFunc(ctx) 13501 13502 }) 13503 case "argUnmarshal": 13504 field := field 13505 13506 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13507 defer func() { 13508 if r := recover(); r != nil { 13509 ec.Error(ctx, ec.Recover(ctx, r)) 13510 } 13511 }() 13512 res = ec._Panics_argUnmarshal(ctx, field, obj) 13513 if res == graphql.Null { 13514 atomic.AddUint32(&invalids, 1) 13515 } 13516 return res 13517 } 13518 13519 out.Concurrently(i, func() graphql.Marshaler { 13520 return innerFunc(ctx) 13521 13522 }) 13523 default: 13524 panic("unknown field " + strconv.Quote(field.Name)) 13525 } 13526 } 13527 out.Dispatch() 13528 if invalids > 0 { 13529 return graphql.Null 13530 } 13531 return out 13532 } 13533 13534 var primitiveImplementors = []string{"Primitive"} 13535 13536 func (ec *executionContext) _Primitive(ctx context.Context, sel ast.SelectionSet, obj *Primitive) graphql.Marshaler { 13537 fields := graphql.CollectFields(ec.OperationContext, sel, primitiveImplementors) 13538 out := graphql.NewFieldSet(fields) 13539 var invalids uint32 13540 for i, field := range fields { 13541 switch field.Name { 13542 case "__typename": 13543 out.Values[i] = graphql.MarshalString("Primitive") 13544 case "value": 13545 field := field 13546 13547 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13548 defer func() { 13549 if r := recover(); r != nil { 13550 ec.Error(ctx, ec.Recover(ctx, r)) 13551 } 13552 }() 13553 res = ec._Primitive_value(ctx, field, obj) 13554 if res == graphql.Null { 13555 atomic.AddUint32(&invalids, 1) 13556 } 13557 return res 13558 } 13559 13560 out.Concurrently(i, func() graphql.Marshaler { 13561 return innerFunc(ctx) 13562 13563 }) 13564 case "squared": 13565 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13566 return ec._Primitive_squared(ctx, field, obj) 13567 } 13568 13569 out.Values[i] = innerFunc(ctx) 13570 13571 if out.Values[i] == graphql.Null { 13572 atomic.AddUint32(&invalids, 1) 13573 } 13574 default: 13575 panic("unknown field " + strconv.Quote(field.Name)) 13576 } 13577 } 13578 out.Dispatch() 13579 if invalids > 0 { 13580 return graphql.Null 13581 } 13582 return out 13583 } 13584 13585 var primitiveStringImplementors = []string{"PrimitiveString"} 13586 13587 func (ec *executionContext) _PrimitiveString(ctx context.Context, sel ast.SelectionSet, obj *PrimitiveString) graphql.Marshaler { 13588 fields := graphql.CollectFields(ec.OperationContext, sel, primitiveStringImplementors) 13589 out := graphql.NewFieldSet(fields) 13590 var invalids uint32 13591 for i, field := range fields { 13592 switch field.Name { 13593 case "__typename": 13594 out.Values[i] = graphql.MarshalString("PrimitiveString") 13595 case "value": 13596 field := field 13597 13598 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13599 defer func() { 13600 if r := recover(); r != nil { 13601 ec.Error(ctx, ec.Recover(ctx, r)) 13602 } 13603 }() 13604 res = ec._PrimitiveString_value(ctx, field, obj) 13605 if res == graphql.Null { 13606 atomic.AddUint32(&invalids, 1) 13607 } 13608 return res 13609 } 13610 13611 out.Concurrently(i, func() graphql.Marshaler { 13612 return innerFunc(ctx) 13613 13614 }) 13615 case "doubled": 13616 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13617 return ec._PrimitiveString_doubled(ctx, field, obj) 13618 } 13619 13620 out.Values[i] = innerFunc(ctx) 13621 13622 if out.Values[i] == graphql.Null { 13623 atomic.AddUint32(&invalids, 1) 13624 } 13625 case "len": 13626 field := field 13627 13628 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13629 defer func() { 13630 if r := recover(); r != nil { 13631 ec.Error(ctx, ec.Recover(ctx, r)) 13632 } 13633 }() 13634 res = ec._PrimitiveString_len(ctx, field, obj) 13635 if res == graphql.Null { 13636 atomic.AddUint32(&invalids, 1) 13637 } 13638 return res 13639 } 13640 13641 out.Concurrently(i, func() graphql.Marshaler { 13642 return innerFunc(ctx) 13643 13644 }) 13645 default: 13646 panic("unknown field " + strconv.Quote(field.Name)) 13647 } 13648 } 13649 out.Dispatch() 13650 if invalids > 0 { 13651 return graphql.Null 13652 } 13653 return out 13654 } 13655 13656 var ptrToPtrInnerImplementors = []string{"PtrToPtrInner"} 13657 13658 func (ec *executionContext) _PtrToPtrInner(ctx context.Context, sel ast.SelectionSet, obj *PtrToPtrInner) graphql.Marshaler { 13659 fields := graphql.CollectFields(ec.OperationContext, sel, ptrToPtrInnerImplementors) 13660 out := graphql.NewFieldSet(fields) 13661 var invalids uint32 13662 for i, field := range fields { 13663 switch field.Name { 13664 case "__typename": 13665 out.Values[i] = graphql.MarshalString("PtrToPtrInner") 13666 case "key": 13667 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13668 return ec._PtrToPtrInner_key(ctx, field, obj) 13669 } 13670 13671 out.Values[i] = innerFunc(ctx) 13672 13673 if out.Values[i] == graphql.Null { 13674 invalids++ 13675 } 13676 case "value": 13677 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13678 return ec._PtrToPtrInner_value(ctx, field, obj) 13679 } 13680 13681 out.Values[i] = innerFunc(ctx) 13682 13683 if out.Values[i] == graphql.Null { 13684 invalids++ 13685 } 13686 default: 13687 panic("unknown field " + strconv.Quote(field.Name)) 13688 } 13689 } 13690 out.Dispatch() 13691 if invalids > 0 { 13692 return graphql.Null 13693 } 13694 return out 13695 } 13696 13697 var ptrToPtrOuterImplementors = []string{"PtrToPtrOuter"} 13698 13699 func (ec *executionContext) _PtrToPtrOuter(ctx context.Context, sel ast.SelectionSet, obj *PtrToPtrOuter) graphql.Marshaler { 13700 fields := graphql.CollectFields(ec.OperationContext, sel, ptrToPtrOuterImplementors) 13701 out := graphql.NewFieldSet(fields) 13702 var invalids uint32 13703 for i, field := range fields { 13704 switch field.Name { 13705 case "__typename": 13706 out.Values[i] = graphql.MarshalString("PtrToPtrOuter") 13707 case "name": 13708 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13709 return ec._PtrToPtrOuter_name(ctx, field, obj) 13710 } 13711 13712 out.Values[i] = innerFunc(ctx) 13713 13714 if out.Values[i] == graphql.Null { 13715 invalids++ 13716 } 13717 case "inner": 13718 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13719 return ec._PtrToPtrOuter_inner(ctx, field, obj) 13720 } 13721 13722 out.Values[i] = innerFunc(ctx) 13723 13724 case "stupidInner": 13725 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13726 return ec._PtrToPtrOuter_stupidInner(ctx, field, obj) 13727 } 13728 13729 out.Values[i] = innerFunc(ctx) 13730 13731 default: 13732 panic("unknown field " + strconv.Quote(field.Name)) 13733 } 13734 } 13735 out.Dispatch() 13736 if invalids > 0 { 13737 return graphql.Null 13738 } 13739 return out 13740 } 13741 13742 var ptrToSliceContainerImplementors = []string{"PtrToSliceContainer"} 13743 13744 func (ec *executionContext) _PtrToSliceContainer(ctx context.Context, sel ast.SelectionSet, obj *PtrToSliceContainer) graphql.Marshaler { 13745 fields := graphql.CollectFields(ec.OperationContext, sel, ptrToSliceContainerImplementors) 13746 out := graphql.NewFieldSet(fields) 13747 var invalids uint32 13748 for i, field := range fields { 13749 switch field.Name { 13750 case "__typename": 13751 out.Values[i] = graphql.MarshalString("PtrToSliceContainer") 13752 case "ptrToSlice": 13753 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13754 return ec._PtrToSliceContainer_ptrToSlice(ctx, field, obj) 13755 } 13756 13757 out.Values[i] = innerFunc(ctx) 13758 13759 default: 13760 panic("unknown field " + strconv.Quote(field.Name)) 13761 } 13762 } 13763 out.Dispatch() 13764 if invalids > 0 { 13765 return graphql.Null 13766 } 13767 return out 13768 } 13769 13770 var queryImplementors = []string{"Query"} 13771 13772 func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { 13773 fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) 13774 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ 13775 Object: "Query", 13776 }) 13777 13778 out := graphql.NewFieldSet(fields) 13779 var invalids uint32 13780 for i, field := range fields { 13781 innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ 13782 Object: field.Name, 13783 Field: field, 13784 }) 13785 13786 switch field.Name { 13787 case "__typename": 13788 out.Values[i] = graphql.MarshalString("Query") 13789 case "invalidIdentifier": 13790 field := field 13791 13792 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13793 defer func() { 13794 if r := recover(); r != nil { 13795 ec.Error(ctx, ec.Recover(ctx, r)) 13796 } 13797 }() 13798 res = ec._Query_invalidIdentifier(ctx, field) 13799 return res 13800 } 13801 13802 rrm := func(ctx context.Context) graphql.Marshaler { 13803 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 13804 } 13805 13806 out.Concurrently(i, func() graphql.Marshaler { 13807 return rrm(innerCtx) 13808 }) 13809 case "collision": 13810 field := field 13811 13812 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13813 defer func() { 13814 if r := recover(); r != nil { 13815 ec.Error(ctx, ec.Recover(ctx, r)) 13816 } 13817 }() 13818 res = ec._Query_collision(ctx, field) 13819 return res 13820 } 13821 13822 rrm := func(ctx context.Context) graphql.Marshaler { 13823 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 13824 } 13825 13826 out.Concurrently(i, func() graphql.Marshaler { 13827 return rrm(innerCtx) 13828 }) 13829 case "mapInput": 13830 field := field 13831 13832 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13833 defer func() { 13834 if r := recover(); r != nil { 13835 ec.Error(ctx, ec.Recover(ctx, r)) 13836 } 13837 }() 13838 res = ec._Query_mapInput(ctx, field) 13839 return res 13840 } 13841 13842 rrm := func(ctx context.Context) graphql.Marshaler { 13843 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 13844 } 13845 13846 out.Concurrently(i, func() graphql.Marshaler { 13847 return rrm(innerCtx) 13848 }) 13849 case "recursive": 13850 field := field 13851 13852 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13853 defer func() { 13854 if r := recover(); r != nil { 13855 ec.Error(ctx, ec.Recover(ctx, r)) 13856 } 13857 }() 13858 res = ec._Query_recursive(ctx, field) 13859 return res 13860 } 13861 13862 rrm := func(ctx context.Context) graphql.Marshaler { 13863 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 13864 } 13865 13866 out.Concurrently(i, func() graphql.Marshaler { 13867 return rrm(innerCtx) 13868 }) 13869 case "nestedInputs": 13870 field := field 13871 13872 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13873 defer func() { 13874 if r := recover(); r != nil { 13875 ec.Error(ctx, ec.Recover(ctx, r)) 13876 } 13877 }() 13878 res = ec._Query_nestedInputs(ctx, field) 13879 return res 13880 } 13881 13882 rrm := func(ctx context.Context) graphql.Marshaler { 13883 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 13884 } 13885 13886 out.Concurrently(i, func() graphql.Marshaler { 13887 return rrm(innerCtx) 13888 }) 13889 case "nestedOutputs": 13890 field := field 13891 13892 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13893 defer func() { 13894 if r := recover(); r != nil { 13895 ec.Error(ctx, ec.Recover(ctx, r)) 13896 } 13897 }() 13898 res = ec._Query_nestedOutputs(ctx, field) 13899 return res 13900 } 13901 13902 rrm := func(ctx context.Context) graphql.Marshaler { 13903 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 13904 } 13905 13906 out.Concurrently(i, func() graphql.Marshaler { 13907 return rrm(innerCtx) 13908 }) 13909 case "modelMethods": 13910 field := field 13911 13912 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13913 defer func() { 13914 if r := recover(); r != nil { 13915 ec.Error(ctx, ec.Recover(ctx, r)) 13916 } 13917 }() 13918 res = ec._Query_modelMethods(ctx, field) 13919 return res 13920 } 13921 13922 rrm := func(ctx context.Context) graphql.Marshaler { 13923 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 13924 } 13925 13926 out.Concurrently(i, func() graphql.Marshaler { 13927 return rrm(innerCtx) 13928 }) 13929 case "user": 13930 field := field 13931 13932 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13933 defer func() { 13934 if r := recover(); r != nil { 13935 ec.Error(ctx, ec.Recover(ctx, r)) 13936 } 13937 }() 13938 res = ec._Query_user(ctx, field) 13939 if res == graphql.Null { 13940 atomic.AddUint32(&invalids, 1) 13941 } 13942 return res 13943 } 13944 13945 rrm := func(ctx context.Context) graphql.Marshaler { 13946 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 13947 } 13948 13949 out.Concurrently(i, func() graphql.Marshaler { 13950 return rrm(innerCtx) 13951 }) 13952 case "nullableArg": 13953 field := field 13954 13955 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13956 defer func() { 13957 if r := recover(); r != nil { 13958 ec.Error(ctx, ec.Recover(ctx, r)) 13959 } 13960 }() 13961 res = ec._Query_nullableArg(ctx, field) 13962 return res 13963 } 13964 13965 rrm := func(ctx context.Context) graphql.Marshaler { 13966 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 13967 } 13968 13969 out.Concurrently(i, func() graphql.Marshaler { 13970 return rrm(innerCtx) 13971 }) 13972 case "inputSlice": 13973 field := field 13974 13975 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13976 defer func() { 13977 if r := recover(); r != nil { 13978 ec.Error(ctx, ec.Recover(ctx, r)) 13979 } 13980 }() 13981 res = ec._Query_inputSlice(ctx, field) 13982 if res == graphql.Null { 13983 atomic.AddUint32(&invalids, 1) 13984 } 13985 return res 13986 } 13987 13988 rrm := func(ctx context.Context) graphql.Marshaler { 13989 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 13990 } 13991 13992 out.Concurrently(i, func() graphql.Marshaler { 13993 return rrm(innerCtx) 13994 }) 13995 case "inputNullableSlice": 13996 field := field 13997 13998 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 13999 defer func() { 14000 if r := recover(); r != nil { 14001 ec.Error(ctx, ec.Recover(ctx, r)) 14002 } 14003 }() 14004 res = ec._Query_inputNullableSlice(ctx, field) 14005 if res == graphql.Null { 14006 atomic.AddUint32(&invalids, 1) 14007 } 14008 return res 14009 } 14010 14011 rrm := func(ctx context.Context) graphql.Marshaler { 14012 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14013 } 14014 14015 out.Concurrently(i, func() graphql.Marshaler { 14016 return rrm(innerCtx) 14017 }) 14018 case "shapeUnion": 14019 field := field 14020 14021 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14022 defer func() { 14023 if r := recover(); r != nil { 14024 ec.Error(ctx, ec.Recover(ctx, r)) 14025 } 14026 }() 14027 res = ec._Query_shapeUnion(ctx, field) 14028 if res == graphql.Null { 14029 atomic.AddUint32(&invalids, 1) 14030 } 14031 return res 14032 } 14033 14034 rrm := func(ctx context.Context) graphql.Marshaler { 14035 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14036 } 14037 14038 out.Concurrently(i, func() graphql.Marshaler { 14039 return rrm(innerCtx) 14040 }) 14041 case "autobind": 14042 field := field 14043 14044 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14045 defer func() { 14046 if r := recover(); r != nil { 14047 ec.Error(ctx, ec.Recover(ctx, r)) 14048 } 14049 }() 14050 res = ec._Query_autobind(ctx, field) 14051 return res 14052 } 14053 14054 rrm := func(ctx context.Context) graphql.Marshaler { 14055 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14056 } 14057 14058 out.Concurrently(i, func() graphql.Marshaler { 14059 return rrm(innerCtx) 14060 }) 14061 case "deprecatedField": 14062 field := field 14063 14064 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14065 defer func() { 14066 if r := recover(); r != nil { 14067 ec.Error(ctx, ec.Recover(ctx, r)) 14068 } 14069 }() 14070 res = ec._Query_deprecatedField(ctx, field) 14071 if res == graphql.Null { 14072 atomic.AddUint32(&invalids, 1) 14073 } 14074 return res 14075 } 14076 14077 rrm := func(ctx context.Context) graphql.Marshaler { 14078 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14079 } 14080 14081 out.Concurrently(i, func() graphql.Marshaler { 14082 return rrm(innerCtx) 14083 }) 14084 case "overlapping": 14085 field := field 14086 14087 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14088 defer func() { 14089 if r := recover(); r != nil { 14090 ec.Error(ctx, ec.Recover(ctx, r)) 14091 } 14092 }() 14093 res = ec._Query_overlapping(ctx, field) 14094 return res 14095 } 14096 14097 rrm := func(ctx context.Context) graphql.Marshaler { 14098 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14099 } 14100 14101 out.Concurrently(i, func() graphql.Marshaler { 14102 return rrm(innerCtx) 14103 }) 14104 case "defaultParameters": 14105 field := field 14106 14107 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14108 defer func() { 14109 if r := recover(); r != nil { 14110 ec.Error(ctx, ec.Recover(ctx, r)) 14111 } 14112 }() 14113 res = ec._Query_defaultParameters(ctx, field) 14114 if res == graphql.Null { 14115 atomic.AddUint32(&invalids, 1) 14116 } 14117 return res 14118 } 14119 14120 rrm := func(ctx context.Context) graphql.Marshaler { 14121 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14122 } 14123 14124 out.Concurrently(i, func() graphql.Marshaler { 14125 return rrm(innerCtx) 14126 }) 14127 case "directiveArg": 14128 field := field 14129 14130 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14131 defer func() { 14132 if r := recover(); r != nil { 14133 ec.Error(ctx, ec.Recover(ctx, r)) 14134 } 14135 }() 14136 res = ec._Query_directiveArg(ctx, field) 14137 return res 14138 } 14139 14140 rrm := func(ctx context.Context) graphql.Marshaler { 14141 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14142 } 14143 14144 out.Concurrently(i, func() graphql.Marshaler { 14145 return rrm(innerCtx) 14146 }) 14147 case "directiveNullableArg": 14148 field := field 14149 14150 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14151 defer func() { 14152 if r := recover(); r != nil { 14153 ec.Error(ctx, ec.Recover(ctx, r)) 14154 } 14155 }() 14156 res = ec._Query_directiveNullableArg(ctx, field) 14157 return res 14158 } 14159 14160 rrm := func(ctx context.Context) graphql.Marshaler { 14161 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14162 } 14163 14164 out.Concurrently(i, func() graphql.Marshaler { 14165 return rrm(innerCtx) 14166 }) 14167 case "directiveInputNullable": 14168 field := field 14169 14170 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14171 defer func() { 14172 if r := recover(); r != nil { 14173 ec.Error(ctx, ec.Recover(ctx, r)) 14174 } 14175 }() 14176 res = ec._Query_directiveInputNullable(ctx, field) 14177 return res 14178 } 14179 14180 rrm := func(ctx context.Context) graphql.Marshaler { 14181 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14182 } 14183 14184 out.Concurrently(i, func() graphql.Marshaler { 14185 return rrm(innerCtx) 14186 }) 14187 case "directiveInput": 14188 field := field 14189 14190 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14191 defer func() { 14192 if r := recover(); r != nil { 14193 ec.Error(ctx, ec.Recover(ctx, r)) 14194 } 14195 }() 14196 res = ec._Query_directiveInput(ctx, field) 14197 return res 14198 } 14199 14200 rrm := func(ctx context.Context) graphql.Marshaler { 14201 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14202 } 14203 14204 out.Concurrently(i, func() graphql.Marshaler { 14205 return rrm(innerCtx) 14206 }) 14207 case "directiveInputType": 14208 field := field 14209 14210 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14211 defer func() { 14212 if r := recover(); r != nil { 14213 ec.Error(ctx, ec.Recover(ctx, r)) 14214 } 14215 }() 14216 res = ec._Query_directiveInputType(ctx, field) 14217 return res 14218 } 14219 14220 rrm := func(ctx context.Context) graphql.Marshaler { 14221 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14222 } 14223 14224 out.Concurrently(i, func() graphql.Marshaler { 14225 return rrm(innerCtx) 14226 }) 14227 case "directiveObject": 14228 field := field 14229 14230 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14231 defer func() { 14232 if r := recover(); r != nil { 14233 ec.Error(ctx, ec.Recover(ctx, r)) 14234 } 14235 }() 14236 res = ec._Query_directiveObject(ctx, field) 14237 return res 14238 } 14239 14240 rrm := func(ctx context.Context) graphql.Marshaler { 14241 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14242 } 14243 14244 out.Concurrently(i, func() graphql.Marshaler { 14245 return rrm(innerCtx) 14246 }) 14247 case "directiveObjectWithCustomGoModel": 14248 field := field 14249 14250 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14251 defer func() { 14252 if r := recover(); r != nil { 14253 ec.Error(ctx, ec.Recover(ctx, r)) 14254 } 14255 }() 14256 res = ec._Query_directiveObjectWithCustomGoModel(ctx, field) 14257 return res 14258 } 14259 14260 rrm := func(ctx context.Context) graphql.Marshaler { 14261 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14262 } 14263 14264 out.Concurrently(i, func() graphql.Marshaler { 14265 return rrm(innerCtx) 14266 }) 14267 case "directiveFieldDef": 14268 field := field 14269 14270 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14271 defer func() { 14272 if r := recover(); r != nil { 14273 ec.Error(ctx, ec.Recover(ctx, r)) 14274 } 14275 }() 14276 res = ec._Query_directiveFieldDef(ctx, field) 14277 if res == graphql.Null { 14278 atomic.AddUint32(&invalids, 1) 14279 } 14280 return res 14281 } 14282 14283 rrm := func(ctx context.Context) graphql.Marshaler { 14284 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14285 } 14286 14287 out.Concurrently(i, func() graphql.Marshaler { 14288 return rrm(innerCtx) 14289 }) 14290 case "directiveField": 14291 field := field 14292 14293 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14294 defer func() { 14295 if r := recover(); r != nil { 14296 ec.Error(ctx, ec.Recover(ctx, r)) 14297 } 14298 }() 14299 res = ec._Query_directiveField(ctx, field) 14300 return res 14301 } 14302 14303 rrm := func(ctx context.Context) graphql.Marshaler { 14304 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14305 } 14306 14307 out.Concurrently(i, func() graphql.Marshaler { 14308 return rrm(innerCtx) 14309 }) 14310 case "directiveDouble": 14311 field := field 14312 14313 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14314 defer func() { 14315 if r := recover(); r != nil { 14316 ec.Error(ctx, ec.Recover(ctx, r)) 14317 } 14318 }() 14319 res = ec._Query_directiveDouble(ctx, field) 14320 return res 14321 } 14322 14323 rrm := func(ctx context.Context) graphql.Marshaler { 14324 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14325 } 14326 14327 out.Concurrently(i, func() graphql.Marshaler { 14328 return rrm(innerCtx) 14329 }) 14330 case "directiveUnimplemented": 14331 field := field 14332 14333 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14334 defer func() { 14335 if r := recover(); r != nil { 14336 ec.Error(ctx, ec.Recover(ctx, r)) 14337 } 14338 }() 14339 res = ec._Query_directiveUnimplemented(ctx, field) 14340 return res 14341 } 14342 14343 rrm := func(ctx context.Context) graphql.Marshaler { 14344 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14345 } 14346 14347 out.Concurrently(i, func() graphql.Marshaler { 14348 return rrm(innerCtx) 14349 }) 14350 case "embeddedCase1": 14351 field := field 14352 14353 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14354 defer func() { 14355 if r := recover(); r != nil { 14356 ec.Error(ctx, ec.Recover(ctx, r)) 14357 } 14358 }() 14359 res = ec._Query_embeddedCase1(ctx, field) 14360 return res 14361 } 14362 14363 rrm := func(ctx context.Context) graphql.Marshaler { 14364 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14365 } 14366 14367 out.Concurrently(i, func() graphql.Marshaler { 14368 return rrm(innerCtx) 14369 }) 14370 case "embeddedCase2": 14371 field := field 14372 14373 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14374 defer func() { 14375 if r := recover(); r != nil { 14376 ec.Error(ctx, ec.Recover(ctx, r)) 14377 } 14378 }() 14379 res = ec._Query_embeddedCase2(ctx, field) 14380 return res 14381 } 14382 14383 rrm := func(ctx context.Context) graphql.Marshaler { 14384 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14385 } 14386 14387 out.Concurrently(i, func() graphql.Marshaler { 14388 return rrm(innerCtx) 14389 }) 14390 case "embeddedCase3": 14391 field := field 14392 14393 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14394 defer func() { 14395 if r := recover(); r != nil { 14396 ec.Error(ctx, ec.Recover(ctx, r)) 14397 } 14398 }() 14399 res = ec._Query_embeddedCase3(ctx, field) 14400 return res 14401 } 14402 14403 rrm := func(ctx context.Context) graphql.Marshaler { 14404 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14405 } 14406 14407 out.Concurrently(i, func() graphql.Marshaler { 14408 return rrm(innerCtx) 14409 }) 14410 case "enumInInput": 14411 field := field 14412 14413 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14414 defer func() { 14415 if r := recover(); r != nil { 14416 ec.Error(ctx, ec.Recover(ctx, r)) 14417 } 14418 }() 14419 res = ec._Query_enumInInput(ctx, field) 14420 if res == graphql.Null { 14421 atomic.AddUint32(&invalids, 1) 14422 } 14423 return res 14424 } 14425 14426 rrm := func(ctx context.Context) graphql.Marshaler { 14427 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14428 } 14429 14430 out.Concurrently(i, func() graphql.Marshaler { 14431 return rrm(innerCtx) 14432 }) 14433 case "shapes": 14434 field := field 14435 14436 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14437 defer func() { 14438 if r := recover(); r != nil { 14439 ec.Error(ctx, ec.Recover(ctx, r)) 14440 } 14441 }() 14442 res = ec._Query_shapes(ctx, field) 14443 return res 14444 } 14445 14446 rrm := func(ctx context.Context) graphql.Marshaler { 14447 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14448 } 14449 14450 out.Concurrently(i, func() graphql.Marshaler { 14451 return rrm(innerCtx) 14452 }) 14453 case "noShape": 14454 field := field 14455 14456 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14457 defer func() { 14458 if r := recover(); r != nil { 14459 ec.Error(ctx, ec.Recover(ctx, r)) 14460 } 14461 }() 14462 res = ec._Query_noShape(ctx, field) 14463 return res 14464 } 14465 14466 rrm := func(ctx context.Context) graphql.Marshaler { 14467 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14468 } 14469 14470 out.Concurrently(i, func() graphql.Marshaler { 14471 return rrm(innerCtx) 14472 }) 14473 case "node": 14474 field := field 14475 14476 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14477 defer func() { 14478 if r := recover(); r != nil { 14479 ec.Error(ctx, ec.Recover(ctx, r)) 14480 } 14481 }() 14482 res = ec._Query_node(ctx, field) 14483 if res == graphql.Null { 14484 atomic.AddUint32(&invalids, 1) 14485 } 14486 return res 14487 } 14488 14489 rrm := func(ctx context.Context) graphql.Marshaler { 14490 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14491 } 14492 14493 out.Concurrently(i, func() graphql.Marshaler { 14494 return rrm(innerCtx) 14495 }) 14496 case "noShapeTypedNil": 14497 field := field 14498 14499 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14500 defer func() { 14501 if r := recover(); r != nil { 14502 ec.Error(ctx, ec.Recover(ctx, r)) 14503 } 14504 }() 14505 res = ec._Query_noShapeTypedNil(ctx, field) 14506 return res 14507 } 14508 14509 rrm := func(ctx context.Context) graphql.Marshaler { 14510 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14511 } 14512 14513 out.Concurrently(i, func() graphql.Marshaler { 14514 return rrm(innerCtx) 14515 }) 14516 case "animal": 14517 field := field 14518 14519 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14520 defer func() { 14521 if r := recover(); r != nil { 14522 ec.Error(ctx, ec.Recover(ctx, r)) 14523 } 14524 }() 14525 res = ec._Query_animal(ctx, field) 14526 return res 14527 } 14528 14529 rrm := func(ctx context.Context) graphql.Marshaler { 14530 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14531 } 14532 14533 out.Concurrently(i, func() graphql.Marshaler { 14534 return rrm(innerCtx) 14535 }) 14536 case "notAnInterface": 14537 field := field 14538 14539 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14540 defer func() { 14541 if r := recover(); r != nil { 14542 ec.Error(ctx, ec.Recover(ctx, r)) 14543 } 14544 }() 14545 res = ec._Query_notAnInterface(ctx, field) 14546 return res 14547 } 14548 14549 rrm := func(ctx context.Context) graphql.Marshaler { 14550 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14551 } 14552 14553 out.Concurrently(i, func() graphql.Marshaler { 14554 return rrm(innerCtx) 14555 }) 14556 case "issue896a": 14557 field := field 14558 14559 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14560 defer func() { 14561 if r := recover(); r != nil { 14562 ec.Error(ctx, ec.Recover(ctx, r)) 14563 } 14564 }() 14565 res = ec._Query_issue896a(ctx, field) 14566 return res 14567 } 14568 14569 rrm := func(ctx context.Context) graphql.Marshaler { 14570 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14571 } 14572 14573 out.Concurrently(i, func() graphql.Marshaler { 14574 return rrm(innerCtx) 14575 }) 14576 case "mapStringInterface": 14577 field := field 14578 14579 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14580 defer func() { 14581 if r := recover(); r != nil { 14582 ec.Error(ctx, ec.Recover(ctx, r)) 14583 } 14584 }() 14585 res = ec._Query_mapStringInterface(ctx, field) 14586 return res 14587 } 14588 14589 rrm := func(ctx context.Context) graphql.Marshaler { 14590 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14591 } 14592 14593 out.Concurrently(i, func() graphql.Marshaler { 14594 return rrm(innerCtx) 14595 }) 14596 case "mapNestedStringInterface": 14597 field := field 14598 14599 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14600 defer func() { 14601 if r := recover(); r != nil { 14602 ec.Error(ctx, ec.Recover(ctx, r)) 14603 } 14604 }() 14605 res = ec._Query_mapNestedStringInterface(ctx, field) 14606 return res 14607 } 14608 14609 rrm := func(ctx context.Context) graphql.Marshaler { 14610 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14611 } 14612 14613 out.Concurrently(i, func() graphql.Marshaler { 14614 return rrm(innerCtx) 14615 }) 14616 case "errorBubble": 14617 field := field 14618 14619 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14620 defer func() { 14621 if r := recover(); r != nil { 14622 ec.Error(ctx, ec.Recover(ctx, r)) 14623 } 14624 }() 14625 res = ec._Query_errorBubble(ctx, field) 14626 return res 14627 } 14628 14629 rrm := func(ctx context.Context) graphql.Marshaler { 14630 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14631 } 14632 14633 out.Concurrently(i, func() graphql.Marshaler { 14634 return rrm(innerCtx) 14635 }) 14636 case "errorBubbleList": 14637 field := field 14638 14639 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14640 defer func() { 14641 if r := recover(); r != nil { 14642 ec.Error(ctx, ec.Recover(ctx, r)) 14643 } 14644 }() 14645 res = ec._Query_errorBubbleList(ctx, field) 14646 return res 14647 } 14648 14649 rrm := func(ctx context.Context) graphql.Marshaler { 14650 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14651 } 14652 14653 out.Concurrently(i, func() graphql.Marshaler { 14654 return rrm(innerCtx) 14655 }) 14656 case "errorList": 14657 field := field 14658 14659 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14660 defer func() { 14661 if r := recover(); r != nil { 14662 ec.Error(ctx, ec.Recover(ctx, r)) 14663 } 14664 }() 14665 res = ec._Query_errorList(ctx, field) 14666 return res 14667 } 14668 14669 rrm := func(ctx context.Context) graphql.Marshaler { 14670 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14671 } 14672 14673 out.Concurrently(i, func() graphql.Marshaler { 14674 return rrm(innerCtx) 14675 }) 14676 case "errors": 14677 field := field 14678 14679 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14680 defer func() { 14681 if r := recover(); r != nil { 14682 ec.Error(ctx, ec.Recover(ctx, r)) 14683 } 14684 }() 14685 res = ec._Query_errors(ctx, field) 14686 return res 14687 } 14688 14689 rrm := func(ctx context.Context) graphql.Marshaler { 14690 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14691 } 14692 14693 out.Concurrently(i, func() graphql.Marshaler { 14694 return rrm(innerCtx) 14695 }) 14696 case "valid": 14697 field := field 14698 14699 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14700 defer func() { 14701 if r := recover(); r != nil { 14702 ec.Error(ctx, ec.Recover(ctx, r)) 14703 } 14704 }() 14705 res = ec._Query_valid(ctx, field) 14706 if res == graphql.Null { 14707 atomic.AddUint32(&invalids, 1) 14708 } 14709 return res 14710 } 14711 14712 rrm := func(ctx context.Context) graphql.Marshaler { 14713 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14714 } 14715 14716 out.Concurrently(i, func() graphql.Marshaler { 14717 return rrm(innerCtx) 14718 }) 14719 case "panics": 14720 field := field 14721 14722 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14723 defer func() { 14724 if r := recover(); r != nil { 14725 ec.Error(ctx, ec.Recover(ctx, r)) 14726 } 14727 }() 14728 res = ec._Query_panics(ctx, field) 14729 return res 14730 } 14731 14732 rrm := func(ctx context.Context) graphql.Marshaler { 14733 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14734 } 14735 14736 out.Concurrently(i, func() graphql.Marshaler { 14737 return rrm(innerCtx) 14738 }) 14739 case "primitiveObject": 14740 field := field 14741 14742 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14743 defer func() { 14744 if r := recover(); r != nil { 14745 ec.Error(ctx, ec.Recover(ctx, r)) 14746 } 14747 }() 14748 res = ec._Query_primitiveObject(ctx, field) 14749 if res == graphql.Null { 14750 atomic.AddUint32(&invalids, 1) 14751 } 14752 return res 14753 } 14754 14755 rrm := func(ctx context.Context) graphql.Marshaler { 14756 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14757 } 14758 14759 out.Concurrently(i, func() graphql.Marshaler { 14760 return rrm(innerCtx) 14761 }) 14762 case "primitiveStringObject": 14763 field := field 14764 14765 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14766 defer func() { 14767 if r := recover(); r != nil { 14768 ec.Error(ctx, ec.Recover(ctx, r)) 14769 } 14770 }() 14771 res = ec._Query_primitiveStringObject(ctx, field) 14772 if res == graphql.Null { 14773 atomic.AddUint32(&invalids, 1) 14774 } 14775 return res 14776 } 14777 14778 rrm := func(ctx context.Context) graphql.Marshaler { 14779 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14780 } 14781 14782 out.Concurrently(i, func() graphql.Marshaler { 14783 return rrm(innerCtx) 14784 }) 14785 case "ptrToSliceContainer": 14786 field := field 14787 14788 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14789 defer func() { 14790 if r := recover(); r != nil { 14791 ec.Error(ctx, ec.Recover(ctx, r)) 14792 } 14793 }() 14794 res = ec._Query_ptrToSliceContainer(ctx, field) 14795 if res == graphql.Null { 14796 atomic.AddUint32(&invalids, 1) 14797 } 14798 return res 14799 } 14800 14801 rrm := func(ctx context.Context) graphql.Marshaler { 14802 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14803 } 14804 14805 out.Concurrently(i, func() graphql.Marshaler { 14806 return rrm(innerCtx) 14807 }) 14808 case "infinity": 14809 field := field 14810 14811 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14812 defer func() { 14813 if r := recover(); r != nil { 14814 ec.Error(ctx, ec.Recover(ctx, r)) 14815 } 14816 }() 14817 res = ec._Query_infinity(ctx, field) 14818 if res == graphql.Null { 14819 atomic.AddUint32(&invalids, 1) 14820 } 14821 return res 14822 } 14823 14824 rrm := func(ctx context.Context) graphql.Marshaler { 14825 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14826 } 14827 14828 out.Concurrently(i, func() graphql.Marshaler { 14829 return rrm(innerCtx) 14830 }) 14831 case "stringFromContextInterface": 14832 field := field 14833 14834 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14835 defer func() { 14836 if r := recover(); r != nil { 14837 ec.Error(ctx, ec.Recover(ctx, r)) 14838 } 14839 }() 14840 res = ec._Query_stringFromContextInterface(ctx, field) 14841 if res == graphql.Null { 14842 atomic.AddUint32(&invalids, 1) 14843 } 14844 return res 14845 } 14846 14847 rrm := func(ctx context.Context) graphql.Marshaler { 14848 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14849 } 14850 14851 out.Concurrently(i, func() graphql.Marshaler { 14852 return rrm(innerCtx) 14853 }) 14854 case "stringFromContextFunction": 14855 field := field 14856 14857 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14858 defer func() { 14859 if r := recover(); r != nil { 14860 ec.Error(ctx, ec.Recover(ctx, r)) 14861 } 14862 }() 14863 res = ec._Query_stringFromContextFunction(ctx, field) 14864 if res == graphql.Null { 14865 atomic.AddUint32(&invalids, 1) 14866 } 14867 return res 14868 } 14869 14870 rrm := func(ctx context.Context) graphql.Marshaler { 14871 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14872 } 14873 14874 out.Concurrently(i, func() graphql.Marshaler { 14875 return rrm(innerCtx) 14876 }) 14877 case "defaultScalar": 14878 field := field 14879 14880 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14881 defer func() { 14882 if r := recover(); r != nil { 14883 ec.Error(ctx, ec.Recover(ctx, r)) 14884 } 14885 }() 14886 res = ec._Query_defaultScalar(ctx, field) 14887 if res == graphql.Null { 14888 atomic.AddUint32(&invalids, 1) 14889 } 14890 return res 14891 } 14892 14893 rrm := func(ctx context.Context) graphql.Marshaler { 14894 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14895 } 14896 14897 out.Concurrently(i, func() graphql.Marshaler { 14898 return rrm(innerCtx) 14899 }) 14900 case "slices": 14901 field := field 14902 14903 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14904 defer func() { 14905 if r := recover(); r != nil { 14906 ec.Error(ctx, ec.Recover(ctx, r)) 14907 } 14908 }() 14909 res = ec._Query_slices(ctx, field) 14910 return res 14911 } 14912 14913 rrm := func(ctx context.Context) graphql.Marshaler { 14914 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14915 } 14916 14917 out.Concurrently(i, func() graphql.Marshaler { 14918 return rrm(innerCtx) 14919 }) 14920 case "scalarSlice": 14921 field := field 14922 14923 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14924 defer func() { 14925 if r := recover(); r != nil { 14926 ec.Error(ctx, ec.Recover(ctx, r)) 14927 } 14928 }() 14929 res = ec._Query_scalarSlice(ctx, field) 14930 if res == graphql.Null { 14931 atomic.AddUint32(&invalids, 1) 14932 } 14933 return res 14934 } 14935 14936 rrm := func(ctx context.Context) graphql.Marshaler { 14937 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14938 } 14939 14940 out.Concurrently(i, func() graphql.Marshaler { 14941 return rrm(innerCtx) 14942 }) 14943 case "fallback": 14944 field := field 14945 14946 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14947 defer func() { 14948 if r := recover(); r != nil { 14949 ec.Error(ctx, ec.Recover(ctx, r)) 14950 } 14951 }() 14952 res = ec._Query_fallback(ctx, field) 14953 if res == graphql.Null { 14954 atomic.AddUint32(&invalids, 1) 14955 } 14956 return res 14957 } 14958 14959 rrm := func(ctx context.Context) graphql.Marshaler { 14960 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14961 } 14962 14963 out.Concurrently(i, func() graphql.Marshaler { 14964 return rrm(innerCtx) 14965 }) 14966 case "optionalUnion": 14967 field := field 14968 14969 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14970 defer func() { 14971 if r := recover(); r != nil { 14972 ec.Error(ctx, ec.Recover(ctx, r)) 14973 } 14974 }() 14975 res = ec._Query_optionalUnion(ctx, field) 14976 return res 14977 } 14978 14979 rrm := func(ctx context.Context) graphql.Marshaler { 14980 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 14981 } 14982 14983 out.Concurrently(i, func() graphql.Marshaler { 14984 return rrm(innerCtx) 14985 }) 14986 case "vOkCaseValue": 14987 field := field 14988 14989 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 14990 defer func() { 14991 if r := recover(); r != nil { 14992 ec.Error(ctx, ec.Recover(ctx, r)) 14993 } 14994 }() 14995 res = ec._Query_vOkCaseValue(ctx, field) 14996 return res 14997 } 14998 14999 rrm := func(ctx context.Context) graphql.Marshaler { 15000 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 15001 } 15002 15003 out.Concurrently(i, func() graphql.Marshaler { 15004 return rrm(innerCtx) 15005 }) 15006 case "vOkCaseNil": 15007 field := field 15008 15009 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15010 defer func() { 15011 if r := recover(); r != nil { 15012 ec.Error(ctx, ec.Recover(ctx, r)) 15013 } 15014 }() 15015 res = ec._Query_vOkCaseNil(ctx, field) 15016 return res 15017 } 15018 15019 rrm := func(ctx context.Context) graphql.Marshaler { 15020 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 15021 } 15022 15023 out.Concurrently(i, func() graphql.Marshaler { 15024 return rrm(innerCtx) 15025 }) 15026 case "validType": 15027 field := field 15028 15029 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15030 defer func() { 15031 if r := recover(); r != nil { 15032 ec.Error(ctx, ec.Recover(ctx, r)) 15033 } 15034 }() 15035 res = ec._Query_validType(ctx, field) 15036 return res 15037 } 15038 15039 rrm := func(ctx context.Context) graphql.Marshaler { 15040 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 15041 } 15042 15043 out.Concurrently(i, func() graphql.Marshaler { 15044 return rrm(innerCtx) 15045 }) 15046 case "wrappedStruct": 15047 field := field 15048 15049 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15050 defer func() { 15051 if r := recover(); r != nil { 15052 ec.Error(ctx, ec.Recover(ctx, r)) 15053 } 15054 }() 15055 res = ec._Query_wrappedStruct(ctx, field) 15056 if res == graphql.Null { 15057 atomic.AddUint32(&invalids, 1) 15058 } 15059 return res 15060 } 15061 15062 rrm := func(ctx context.Context) graphql.Marshaler { 15063 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 15064 } 15065 15066 out.Concurrently(i, func() graphql.Marshaler { 15067 return rrm(innerCtx) 15068 }) 15069 case "wrappedScalar": 15070 field := field 15071 15072 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15073 defer func() { 15074 if r := recover(); r != nil { 15075 ec.Error(ctx, ec.Recover(ctx, r)) 15076 } 15077 }() 15078 res = ec._Query_wrappedScalar(ctx, field) 15079 if res == graphql.Null { 15080 atomic.AddUint32(&invalids, 1) 15081 } 15082 return res 15083 } 15084 15085 rrm := func(ctx context.Context) graphql.Marshaler { 15086 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 15087 } 15088 15089 out.Concurrently(i, func() graphql.Marshaler { 15090 return rrm(innerCtx) 15091 }) 15092 case "wrappedMap": 15093 field := field 15094 15095 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15096 defer func() { 15097 if r := recover(); r != nil { 15098 ec.Error(ctx, ec.Recover(ctx, r)) 15099 } 15100 }() 15101 res = ec._Query_wrappedMap(ctx, field) 15102 if res == graphql.Null { 15103 atomic.AddUint32(&invalids, 1) 15104 } 15105 return res 15106 } 15107 15108 rrm := func(ctx context.Context) graphql.Marshaler { 15109 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 15110 } 15111 15112 out.Concurrently(i, func() graphql.Marshaler { 15113 return rrm(innerCtx) 15114 }) 15115 case "wrappedSlice": 15116 field := field 15117 15118 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15119 defer func() { 15120 if r := recover(); r != nil { 15121 ec.Error(ctx, ec.Recover(ctx, r)) 15122 } 15123 }() 15124 res = ec._Query_wrappedSlice(ctx, field) 15125 if res == graphql.Null { 15126 atomic.AddUint32(&invalids, 1) 15127 } 15128 return res 15129 } 15130 15131 rrm := func(ctx context.Context) graphql.Marshaler { 15132 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 15133 } 15134 15135 out.Concurrently(i, func() graphql.Marshaler { 15136 return rrm(innerCtx) 15137 }) 15138 case "__type": 15139 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15140 return ec._Query___type(ctx, field) 15141 } 15142 15143 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, innerFunc) 15144 15145 case "__schema": 15146 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15147 return ec._Query___schema(ctx, field) 15148 } 15149 15150 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, innerFunc) 15151 15152 default: 15153 panic("unknown field " + strconv.Quote(field.Name)) 15154 } 15155 } 15156 out.Dispatch() 15157 if invalids > 0 { 15158 return graphql.Null 15159 } 15160 return out 15161 } 15162 15163 var rectangleImplementors = []string{"Rectangle", "Shape", "ShapeUnion"} 15164 15165 func (ec *executionContext) _Rectangle(ctx context.Context, sel ast.SelectionSet, obj *Rectangle) graphql.Marshaler { 15166 fields := graphql.CollectFields(ec.OperationContext, sel, rectangleImplementors) 15167 out := graphql.NewFieldSet(fields) 15168 var invalids uint32 15169 for i, field := range fields { 15170 switch field.Name { 15171 case "__typename": 15172 out.Values[i] = graphql.MarshalString("Rectangle") 15173 case "length": 15174 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15175 return ec._Rectangle_length(ctx, field, obj) 15176 } 15177 15178 out.Values[i] = innerFunc(ctx) 15179 15180 case "width": 15181 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15182 return ec._Rectangle_width(ctx, field, obj) 15183 } 15184 15185 out.Values[i] = innerFunc(ctx) 15186 15187 case "area": 15188 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15189 return ec._Rectangle_area(ctx, field, obj) 15190 } 15191 15192 out.Values[i] = innerFunc(ctx) 15193 15194 case "coordinates": 15195 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15196 return ec._Rectangle_coordinates(ctx, field, obj) 15197 } 15198 15199 out.Values[i] = innerFunc(ctx) 15200 15201 default: 15202 panic("unknown field " + strconv.Quote(field.Name)) 15203 } 15204 } 15205 out.Dispatch() 15206 if invalids > 0 { 15207 return graphql.Null 15208 } 15209 return out 15210 } 15211 15212 var slicesImplementors = []string{"Slices"} 15213 15214 func (ec *executionContext) _Slices(ctx context.Context, sel ast.SelectionSet, obj *Slices) graphql.Marshaler { 15215 fields := graphql.CollectFields(ec.OperationContext, sel, slicesImplementors) 15216 out := graphql.NewFieldSet(fields) 15217 var invalids uint32 15218 for i, field := range fields { 15219 switch field.Name { 15220 case "__typename": 15221 out.Values[i] = graphql.MarshalString("Slices") 15222 case "test1": 15223 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15224 return ec._Slices_test1(ctx, field, obj) 15225 } 15226 15227 out.Values[i] = innerFunc(ctx) 15228 15229 case "test2": 15230 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15231 return ec._Slices_test2(ctx, field, obj) 15232 } 15233 15234 out.Values[i] = innerFunc(ctx) 15235 15236 case "test3": 15237 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15238 return ec._Slices_test3(ctx, field, obj) 15239 } 15240 15241 out.Values[i] = innerFunc(ctx) 15242 15243 if out.Values[i] == graphql.Null { 15244 invalids++ 15245 } 15246 case "test4": 15247 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15248 return ec._Slices_test4(ctx, field, obj) 15249 } 15250 15251 out.Values[i] = innerFunc(ctx) 15252 15253 if out.Values[i] == graphql.Null { 15254 invalids++ 15255 } 15256 default: 15257 panic("unknown field " + strconv.Quote(field.Name)) 15258 } 15259 } 15260 out.Dispatch() 15261 if invalids > 0 { 15262 return graphql.Null 15263 } 15264 return out 15265 } 15266 15267 var subscriptionImplementors = []string{"Subscription"} 15268 15269 func (ec *executionContext) _Subscription(ctx context.Context, sel ast.SelectionSet) func() graphql.Marshaler { 15270 fields := graphql.CollectFields(ec.OperationContext, sel, subscriptionImplementors) 15271 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ 15272 Object: "Subscription", 15273 }) 15274 if len(fields) != 1 { 15275 ec.Errorf(ctx, "must subscribe to exactly one stream") 15276 return nil 15277 } 15278 15279 switch fields[0].Name { 15280 case "updated": 15281 return ec._Subscription_updated(ctx, fields[0]) 15282 case "initPayload": 15283 return ec._Subscription_initPayload(ctx, fields[0]) 15284 case "directiveArg": 15285 return ec._Subscription_directiveArg(ctx, fields[0]) 15286 case "directiveNullableArg": 15287 return ec._Subscription_directiveNullableArg(ctx, fields[0]) 15288 case "directiveDouble": 15289 return ec._Subscription_directiveDouble(ctx, fields[0]) 15290 case "directiveUnimplemented": 15291 return ec._Subscription_directiveUnimplemented(ctx, fields[0]) 15292 case "issue896b": 15293 return ec._Subscription_issue896b(ctx, fields[0]) 15294 default: 15295 panic("unknown field " + strconv.Quote(fields[0].Name)) 15296 } 15297 } 15298 15299 var userImplementors = []string{"User"} 15300 15301 func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj *User) graphql.Marshaler { 15302 fields := graphql.CollectFields(ec.OperationContext, sel, userImplementors) 15303 out := graphql.NewFieldSet(fields) 15304 var invalids uint32 15305 for i, field := range fields { 15306 switch field.Name { 15307 case "__typename": 15308 out.Values[i] = graphql.MarshalString("User") 15309 case "id": 15310 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15311 return ec._User_id(ctx, field, obj) 15312 } 15313 15314 out.Values[i] = innerFunc(ctx) 15315 15316 if out.Values[i] == graphql.Null { 15317 atomic.AddUint32(&invalids, 1) 15318 } 15319 case "friends": 15320 field := field 15321 15322 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15323 defer func() { 15324 if r := recover(); r != nil { 15325 ec.Error(ctx, ec.Recover(ctx, r)) 15326 } 15327 }() 15328 res = ec._User_friends(ctx, field, obj) 15329 if res == graphql.Null { 15330 atomic.AddUint32(&invalids, 1) 15331 } 15332 return res 15333 } 15334 15335 out.Concurrently(i, func() graphql.Marshaler { 15336 return innerFunc(ctx) 15337 15338 }) 15339 case "created": 15340 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15341 return ec._User_created(ctx, field, obj) 15342 } 15343 15344 out.Values[i] = innerFunc(ctx) 15345 15346 if out.Values[i] == graphql.Null { 15347 atomic.AddUint32(&invalids, 1) 15348 } 15349 case "updated": 15350 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15351 return ec._User_updated(ctx, field, obj) 15352 } 15353 15354 out.Values[i] = innerFunc(ctx) 15355 15356 default: 15357 panic("unknown field " + strconv.Quote(field.Name)) 15358 } 15359 } 15360 out.Dispatch() 15361 if invalids > 0 { 15362 return graphql.Null 15363 } 15364 return out 15365 } 15366 15367 var vOkCaseNilImplementors = []string{"VOkCaseNil"} 15368 15369 func (ec *executionContext) _VOkCaseNil(ctx context.Context, sel ast.SelectionSet, obj *VOkCaseNil) graphql.Marshaler { 15370 fields := graphql.CollectFields(ec.OperationContext, sel, vOkCaseNilImplementors) 15371 out := graphql.NewFieldSet(fields) 15372 var invalids uint32 15373 for i, field := range fields { 15374 switch field.Name { 15375 case "__typename": 15376 out.Values[i] = graphql.MarshalString("VOkCaseNil") 15377 case "value": 15378 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15379 return ec._VOkCaseNil_value(ctx, field, obj) 15380 } 15381 15382 out.Values[i] = innerFunc(ctx) 15383 15384 default: 15385 panic("unknown field " + strconv.Quote(field.Name)) 15386 } 15387 } 15388 out.Dispatch() 15389 if invalids > 0 { 15390 return graphql.Null 15391 } 15392 return out 15393 } 15394 15395 var vOkCaseValueImplementors = []string{"VOkCaseValue"} 15396 15397 func (ec *executionContext) _VOkCaseValue(ctx context.Context, sel ast.SelectionSet, obj *VOkCaseValue) graphql.Marshaler { 15398 fields := graphql.CollectFields(ec.OperationContext, sel, vOkCaseValueImplementors) 15399 out := graphql.NewFieldSet(fields) 15400 var invalids uint32 15401 for i, field := range fields { 15402 switch field.Name { 15403 case "__typename": 15404 out.Values[i] = graphql.MarshalString("VOkCaseValue") 15405 case "value": 15406 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15407 return ec._VOkCaseValue_value(ctx, field, obj) 15408 } 15409 15410 out.Values[i] = innerFunc(ctx) 15411 15412 default: 15413 panic("unknown field " + strconv.Quote(field.Name)) 15414 } 15415 } 15416 out.Dispatch() 15417 if invalids > 0 { 15418 return graphql.Null 15419 } 15420 return out 15421 } 15422 15423 var validTypeImplementors = []string{"ValidType"} 15424 15425 func (ec *executionContext) _ValidType(ctx context.Context, sel ast.SelectionSet, obj *ValidType) graphql.Marshaler { 15426 fields := graphql.CollectFields(ec.OperationContext, sel, validTypeImplementors) 15427 out := graphql.NewFieldSet(fields) 15428 var invalids uint32 15429 for i, field := range fields { 15430 switch field.Name { 15431 case "__typename": 15432 out.Values[i] = graphql.MarshalString("ValidType") 15433 case "differentCase": 15434 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15435 return ec._ValidType_differentCase(ctx, field, obj) 15436 } 15437 15438 out.Values[i] = innerFunc(ctx) 15439 15440 if out.Values[i] == graphql.Null { 15441 invalids++ 15442 } 15443 case "different_case": 15444 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15445 return ec._ValidType_different_case(ctx, field, obj) 15446 } 15447 15448 out.Values[i] = innerFunc(ctx) 15449 15450 if out.Values[i] == graphql.Null { 15451 invalids++ 15452 } 15453 case "validInputKeywords": 15454 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15455 return ec._ValidType_validInputKeywords(ctx, field, obj) 15456 } 15457 15458 out.Values[i] = innerFunc(ctx) 15459 15460 if out.Values[i] == graphql.Null { 15461 invalids++ 15462 } 15463 case "validArgs": 15464 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15465 return ec._ValidType_validArgs(ctx, field, obj) 15466 } 15467 15468 out.Values[i] = innerFunc(ctx) 15469 15470 if out.Values[i] == graphql.Null { 15471 invalids++ 15472 } 15473 default: 15474 panic("unknown field " + strconv.Quote(field.Name)) 15475 } 15476 } 15477 out.Dispatch() 15478 if invalids > 0 { 15479 return graphql.Null 15480 } 15481 return out 15482 } 15483 15484 var wrappedMapImplementors = []string{"WrappedMap"} 15485 15486 func (ec *executionContext) _WrappedMap(ctx context.Context, sel ast.SelectionSet, obj WrappedMap) graphql.Marshaler { 15487 fields := graphql.CollectFields(ec.OperationContext, sel, wrappedMapImplementors) 15488 out := graphql.NewFieldSet(fields) 15489 var invalids uint32 15490 for i, field := range fields { 15491 switch field.Name { 15492 case "__typename": 15493 out.Values[i] = graphql.MarshalString("WrappedMap") 15494 case "get": 15495 field := field 15496 15497 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15498 defer func() { 15499 if r := recover(); r != nil { 15500 ec.Error(ctx, ec.Recover(ctx, r)) 15501 } 15502 }() 15503 res = ec._WrappedMap_get(ctx, field, obj) 15504 if res == graphql.Null { 15505 atomic.AddUint32(&invalids, 1) 15506 } 15507 return res 15508 } 15509 15510 out.Concurrently(i, func() graphql.Marshaler { 15511 return innerFunc(ctx) 15512 15513 }) 15514 default: 15515 panic("unknown field " + strconv.Quote(field.Name)) 15516 } 15517 } 15518 out.Dispatch() 15519 if invalids > 0 { 15520 return graphql.Null 15521 } 15522 return out 15523 } 15524 15525 var wrappedSliceImplementors = []string{"WrappedSlice"} 15526 15527 func (ec *executionContext) _WrappedSlice(ctx context.Context, sel ast.SelectionSet, obj WrappedSlice) graphql.Marshaler { 15528 fields := graphql.CollectFields(ec.OperationContext, sel, wrappedSliceImplementors) 15529 out := graphql.NewFieldSet(fields) 15530 var invalids uint32 15531 for i, field := range fields { 15532 switch field.Name { 15533 case "__typename": 15534 out.Values[i] = graphql.MarshalString("WrappedSlice") 15535 case "get": 15536 field := field 15537 15538 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15539 defer func() { 15540 if r := recover(); r != nil { 15541 ec.Error(ctx, ec.Recover(ctx, r)) 15542 } 15543 }() 15544 res = ec._WrappedSlice_get(ctx, field, obj) 15545 if res == graphql.Null { 15546 atomic.AddUint32(&invalids, 1) 15547 } 15548 return res 15549 } 15550 15551 out.Concurrently(i, func() graphql.Marshaler { 15552 return innerFunc(ctx) 15553 15554 }) 15555 default: 15556 panic("unknown field " + strconv.Quote(field.Name)) 15557 } 15558 } 15559 out.Dispatch() 15560 if invalids > 0 { 15561 return graphql.Null 15562 } 15563 return out 15564 } 15565 15566 var wrappedStructImplementors = []string{"WrappedStruct"} 15567 15568 func (ec *executionContext) _WrappedStruct(ctx context.Context, sel ast.SelectionSet, obj *WrappedStruct) graphql.Marshaler { 15569 fields := graphql.CollectFields(ec.OperationContext, sel, wrappedStructImplementors) 15570 out := graphql.NewFieldSet(fields) 15571 var invalids uint32 15572 for i, field := range fields { 15573 switch field.Name { 15574 case "__typename": 15575 out.Values[i] = graphql.MarshalString("WrappedStruct") 15576 case "name": 15577 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15578 return ec._WrappedStruct_name(ctx, field, obj) 15579 } 15580 15581 out.Values[i] = innerFunc(ctx) 15582 15583 if out.Values[i] == graphql.Null { 15584 invalids++ 15585 } 15586 case "desc": 15587 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15588 return ec._WrappedStruct_desc(ctx, field, obj) 15589 } 15590 15591 out.Values[i] = innerFunc(ctx) 15592 15593 default: 15594 panic("unknown field " + strconv.Quote(field.Name)) 15595 } 15596 } 15597 out.Dispatch() 15598 if invalids > 0 { 15599 return graphql.Null 15600 } 15601 return out 15602 } 15603 15604 var xXItImplementors = []string{"XXIt"} 15605 15606 func (ec *executionContext) _XXIt(ctx context.Context, sel ast.SelectionSet, obj *XXIt) graphql.Marshaler { 15607 fields := graphql.CollectFields(ec.OperationContext, sel, xXItImplementors) 15608 out := graphql.NewFieldSet(fields) 15609 var invalids uint32 15610 for i, field := range fields { 15611 switch field.Name { 15612 case "__typename": 15613 out.Values[i] = graphql.MarshalString("XXIt") 15614 case "id": 15615 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15616 return ec._XXIt_id(ctx, field, obj) 15617 } 15618 15619 out.Values[i] = innerFunc(ctx) 15620 15621 if out.Values[i] == graphql.Null { 15622 invalids++ 15623 } 15624 default: 15625 panic("unknown field " + strconv.Quote(field.Name)) 15626 } 15627 } 15628 out.Dispatch() 15629 if invalids > 0 { 15630 return graphql.Null 15631 } 15632 return out 15633 } 15634 15635 var xxItImplementors = []string{"XxIt"} 15636 15637 func (ec *executionContext) _XxIt(ctx context.Context, sel ast.SelectionSet, obj *XxIt) graphql.Marshaler { 15638 fields := graphql.CollectFields(ec.OperationContext, sel, xxItImplementors) 15639 out := graphql.NewFieldSet(fields) 15640 var invalids uint32 15641 for i, field := range fields { 15642 switch field.Name { 15643 case "__typename": 15644 out.Values[i] = graphql.MarshalString("XxIt") 15645 case "id": 15646 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15647 return ec._XxIt_id(ctx, field, obj) 15648 } 15649 15650 out.Values[i] = innerFunc(ctx) 15651 15652 if out.Values[i] == graphql.Null { 15653 invalids++ 15654 } 15655 default: 15656 panic("unknown field " + strconv.Quote(field.Name)) 15657 } 15658 } 15659 out.Dispatch() 15660 if invalids > 0 { 15661 return graphql.Null 15662 } 15663 return out 15664 } 15665 15666 var __DirectiveImplementors = []string{"__Directive"} 15667 15668 func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { 15669 fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) 15670 out := graphql.NewFieldSet(fields) 15671 var invalids uint32 15672 for i, field := range fields { 15673 switch field.Name { 15674 case "__typename": 15675 out.Values[i] = graphql.MarshalString("__Directive") 15676 case "name": 15677 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15678 return ec.___Directive_name(ctx, field, obj) 15679 } 15680 15681 out.Values[i] = innerFunc(ctx) 15682 15683 if out.Values[i] == graphql.Null { 15684 invalids++ 15685 } 15686 case "description": 15687 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15688 return ec.___Directive_description(ctx, field, obj) 15689 } 15690 15691 out.Values[i] = innerFunc(ctx) 15692 15693 case "locations": 15694 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15695 return ec.___Directive_locations(ctx, field, obj) 15696 } 15697 15698 out.Values[i] = innerFunc(ctx) 15699 15700 if out.Values[i] == graphql.Null { 15701 invalids++ 15702 } 15703 case "args": 15704 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15705 return ec.___Directive_args(ctx, field, obj) 15706 } 15707 15708 out.Values[i] = innerFunc(ctx) 15709 15710 if out.Values[i] == graphql.Null { 15711 invalids++ 15712 } 15713 case "isRepeatable": 15714 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15715 return ec.___Directive_isRepeatable(ctx, field, obj) 15716 } 15717 15718 out.Values[i] = innerFunc(ctx) 15719 15720 if out.Values[i] == graphql.Null { 15721 invalids++ 15722 } 15723 default: 15724 panic("unknown field " + strconv.Quote(field.Name)) 15725 } 15726 } 15727 out.Dispatch() 15728 if invalids > 0 { 15729 return graphql.Null 15730 } 15731 return out 15732 } 15733 15734 var __EnumValueImplementors = []string{"__EnumValue"} 15735 15736 func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { 15737 fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) 15738 out := graphql.NewFieldSet(fields) 15739 var invalids uint32 15740 for i, field := range fields { 15741 switch field.Name { 15742 case "__typename": 15743 out.Values[i] = graphql.MarshalString("__EnumValue") 15744 case "name": 15745 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15746 return ec.___EnumValue_name(ctx, field, obj) 15747 } 15748 15749 out.Values[i] = innerFunc(ctx) 15750 15751 if out.Values[i] == graphql.Null { 15752 invalids++ 15753 } 15754 case "description": 15755 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15756 return ec.___EnumValue_description(ctx, field, obj) 15757 } 15758 15759 out.Values[i] = innerFunc(ctx) 15760 15761 case "isDeprecated": 15762 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15763 return ec.___EnumValue_isDeprecated(ctx, field, obj) 15764 } 15765 15766 out.Values[i] = innerFunc(ctx) 15767 15768 if out.Values[i] == graphql.Null { 15769 invalids++ 15770 } 15771 case "deprecationReason": 15772 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15773 return ec.___EnumValue_deprecationReason(ctx, field, obj) 15774 } 15775 15776 out.Values[i] = innerFunc(ctx) 15777 15778 default: 15779 panic("unknown field " + strconv.Quote(field.Name)) 15780 } 15781 } 15782 out.Dispatch() 15783 if invalids > 0 { 15784 return graphql.Null 15785 } 15786 return out 15787 } 15788 15789 var __FieldImplementors = []string{"__Field"} 15790 15791 func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { 15792 fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) 15793 out := graphql.NewFieldSet(fields) 15794 var invalids uint32 15795 for i, field := range fields { 15796 switch field.Name { 15797 case "__typename": 15798 out.Values[i] = graphql.MarshalString("__Field") 15799 case "name": 15800 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15801 return ec.___Field_name(ctx, field, obj) 15802 } 15803 15804 out.Values[i] = innerFunc(ctx) 15805 15806 if out.Values[i] == graphql.Null { 15807 invalids++ 15808 } 15809 case "description": 15810 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15811 return ec.___Field_description(ctx, field, obj) 15812 } 15813 15814 out.Values[i] = innerFunc(ctx) 15815 15816 case "args": 15817 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15818 return ec.___Field_args(ctx, field, obj) 15819 } 15820 15821 out.Values[i] = innerFunc(ctx) 15822 15823 if out.Values[i] == graphql.Null { 15824 invalids++ 15825 } 15826 case "type": 15827 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15828 return ec.___Field_type(ctx, field, obj) 15829 } 15830 15831 out.Values[i] = innerFunc(ctx) 15832 15833 if out.Values[i] == graphql.Null { 15834 invalids++ 15835 } 15836 case "isDeprecated": 15837 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15838 return ec.___Field_isDeprecated(ctx, field, obj) 15839 } 15840 15841 out.Values[i] = innerFunc(ctx) 15842 15843 if out.Values[i] == graphql.Null { 15844 invalids++ 15845 } 15846 case "deprecationReason": 15847 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15848 return ec.___Field_deprecationReason(ctx, field, obj) 15849 } 15850 15851 out.Values[i] = innerFunc(ctx) 15852 15853 default: 15854 panic("unknown field " + strconv.Quote(field.Name)) 15855 } 15856 } 15857 out.Dispatch() 15858 if invalids > 0 { 15859 return graphql.Null 15860 } 15861 return out 15862 } 15863 15864 var __InputValueImplementors = []string{"__InputValue"} 15865 15866 func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { 15867 fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) 15868 out := graphql.NewFieldSet(fields) 15869 var invalids uint32 15870 for i, field := range fields { 15871 switch field.Name { 15872 case "__typename": 15873 out.Values[i] = graphql.MarshalString("__InputValue") 15874 case "name": 15875 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15876 return ec.___InputValue_name(ctx, field, obj) 15877 } 15878 15879 out.Values[i] = innerFunc(ctx) 15880 15881 if out.Values[i] == graphql.Null { 15882 invalids++ 15883 } 15884 case "description": 15885 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15886 return ec.___InputValue_description(ctx, field, obj) 15887 } 15888 15889 out.Values[i] = innerFunc(ctx) 15890 15891 case "type": 15892 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15893 return ec.___InputValue_type(ctx, field, obj) 15894 } 15895 15896 out.Values[i] = innerFunc(ctx) 15897 15898 if out.Values[i] == graphql.Null { 15899 invalids++ 15900 } 15901 case "defaultValue": 15902 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15903 return ec.___InputValue_defaultValue(ctx, field, obj) 15904 } 15905 15906 out.Values[i] = innerFunc(ctx) 15907 15908 default: 15909 panic("unknown field " + strconv.Quote(field.Name)) 15910 } 15911 } 15912 out.Dispatch() 15913 if invalids > 0 { 15914 return graphql.Null 15915 } 15916 return out 15917 } 15918 15919 var __SchemaImplementors = []string{"__Schema"} 15920 15921 func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { 15922 fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) 15923 out := graphql.NewFieldSet(fields) 15924 var invalids uint32 15925 for i, field := range fields { 15926 switch field.Name { 15927 case "__typename": 15928 out.Values[i] = graphql.MarshalString("__Schema") 15929 case "types": 15930 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15931 return ec.___Schema_types(ctx, field, obj) 15932 } 15933 15934 out.Values[i] = innerFunc(ctx) 15935 15936 if out.Values[i] == graphql.Null { 15937 invalids++ 15938 } 15939 case "queryType": 15940 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15941 return ec.___Schema_queryType(ctx, field, obj) 15942 } 15943 15944 out.Values[i] = innerFunc(ctx) 15945 15946 if out.Values[i] == graphql.Null { 15947 invalids++ 15948 } 15949 case "mutationType": 15950 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15951 return ec.___Schema_mutationType(ctx, field, obj) 15952 } 15953 15954 out.Values[i] = innerFunc(ctx) 15955 15956 case "subscriptionType": 15957 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15958 return ec.___Schema_subscriptionType(ctx, field, obj) 15959 } 15960 15961 out.Values[i] = innerFunc(ctx) 15962 15963 case "directives": 15964 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15965 return ec.___Schema_directives(ctx, field, obj) 15966 } 15967 15968 out.Values[i] = innerFunc(ctx) 15969 15970 if out.Values[i] == graphql.Null { 15971 invalids++ 15972 } 15973 default: 15974 panic("unknown field " + strconv.Quote(field.Name)) 15975 } 15976 } 15977 out.Dispatch() 15978 if invalids > 0 { 15979 return graphql.Null 15980 } 15981 return out 15982 } 15983 15984 var __TypeImplementors = []string{"__Type"} 15985 15986 func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { 15987 fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) 15988 out := graphql.NewFieldSet(fields) 15989 var invalids uint32 15990 for i, field := range fields { 15991 switch field.Name { 15992 case "__typename": 15993 out.Values[i] = graphql.MarshalString("__Type") 15994 case "kind": 15995 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15996 return ec.___Type_kind(ctx, field, obj) 15997 } 15998 15999 out.Values[i] = innerFunc(ctx) 16000 16001 if out.Values[i] == graphql.Null { 16002 invalids++ 16003 } 16004 case "name": 16005 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16006 return ec.___Type_name(ctx, field, obj) 16007 } 16008 16009 out.Values[i] = innerFunc(ctx) 16010 16011 case "description": 16012 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16013 return ec.___Type_description(ctx, field, obj) 16014 } 16015 16016 out.Values[i] = innerFunc(ctx) 16017 16018 case "fields": 16019 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16020 return ec.___Type_fields(ctx, field, obj) 16021 } 16022 16023 out.Values[i] = innerFunc(ctx) 16024 16025 case "interfaces": 16026 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16027 return ec.___Type_interfaces(ctx, field, obj) 16028 } 16029 16030 out.Values[i] = innerFunc(ctx) 16031 16032 case "possibleTypes": 16033 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16034 return ec.___Type_possibleTypes(ctx, field, obj) 16035 } 16036 16037 out.Values[i] = innerFunc(ctx) 16038 16039 case "enumValues": 16040 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16041 return ec.___Type_enumValues(ctx, field, obj) 16042 } 16043 16044 out.Values[i] = innerFunc(ctx) 16045 16046 case "inputFields": 16047 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16048 return ec.___Type_inputFields(ctx, field, obj) 16049 } 16050 16051 out.Values[i] = innerFunc(ctx) 16052 16053 case "ofType": 16054 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16055 return ec.___Type_ofType(ctx, field, obj) 16056 } 16057 16058 out.Values[i] = innerFunc(ctx) 16059 16060 default: 16061 panic("unknown field " + strconv.Quote(field.Name)) 16062 } 16063 } 16064 out.Dispatch() 16065 if invalids > 0 { 16066 return graphql.Null 16067 } 16068 return out 16069 } 16070 16071 var asdfItImplementors = []string{"asdfIt"} 16072 16073 func (ec *executionContext) _asdfIt(ctx context.Context, sel ast.SelectionSet, obj *AsdfIt) graphql.Marshaler { 16074 fields := graphql.CollectFields(ec.OperationContext, sel, asdfItImplementors) 16075 out := graphql.NewFieldSet(fields) 16076 var invalids uint32 16077 for i, field := range fields { 16078 switch field.Name { 16079 case "__typename": 16080 out.Values[i] = graphql.MarshalString("asdfIt") 16081 case "id": 16082 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16083 return ec._asdfIt_id(ctx, field, obj) 16084 } 16085 16086 out.Values[i] = innerFunc(ctx) 16087 16088 if out.Values[i] == graphql.Null { 16089 invalids++ 16090 } 16091 default: 16092 panic("unknown field " + strconv.Quote(field.Name)) 16093 } 16094 } 16095 out.Dispatch() 16096 if invalids > 0 { 16097 return graphql.Null 16098 } 16099 return out 16100 } 16101 16102 var iItImplementors = []string{"iIt"} 16103 16104 func (ec *executionContext) _iIt(ctx context.Context, sel ast.SelectionSet, obj *IIt) graphql.Marshaler { 16105 fields := graphql.CollectFields(ec.OperationContext, sel, iItImplementors) 16106 out := graphql.NewFieldSet(fields) 16107 var invalids uint32 16108 for i, field := range fields { 16109 switch field.Name { 16110 case "__typename": 16111 out.Values[i] = graphql.MarshalString("iIt") 16112 case "id": 16113 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16114 return ec._iIt_id(ctx, field, obj) 16115 } 16116 16117 out.Values[i] = innerFunc(ctx) 16118 16119 if out.Values[i] == graphql.Null { 16120 invalids++ 16121 } 16122 default: 16123 panic("unknown field " + strconv.Quote(field.Name)) 16124 } 16125 } 16126 out.Dispatch() 16127 if invalids > 0 { 16128 return graphql.Null 16129 } 16130 return out 16131 } 16132 16133 // endregion **************************** object.gotpl **************************** 16134 16135 // region ***************************** type.gotpl ***************************** 16136 16137 func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) { 16138 res, err := graphql.UnmarshalBoolean(v) 16139 return res, graphql.ErrorOnPath(ctx, err) 16140 } 16141 16142 func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { 16143 res := graphql.MarshalBoolean(v) 16144 if res == graphql.Null { 16145 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16146 ec.Errorf(ctx, "must not be null") 16147 } 16148 } 16149 return res 16150 } 16151 16152 func (ec *executionContext) unmarshalNBytes2ᚕbyte(ctx context.Context, v interface{}) ([]byte, error) { 16153 res, err := UnmarshalBytes(v) 16154 return res, graphql.ErrorOnPath(ctx, err) 16155 } 16156 16157 func (ec *executionContext) marshalNBytes2ᚕbyte(ctx context.Context, sel ast.SelectionSet, v []byte) graphql.Marshaler { 16158 if v == nil { 16159 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16160 ec.Errorf(ctx, "must not be null") 16161 } 16162 return graphql.Null 16163 } 16164 res := MarshalBytes(v) 16165 if res == graphql.Null { 16166 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16167 ec.Errorf(ctx, "must not be null") 16168 } 16169 } 16170 return res 16171 } 16172 16173 func (ec *executionContext) marshalNCheckIssue8962ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896(ctx context.Context, sel ast.SelectionSet, v *CheckIssue896) graphql.Marshaler { 16174 if v == nil { 16175 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16176 ec.Errorf(ctx, "must not be null") 16177 } 16178 return graphql.Null 16179 } 16180 return ec._CheckIssue896(ctx, sel, v) 16181 } 16182 16183 func (ec *executionContext) unmarshalNDefaultInput2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐDefaultInput(ctx context.Context, v interface{}) (DefaultInput, error) { 16184 res, err := ec.unmarshalInputDefaultInput(ctx, v) 16185 return res, graphql.ErrorOnPath(ctx, err) 16186 } 16187 16188 func (ec *executionContext) marshalNDefaultParametersMirror2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐDefaultParametersMirror(ctx context.Context, sel ast.SelectionSet, v DefaultParametersMirror) graphql.Marshaler { 16189 return ec._DefaultParametersMirror(ctx, sel, &v) 16190 } 16191 16192 func (ec *executionContext) marshalNDefaultParametersMirror2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐDefaultParametersMirror(ctx context.Context, sel ast.SelectionSet, v *DefaultParametersMirror) graphql.Marshaler { 16193 if v == nil { 16194 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16195 ec.Errorf(ctx, "must not be null") 16196 } 16197 return graphql.Null 16198 } 16199 return ec._DefaultParametersMirror(ctx, sel, v) 16200 } 16201 16202 func (ec *executionContext) unmarshalNDefaultScalarImplementation2string(ctx context.Context, v interface{}) (string, error) { 16203 res, err := graphql.UnmarshalString(v) 16204 return res, graphql.ErrorOnPath(ctx, err) 16205 } 16206 16207 func (ec *executionContext) marshalNDefaultScalarImplementation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 16208 res := graphql.MarshalString(v) 16209 if res == graphql.Null { 16210 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16211 ec.Errorf(ctx, "must not be null") 16212 } 16213 } 16214 return res 16215 } 16216 16217 func (ec *executionContext) unmarshalNEmail2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEmail(ctx context.Context, v interface{}) (Email, error) { 16218 var res Email 16219 err := res.UnmarshalGQL(v) 16220 return res, graphql.ErrorOnPath(ctx, err) 16221 } 16222 16223 func (ec *executionContext) marshalNEmail2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEmail(ctx context.Context, sel ast.SelectionSet, v Email) graphql.Marshaler { 16224 return v 16225 } 16226 16227 func (ec *executionContext) unmarshalNEnumTest2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEnumTest(ctx context.Context, v interface{}) (EnumTest, error) { 16228 var res EnumTest 16229 err := res.UnmarshalGQL(v) 16230 return res, graphql.ErrorOnPath(ctx, err) 16231 } 16232 16233 func (ec *executionContext) marshalNEnumTest2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEnumTest(ctx context.Context, sel ast.SelectionSet, v EnumTest) graphql.Marshaler { 16234 return v 16235 } 16236 16237 func (ec *executionContext) marshalNError2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx context.Context, sel ast.SelectionSet, v Error) graphql.Marshaler { 16238 return ec._Error(ctx, sel, &v) 16239 } 16240 16241 func (ec *executionContext) marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx context.Context, sel ast.SelectionSet, v *Error) graphql.Marshaler { 16242 if v == nil { 16243 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16244 ec.Errorf(ctx, "must not be null") 16245 } 16246 return graphql.Null 16247 } 16248 return ec._Error(ctx, sel, v) 16249 } 16250 16251 func (ec *executionContext) unmarshalNFallbackToStringEncoding2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐFallbackToStringEncoding(ctx context.Context, v interface{}) (FallbackToStringEncoding, error) { 16252 tmp, err := graphql.UnmarshalString(v) 16253 res := FallbackToStringEncoding(tmp) 16254 return res, graphql.ErrorOnPath(ctx, err) 16255 } 16256 16257 func (ec *executionContext) marshalNFallbackToStringEncoding2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐFallbackToStringEncoding(ctx context.Context, sel ast.SelectionSet, v FallbackToStringEncoding) graphql.Marshaler { 16258 res := graphql.MarshalString(string(v)) 16259 if res == graphql.Null { 16260 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16261 ec.Errorf(ctx, "must not be null") 16262 } 16263 } 16264 return res 16265 } 16266 16267 func (ec *executionContext) unmarshalNFloat2float64(ctx context.Context, v interface{}) (float64, error) { 16268 res, err := graphql.UnmarshalFloatContext(ctx, v) 16269 return res, graphql.ErrorOnPath(ctx, err) 16270 } 16271 16272 func (ec *executionContext) marshalNFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler { 16273 res := graphql.MarshalFloatContext(v) 16274 if res == graphql.Null { 16275 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16276 ec.Errorf(ctx, "must not be null") 16277 } 16278 } 16279 return graphql.WrapContextMarshaler(ctx, res) 16280 } 16281 16282 func (ec *executionContext) unmarshalNID2int(ctx context.Context, v interface{}) (int, error) { 16283 res, err := graphql.UnmarshalIntID(v) 16284 return res, graphql.ErrorOnPath(ctx, err) 16285 } 16286 16287 func (ec *executionContext) marshalNID2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { 16288 res := graphql.MarshalIntID(v) 16289 if res == graphql.Null { 16290 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16291 ec.Errorf(ctx, "must not be null") 16292 } 16293 } 16294 return res 16295 } 16296 16297 func (ec *executionContext) unmarshalNID2string(ctx context.Context, v interface{}) (string, error) { 16298 res, err := graphql.UnmarshalID(v) 16299 return res, graphql.ErrorOnPath(ctx, err) 16300 } 16301 16302 func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 16303 res := graphql.MarshalID(v) 16304 if res == graphql.Null { 16305 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16306 ec.Errorf(ctx, "must not be null") 16307 } 16308 } 16309 return res 16310 } 16311 16312 func (ec *executionContext) unmarshalNInnerDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInnerDirectives(ctx context.Context, v interface{}) (*InnerDirectives, error) { 16313 res, err := ec.unmarshalInputInnerDirectives(ctx, v) 16314 return &res, graphql.ErrorOnPath(ctx, err) 16315 } 16316 16317 func (ec *executionContext) unmarshalNInnerInput2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInnerInput(ctx context.Context, v interface{}) (InnerInput, error) { 16318 res, err := ec.unmarshalInputInnerInput(ctx, v) 16319 return res, graphql.ErrorOnPath(ctx, err) 16320 } 16321 16322 func (ec *executionContext) unmarshalNInnerInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInnerInput(ctx context.Context, v interface{}) (*InnerInput, error) { 16323 res, err := ec.unmarshalInputInnerInput(ctx, v) 16324 return &res, graphql.ErrorOnPath(ctx, err) 16325 } 16326 16327 func (ec *executionContext) marshalNInnerObject2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInnerObject(ctx context.Context, sel ast.SelectionSet, v *InnerObject) graphql.Marshaler { 16328 if v == nil { 16329 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16330 ec.Errorf(ctx, "must not be null") 16331 } 16332 return graphql.Null 16333 } 16334 return ec._InnerObject(ctx, sel, v) 16335 } 16336 16337 func (ec *executionContext) unmarshalNInputDirectives2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInputDirectives(ctx context.Context, v interface{}) (InputDirectives, error) { 16338 res, err := ec.unmarshalInputInputDirectives(ctx, v) 16339 return res, graphql.ErrorOnPath(ctx, err) 16340 } 16341 16342 func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) { 16343 res, err := graphql.UnmarshalInt(v) 16344 return res, graphql.ErrorOnPath(ctx, err) 16345 } 16346 16347 func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { 16348 res := graphql.MarshalInt(v) 16349 if res == graphql.Null { 16350 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16351 ec.Errorf(ctx, "must not be null") 16352 } 16353 } 16354 return res 16355 } 16356 16357 func (ec *executionContext) unmarshalNInt2int32(ctx context.Context, v interface{}) (int32, error) { 16358 res, err := graphql.UnmarshalInt32(v) 16359 return res, graphql.ErrorOnPath(ctx, err) 16360 } 16361 16362 func (ec *executionContext) marshalNInt2int32(ctx context.Context, sel ast.SelectionSet, v int32) graphql.Marshaler { 16363 res := graphql.MarshalInt32(v) 16364 if res == graphql.Null { 16365 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16366 ec.Errorf(ctx, "must not be null") 16367 } 16368 } 16369 return res 16370 } 16371 16372 func (ec *executionContext) unmarshalNInt2int64(ctx context.Context, v interface{}) (int64, error) { 16373 res, err := graphql.UnmarshalInt64(v) 16374 return res, graphql.ErrorOnPath(ctx, err) 16375 } 16376 16377 func (ec *executionContext) marshalNInt2int64(ctx context.Context, sel ast.SelectionSet, v int64) graphql.Marshaler { 16378 res := graphql.MarshalInt64(v) 16379 if res == graphql.Null { 16380 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16381 ec.Errorf(ctx, "must not be null") 16382 } 16383 } 16384 return res 16385 } 16386 16387 func (ec *executionContext) marshalNLoopA2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐLoopA(ctx context.Context, sel ast.SelectionSet, v *LoopA) graphql.Marshaler { 16388 if v == nil { 16389 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16390 ec.Errorf(ctx, "must not be null") 16391 } 16392 return graphql.Null 16393 } 16394 return ec._LoopA(ctx, sel, v) 16395 } 16396 16397 func (ec *executionContext) marshalNLoopB2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐLoopB(ctx context.Context, sel ast.SelectionSet, v *LoopB) graphql.Marshaler { 16398 if v == nil { 16399 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16400 ec.Errorf(ctx, "must not be null") 16401 } 16402 return graphql.Null 16403 } 16404 return ec._LoopB(ctx, sel, v) 16405 } 16406 16407 func (ec *executionContext) unmarshalNMarshalPanic2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanic(ctx context.Context, v interface{}) (MarshalPanic, error) { 16408 var res MarshalPanic 16409 err := res.UnmarshalGQL(v) 16410 return res, graphql.ErrorOnPath(ctx, err) 16411 } 16412 16413 func (ec *executionContext) marshalNMarshalPanic2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanic(ctx context.Context, sel ast.SelectionSet, v MarshalPanic) graphql.Marshaler { 16414 return v 16415 } 16416 16417 func (ec *executionContext) unmarshalNMarshalPanic2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanicᚄ(ctx context.Context, v interface{}) ([]MarshalPanic, error) { 16418 var vSlice []interface{} 16419 if v != nil { 16420 vSlice = graphql.CoerceList(v) 16421 } 16422 var err error 16423 res := make([]MarshalPanic, len(vSlice)) 16424 for i := range vSlice { 16425 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 16426 res[i], err = ec.unmarshalNMarshalPanic2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanic(ctx, vSlice[i]) 16427 if err != nil { 16428 return nil, err 16429 } 16430 } 16431 return res, nil 16432 } 16433 16434 func (ec *executionContext) marshalNMarshalPanic2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanicᚄ(ctx context.Context, sel ast.SelectionSet, v []MarshalPanic) graphql.Marshaler { 16435 ret := make(graphql.Array, len(v)) 16436 for i := range v { 16437 ret[i] = ec.marshalNMarshalPanic2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanic(ctx, sel, v[i]) 16438 } 16439 16440 for _, e := range ret { 16441 if e == graphql.Null { 16442 return graphql.Null 16443 } 16444 } 16445 16446 return ret 16447 } 16448 16449 func (ec *executionContext) unmarshalNNestedInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐNestedInput(ctx context.Context, v interface{}) (*NestedInput, error) { 16450 res, err := ec.unmarshalInputNestedInput(ctx, v) 16451 return &res, graphql.ErrorOnPath(ctx, err) 16452 } 16453 16454 func (ec *executionContext) marshalNNode2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐNode(ctx context.Context, sel ast.SelectionSet, v Node) graphql.Marshaler { 16455 if v == nil { 16456 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16457 ec.Errorf(ctx, "must not be null") 16458 } 16459 return graphql.Null 16460 } 16461 return ec._Node(ctx, sel, v) 16462 } 16463 16464 func (ec *executionContext) marshalNPrimitive2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitive(ctx context.Context, sel ast.SelectionSet, v Primitive) graphql.Marshaler { 16465 return ec._Primitive(ctx, sel, &v) 16466 } 16467 16468 func (ec *executionContext) marshalNPrimitive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitiveᚄ(ctx context.Context, sel ast.SelectionSet, v []Primitive) graphql.Marshaler { 16469 ret := make(graphql.Array, len(v)) 16470 var wg sync.WaitGroup 16471 isLen1 := len(v) == 1 16472 if !isLen1 { 16473 wg.Add(len(v)) 16474 } 16475 for i := range v { 16476 i := i 16477 fc := &graphql.FieldContext{ 16478 Index: &i, 16479 Result: &v[i], 16480 } 16481 ctx := graphql.WithFieldContext(ctx, fc) 16482 f := func(i int) { 16483 defer func() { 16484 if r := recover(); r != nil { 16485 ec.Error(ctx, ec.Recover(ctx, r)) 16486 ret = nil 16487 } 16488 }() 16489 if !isLen1 { 16490 defer wg.Done() 16491 } 16492 ret[i] = ec.marshalNPrimitive2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitive(ctx, sel, v[i]) 16493 } 16494 if isLen1 { 16495 f(i) 16496 } else { 16497 go f(i) 16498 } 16499 16500 } 16501 wg.Wait() 16502 16503 for _, e := range ret { 16504 if e == graphql.Null { 16505 return graphql.Null 16506 } 16507 } 16508 16509 return ret 16510 } 16511 16512 func (ec *executionContext) marshalNPrimitiveString2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitiveString(ctx context.Context, sel ast.SelectionSet, v PrimitiveString) graphql.Marshaler { 16513 return ec._PrimitiveString(ctx, sel, &v) 16514 } 16515 16516 func (ec *executionContext) marshalNPrimitiveString2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitiveStringᚄ(ctx context.Context, sel ast.SelectionSet, v []PrimitiveString) graphql.Marshaler { 16517 ret := make(graphql.Array, len(v)) 16518 var wg sync.WaitGroup 16519 isLen1 := len(v) == 1 16520 if !isLen1 { 16521 wg.Add(len(v)) 16522 } 16523 for i := range v { 16524 i := i 16525 fc := &graphql.FieldContext{ 16526 Index: &i, 16527 Result: &v[i], 16528 } 16529 ctx := graphql.WithFieldContext(ctx, fc) 16530 f := func(i int) { 16531 defer func() { 16532 if r := recover(); r != nil { 16533 ec.Error(ctx, ec.Recover(ctx, r)) 16534 ret = nil 16535 } 16536 }() 16537 if !isLen1 { 16538 defer wg.Done() 16539 } 16540 ret[i] = ec.marshalNPrimitiveString2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitiveString(ctx, sel, v[i]) 16541 } 16542 if isLen1 { 16543 f(i) 16544 } else { 16545 go f(i) 16546 } 16547 16548 } 16549 wg.Wait() 16550 16551 for _, e := range ret { 16552 if e == graphql.Null { 16553 return graphql.Null 16554 } 16555 } 16556 16557 return ret 16558 } 16559 16560 func (ec *executionContext) marshalNPtrToPtrOuter2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrOuter(ctx context.Context, sel ast.SelectionSet, v PtrToPtrOuter) graphql.Marshaler { 16561 return ec._PtrToPtrOuter(ctx, sel, &v) 16562 } 16563 16564 func (ec *executionContext) marshalNPtrToPtrOuter2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrOuter(ctx context.Context, sel ast.SelectionSet, v *PtrToPtrOuter) graphql.Marshaler { 16565 if v == nil { 16566 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16567 ec.Errorf(ctx, "must not be null") 16568 } 16569 return graphql.Null 16570 } 16571 return ec._PtrToPtrOuter(ctx, sel, v) 16572 } 16573 16574 func (ec *executionContext) marshalNPtrToSliceContainer2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToSliceContainer(ctx context.Context, sel ast.SelectionSet, v PtrToSliceContainer) graphql.Marshaler { 16575 return ec._PtrToSliceContainer(ctx, sel, &v) 16576 } 16577 16578 func (ec *executionContext) marshalNPtrToSliceContainer2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToSliceContainer(ctx context.Context, sel ast.SelectionSet, v *PtrToSliceContainer) graphql.Marshaler { 16579 if v == nil { 16580 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16581 ec.Errorf(ctx, "must not be null") 16582 } 16583 return graphql.Null 16584 } 16585 return ec._PtrToSliceContainer(ctx, sel, v) 16586 } 16587 16588 func (ec *executionContext) unmarshalNRecursiveInputSlice2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐRecursiveInputSlice(ctx context.Context, v interface{}) (RecursiveInputSlice, error) { 16589 res, err := ec.unmarshalInputRecursiveInputSlice(ctx, v) 16590 return res, graphql.ErrorOnPath(ctx, err) 16591 } 16592 16593 func (ec *executionContext) marshalNShapeUnion2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐShapeUnion(ctx context.Context, sel ast.SelectionSet, v ShapeUnion) graphql.Marshaler { 16594 if v == nil { 16595 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16596 ec.Errorf(ctx, "must not be null") 16597 } 16598 return graphql.Null 16599 } 16600 return ec._ShapeUnion(ctx, sel, v) 16601 } 16602 16603 func (ec *executionContext) unmarshalNSpecialInput2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐSpecialInput(ctx context.Context, v interface{}) (SpecialInput, error) { 16604 res, err := ec.unmarshalInputSpecialInput(ctx, v) 16605 return res, graphql.ErrorOnPath(ctx, err) 16606 } 16607 16608 func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) { 16609 res, err := graphql.UnmarshalString(v) 16610 return res, graphql.ErrorOnPath(ctx, err) 16611 } 16612 16613 func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 16614 res := graphql.MarshalString(v) 16615 if res == graphql.Null { 16616 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16617 ec.Errorf(ctx, "must not be null") 16618 } 16619 } 16620 return res 16621 } 16622 16623 func (ec *executionContext) unmarshalNString2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { 16624 var vSlice []interface{} 16625 if v != nil { 16626 vSlice = graphql.CoerceList(v) 16627 } 16628 var err error 16629 res := make([]string, len(vSlice)) 16630 for i := range vSlice { 16631 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 16632 res[i], err = ec.unmarshalNString2string(ctx, vSlice[i]) 16633 if err != nil { 16634 return nil, err 16635 } 16636 } 16637 return res, nil 16638 } 16639 16640 func (ec *executionContext) marshalNString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { 16641 ret := make(graphql.Array, len(v)) 16642 for i := range v { 16643 ret[i] = ec.marshalNString2string(ctx, sel, v[i]) 16644 } 16645 16646 for _, e := range ret { 16647 if e == graphql.Null { 16648 return graphql.Null 16649 } 16650 } 16651 16652 return ret 16653 } 16654 16655 func (ec *executionContext) unmarshalNString2ᚕᚖstring(ctx context.Context, v interface{}) ([]*string, error) { 16656 var vSlice []interface{} 16657 if v != nil { 16658 vSlice = graphql.CoerceList(v) 16659 } 16660 var err error 16661 res := make([]*string, len(vSlice)) 16662 for i := range vSlice { 16663 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 16664 res[i], err = ec.unmarshalOString2ᚖstring(ctx, vSlice[i]) 16665 if err != nil { 16666 return nil, err 16667 } 16668 } 16669 return res, nil 16670 } 16671 16672 func (ec *executionContext) marshalNString2ᚕᚖstring(ctx context.Context, sel ast.SelectionSet, v []*string) graphql.Marshaler { 16673 ret := make(graphql.Array, len(v)) 16674 for i := range v { 16675 ret[i] = ec.marshalOString2ᚖstring(ctx, sel, v[i]) 16676 } 16677 16678 return ret 16679 } 16680 16681 func (ec *executionContext) unmarshalNString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { 16682 res, err := graphql.UnmarshalString(v) 16683 return &res, graphql.ErrorOnPath(ctx, err) 16684 } 16685 16686 func (ec *executionContext) marshalNString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { 16687 if v == nil { 16688 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16689 ec.Errorf(ctx, "must not be null") 16690 } 16691 return graphql.Null 16692 } 16693 res := graphql.MarshalString(*v) 16694 if res == graphql.Null { 16695 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16696 ec.Errorf(ctx, "must not be null") 16697 } 16698 } 16699 return res 16700 } 16701 16702 func (ec *executionContext) unmarshalNStringFromContextFunction2string(ctx context.Context, v interface{}) (string, error) { 16703 res, err := UnmarshalStringFromContextFunction(ctx, v) 16704 return res, graphql.ErrorOnPath(ctx, err) 16705 } 16706 16707 func (ec *executionContext) marshalNStringFromContextFunction2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 16708 res := MarshalStringFromContextFunction(v) 16709 if res == graphql.Null { 16710 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16711 ec.Errorf(ctx, "must not be null") 16712 } 16713 } 16714 return graphql.WrapContextMarshaler(ctx, res) 16715 } 16716 16717 func (ec *executionContext) unmarshalNStringFromContextInterface2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐStringFromContextInterface(ctx context.Context, v interface{}) (StringFromContextInterface, error) { 16718 var res StringFromContextInterface 16719 err := res.UnmarshalGQLContext(ctx, v) 16720 return res, graphql.ErrorOnPath(ctx, err) 16721 } 16722 16723 func (ec *executionContext) marshalNStringFromContextInterface2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐStringFromContextInterface(ctx context.Context, sel ast.SelectionSet, v StringFromContextInterface) graphql.Marshaler { 16724 return graphql.WrapContextMarshaler(ctx, v) 16725 } 16726 16727 func (ec *executionContext) unmarshalNStringFromContextInterface2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐStringFromContextInterface(ctx context.Context, v interface{}) (*StringFromContextInterface, error) { 16728 var res = new(StringFromContextInterface) 16729 err := res.UnmarshalGQLContext(ctx, v) 16730 return res, graphql.ErrorOnPath(ctx, err) 16731 } 16732 16733 func (ec *executionContext) marshalNStringFromContextInterface2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐStringFromContextInterface(ctx context.Context, sel ast.SelectionSet, v *StringFromContextInterface) graphql.Marshaler { 16734 if v == nil { 16735 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16736 ec.Errorf(ctx, "must not be null") 16737 } 16738 return graphql.Null 16739 } 16740 return graphql.WrapContextMarshaler(ctx, v) 16741 } 16742 16743 func (ec *executionContext) unmarshalNTime2timeᚐTime(ctx context.Context, v interface{}) (time.Time, error) { 16744 res, err := graphql.UnmarshalTime(v) 16745 return res, graphql.ErrorOnPath(ctx, err) 16746 } 16747 16748 func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler { 16749 res := graphql.MarshalTime(v) 16750 if res == graphql.Null { 16751 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16752 ec.Errorf(ctx, "must not be null") 16753 } 16754 } 16755 return res 16756 } 16757 16758 func (ec *executionContext) unmarshalNUUID2string(ctx context.Context, v interface{}) (string, error) { 16759 res, err := graphql.UnmarshalString(v) 16760 return res, graphql.ErrorOnPath(ctx, err) 16761 } 16762 16763 func (ec *executionContext) marshalNUUID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 16764 res := graphql.MarshalString(v) 16765 if res == graphql.Null { 16766 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16767 ec.Errorf(ctx, "must not be null") 16768 } 16769 } 16770 return res 16771 } 16772 16773 func (ec *executionContext) unmarshalNUpdatePtrToPtrOuter2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrOuter(ctx context.Context, v interface{}) (UpdatePtrToPtrOuter, error) { 16774 res, err := ec.unmarshalInputUpdatePtrToPtrOuter(ctx, v) 16775 return res, graphql.ErrorOnPath(ctx, err) 16776 } 16777 16778 func (ec *executionContext) marshalNUser2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUser(ctx context.Context, sel ast.SelectionSet, v User) graphql.Marshaler { 16779 return ec._User(ctx, sel, &v) 16780 } 16781 16782 func (ec *executionContext) marshalNUser2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUserᚄ(ctx context.Context, sel ast.SelectionSet, v []*User) graphql.Marshaler { 16783 ret := make(graphql.Array, len(v)) 16784 var wg sync.WaitGroup 16785 isLen1 := len(v) == 1 16786 if !isLen1 { 16787 wg.Add(len(v)) 16788 } 16789 for i := range v { 16790 i := i 16791 fc := &graphql.FieldContext{ 16792 Index: &i, 16793 Result: &v[i], 16794 } 16795 ctx := graphql.WithFieldContext(ctx, fc) 16796 f := func(i int) { 16797 defer func() { 16798 if r := recover(); r != nil { 16799 ec.Error(ctx, ec.Recover(ctx, r)) 16800 ret = nil 16801 } 16802 }() 16803 if !isLen1 { 16804 defer wg.Done() 16805 } 16806 ret[i] = ec.marshalNUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUser(ctx, sel, v[i]) 16807 } 16808 if isLen1 { 16809 f(i) 16810 } else { 16811 go f(i) 16812 } 16813 16814 } 16815 wg.Wait() 16816 16817 for _, e := range ret { 16818 if e == graphql.Null { 16819 return graphql.Null 16820 } 16821 } 16822 16823 return ret 16824 } 16825 16826 func (ec *executionContext) marshalNUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUser(ctx context.Context, sel ast.SelectionSet, v *User) graphql.Marshaler { 16827 if v == nil { 16828 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16829 ec.Errorf(ctx, "must not be null") 16830 } 16831 return graphql.Null 16832 } 16833 return ec._User(ctx, sel, v) 16834 } 16835 16836 func (ec *executionContext) marshalNWrappedMap2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐWrappedMap(ctx context.Context, sel ast.SelectionSet, v WrappedMap) graphql.Marshaler { 16837 if v == nil { 16838 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16839 ec.Errorf(ctx, "must not be null") 16840 } 16841 return graphql.Null 16842 } 16843 return ec._WrappedMap(ctx, sel, v) 16844 } 16845 16846 func (ec *executionContext) unmarshalNWrappedScalar2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚋotherpkgᚐScalar(ctx context.Context, v interface{}) (otherpkg.Scalar, error) { 16847 tmp, err := graphql.UnmarshalString(v) 16848 res := otherpkg.Scalar(tmp) 16849 return res, graphql.ErrorOnPath(ctx, err) 16850 } 16851 16852 func (ec *executionContext) marshalNWrappedScalar2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚋotherpkgᚐScalar(ctx context.Context, sel ast.SelectionSet, v otherpkg.Scalar) graphql.Marshaler { 16853 res := graphql.MarshalString(string(v)) 16854 if res == graphql.Null { 16855 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16856 ec.Errorf(ctx, "must not be null") 16857 } 16858 } 16859 return res 16860 } 16861 16862 func (ec *executionContext) marshalNWrappedSlice2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐWrappedSlice(ctx context.Context, sel ast.SelectionSet, v WrappedSlice) graphql.Marshaler { 16863 if v == nil { 16864 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16865 ec.Errorf(ctx, "must not be null") 16866 } 16867 return graphql.Null 16868 } 16869 return ec._WrappedSlice(ctx, sel, v) 16870 } 16871 16872 func (ec *executionContext) marshalNWrappedStruct2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐWrappedStruct(ctx context.Context, sel ast.SelectionSet, v WrappedStruct) graphql.Marshaler { 16873 return ec._WrappedStruct(ctx, sel, &v) 16874 } 16875 16876 func (ec *executionContext) marshalNWrappedStruct2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐWrappedStruct(ctx context.Context, sel ast.SelectionSet, v *WrappedStruct) graphql.Marshaler { 16877 if v == nil { 16878 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16879 ec.Errorf(ctx, "must not be null") 16880 } 16881 return graphql.Null 16882 } 16883 return ec._WrappedStruct(ctx, sel, v) 16884 } 16885 16886 func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler { 16887 return ec.___Directive(ctx, sel, &v) 16888 } 16889 16890 func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler { 16891 ret := make(graphql.Array, len(v)) 16892 var wg sync.WaitGroup 16893 isLen1 := len(v) == 1 16894 if !isLen1 { 16895 wg.Add(len(v)) 16896 } 16897 for i := range v { 16898 i := i 16899 fc := &graphql.FieldContext{ 16900 Index: &i, 16901 Result: &v[i], 16902 } 16903 ctx := graphql.WithFieldContext(ctx, fc) 16904 f := func(i int) { 16905 defer func() { 16906 if r := recover(); r != nil { 16907 ec.Error(ctx, ec.Recover(ctx, r)) 16908 ret = nil 16909 } 16910 }() 16911 if !isLen1 { 16912 defer wg.Done() 16913 } 16914 ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i]) 16915 } 16916 if isLen1 { 16917 f(i) 16918 } else { 16919 go f(i) 16920 } 16921 16922 } 16923 wg.Wait() 16924 16925 for _, e := range ret { 16926 if e == graphql.Null { 16927 return graphql.Null 16928 } 16929 } 16930 16931 return ret 16932 } 16933 16934 func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) { 16935 res, err := graphql.UnmarshalString(v) 16936 return res, graphql.ErrorOnPath(ctx, err) 16937 } 16938 16939 func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 16940 res := graphql.MarshalString(v) 16941 if res == graphql.Null { 16942 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 16943 ec.Errorf(ctx, "must not be null") 16944 } 16945 } 16946 return res 16947 } 16948 16949 func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { 16950 var vSlice []interface{} 16951 if v != nil { 16952 vSlice = graphql.CoerceList(v) 16953 } 16954 var err error 16955 res := make([]string, len(vSlice)) 16956 for i := range vSlice { 16957 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 16958 res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i]) 16959 if err != nil { 16960 return nil, err 16961 } 16962 } 16963 return res, nil 16964 } 16965 16966 func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { 16967 ret := make(graphql.Array, len(v)) 16968 var wg sync.WaitGroup 16969 isLen1 := len(v) == 1 16970 if !isLen1 { 16971 wg.Add(len(v)) 16972 } 16973 for i := range v { 16974 i := i 16975 fc := &graphql.FieldContext{ 16976 Index: &i, 16977 Result: &v[i], 16978 } 16979 ctx := graphql.WithFieldContext(ctx, fc) 16980 f := func(i int) { 16981 defer func() { 16982 if r := recover(); r != nil { 16983 ec.Error(ctx, ec.Recover(ctx, r)) 16984 ret = nil 16985 } 16986 }() 16987 if !isLen1 { 16988 defer wg.Done() 16989 } 16990 ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i]) 16991 } 16992 if isLen1 { 16993 f(i) 16994 } else { 16995 go f(i) 16996 } 16997 16998 } 16999 wg.Wait() 17000 17001 for _, e := range ret { 17002 if e == graphql.Null { 17003 return graphql.Null 17004 } 17005 } 17006 17007 return ret 17008 } 17009 17010 func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler { 17011 return ec.___EnumValue(ctx, sel, &v) 17012 } 17013 17014 func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler { 17015 return ec.___Field(ctx, sel, &v) 17016 } 17017 17018 func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler { 17019 return ec.___InputValue(ctx, sel, &v) 17020 } 17021 17022 func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { 17023 ret := make(graphql.Array, len(v)) 17024 var wg sync.WaitGroup 17025 isLen1 := len(v) == 1 17026 if !isLen1 { 17027 wg.Add(len(v)) 17028 } 17029 for i := range v { 17030 i := i 17031 fc := &graphql.FieldContext{ 17032 Index: &i, 17033 Result: &v[i], 17034 } 17035 ctx := graphql.WithFieldContext(ctx, fc) 17036 f := func(i int) { 17037 defer func() { 17038 if r := recover(); r != nil { 17039 ec.Error(ctx, ec.Recover(ctx, r)) 17040 ret = nil 17041 } 17042 }() 17043 if !isLen1 { 17044 defer wg.Done() 17045 } 17046 ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) 17047 } 17048 if isLen1 { 17049 f(i) 17050 } else { 17051 go f(i) 17052 } 17053 17054 } 17055 wg.Wait() 17056 17057 for _, e := range ret { 17058 if e == graphql.Null { 17059 return graphql.Null 17060 } 17061 } 17062 17063 return ret 17064 } 17065 17066 func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { 17067 return ec.___Type(ctx, sel, &v) 17068 } 17069 17070 func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { 17071 ret := make(graphql.Array, len(v)) 17072 var wg sync.WaitGroup 17073 isLen1 := len(v) == 1 17074 if !isLen1 { 17075 wg.Add(len(v)) 17076 } 17077 for i := range v { 17078 i := i 17079 fc := &graphql.FieldContext{ 17080 Index: &i, 17081 Result: &v[i], 17082 } 17083 ctx := graphql.WithFieldContext(ctx, fc) 17084 f := func(i int) { 17085 defer func() { 17086 if r := recover(); r != nil { 17087 ec.Error(ctx, ec.Recover(ctx, r)) 17088 ret = nil 17089 } 17090 }() 17091 if !isLen1 { 17092 defer wg.Done() 17093 } 17094 ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) 17095 } 17096 if isLen1 { 17097 f(i) 17098 } else { 17099 go f(i) 17100 } 17101 17102 } 17103 wg.Wait() 17104 17105 for _, e := range ret { 17106 if e == graphql.Null { 17107 return graphql.Null 17108 } 17109 } 17110 17111 return ret 17112 } 17113 17114 func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { 17115 if v == nil { 17116 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 17117 ec.Errorf(ctx, "must not be null") 17118 } 17119 return graphql.Null 17120 } 17121 return ec.___Type(ctx, sel, v) 17122 } 17123 17124 func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) { 17125 res, err := graphql.UnmarshalString(v) 17126 return res, graphql.ErrorOnPath(ctx, err) 17127 } 17128 17129 func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 17130 res := graphql.MarshalString(v) 17131 if res == graphql.Null { 17132 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 17133 ec.Errorf(ctx, "must not be null") 17134 } 17135 } 17136 return res 17137 } 17138 17139 func (ec *executionContext) marshalOAnimal2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐAnimal(ctx context.Context, sel ast.SelectionSet, v Animal) graphql.Marshaler { 17140 if v == nil { 17141 return graphql.Null 17142 } 17143 return ec._Animal(ctx, sel, v) 17144 } 17145 17146 func (ec *executionContext) marshalOAutobind2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐAutobind(ctx context.Context, sel ast.SelectionSet, v *Autobind) graphql.Marshaler { 17147 if v == nil { 17148 return graphql.Null 17149 } 17150 return ec._Autobind(ctx, sel, v) 17151 } 17152 17153 func (ec *executionContext) marshalOBackedByInterface2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐBackedByInterface(ctx context.Context, sel ast.SelectionSet, v BackedByInterface) graphql.Marshaler { 17154 if v == nil { 17155 return graphql.Null 17156 } 17157 return ec._BackedByInterface(ctx, sel, v) 17158 } 17159 17160 func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) { 17161 res, err := graphql.UnmarshalBoolean(v) 17162 return res, graphql.ErrorOnPath(ctx, err) 17163 } 17164 17165 func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { 17166 res := graphql.MarshalBoolean(v) 17167 return res 17168 } 17169 17170 func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) { 17171 if v == nil { 17172 return nil, nil 17173 } 17174 res, err := graphql.UnmarshalBoolean(v) 17175 return &res, graphql.ErrorOnPath(ctx, err) 17176 } 17177 17178 func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler { 17179 if v == nil { 17180 return graphql.Null 17181 } 17182 res := graphql.MarshalBoolean(*v) 17183 return res 17184 } 17185 17186 func (ec *executionContext) unmarshalOChanges2map(ctx context.Context, v interface{}) (map[string]interface{}, error) { 17187 if v == nil { 17188 return nil, nil 17189 } 17190 return v.(map[string]interface{}), nil 17191 } 17192 17193 func (ec *executionContext) marshalOCheckIssue8962ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896(ctx context.Context, sel ast.SelectionSet, v []*CheckIssue896) graphql.Marshaler { 17194 if v == nil { 17195 return graphql.Null 17196 } 17197 ret := make(graphql.Array, len(v)) 17198 var wg sync.WaitGroup 17199 isLen1 := len(v) == 1 17200 if !isLen1 { 17201 wg.Add(len(v)) 17202 } 17203 for i := range v { 17204 i := i 17205 fc := &graphql.FieldContext{ 17206 Index: &i, 17207 Result: &v[i], 17208 } 17209 ctx := graphql.WithFieldContext(ctx, fc) 17210 f := func(i int) { 17211 defer func() { 17212 if r := recover(); r != nil { 17213 ec.Error(ctx, ec.Recover(ctx, r)) 17214 ret = nil 17215 } 17216 }() 17217 if !isLen1 { 17218 defer wg.Done() 17219 } 17220 ret[i] = ec.marshalOCheckIssue8962ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896(ctx, sel, v[i]) 17221 } 17222 if isLen1 { 17223 f(i) 17224 } else { 17225 go f(i) 17226 } 17227 17228 } 17229 wg.Wait() 17230 17231 return ret 17232 } 17233 17234 func (ec *executionContext) marshalOCheckIssue8962ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896ᚄ(ctx context.Context, sel ast.SelectionSet, v []*CheckIssue896) graphql.Marshaler { 17235 if v == nil { 17236 return graphql.Null 17237 } 17238 ret := make(graphql.Array, len(v)) 17239 var wg sync.WaitGroup 17240 isLen1 := len(v) == 1 17241 if !isLen1 { 17242 wg.Add(len(v)) 17243 } 17244 for i := range v { 17245 i := i 17246 fc := &graphql.FieldContext{ 17247 Index: &i, 17248 Result: &v[i], 17249 } 17250 ctx := graphql.WithFieldContext(ctx, fc) 17251 f := func(i int) { 17252 defer func() { 17253 if r := recover(); r != nil { 17254 ec.Error(ctx, ec.Recover(ctx, r)) 17255 ret = nil 17256 } 17257 }() 17258 if !isLen1 { 17259 defer wg.Done() 17260 } 17261 ret[i] = ec.marshalNCheckIssue8962ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896(ctx, sel, v[i]) 17262 } 17263 if isLen1 { 17264 f(i) 17265 } else { 17266 go f(i) 17267 } 17268 17269 } 17270 wg.Wait() 17271 17272 for _, e := range ret { 17273 if e == graphql.Null { 17274 return graphql.Null 17275 } 17276 } 17277 17278 return ret 17279 } 17280 17281 func (ec *executionContext) marshalOCheckIssue8962ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896(ctx context.Context, sel ast.SelectionSet, v *CheckIssue896) graphql.Marshaler { 17282 if v == nil { 17283 return graphql.Null 17284 } 17285 return ec._CheckIssue896(ctx, sel, v) 17286 } 17287 17288 func (ec *executionContext) marshalOCircle2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCircle(ctx context.Context, sel ast.SelectionSet, v *Circle) graphql.Marshaler { 17289 if v == nil { 17290 return graphql.Null 17291 } 17292 return ec._Circle(ctx, sel, v) 17293 } 17294 17295 func (ec *executionContext) marshalOCoordinates2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCoordinates(ctx context.Context, sel ast.SelectionSet, v Coordinates) graphql.Marshaler { 17296 return ec._Coordinates(ctx, sel, &v) 17297 } 17298 17299 func (ec *executionContext) unmarshalODefaultScalarImplementation2ᚖstring(ctx context.Context, v interface{}) (*string, error) { 17300 if v == nil { 17301 return nil, nil 17302 } 17303 res, err := graphql.UnmarshalString(v) 17304 return &res, graphql.ErrorOnPath(ctx, err) 17305 } 17306 17307 func (ec *executionContext) marshalODefaultScalarImplementation2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { 17308 if v == nil { 17309 return graphql.Null 17310 } 17311 res := graphql.MarshalString(*v) 17312 return res 17313 } 17314 17315 func (ec *executionContext) marshalOEmbeddedCase12ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEmbeddedCase1(ctx context.Context, sel ast.SelectionSet, v *EmbeddedCase1) graphql.Marshaler { 17316 if v == nil { 17317 return graphql.Null 17318 } 17319 return ec._EmbeddedCase1(ctx, sel, v) 17320 } 17321 17322 func (ec *executionContext) marshalOEmbeddedCase22ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEmbeddedCase2(ctx context.Context, sel ast.SelectionSet, v *EmbeddedCase2) graphql.Marshaler { 17323 if v == nil { 17324 return graphql.Null 17325 } 17326 return ec._EmbeddedCase2(ctx, sel, v) 17327 } 17328 17329 func (ec *executionContext) marshalOEmbeddedCase32ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEmbeddedCase3(ctx context.Context, sel ast.SelectionSet, v *EmbeddedCase3) graphql.Marshaler { 17330 if v == nil { 17331 return graphql.Null 17332 } 17333 return ec._EmbeddedCase3(ctx, sel, v) 17334 } 17335 17336 func (ec *executionContext) marshalOError2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx context.Context, sel ast.SelectionSet, v []*Error) graphql.Marshaler { 17337 if v == nil { 17338 return graphql.Null 17339 } 17340 ret := make(graphql.Array, len(v)) 17341 var wg sync.WaitGroup 17342 isLen1 := len(v) == 1 17343 if !isLen1 { 17344 wg.Add(len(v)) 17345 } 17346 for i := range v { 17347 i := i 17348 fc := &graphql.FieldContext{ 17349 Index: &i, 17350 Result: &v[i], 17351 } 17352 ctx := graphql.WithFieldContext(ctx, fc) 17353 f := func(i int) { 17354 defer func() { 17355 if r := recover(); r != nil { 17356 ec.Error(ctx, ec.Recover(ctx, r)) 17357 ret = nil 17358 } 17359 }() 17360 if !isLen1 { 17361 defer wg.Done() 17362 } 17363 ret[i] = ec.marshalOError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx, sel, v[i]) 17364 } 17365 if isLen1 { 17366 f(i) 17367 } else { 17368 go f(i) 17369 } 17370 17371 } 17372 wg.Wait() 17373 17374 return ret 17375 } 17376 17377 func (ec *executionContext) marshalOError2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐErrorᚄ(ctx context.Context, sel ast.SelectionSet, v []*Error) graphql.Marshaler { 17378 if v == nil { 17379 return graphql.Null 17380 } 17381 ret := make(graphql.Array, len(v)) 17382 var wg sync.WaitGroup 17383 isLen1 := len(v) == 1 17384 if !isLen1 { 17385 wg.Add(len(v)) 17386 } 17387 for i := range v { 17388 i := i 17389 fc := &graphql.FieldContext{ 17390 Index: &i, 17391 Result: &v[i], 17392 } 17393 ctx := graphql.WithFieldContext(ctx, fc) 17394 f := func(i int) { 17395 defer func() { 17396 if r := recover(); r != nil { 17397 ec.Error(ctx, ec.Recover(ctx, r)) 17398 ret = nil 17399 } 17400 }() 17401 if !isLen1 { 17402 defer wg.Done() 17403 } 17404 ret[i] = ec.marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx, sel, v[i]) 17405 } 17406 if isLen1 { 17407 f(i) 17408 } else { 17409 go f(i) 17410 } 17411 17412 } 17413 wg.Wait() 17414 17415 for _, e := range ret { 17416 if e == graphql.Null { 17417 return graphql.Null 17418 } 17419 } 17420 17421 return ret 17422 } 17423 17424 func (ec *executionContext) marshalOError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx context.Context, sel ast.SelectionSet, v *Error) graphql.Marshaler { 17425 if v == nil { 17426 return graphql.Null 17427 } 17428 return ec._Error(ctx, sel, v) 17429 } 17430 17431 func (ec *executionContext) marshalOErrors2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐErrors(ctx context.Context, sel ast.SelectionSet, v *Errors) graphql.Marshaler { 17432 if v == nil { 17433 return graphql.Null 17434 } 17435 return ec._Errors(ctx, sel, v) 17436 } 17437 17438 func (ec *executionContext) unmarshalOFloat2float64(ctx context.Context, v interface{}) (float64, error) { 17439 res, err := graphql.UnmarshalFloatContext(ctx, v) 17440 return res, graphql.ErrorOnPath(ctx, err) 17441 } 17442 17443 func (ec *executionContext) marshalOFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler { 17444 res := graphql.MarshalFloatContext(v) 17445 return graphql.WrapContextMarshaler(ctx, res) 17446 } 17447 17448 func (ec *executionContext) unmarshalOInnerDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInnerDirectives(ctx context.Context, v interface{}) (*InnerDirectives, error) { 17449 if v == nil { 17450 return nil, nil 17451 } 17452 res, err := ec.unmarshalInputInnerDirectives(ctx, v) 17453 return &res, graphql.ErrorOnPath(ctx, err) 17454 } 17455 17456 func (ec *executionContext) unmarshalOInputDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInputDirectives(ctx context.Context, v interface{}) (*InputDirectives, error) { 17457 if v == nil { 17458 return nil, nil 17459 } 17460 res, err := ec.unmarshalInputInputDirectives(ctx, v) 17461 return &res, graphql.ErrorOnPath(ctx, err) 17462 } 17463 17464 func (ec *executionContext) unmarshalOInputWithEnumValue2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInputWithEnumValue(ctx context.Context, v interface{}) (*InputWithEnumValue, error) { 17465 if v == nil { 17466 return nil, nil 17467 } 17468 res, err := ec.unmarshalInputInputWithEnumValue(ctx, v) 17469 return &res, graphql.ErrorOnPath(ctx, err) 17470 } 17471 17472 func (ec *executionContext) unmarshalOInt2ᚖint(ctx context.Context, v interface{}) (*int, error) { 17473 if v == nil { 17474 return nil, nil 17475 } 17476 res, err := graphql.UnmarshalInt(v) 17477 return &res, graphql.ErrorOnPath(ctx, err) 17478 } 17479 17480 func (ec *executionContext) marshalOInt2ᚖint(ctx context.Context, sel ast.SelectionSet, v *int) graphql.Marshaler { 17481 if v == nil { 17482 return graphql.Null 17483 } 17484 res := graphql.MarshalInt(*v) 17485 return res 17486 } 17487 17488 func (ec *executionContext) marshalOInvalidIdentifier2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚋinvalidᚑpackagenameᚐInvalidIdentifier(ctx context.Context, sel ast.SelectionSet, v *invalid_packagename.InvalidIdentifier) graphql.Marshaler { 17489 if v == nil { 17490 return graphql.Null 17491 } 17492 return ec._InvalidIdentifier(ctx, sel, v) 17493 } 17494 17495 func (ec *executionContext) marshalOIt2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚋintrospectionᚐIt(ctx context.Context, sel ast.SelectionSet, v *introspection1.It) graphql.Marshaler { 17496 if v == nil { 17497 return graphql.Null 17498 } 17499 return ec._It(ctx, sel, v) 17500 } 17501 17502 func (ec *executionContext) unmarshalOMapStringInterfaceInput2map(ctx context.Context, v interface{}) (map[string]interface{}, error) { 17503 if v == nil { 17504 return nil, nil 17505 } 17506 return v.(map[string]interface{}), nil 17507 } 17508 17509 func (ec *executionContext) marshalOMapStringInterfaceType2map(ctx context.Context, sel ast.SelectionSet, v map[string]interface{}) graphql.Marshaler { 17510 if v == nil { 17511 return graphql.Null 17512 } 17513 return ec._MapStringInterfaceType(ctx, sel, v) 17514 } 17515 17516 func (ec *executionContext) marshalOModelMethods2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐModelMethods(ctx context.Context, sel ast.SelectionSet, v *ModelMethods) graphql.Marshaler { 17517 if v == nil { 17518 return graphql.Null 17519 } 17520 return ec._ModelMethods(ctx, sel, v) 17521 } 17522 17523 func (ec *executionContext) unmarshalONestedMapInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐNestedMapInput(ctx context.Context, v interface{}) (*NestedMapInput, error) { 17524 if v == nil { 17525 return nil, nil 17526 } 17527 res, err := ec.unmarshalInputNestedMapInput(ctx, v) 17528 return &res, graphql.ErrorOnPath(ctx, err) 17529 } 17530 17531 func (ec *executionContext) marshalOObjectDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐObjectDirectives(ctx context.Context, sel ast.SelectionSet, v *ObjectDirectives) graphql.Marshaler { 17532 if v == nil { 17533 return graphql.Null 17534 } 17535 return ec._ObjectDirectives(ctx, sel, v) 17536 } 17537 17538 func (ec *executionContext) marshalOObjectDirectivesWithCustomGoModel2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐObjectDirectivesWithCustomGoModel(ctx context.Context, sel ast.SelectionSet, v *ObjectDirectivesWithCustomGoModel) graphql.Marshaler { 17539 if v == nil { 17540 return graphql.Null 17541 } 17542 return ec._ObjectDirectivesWithCustomGoModel(ctx, sel, v) 17543 } 17544 17545 func (ec *executionContext) unmarshalOOuterInput2ᚕᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterInput(ctx context.Context, v interface{}) ([][]*OuterInput, error) { 17546 if v == nil { 17547 return nil, nil 17548 } 17549 var vSlice []interface{} 17550 if v != nil { 17551 vSlice = graphql.CoerceList(v) 17552 } 17553 var err error 17554 res := make([][]*OuterInput, len(vSlice)) 17555 for i := range vSlice { 17556 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 17557 res[i], err = ec.unmarshalOOuterInput2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterInput(ctx, vSlice[i]) 17558 if err != nil { 17559 return nil, err 17560 } 17561 } 17562 return res, nil 17563 } 17564 17565 func (ec *executionContext) unmarshalOOuterInput2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterInput(ctx context.Context, v interface{}) ([]*OuterInput, error) { 17566 if v == nil { 17567 return nil, nil 17568 } 17569 var vSlice []interface{} 17570 if v != nil { 17571 vSlice = graphql.CoerceList(v) 17572 } 17573 var err error 17574 res := make([]*OuterInput, len(vSlice)) 17575 for i := range vSlice { 17576 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 17577 res[i], err = ec.unmarshalOOuterInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterInput(ctx, vSlice[i]) 17578 if err != nil { 17579 return nil, err 17580 } 17581 } 17582 return res, nil 17583 } 17584 17585 func (ec *executionContext) unmarshalOOuterInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterInput(ctx context.Context, v interface{}) (*OuterInput, error) { 17586 if v == nil { 17587 return nil, nil 17588 } 17589 res, err := ec.unmarshalInputOuterInput(ctx, v) 17590 return &res, graphql.ErrorOnPath(ctx, err) 17591 } 17592 17593 func (ec *executionContext) marshalOOuterObject2ᚕᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterObject(ctx context.Context, sel ast.SelectionSet, v [][]*OuterObject) graphql.Marshaler { 17594 if v == nil { 17595 return graphql.Null 17596 } 17597 ret := make(graphql.Array, len(v)) 17598 var wg sync.WaitGroup 17599 isLen1 := len(v) == 1 17600 if !isLen1 { 17601 wg.Add(len(v)) 17602 } 17603 for i := range v { 17604 i := i 17605 fc := &graphql.FieldContext{ 17606 Index: &i, 17607 Result: &v[i], 17608 } 17609 ctx := graphql.WithFieldContext(ctx, fc) 17610 f := func(i int) { 17611 defer func() { 17612 if r := recover(); r != nil { 17613 ec.Error(ctx, ec.Recover(ctx, r)) 17614 ret = nil 17615 } 17616 }() 17617 if !isLen1 { 17618 defer wg.Done() 17619 } 17620 ret[i] = ec.marshalOOuterObject2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterObject(ctx, sel, v[i]) 17621 } 17622 if isLen1 { 17623 f(i) 17624 } else { 17625 go f(i) 17626 } 17627 17628 } 17629 wg.Wait() 17630 17631 return ret 17632 } 17633 17634 func (ec *executionContext) marshalOOuterObject2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterObject(ctx context.Context, sel ast.SelectionSet, v []*OuterObject) graphql.Marshaler { 17635 if v == nil { 17636 return graphql.Null 17637 } 17638 ret := make(graphql.Array, len(v)) 17639 var wg sync.WaitGroup 17640 isLen1 := len(v) == 1 17641 if !isLen1 { 17642 wg.Add(len(v)) 17643 } 17644 for i := range v { 17645 i := i 17646 fc := &graphql.FieldContext{ 17647 Index: &i, 17648 Result: &v[i], 17649 } 17650 ctx := graphql.WithFieldContext(ctx, fc) 17651 f := func(i int) { 17652 defer func() { 17653 if r := recover(); r != nil { 17654 ec.Error(ctx, ec.Recover(ctx, r)) 17655 ret = nil 17656 } 17657 }() 17658 if !isLen1 { 17659 defer wg.Done() 17660 } 17661 ret[i] = ec.marshalOOuterObject2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterObject(ctx, sel, v[i]) 17662 } 17663 if isLen1 { 17664 f(i) 17665 } else { 17666 go f(i) 17667 } 17668 17669 } 17670 wg.Wait() 17671 17672 return ret 17673 } 17674 17675 func (ec *executionContext) marshalOOuterObject2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterObject(ctx context.Context, sel ast.SelectionSet, v *OuterObject) graphql.Marshaler { 17676 if v == nil { 17677 return graphql.Null 17678 } 17679 return ec._OuterObject(ctx, sel, v) 17680 } 17681 17682 func (ec *executionContext) marshalOOverlappingFields2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOverlappingFields(ctx context.Context, sel ast.SelectionSet, v *OverlappingFields) graphql.Marshaler { 17683 if v == nil { 17684 return graphql.Null 17685 } 17686 return ec._OverlappingFields(ctx, sel, v) 17687 } 17688 17689 func (ec *executionContext) marshalOPanics2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPanics(ctx context.Context, sel ast.SelectionSet, v *Panics) graphql.Marshaler { 17690 if v == nil { 17691 return graphql.Null 17692 } 17693 return ec._Panics(ctx, sel, v) 17694 } 17695 17696 func (ec *executionContext) marshalOPtrToPtrInner2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx context.Context, sel ast.SelectionSet, v *PtrToPtrInner) graphql.Marshaler { 17697 if v == nil { 17698 return graphql.Null 17699 } 17700 return ec._PtrToPtrInner(ctx, sel, v) 17701 } 17702 17703 func (ec *executionContext) marshalOPtrToPtrInner2ᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx context.Context, sel ast.SelectionSet, v **PtrToPtrInner) graphql.Marshaler { 17704 if v == nil { 17705 return graphql.Null 17706 } 17707 return ec.marshalOPtrToPtrInner2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, sel, *v) 17708 } 17709 17710 func (ec *executionContext) marshalOPtrToPtrInner2ᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx context.Context, sel ast.SelectionSet, v ***PtrToPtrInner) graphql.Marshaler { 17711 if v == nil { 17712 return graphql.Null 17713 } 17714 return ec.marshalOPtrToPtrInner2ᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, sel, *v) 17715 } 17716 17717 func (ec *executionContext) marshalOPtrToPtrInner2ᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx context.Context, sel ast.SelectionSet, v ****PtrToPtrInner) graphql.Marshaler { 17718 if v == nil { 17719 return graphql.Null 17720 } 17721 return ec.marshalOPtrToPtrInner2ᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, sel, *v) 17722 } 17723 17724 func (ec *executionContext) marshalOPtrToPtrInner2ᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx context.Context, sel ast.SelectionSet, v *****PtrToPtrInner) graphql.Marshaler { 17725 if v == nil { 17726 return graphql.Null 17727 } 17728 return ec.marshalOPtrToPtrInner2ᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, sel, *v) 17729 } 17730 17731 func (ec *executionContext) marshalOPtrToPtrInner2ᚖᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx context.Context, sel ast.SelectionSet, v ******PtrToPtrInner) graphql.Marshaler { 17732 if v == nil { 17733 return graphql.Null 17734 } 17735 return ec.marshalOPtrToPtrInner2ᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, sel, *v) 17736 } 17737 17738 func (ec *executionContext) marshalOPtrToPtrInner2ᚖᚖᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx context.Context, sel ast.SelectionSet, v *******PtrToPtrInner) graphql.Marshaler { 17739 if v == nil { 17740 return graphql.Null 17741 } 17742 return ec.marshalOPtrToPtrInner2ᚖᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, sel, *v) 17743 } 17744 17745 func (ec *executionContext) unmarshalORecursiveInputSlice2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐRecursiveInputSliceᚄ(ctx context.Context, v interface{}) ([]RecursiveInputSlice, error) { 17746 if v == nil { 17747 return nil, nil 17748 } 17749 var vSlice []interface{} 17750 if v != nil { 17751 vSlice = graphql.CoerceList(v) 17752 } 17753 var err error 17754 res := make([]RecursiveInputSlice, len(vSlice)) 17755 for i := range vSlice { 17756 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 17757 res[i], err = ec.unmarshalNRecursiveInputSlice2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐRecursiveInputSlice(ctx, vSlice[i]) 17758 if err != nil { 17759 return nil, err 17760 } 17761 } 17762 return res, nil 17763 } 17764 17765 func (ec *executionContext) unmarshalORecursiveInputSlice2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐRecursiveInputSlice(ctx context.Context, v interface{}) (*RecursiveInputSlice, error) { 17766 if v == nil { 17767 return nil, nil 17768 } 17769 res, err := ec.unmarshalInputRecursiveInputSlice(ctx, v) 17770 return &res, graphql.ErrorOnPath(ctx, err) 17771 } 17772 17773 func (ec *executionContext) marshalOShape2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐShape(ctx context.Context, sel ast.SelectionSet, v Shape) graphql.Marshaler { 17774 if v == nil { 17775 return graphql.Null 17776 } 17777 return ec._Shape(ctx, sel, v) 17778 } 17779 17780 func (ec *executionContext) marshalOShape2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐShape(ctx context.Context, sel ast.SelectionSet, v []Shape) graphql.Marshaler { 17781 if v == nil { 17782 return graphql.Null 17783 } 17784 ret := make(graphql.Array, len(v)) 17785 var wg sync.WaitGroup 17786 isLen1 := len(v) == 1 17787 if !isLen1 { 17788 wg.Add(len(v)) 17789 } 17790 for i := range v { 17791 i := i 17792 fc := &graphql.FieldContext{ 17793 Index: &i, 17794 Result: &v[i], 17795 } 17796 ctx := graphql.WithFieldContext(ctx, fc) 17797 f := func(i int) { 17798 defer func() { 17799 if r := recover(); r != nil { 17800 ec.Error(ctx, ec.Recover(ctx, r)) 17801 ret = nil 17802 } 17803 }() 17804 if !isLen1 { 17805 defer wg.Done() 17806 } 17807 ret[i] = ec.marshalOShape2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐShape(ctx, sel, v[i]) 17808 } 17809 if isLen1 { 17810 f(i) 17811 } else { 17812 go f(i) 17813 } 17814 17815 } 17816 wg.Wait() 17817 17818 return ret 17819 } 17820 17821 func (ec *executionContext) marshalOSlices2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐSlices(ctx context.Context, sel ast.SelectionSet, v *Slices) graphql.Marshaler { 17822 if v == nil { 17823 return graphql.Null 17824 } 17825 return ec._Slices(ctx, sel, v) 17826 } 17827 17828 func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) { 17829 res, err := graphql.UnmarshalString(v) 17830 return res, graphql.ErrorOnPath(ctx, err) 17831 } 17832 17833 func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 17834 res := graphql.MarshalString(v) 17835 return res 17836 } 17837 17838 func (ec *executionContext) unmarshalOString2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { 17839 if v == nil { 17840 return nil, nil 17841 } 17842 var vSlice []interface{} 17843 if v != nil { 17844 vSlice = graphql.CoerceList(v) 17845 } 17846 var err error 17847 res := make([]string, len(vSlice)) 17848 for i := range vSlice { 17849 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 17850 res[i], err = ec.unmarshalNString2string(ctx, vSlice[i]) 17851 if err != nil { 17852 return nil, err 17853 } 17854 } 17855 return res, nil 17856 } 17857 17858 func (ec *executionContext) marshalOString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { 17859 if v == nil { 17860 return graphql.Null 17861 } 17862 ret := make(graphql.Array, len(v)) 17863 for i := range v { 17864 ret[i] = ec.marshalNString2string(ctx, sel, v[i]) 17865 } 17866 17867 for _, e := range ret { 17868 if e == graphql.Null { 17869 return graphql.Null 17870 } 17871 } 17872 17873 return ret 17874 } 17875 17876 func (ec *executionContext) unmarshalOString2ᚕᚖstring(ctx context.Context, v interface{}) ([]*string, error) { 17877 if v == nil { 17878 return nil, nil 17879 } 17880 var vSlice []interface{} 17881 if v != nil { 17882 vSlice = graphql.CoerceList(v) 17883 } 17884 var err error 17885 res := make([]*string, len(vSlice)) 17886 for i := range vSlice { 17887 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 17888 res[i], err = ec.unmarshalOString2ᚖstring(ctx, vSlice[i]) 17889 if err != nil { 17890 return nil, err 17891 } 17892 } 17893 return res, nil 17894 } 17895 17896 func (ec *executionContext) marshalOString2ᚕᚖstring(ctx context.Context, sel ast.SelectionSet, v []*string) graphql.Marshaler { 17897 if v == nil { 17898 return graphql.Null 17899 } 17900 ret := make(graphql.Array, len(v)) 17901 for i := range v { 17902 ret[i] = ec.marshalOString2ᚖstring(ctx, sel, v[i]) 17903 } 17904 17905 return ret 17906 } 17907 17908 func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { 17909 if v == nil { 17910 return nil, nil 17911 } 17912 res, err := graphql.UnmarshalString(v) 17913 return &res, graphql.ErrorOnPath(ctx, err) 17914 } 17915 17916 func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { 17917 if v == nil { 17918 return graphql.Null 17919 } 17920 res := graphql.MarshalString(*v) 17921 return res 17922 } 17923 17924 func (ec *executionContext) unmarshalOString2ᚖᚕstringᚄ(ctx context.Context, v interface{}) (*[]string, error) { 17925 if v == nil { 17926 return nil, nil 17927 } 17928 res, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) 17929 return &res, graphql.ErrorOnPath(ctx, err) 17930 } 17931 17932 func (ec *executionContext) marshalOString2ᚖᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v *[]string) graphql.Marshaler { 17933 return ec.marshalOString2ᚕstringᚄ(ctx, sel, *v) 17934 } 17935 17936 func (ec *executionContext) marshalOTestUnion2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐTestUnion(ctx context.Context, sel ast.SelectionSet, v TestUnion) graphql.Marshaler { 17937 if v == nil { 17938 return graphql.Null 17939 } 17940 return ec._TestUnion(ctx, sel, v) 17941 } 17942 17943 func (ec *executionContext) unmarshalOThirdParty2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐThirdParty(ctx context.Context, v interface{}) (*ThirdParty, error) { 17944 if v == nil { 17945 return nil, nil 17946 } 17947 res, err := UnmarshalThirdParty(v) 17948 return &res, graphql.ErrorOnPath(ctx, err) 17949 } 17950 17951 func (ec *executionContext) marshalOThirdParty2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐThirdParty(ctx context.Context, sel ast.SelectionSet, v *ThirdParty) graphql.Marshaler { 17952 if v == nil { 17953 return graphql.Null 17954 } 17955 res := MarshalThirdParty(*v) 17956 return res 17957 } 17958 17959 func (ec *executionContext) unmarshalOTime2ᚖtimeᚐTime(ctx context.Context, v interface{}) (*time.Time, error) { 17960 if v == nil { 17961 return nil, nil 17962 } 17963 res, err := graphql.UnmarshalTime(v) 17964 return &res, graphql.ErrorOnPath(ctx, err) 17965 } 17966 17967 func (ec *executionContext) marshalOTime2ᚖtimeᚐTime(ctx context.Context, sel ast.SelectionSet, v *time.Time) graphql.Marshaler { 17968 if v == nil { 17969 return graphql.Null 17970 } 17971 res := graphql.MarshalTime(*v) 17972 return res 17973 } 17974 17975 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (*UpdatePtrToPtrInner, error) { 17976 if v == nil { 17977 return nil, nil 17978 } 17979 res, err := ec.unmarshalInputUpdatePtrToPtrInner(ctx, v) 17980 return &res, graphql.ErrorOnPath(ctx, err) 17981 } 17982 17983 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (**UpdatePtrToPtrInner, error) { 17984 var pres *UpdatePtrToPtrInner 17985 if v != nil { 17986 res, err := ec.unmarshalOUpdatePtrToPtrInner2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 17987 if err != nil { 17988 return nil, graphql.ErrorOnPath(ctx, err) 17989 } 17990 pres = res 17991 } 17992 return &pres, nil 17993 } 17994 17995 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (***UpdatePtrToPtrInner, error) { 17996 var pres **UpdatePtrToPtrInner 17997 if v != nil { 17998 res, err := ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 17999 if err != nil { 18000 return nil, graphql.ErrorOnPath(ctx, err) 18001 } 18002 pres = res 18003 } 18004 return &pres, nil 18005 } 18006 18007 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (****UpdatePtrToPtrInner, error) { 18008 var pres ***UpdatePtrToPtrInner 18009 if v != nil { 18010 res, err := ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 18011 if err != nil { 18012 return nil, graphql.ErrorOnPath(ctx, err) 18013 } 18014 pres = res 18015 } 18016 return &pres, nil 18017 } 18018 18019 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (*****UpdatePtrToPtrInner, error) { 18020 var pres ****UpdatePtrToPtrInner 18021 if v != nil { 18022 res, err := ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 18023 if err != nil { 18024 return nil, graphql.ErrorOnPath(ctx, err) 18025 } 18026 pres = res 18027 } 18028 return &pres, nil 18029 } 18030 18031 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (******UpdatePtrToPtrInner, error) { 18032 var pres *****UpdatePtrToPtrInner 18033 if v != nil { 18034 res, err := ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 18035 if err != nil { 18036 return nil, graphql.ErrorOnPath(ctx, err) 18037 } 18038 pres = res 18039 } 18040 return &pres, nil 18041 } 18042 18043 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (*******UpdatePtrToPtrInner, error) { 18044 var pres ******UpdatePtrToPtrInner 18045 if v != nil { 18046 res, err := ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 18047 if err != nil { 18048 return nil, graphql.ErrorOnPath(ctx, err) 18049 } 18050 pres = res 18051 } 18052 return &pres, nil 18053 } 18054 18055 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (********UpdatePtrToPtrInner, error) { 18056 var pres *******UpdatePtrToPtrInner 18057 if v != nil { 18058 res, err := ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 18059 if err != nil { 18060 return nil, graphql.ErrorOnPath(ctx, err) 18061 } 18062 pres = res 18063 } 18064 return &pres, nil 18065 } 18066 18067 func (ec *executionContext) marshalOVOkCaseNil2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐVOkCaseNil(ctx context.Context, sel ast.SelectionSet, v *VOkCaseNil) graphql.Marshaler { 18068 if v == nil { 18069 return graphql.Null 18070 } 18071 return ec._VOkCaseNil(ctx, sel, v) 18072 } 18073 18074 func (ec *executionContext) marshalOVOkCaseValue2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐVOkCaseValue(ctx context.Context, sel ast.SelectionSet, v *VOkCaseValue) graphql.Marshaler { 18075 if v == nil { 18076 return graphql.Null 18077 } 18078 return ec._VOkCaseValue(ctx, sel, v) 18079 } 18080 18081 func (ec *executionContext) unmarshalOValidInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐValidInput(ctx context.Context, v interface{}) (*ValidInput, error) { 18082 if v == nil { 18083 return nil, nil 18084 } 18085 res, err := ec.unmarshalInputValidInput(ctx, v) 18086 return &res, graphql.ErrorOnPath(ctx, err) 18087 } 18088 18089 func (ec *executionContext) marshalOValidType2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐValidType(ctx context.Context, sel ast.SelectionSet, v *ValidType) graphql.Marshaler { 18090 if v == nil { 18091 return graphql.Null 18092 } 18093 return ec._ValidType(ctx, sel, v) 18094 } 18095 18096 func (ec *executionContext) unmarshalOWrappedScalar2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚋotherpkgᚐScalar(ctx context.Context, v interface{}) (*otherpkg.Scalar, error) { 18097 if v == nil { 18098 return nil, nil 18099 } 18100 tmp, err := graphql.UnmarshalString(v) 18101 res := otherpkg.Scalar(tmp) 18102 return &res, graphql.ErrorOnPath(ctx, err) 18103 } 18104 18105 func (ec *executionContext) marshalOWrappedScalar2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚋotherpkgᚐScalar(ctx context.Context, sel ast.SelectionSet, v *otherpkg.Scalar) graphql.Marshaler { 18106 if v == nil { 18107 return graphql.Null 18108 } 18109 res := graphql.MarshalString(string(*v)) 18110 return res 18111 } 18112 18113 func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler { 18114 if v == nil { 18115 return graphql.Null 18116 } 18117 ret := make(graphql.Array, len(v)) 18118 var wg sync.WaitGroup 18119 isLen1 := len(v) == 1 18120 if !isLen1 { 18121 wg.Add(len(v)) 18122 } 18123 for i := range v { 18124 i := i 18125 fc := &graphql.FieldContext{ 18126 Index: &i, 18127 Result: &v[i], 18128 } 18129 ctx := graphql.WithFieldContext(ctx, fc) 18130 f := func(i int) { 18131 defer func() { 18132 if r := recover(); r != nil { 18133 ec.Error(ctx, ec.Recover(ctx, r)) 18134 ret = nil 18135 } 18136 }() 18137 if !isLen1 { 18138 defer wg.Done() 18139 } 18140 ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i]) 18141 } 18142 if isLen1 { 18143 f(i) 18144 } else { 18145 go f(i) 18146 } 18147 18148 } 18149 wg.Wait() 18150 18151 for _, e := range ret { 18152 if e == graphql.Null { 18153 return graphql.Null 18154 } 18155 } 18156 18157 return ret 18158 } 18159 18160 func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler { 18161 if v == nil { 18162 return graphql.Null 18163 } 18164 ret := make(graphql.Array, len(v)) 18165 var wg sync.WaitGroup 18166 isLen1 := len(v) == 1 18167 if !isLen1 { 18168 wg.Add(len(v)) 18169 } 18170 for i := range v { 18171 i := i 18172 fc := &graphql.FieldContext{ 18173 Index: &i, 18174 Result: &v[i], 18175 } 18176 ctx := graphql.WithFieldContext(ctx, fc) 18177 f := func(i int) { 18178 defer func() { 18179 if r := recover(); r != nil { 18180 ec.Error(ctx, ec.Recover(ctx, r)) 18181 ret = nil 18182 } 18183 }() 18184 if !isLen1 { 18185 defer wg.Done() 18186 } 18187 ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i]) 18188 } 18189 if isLen1 { 18190 f(i) 18191 } else { 18192 go f(i) 18193 } 18194 18195 } 18196 wg.Wait() 18197 18198 for _, e := range ret { 18199 if e == graphql.Null { 18200 return graphql.Null 18201 } 18202 } 18203 18204 return ret 18205 } 18206 18207 func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { 18208 if v == nil { 18209 return graphql.Null 18210 } 18211 ret := make(graphql.Array, len(v)) 18212 var wg sync.WaitGroup 18213 isLen1 := len(v) == 1 18214 if !isLen1 { 18215 wg.Add(len(v)) 18216 } 18217 for i := range v { 18218 i := i 18219 fc := &graphql.FieldContext{ 18220 Index: &i, 18221 Result: &v[i], 18222 } 18223 ctx := graphql.WithFieldContext(ctx, fc) 18224 f := func(i int) { 18225 defer func() { 18226 if r := recover(); r != nil { 18227 ec.Error(ctx, ec.Recover(ctx, r)) 18228 ret = nil 18229 } 18230 }() 18231 if !isLen1 { 18232 defer wg.Done() 18233 } 18234 ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) 18235 } 18236 if isLen1 { 18237 f(i) 18238 } else { 18239 go f(i) 18240 } 18241 18242 } 18243 wg.Wait() 18244 18245 for _, e := range ret { 18246 if e == graphql.Null { 18247 return graphql.Null 18248 } 18249 } 18250 18251 return ret 18252 } 18253 18254 func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler { 18255 if v == nil { 18256 return graphql.Null 18257 } 18258 return ec.___Schema(ctx, sel, v) 18259 } 18260 18261 func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { 18262 if v == nil { 18263 return graphql.Null 18264 } 18265 ret := make(graphql.Array, len(v)) 18266 var wg sync.WaitGroup 18267 isLen1 := len(v) == 1 18268 if !isLen1 { 18269 wg.Add(len(v)) 18270 } 18271 for i := range v { 18272 i := i 18273 fc := &graphql.FieldContext{ 18274 Index: &i, 18275 Result: &v[i], 18276 } 18277 ctx := graphql.WithFieldContext(ctx, fc) 18278 f := func(i int) { 18279 defer func() { 18280 if r := recover(); r != nil { 18281 ec.Error(ctx, ec.Recover(ctx, r)) 18282 ret = nil 18283 } 18284 }() 18285 if !isLen1 { 18286 defer wg.Done() 18287 } 18288 ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) 18289 } 18290 if isLen1 { 18291 f(i) 18292 } else { 18293 go f(i) 18294 } 18295 18296 } 18297 wg.Wait() 18298 18299 for _, e := range ret { 18300 if e == graphql.Null { 18301 return graphql.Null 18302 } 18303 } 18304 18305 return ret 18306 } 18307 18308 func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { 18309 if v == nil { 18310 return graphql.Null 18311 } 18312 return ec.___Type(ctx, sel, v) 18313 } 18314 18315 // endregion ***************************** type.gotpl *****************************