github.com/spread-ai/gqlgen@v0.0.0-20221124102857-a6c8ef538a1d/codegen/testserver/singlefile/generated.go (about) 1 // Code generated by github.com/spread-ai/gqlgen, DO NOT EDIT. 2 3 package singlefile 4 5 import ( 6 "bytes" 7 "context" 8 "embed" 9 "errors" 10 "fmt" 11 "io" 12 "strconv" 13 "sync" 14 "sync/atomic" 15 "time" 16 17 introspection1 "github.com/spread-ai/gqlgen/codegen/testserver/singlefile/introspection" 18 invalid_packagename "github.com/spread-ai/gqlgen/codegen/testserver/singlefile/invalid-packagename" 19 "github.com/spread-ai/gqlgen/codegen/testserver/singlefile/otherpkg" 20 "github.com/spread-ai/gqlgen/graphql" 21 "github.com/spread-ai/gqlgen/graphql/introspection" 22 gqlparser "github.com/vektah/gqlparser/v2" 23 "github.com/vektah/gqlparser/v2/ast" 24 ) 25 26 // region ************************** generated!.gotpl ************************** 27 28 // NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface. 29 func NewExecutableSchema(cfg Config) graphql.ExecutableSchema { 30 return &executableSchema{ 31 resolvers: cfg.Resolvers, 32 directives: cfg.Directives, 33 complexity: cfg.Complexity, 34 } 35 } 36 37 type Config struct { 38 Resolvers ResolverRoot 39 Directives DirectiveRoot 40 Complexity ComplexityRoot 41 } 42 43 type ResolverRoot interface { 44 BackedByInterface() BackedByInterfaceResolver 45 Errors() ErrorsResolver 46 ForcedResolver() ForcedResolverResolver 47 ModelMethods() ModelMethodsResolver 48 Mutation() MutationResolver 49 OverlappingFields() OverlappingFieldsResolver 50 Panics() PanicsResolver 51 Pet() PetResolver 52 Primitive() PrimitiveResolver 53 PrimitiveString() PrimitiveStringResolver 54 Query() QueryResolver 55 Subscription() SubscriptionResolver 56 User() UserResolver 57 WrappedMap() WrappedMapResolver 58 WrappedSlice() WrappedSliceResolver 59 FieldsOrderInput() FieldsOrderInputResolver 60 } 61 62 type DirectiveRoot struct { 63 Custom func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 64 Directive1 func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 65 Directive2 func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 66 Directive3 func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 67 Length func(ctx context.Context, obj interface{}, next graphql.Resolver, min int, max *int, message *string) (res interface{}, err error) 68 Logged func(ctx context.Context, obj interface{}, next graphql.Resolver, id string) (res interface{}, err error) 69 MakeNil func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 70 MakeTypedNil func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 71 Order1 func(ctx context.Context, obj interface{}, next graphql.Resolver, location string) (res interface{}, err error) 72 Order2 func(ctx context.Context, obj interface{}, next graphql.Resolver, location string) (res interface{}, err error) 73 Range func(ctx context.Context, obj interface{}, next graphql.Resolver, min *int, max *int) (res interface{}, err error) 74 ToNull func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 75 Unimplemented func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) 76 } 77 78 type ComplexityRoot struct { 79 A struct { 80 ID func(childComplexity int) int 81 } 82 83 AIt struct { 84 ID func(childComplexity int) int 85 } 86 87 AbIt struct { 88 ID func(childComplexity int) int 89 } 90 91 Autobind struct { 92 IdInt func(childComplexity int) int 93 IdStr func(childComplexity int) int 94 Int func(childComplexity int) int 95 Int32 func(childComplexity int) int 96 Int64 func(childComplexity int) int 97 } 98 99 B struct { 100 ID func(childComplexity int) int 101 } 102 103 BackedByInterface struct { 104 ID func(childComplexity int) int 105 ThisShouldBind func(childComplexity int) int 106 ThisShouldBindWithError func(childComplexity int) int 107 } 108 109 Cat struct { 110 CatBreed func(childComplexity int) int 111 Size func(childComplexity int) int 112 Species func(childComplexity int) int 113 } 114 115 CheckIssue896 struct { 116 ID func(childComplexity int) int 117 } 118 119 Circle struct { 120 Area func(childComplexity int) int 121 Coordinates func(childComplexity int) int 122 Radius func(childComplexity int) int 123 } 124 125 ConcreteNodeA struct { 126 Child func(childComplexity int) int 127 ID func(childComplexity int) int 128 Name func(childComplexity int) int 129 } 130 131 ConcreteNodeInterface struct { 132 Child func(childComplexity int) int 133 ID func(childComplexity int) int 134 } 135 136 Content_Post struct { 137 Foo func(childComplexity int) int 138 } 139 140 Content_User struct { 141 Foo func(childComplexity int) int 142 } 143 144 Coordinates struct { 145 X func(childComplexity int) int 146 Y func(childComplexity int) int 147 } 148 149 DefaultParametersMirror struct { 150 FalsyBoolean func(childComplexity int) int 151 TruthyBoolean func(childComplexity int) int 152 } 153 154 Dog struct { 155 DogBreed func(childComplexity int) int 156 Size func(childComplexity int) int 157 Species func(childComplexity int) int 158 } 159 160 EmbeddedCase1 struct { 161 ExportedEmbeddedPointerExportedMethod func(childComplexity int) int 162 } 163 164 EmbeddedCase2 struct { 165 UnexportedEmbeddedPointerExportedMethod func(childComplexity int) int 166 } 167 168 EmbeddedCase3 struct { 169 UnexportedEmbeddedInterfaceExportedMethod func(childComplexity int) int 170 } 171 172 EmbeddedDefaultScalar struct { 173 Value func(childComplexity int) int 174 } 175 176 EmbeddedPointer struct { 177 ID func(childComplexity int) int 178 Title func(childComplexity int) int 179 } 180 181 Error struct { 182 ErrorOnNonRequiredField func(childComplexity int) int 183 ErrorOnRequiredField func(childComplexity int) int 184 ID func(childComplexity int) int 185 NilOnRequiredField func(childComplexity int) int 186 } 187 188 Errors struct { 189 A func(childComplexity int) int 190 B func(childComplexity int) int 191 C func(childComplexity int) int 192 D func(childComplexity int) int 193 E func(childComplexity int) int 194 } 195 196 FieldsOrderPayload struct { 197 FirstFieldValue func(childComplexity int) int 198 } 199 200 ForcedResolver struct { 201 Field func(childComplexity int) int 202 } 203 204 InnerObject struct { 205 ID func(childComplexity int) int 206 } 207 208 InvalidIdentifier struct { 209 ID func(childComplexity int) int 210 } 211 212 It struct { 213 ID func(childComplexity int) int 214 } 215 216 LoopA struct { 217 B func(childComplexity int) int 218 } 219 220 LoopB struct { 221 A func(childComplexity int) int 222 } 223 224 Map struct { 225 ID func(childComplexity int) int 226 } 227 228 MapStringInterfaceType struct { 229 A func(childComplexity int) int 230 B func(childComplexity int) int 231 } 232 233 ModelMethods struct { 234 NoContext func(childComplexity int) int 235 ResolverField func(childComplexity int) int 236 WithContext func(childComplexity int) int 237 } 238 239 Mutation struct { 240 DefaultInput func(childComplexity int, input DefaultInput) int 241 OverrideValueViaInput func(childComplexity int, input FieldsOrderInput) int 242 UpdatePtrToPtr func(childComplexity int, input UpdatePtrToPtrOuter) int 243 UpdateSomething func(childComplexity int, input SpecialInput) int 244 } 245 246 ObjectDirectives struct { 247 NullableText func(childComplexity int) int 248 Order func(childComplexity int) int 249 Text func(childComplexity int) int 250 } 251 252 ObjectDirectivesWithCustomGoModel struct { 253 NullableText func(childComplexity int) int 254 } 255 256 OuterObject struct { 257 Inner func(childComplexity int) int 258 } 259 260 OverlappingFields struct { 261 Foo func(childComplexity int) int 262 NewFoo func(childComplexity int) int 263 OldFoo func(childComplexity int) int 264 } 265 266 Panics struct { 267 ArgUnmarshal func(childComplexity int, u []MarshalPanic) int 268 FieldFuncMarshal func(childComplexity int, u []MarshalPanic) int 269 FieldScalarMarshal func(childComplexity int) int 270 } 271 272 Pet struct { 273 Friends func(childComplexity int, limit *int) int 274 ID func(childComplexity int) int 275 } 276 277 Primitive struct { 278 Squared func(childComplexity int) int 279 Value func(childComplexity int) int 280 } 281 282 PrimitiveString struct { 283 Doubled func(childComplexity int) int 284 Len func(childComplexity int) int 285 Value func(childComplexity int) int 286 } 287 288 PtrToPtrInner struct { 289 Key func(childComplexity int) int 290 Value func(childComplexity int) int 291 } 292 293 PtrToPtrOuter struct { 294 Inner func(childComplexity int) int 295 Name func(childComplexity int) int 296 StupidInner func(childComplexity int) int 297 } 298 299 PtrToSliceContainer struct { 300 PtrToSlice func(childComplexity int) int 301 } 302 303 Query struct { 304 Animal func(childComplexity int) int 305 Autobind func(childComplexity int) int 306 Collision func(childComplexity int) int 307 DefaultParameters func(childComplexity int, falsyBoolean *bool, truthyBoolean *bool) int 308 DefaultScalar func(childComplexity int, arg string) int 309 DeprecatedField func(childComplexity int) int 310 DirectiveArg func(childComplexity int, arg string) int 311 DirectiveDouble func(childComplexity int) int 312 DirectiveField func(childComplexity int) int 313 DirectiveFieldDef func(childComplexity int, ret string) int 314 DirectiveInput func(childComplexity int, arg InputDirectives) int 315 DirectiveInputNullable func(childComplexity int, arg *InputDirectives) int 316 DirectiveInputType func(childComplexity int, arg InnerInput) int 317 DirectiveNullableArg func(childComplexity int, arg *int, arg2 *int, arg3 *string) int 318 DirectiveObject func(childComplexity int) int 319 DirectiveObjectWithCustomGoModel func(childComplexity int) int 320 DirectiveUnimplemented func(childComplexity int) int 321 Dog func(childComplexity int) int 322 EmbeddedCase1 func(childComplexity int) int 323 EmbeddedCase2 func(childComplexity int) int 324 EmbeddedCase3 func(childComplexity int) int 325 EnumInInput func(childComplexity int, input *InputWithEnumValue) int 326 ErrorBubble func(childComplexity int) int 327 ErrorBubbleList func(childComplexity int) int 328 ErrorList func(childComplexity int) int 329 Errors func(childComplexity int) int 330 Fallback func(childComplexity int, arg FallbackToStringEncoding) int 331 Infinity func(childComplexity int) int 332 InputNullableSlice func(childComplexity int, arg []string) int 333 InputSlice func(childComplexity int, arg []string) int 334 InvalidIdentifier func(childComplexity int) int 335 Issue896a func(childComplexity int) int 336 MapInput func(childComplexity int, input map[string]interface{}) int 337 MapNestedStringInterface func(childComplexity int, in *NestedMapInput) int 338 MapStringInterface func(childComplexity int, in map[string]interface{}) int 339 ModelMethods func(childComplexity int) int 340 NestedInputs func(childComplexity int, input [][]*OuterInput) int 341 NestedOutputs func(childComplexity int) int 342 NoShape func(childComplexity int) int 343 NoShapeTypedNil func(childComplexity int) int 344 Node func(childComplexity int) int 345 NotAnInterface func(childComplexity int) int 346 NullableArg func(childComplexity int, arg *int) int 347 OptionalUnion func(childComplexity int) int 348 Overlapping func(childComplexity int) int 349 Panics func(childComplexity int) int 350 PrimitiveObject func(childComplexity int) int 351 PrimitiveStringObject func(childComplexity int) int 352 PtrToSliceContainer func(childComplexity int) int 353 Recursive func(childComplexity int, input *RecursiveInputSlice) int 354 ScalarSlice func(childComplexity int) int 355 ShapeUnion func(childComplexity int) int 356 Shapes func(childComplexity int) int 357 Slices func(childComplexity int) int 358 StringFromContextFunction func(childComplexity int) int 359 StringFromContextInterface func(childComplexity int) int 360 User func(childComplexity int, id int) int 361 VOkCaseNil func(childComplexity int) int 362 VOkCaseValue func(childComplexity int) int 363 Valid func(childComplexity int) int 364 ValidType func(childComplexity int) int 365 VariadicModel func(childComplexity int) int 366 WrappedMap func(childComplexity int) int 367 WrappedScalar func(childComplexity int) int 368 WrappedSlice func(childComplexity int) int 369 WrappedStruct func(childComplexity int) int 370 } 371 372 Rectangle struct { 373 Area func(childComplexity int) int 374 Coordinates func(childComplexity int) int 375 Length func(childComplexity int) int 376 Width func(childComplexity int) int 377 } 378 379 Size struct { 380 Height func(childComplexity int) int 381 Weight func(childComplexity int) int 382 } 383 384 Slices struct { 385 Test1 func(childComplexity int) int 386 Test2 func(childComplexity int) int 387 Test3 func(childComplexity int) int 388 Test4 func(childComplexity int) int 389 } 390 391 Subscription struct { 392 DirectiveArg func(childComplexity int, arg string) int 393 DirectiveDouble func(childComplexity int) int 394 DirectiveNullableArg func(childComplexity int, arg *int, arg2 *int, arg3 *string) int 395 DirectiveUnimplemented func(childComplexity int) int 396 ErrorRequired func(childComplexity int) int 397 InitPayload func(childComplexity int) int 398 Issue896b func(childComplexity int) int 399 Updated func(childComplexity int) int 400 } 401 402 User struct { 403 Created func(childComplexity int) int 404 Friends func(childComplexity int) int 405 ID func(childComplexity int) int 406 Pets func(childComplexity int, limit *int) int 407 Updated func(childComplexity int) int 408 } 409 410 VOkCaseNil struct { 411 Value func(childComplexity int) int 412 } 413 414 VOkCaseValue struct { 415 Value func(childComplexity int) int 416 } 417 418 ValidType struct { 419 DifferentCase func(childComplexity int) int 420 DifferentCaseOld func(childComplexity int) int 421 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 422 ValidInputKeywords func(childComplexity int, input *ValidInput) int 423 } 424 425 VariadicModel struct { 426 Value func(childComplexity int, rank int) int 427 } 428 429 WrappedMap struct { 430 Get func(childComplexity int, key string) int 431 } 432 433 WrappedSlice struct { 434 Get func(childComplexity int, idx int) int 435 } 436 437 WrappedStruct struct { 438 Desc func(childComplexity int) int 439 Name func(childComplexity int) int 440 } 441 442 XXIt struct { 443 ID func(childComplexity int) int 444 } 445 446 XxIt struct { 447 ID func(childComplexity int) int 448 } 449 450 AsdfIt struct { 451 ID func(childComplexity int) int 452 } 453 454 IIt struct { 455 ID func(childComplexity int) int 456 } 457 } 458 459 type BackedByInterfaceResolver interface { 460 ID(ctx context.Context, obj BackedByInterface) (string, error) 461 } 462 type ErrorsResolver interface { 463 A(ctx context.Context, obj *Errors) (*Error, error) 464 B(ctx context.Context, obj *Errors) (*Error, error) 465 C(ctx context.Context, obj *Errors) (*Error, error) 466 D(ctx context.Context, obj *Errors) (*Error, error) 467 E(ctx context.Context, obj *Errors) (*Error, error) 468 } 469 type ForcedResolverResolver interface { 470 Field(ctx context.Context, obj *ForcedResolver) (*Circle, error) 471 } 472 type ModelMethodsResolver interface { 473 ResolverField(ctx context.Context, obj *ModelMethods) (bool, error) 474 } 475 type MutationResolver interface { 476 DefaultInput(ctx context.Context, input DefaultInput) (*DefaultParametersMirror, error) 477 OverrideValueViaInput(ctx context.Context, input FieldsOrderInput) (*FieldsOrderPayload, error) 478 UpdateSomething(ctx context.Context, input SpecialInput) (string, error) 479 UpdatePtrToPtr(ctx context.Context, input UpdatePtrToPtrOuter) (*PtrToPtrOuter, error) 480 } 481 type OverlappingFieldsResolver interface { 482 OldFoo(ctx context.Context, obj *OverlappingFields) (int, error) 483 } 484 type PanicsResolver interface { 485 FieldScalarMarshal(ctx context.Context, obj *Panics) ([]MarshalPanic, error) 486 487 ArgUnmarshal(ctx context.Context, obj *Panics, u []MarshalPanic) (bool, error) 488 } 489 type PetResolver interface { 490 Friends(ctx context.Context, obj *Pet, limit *int) ([]*Pet, error) 491 } 492 type PrimitiveResolver interface { 493 Value(ctx context.Context, obj *Primitive) (int, error) 494 } 495 type PrimitiveStringResolver interface { 496 Value(ctx context.Context, obj *PrimitiveString) (string, error) 497 498 Len(ctx context.Context, obj *PrimitiveString) (int, error) 499 } 500 type QueryResolver interface { 501 InvalidIdentifier(ctx context.Context) (*invalid_packagename.InvalidIdentifier, error) 502 Collision(ctx context.Context) (*introspection1.It, error) 503 MapInput(ctx context.Context, input map[string]interface{}) (*bool, error) 504 Recursive(ctx context.Context, input *RecursiveInputSlice) (*bool, error) 505 NestedInputs(ctx context.Context, input [][]*OuterInput) (*bool, error) 506 NestedOutputs(ctx context.Context) ([][]*OuterObject, error) 507 ModelMethods(ctx context.Context) (*ModelMethods, error) 508 User(ctx context.Context, id int) (*User, error) 509 NullableArg(ctx context.Context, arg *int) (*string, error) 510 InputSlice(ctx context.Context, arg []string) (bool, error) 511 InputNullableSlice(ctx context.Context, arg []string) (bool, error) 512 ShapeUnion(ctx context.Context) (ShapeUnion, error) 513 Autobind(ctx context.Context) (*Autobind, error) 514 DeprecatedField(ctx context.Context) (string, error) 515 Overlapping(ctx context.Context) (*OverlappingFields, error) 516 DefaultParameters(ctx context.Context, falsyBoolean *bool, truthyBoolean *bool) (*DefaultParametersMirror, error) 517 DirectiveArg(ctx context.Context, arg string) (*string, error) 518 DirectiveNullableArg(ctx context.Context, arg *int, arg2 *int, arg3 *string) (*string, error) 519 DirectiveInputNullable(ctx context.Context, arg *InputDirectives) (*string, error) 520 DirectiveInput(ctx context.Context, arg InputDirectives) (*string, error) 521 DirectiveInputType(ctx context.Context, arg InnerInput) (*string, error) 522 DirectiveObject(ctx context.Context) (*ObjectDirectives, error) 523 DirectiveObjectWithCustomGoModel(ctx context.Context) (*ObjectDirectivesWithCustomGoModel, error) 524 DirectiveFieldDef(ctx context.Context, ret string) (string, error) 525 DirectiveField(ctx context.Context) (*string, error) 526 DirectiveDouble(ctx context.Context) (*string, error) 527 DirectiveUnimplemented(ctx context.Context) (*string, error) 528 EmbeddedCase1(ctx context.Context) (*EmbeddedCase1, error) 529 EmbeddedCase2(ctx context.Context) (*EmbeddedCase2, error) 530 EmbeddedCase3(ctx context.Context) (*EmbeddedCase3, error) 531 EnumInInput(ctx context.Context, input *InputWithEnumValue) (EnumTest, error) 532 Shapes(ctx context.Context) ([]Shape, error) 533 NoShape(ctx context.Context) (Shape, error) 534 Node(ctx context.Context) (Node, error) 535 NoShapeTypedNil(ctx context.Context) (Shape, error) 536 Animal(ctx context.Context) (Animal, error) 537 NotAnInterface(ctx context.Context) (BackedByInterface, error) 538 Dog(ctx context.Context) (*Dog, error) 539 Issue896a(ctx context.Context) ([]*CheckIssue896, error) 540 MapStringInterface(ctx context.Context, in map[string]interface{}) (map[string]interface{}, error) 541 MapNestedStringInterface(ctx context.Context, in *NestedMapInput) (map[string]interface{}, error) 542 ErrorBubble(ctx context.Context) (*Error, error) 543 ErrorBubbleList(ctx context.Context) ([]*Error, error) 544 ErrorList(ctx context.Context) ([]*Error, error) 545 Errors(ctx context.Context) (*Errors, error) 546 Valid(ctx context.Context) (string, error) 547 Panics(ctx context.Context) (*Panics, error) 548 PrimitiveObject(ctx context.Context) ([]Primitive, error) 549 PrimitiveStringObject(ctx context.Context) ([]PrimitiveString, error) 550 PtrToSliceContainer(ctx context.Context) (*PtrToSliceContainer, error) 551 Infinity(ctx context.Context) (float64, error) 552 StringFromContextInterface(ctx context.Context) (*StringFromContextInterface, error) 553 StringFromContextFunction(ctx context.Context) (string, error) 554 DefaultScalar(ctx context.Context, arg string) (string, error) 555 Slices(ctx context.Context) (*Slices, error) 556 ScalarSlice(ctx context.Context) ([]byte, error) 557 Fallback(ctx context.Context, arg FallbackToStringEncoding) (FallbackToStringEncoding, error) 558 OptionalUnion(ctx context.Context) (TestUnion, error) 559 VOkCaseValue(ctx context.Context) (*VOkCaseValue, error) 560 VOkCaseNil(ctx context.Context) (*VOkCaseNil, error) 561 ValidType(ctx context.Context) (*ValidType, error) 562 VariadicModel(ctx context.Context) (*VariadicModel, error) 563 WrappedStruct(ctx context.Context) (*WrappedStruct, error) 564 WrappedScalar(ctx context.Context) (otherpkg.Scalar, error) 565 WrappedMap(ctx context.Context) (WrappedMap, error) 566 WrappedSlice(ctx context.Context) (WrappedSlice, error) 567 } 568 type SubscriptionResolver interface { 569 Updated(ctx context.Context) (<-chan string, error) 570 InitPayload(ctx context.Context) (<-chan string, error) 571 DirectiveArg(ctx context.Context, arg string) (<-chan *string, error) 572 DirectiveNullableArg(ctx context.Context, arg *int, arg2 *int, arg3 *string) (<-chan *string, error) 573 DirectiveDouble(ctx context.Context) (<-chan *string, error) 574 DirectiveUnimplemented(ctx context.Context) (<-chan *string, error) 575 Issue896b(ctx context.Context) (<-chan []*CheckIssue896, error) 576 ErrorRequired(ctx context.Context) (<-chan *Error, error) 577 } 578 type UserResolver interface { 579 Friends(ctx context.Context, obj *User) ([]*User, error) 580 581 Pets(ctx context.Context, obj *User, limit *int) ([]*Pet, error) 582 } 583 type WrappedMapResolver interface { 584 Get(ctx context.Context, obj WrappedMap, key string) (string, error) 585 } 586 type WrappedSliceResolver interface { 587 Get(ctx context.Context, obj WrappedSlice, idx int) (string, error) 588 } 589 590 type FieldsOrderInputResolver interface { 591 OverrideFirstField(ctx context.Context, obj *FieldsOrderInput, data *string) error 592 } 593 594 type executableSchema struct { 595 resolvers ResolverRoot 596 directives DirectiveRoot 597 complexity ComplexityRoot 598 } 599 600 func (e *executableSchema) Schema() *ast.Schema { 601 return parsedSchema 602 } 603 604 func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) { 605 ec := executionContext{nil, e} 606 _ = ec 607 switch typeName + "." + field { 608 609 case "A.id": 610 if e.complexity.A.ID == nil { 611 break 612 } 613 614 return e.complexity.A.ID(childComplexity), true 615 616 case "AIt.id": 617 if e.complexity.AIt.ID == nil { 618 break 619 } 620 621 return e.complexity.AIt.ID(childComplexity), true 622 623 case "AbIt.id": 624 if e.complexity.AbIt.ID == nil { 625 break 626 } 627 628 return e.complexity.AbIt.ID(childComplexity), true 629 630 case "Autobind.idInt": 631 if e.complexity.Autobind.IdInt == nil { 632 break 633 } 634 635 return e.complexity.Autobind.IdInt(childComplexity), true 636 637 case "Autobind.idStr": 638 if e.complexity.Autobind.IdStr == nil { 639 break 640 } 641 642 return e.complexity.Autobind.IdStr(childComplexity), true 643 644 case "Autobind.int": 645 if e.complexity.Autobind.Int == nil { 646 break 647 } 648 649 return e.complexity.Autobind.Int(childComplexity), true 650 651 case "Autobind.int32": 652 if e.complexity.Autobind.Int32 == nil { 653 break 654 } 655 656 return e.complexity.Autobind.Int32(childComplexity), true 657 658 case "Autobind.int64": 659 if e.complexity.Autobind.Int64 == nil { 660 break 661 } 662 663 return e.complexity.Autobind.Int64(childComplexity), true 664 665 case "B.id": 666 if e.complexity.B.ID == nil { 667 break 668 } 669 670 return e.complexity.B.ID(childComplexity), true 671 672 case "BackedByInterface.id": 673 if e.complexity.BackedByInterface.ID == nil { 674 break 675 } 676 677 return e.complexity.BackedByInterface.ID(childComplexity), true 678 679 case "BackedByInterface.thisShouldBind": 680 if e.complexity.BackedByInterface.ThisShouldBind == nil { 681 break 682 } 683 684 return e.complexity.BackedByInterface.ThisShouldBind(childComplexity), true 685 686 case "BackedByInterface.thisShouldBindWithError": 687 if e.complexity.BackedByInterface.ThisShouldBindWithError == nil { 688 break 689 } 690 691 return e.complexity.BackedByInterface.ThisShouldBindWithError(childComplexity), true 692 693 case "Cat.catBreed": 694 if e.complexity.Cat.CatBreed == nil { 695 break 696 } 697 698 return e.complexity.Cat.CatBreed(childComplexity), true 699 700 case "Cat.size": 701 if e.complexity.Cat.Size == nil { 702 break 703 } 704 705 return e.complexity.Cat.Size(childComplexity), true 706 707 case "Cat.species": 708 if e.complexity.Cat.Species == nil { 709 break 710 } 711 712 return e.complexity.Cat.Species(childComplexity), true 713 714 case "CheckIssue896.id": 715 if e.complexity.CheckIssue896.ID == nil { 716 break 717 } 718 719 return e.complexity.CheckIssue896.ID(childComplexity), true 720 721 case "Circle.area": 722 if e.complexity.Circle.Area == nil { 723 break 724 } 725 726 return e.complexity.Circle.Area(childComplexity), true 727 728 case "Circle.coordinates": 729 if e.complexity.Circle.Coordinates == nil { 730 break 731 } 732 733 return e.complexity.Circle.Coordinates(childComplexity), true 734 735 case "Circle.radius": 736 if e.complexity.Circle.Radius == nil { 737 break 738 } 739 740 return e.complexity.Circle.Radius(childComplexity), true 741 742 case "ConcreteNodeA.child": 743 if e.complexity.ConcreteNodeA.Child == nil { 744 break 745 } 746 747 return e.complexity.ConcreteNodeA.Child(childComplexity), true 748 749 case "ConcreteNodeA.id": 750 if e.complexity.ConcreteNodeA.ID == nil { 751 break 752 } 753 754 return e.complexity.ConcreteNodeA.ID(childComplexity), true 755 756 case "ConcreteNodeA.name": 757 if e.complexity.ConcreteNodeA.Name == nil { 758 break 759 } 760 761 return e.complexity.ConcreteNodeA.Name(childComplexity), true 762 763 case "ConcreteNodeInterface.child": 764 if e.complexity.ConcreteNodeInterface.Child == nil { 765 break 766 } 767 768 return e.complexity.ConcreteNodeInterface.Child(childComplexity), true 769 770 case "ConcreteNodeInterface.id": 771 if e.complexity.ConcreteNodeInterface.ID == nil { 772 break 773 } 774 775 return e.complexity.ConcreteNodeInterface.ID(childComplexity), true 776 777 case "Content_Post.foo": 778 if e.complexity.Content_Post.Foo == nil { 779 break 780 } 781 782 return e.complexity.Content_Post.Foo(childComplexity), true 783 784 case "Content_User.foo": 785 if e.complexity.Content_User.Foo == nil { 786 break 787 } 788 789 return e.complexity.Content_User.Foo(childComplexity), true 790 791 case "Coordinates.x": 792 if e.complexity.Coordinates.X == nil { 793 break 794 } 795 796 return e.complexity.Coordinates.X(childComplexity), true 797 798 case "Coordinates.y": 799 if e.complexity.Coordinates.Y == nil { 800 break 801 } 802 803 return e.complexity.Coordinates.Y(childComplexity), true 804 805 case "DefaultParametersMirror.falsyBoolean": 806 if e.complexity.DefaultParametersMirror.FalsyBoolean == nil { 807 break 808 } 809 810 return e.complexity.DefaultParametersMirror.FalsyBoolean(childComplexity), true 811 812 case "DefaultParametersMirror.truthyBoolean": 813 if e.complexity.DefaultParametersMirror.TruthyBoolean == nil { 814 break 815 } 816 817 return e.complexity.DefaultParametersMirror.TruthyBoolean(childComplexity), true 818 819 case "Dog.dogBreed": 820 if e.complexity.Dog.DogBreed == nil { 821 break 822 } 823 824 return e.complexity.Dog.DogBreed(childComplexity), true 825 826 case "Dog.size": 827 if e.complexity.Dog.Size == nil { 828 break 829 } 830 831 return e.complexity.Dog.Size(childComplexity), true 832 833 case "Dog.species": 834 if e.complexity.Dog.Species == nil { 835 break 836 } 837 838 return e.complexity.Dog.Species(childComplexity), true 839 840 case "EmbeddedCase1.exportedEmbeddedPointerExportedMethod": 841 if e.complexity.EmbeddedCase1.ExportedEmbeddedPointerExportedMethod == nil { 842 break 843 } 844 845 return e.complexity.EmbeddedCase1.ExportedEmbeddedPointerExportedMethod(childComplexity), true 846 847 case "EmbeddedCase2.unexportedEmbeddedPointerExportedMethod": 848 if e.complexity.EmbeddedCase2.UnexportedEmbeddedPointerExportedMethod == nil { 849 break 850 } 851 852 return e.complexity.EmbeddedCase2.UnexportedEmbeddedPointerExportedMethod(childComplexity), true 853 854 case "EmbeddedCase3.unexportedEmbeddedInterfaceExportedMethod": 855 if e.complexity.EmbeddedCase3.UnexportedEmbeddedInterfaceExportedMethod == nil { 856 break 857 } 858 859 return e.complexity.EmbeddedCase3.UnexportedEmbeddedInterfaceExportedMethod(childComplexity), true 860 861 case "EmbeddedDefaultScalar.value": 862 if e.complexity.EmbeddedDefaultScalar.Value == nil { 863 break 864 } 865 866 return e.complexity.EmbeddedDefaultScalar.Value(childComplexity), true 867 868 case "EmbeddedPointer.ID": 869 if e.complexity.EmbeddedPointer.ID == nil { 870 break 871 } 872 873 return e.complexity.EmbeddedPointer.ID(childComplexity), true 874 875 case "EmbeddedPointer.Title": 876 if e.complexity.EmbeddedPointer.Title == nil { 877 break 878 } 879 880 return e.complexity.EmbeddedPointer.Title(childComplexity), true 881 882 case "Error.errorOnNonRequiredField": 883 if e.complexity.Error.ErrorOnNonRequiredField == nil { 884 break 885 } 886 887 return e.complexity.Error.ErrorOnNonRequiredField(childComplexity), true 888 889 case "Error.errorOnRequiredField": 890 if e.complexity.Error.ErrorOnRequiredField == nil { 891 break 892 } 893 894 return e.complexity.Error.ErrorOnRequiredField(childComplexity), true 895 896 case "Error.id": 897 if e.complexity.Error.ID == nil { 898 break 899 } 900 901 return e.complexity.Error.ID(childComplexity), true 902 903 case "Error.nilOnRequiredField": 904 if e.complexity.Error.NilOnRequiredField == nil { 905 break 906 } 907 908 return e.complexity.Error.NilOnRequiredField(childComplexity), true 909 910 case "Errors.a": 911 if e.complexity.Errors.A == nil { 912 break 913 } 914 915 return e.complexity.Errors.A(childComplexity), true 916 917 case "Errors.b": 918 if e.complexity.Errors.B == nil { 919 break 920 } 921 922 return e.complexity.Errors.B(childComplexity), true 923 924 case "Errors.c": 925 if e.complexity.Errors.C == nil { 926 break 927 } 928 929 return e.complexity.Errors.C(childComplexity), true 930 931 case "Errors.d": 932 if e.complexity.Errors.D == nil { 933 break 934 } 935 936 return e.complexity.Errors.D(childComplexity), true 937 938 case "Errors.e": 939 if e.complexity.Errors.E == nil { 940 break 941 } 942 943 return e.complexity.Errors.E(childComplexity), true 944 945 case "FieldsOrderPayload.firstFieldValue": 946 if e.complexity.FieldsOrderPayload.FirstFieldValue == nil { 947 break 948 } 949 950 return e.complexity.FieldsOrderPayload.FirstFieldValue(childComplexity), true 951 952 case "ForcedResolver.field": 953 if e.complexity.ForcedResolver.Field == nil { 954 break 955 } 956 957 return e.complexity.ForcedResolver.Field(childComplexity), true 958 959 case "InnerObject.id": 960 if e.complexity.InnerObject.ID == nil { 961 break 962 } 963 964 return e.complexity.InnerObject.ID(childComplexity), true 965 966 case "InvalidIdentifier.id": 967 if e.complexity.InvalidIdentifier.ID == nil { 968 break 969 } 970 971 return e.complexity.InvalidIdentifier.ID(childComplexity), true 972 973 case "It.id": 974 if e.complexity.It.ID == nil { 975 break 976 } 977 978 return e.complexity.It.ID(childComplexity), true 979 980 case "LoopA.b": 981 if e.complexity.LoopA.B == nil { 982 break 983 } 984 985 return e.complexity.LoopA.B(childComplexity), true 986 987 case "LoopB.a": 988 if e.complexity.LoopB.A == nil { 989 break 990 } 991 992 return e.complexity.LoopB.A(childComplexity), true 993 994 case "Map.id": 995 if e.complexity.Map.ID == nil { 996 break 997 } 998 999 return e.complexity.Map.ID(childComplexity), true 1000 1001 case "MapStringInterfaceType.a": 1002 if e.complexity.MapStringInterfaceType.A == nil { 1003 break 1004 } 1005 1006 return e.complexity.MapStringInterfaceType.A(childComplexity), true 1007 1008 case "MapStringInterfaceType.b": 1009 if e.complexity.MapStringInterfaceType.B == nil { 1010 break 1011 } 1012 1013 return e.complexity.MapStringInterfaceType.B(childComplexity), true 1014 1015 case "ModelMethods.noContext": 1016 if e.complexity.ModelMethods.NoContext == nil { 1017 break 1018 } 1019 1020 return e.complexity.ModelMethods.NoContext(childComplexity), true 1021 1022 case "ModelMethods.resolverField": 1023 if e.complexity.ModelMethods.ResolverField == nil { 1024 break 1025 } 1026 1027 return e.complexity.ModelMethods.ResolverField(childComplexity), true 1028 1029 case "ModelMethods.withContext": 1030 if e.complexity.ModelMethods.WithContext == nil { 1031 break 1032 } 1033 1034 return e.complexity.ModelMethods.WithContext(childComplexity), true 1035 1036 case "Mutation.defaultInput": 1037 if e.complexity.Mutation.DefaultInput == nil { 1038 break 1039 } 1040 1041 args, err := ec.field_Mutation_defaultInput_args(context.TODO(), rawArgs) 1042 if err != nil { 1043 return 0, false 1044 } 1045 1046 return e.complexity.Mutation.DefaultInput(childComplexity, args["input"].(DefaultInput)), true 1047 1048 case "Mutation.overrideValueViaInput": 1049 if e.complexity.Mutation.OverrideValueViaInput == nil { 1050 break 1051 } 1052 1053 args, err := ec.field_Mutation_overrideValueViaInput_args(context.TODO(), rawArgs) 1054 if err != nil { 1055 return 0, false 1056 } 1057 1058 return e.complexity.Mutation.OverrideValueViaInput(childComplexity, args["input"].(FieldsOrderInput)), true 1059 1060 case "Mutation.updatePtrToPtr": 1061 if e.complexity.Mutation.UpdatePtrToPtr == nil { 1062 break 1063 } 1064 1065 args, err := ec.field_Mutation_updatePtrToPtr_args(context.TODO(), rawArgs) 1066 if err != nil { 1067 return 0, false 1068 } 1069 1070 return e.complexity.Mutation.UpdatePtrToPtr(childComplexity, args["input"].(UpdatePtrToPtrOuter)), true 1071 1072 case "Mutation.updateSomething": 1073 if e.complexity.Mutation.UpdateSomething == nil { 1074 break 1075 } 1076 1077 args, err := ec.field_Mutation_updateSomething_args(context.TODO(), rawArgs) 1078 if err != nil { 1079 return 0, false 1080 } 1081 1082 return e.complexity.Mutation.UpdateSomething(childComplexity, args["input"].(SpecialInput)), true 1083 1084 case "ObjectDirectives.nullableText": 1085 if e.complexity.ObjectDirectives.NullableText == nil { 1086 break 1087 } 1088 1089 return e.complexity.ObjectDirectives.NullableText(childComplexity), true 1090 1091 case "ObjectDirectives.order": 1092 if e.complexity.ObjectDirectives.Order == nil { 1093 break 1094 } 1095 1096 return e.complexity.ObjectDirectives.Order(childComplexity), true 1097 1098 case "ObjectDirectives.text": 1099 if e.complexity.ObjectDirectives.Text == nil { 1100 break 1101 } 1102 1103 return e.complexity.ObjectDirectives.Text(childComplexity), true 1104 1105 case "ObjectDirectivesWithCustomGoModel.nullableText": 1106 if e.complexity.ObjectDirectivesWithCustomGoModel.NullableText == nil { 1107 break 1108 } 1109 1110 return e.complexity.ObjectDirectivesWithCustomGoModel.NullableText(childComplexity), true 1111 1112 case "OuterObject.inner": 1113 if e.complexity.OuterObject.Inner == nil { 1114 break 1115 } 1116 1117 return e.complexity.OuterObject.Inner(childComplexity), true 1118 1119 case "OverlappingFields.oneFoo", "OverlappingFields.twoFoo": 1120 if e.complexity.OverlappingFields.Foo == nil { 1121 break 1122 } 1123 1124 return e.complexity.OverlappingFields.Foo(childComplexity), true 1125 1126 case "OverlappingFields.newFoo", "OverlappingFields.new_foo": 1127 if e.complexity.OverlappingFields.NewFoo == nil { 1128 break 1129 } 1130 1131 return e.complexity.OverlappingFields.NewFoo(childComplexity), true 1132 1133 case "OverlappingFields.oldFoo": 1134 if e.complexity.OverlappingFields.OldFoo == nil { 1135 break 1136 } 1137 1138 return e.complexity.OverlappingFields.OldFoo(childComplexity), true 1139 1140 case "Panics.argUnmarshal": 1141 if e.complexity.Panics.ArgUnmarshal == nil { 1142 break 1143 } 1144 1145 args, err := ec.field_Panics_argUnmarshal_args(context.TODO(), rawArgs) 1146 if err != nil { 1147 return 0, false 1148 } 1149 1150 return e.complexity.Panics.ArgUnmarshal(childComplexity, args["u"].([]MarshalPanic)), true 1151 1152 case "Panics.fieldFuncMarshal": 1153 if e.complexity.Panics.FieldFuncMarshal == nil { 1154 break 1155 } 1156 1157 args, err := ec.field_Panics_fieldFuncMarshal_args(context.TODO(), rawArgs) 1158 if err != nil { 1159 return 0, false 1160 } 1161 1162 return e.complexity.Panics.FieldFuncMarshal(childComplexity, args["u"].([]MarshalPanic)), true 1163 1164 case "Panics.fieldScalarMarshal": 1165 if e.complexity.Panics.FieldScalarMarshal == nil { 1166 break 1167 } 1168 1169 return e.complexity.Panics.FieldScalarMarshal(childComplexity), true 1170 1171 case "Pet.friends": 1172 if e.complexity.Pet.Friends == nil { 1173 break 1174 } 1175 1176 args, err := ec.field_Pet_friends_args(context.TODO(), rawArgs) 1177 if err != nil { 1178 return 0, false 1179 } 1180 1181 return e.complexity.Pet.Friends(childComplexity, args["limit"].(*int)), true 1182 1183 case "Pet.id": 1184 if e.complexity.Pet.ID == nil { 1185 break 1186 } 1187 1188 return e.complexity.Pet.ID(childComplexity), true 1189 1190 case "Primitive.squared": 1191 if e.complexity.Primitive.Squared == nil { 1192 break 1193 } 1194 1195 return e.complexity.Primitive.Squared(childComplexity), true 1196 1197 case "Primitive.value": 1198 if e.complexity.Primitive.Value == nil { 1199 break 1200 } 1201 1202 return e.complexity.Primitive.Value(childComplexity), true 1203 1204 case "PrimitiveString.doubled": 1205 if e.complexity.PrimitiveString.Doubled == nil { 1206 break 1207 } 1208 1209 return e.complexity.PrimitiveString.Doubled(childComplexity), true 1210 1211 case "PrimitiveString.len": 1212 if e.complexity.PrimitiveString.Len == nil { 1213 break 1214 } 1215 1216 return e.complexity.PrimitiveString.Len(childComplexity), true 1217 1218 case "PrimitiveString.value": 1219 if e.complexity.PrimitiveString.Value == nil { 1220 break 1221 } 1222 1223 return e.complexity.PrimitiveString.Value(childComplexity), true 1224 1225 case "PtrToPtrInner.key": 1226 if e.complexity.PtrToPtrInner.Key == nil { 1227 break 1228 } 1229 1230 return e.complexity.PtrToPtrInner.Key(childComplexity), true 1231 1232 case "PtrToPtrInner.value": 1233 if e.complexity.PtrToPtrInner.Value == nil { 1234 break 1235 } 1236 1237 return e.complexity.PtrToPtrInner.Value(childComplexity), true 1238 1239 case "PtrToPtrOuter.inner": 1240 if e.complexity.PtrToPtrOuter.Inner == nil { 1241 break 1242 } 1243 1244 return e.complexity.PtrToPtrOuter.Inner(childComplexity), true 1245 1246 case "PtrToPtrOuter.name": 1247 if e.complexity.PtrToPtrOuter.Name == nil { 1248 break 1249 } 1250 1251 return e.complexity.PtrToPtrOuter.Name(childComplexity), true 1252 1253 case "PtrToPtrOuter.stupidInner": 1254 if e.complexity.PtrToPtrOuter.StupidInner == nil { 1255 break 1256 } 1257 1258 return e.complexity.PtrToPtrOuter.StupidInner(childComplexity), true 1259 1260 case "PtrToSliceContainer.ptrToSlice": 1261 if e.complexity.PtrToSliceContainer.PtrToSlice == nil { 1262 break 1263 } 1264 1265 return e.complexity.PtrToSliceContainer.PtrToSlice(childComplexity), true 1266 1267 case "Query.animal": 1268 if e.complexity.Query.Animal == nil { 1269 break 1270 } 1271 1272 return e.complexity.Query.Animal(childComplexity), true 1273 1274 case "Query.autobind": 1275 if e.complexity.Query.Autobind == nil { 1276 break 1277 } 1278 1279 return e.complexity.Query.Autobind(childComplexity), true 1280 1281 case "Query.collision": 1282 if e.complexity.Query.Collision == nil { 1283 break 1284 } 1285 1286 return e.complexity.Query.Collision(childComplexity), true 1287 1288 case "Query.defaultParameters": 1289 if e.complexity.Query.DefaultParameters == nil { 1290 break 1291 } 1292 1293 args, err := ec.field_Query_defaultParameters_args(context.TODO(), rawArgs) 1294 if err != nil { 1295 return 0, false 1296 } 1297 1298 return e.complexity.Query.DefaultParameters(childComplexity, args["falsyBoolean"].(*bool), args["truthyBoolean"].(*bool)), true 1299 1300 case "Query.defaultScalar": 1301 if e.complexity.Query.DefaultScalar == nil { 1302 break 1303 } 1304 1305 args, err := ec.field_Query_defaultScalar_args(context.TODO(), rawArgs) 1306 if err != nil { 1307 return 0, false 1308 } 1309 1310 return e.complexity.Query.DefaultScalar(childComplexity, args["arg"].(string)), true 1311 1312 case "Query.deprecatedField": 1313 if e.complexity.Query.DeprecatedField == nil { 1314 break 1315 } 1316 1317 return e.complexity.Query.DeprecatedField(childComplexity), true 1318 1319 case "Query.directiveArg": 1320 if e.complexity.Query.DirectiveArg == nil { 1321 break 1322 } 1323 1324 args, err := ec.field_Query_directiveArg_args(context.TODO(), rawArgs) 1325 if err != nil { 1326 return 0, false 1327 } 1328 1329 return e.complexity.Query.DirectiveArg(childComplexity, args["arg"].(string)), true 1330 1331 case "Query.directiveDouble": 1332 if e.complexity.Query.DirectiveDouble == nil { 1333 break 1334 } 1335 1336 return e.complexity.Query.DirectiveDouble(childComplexity), true 1337 1338 case "Query.directiveField": 1339 if e.complexity.Query.DirectiveField == nil { 1340 break 1341 } 1342 1343 return e.complexity.Query.DirectiveField(childComplexity), true 1344 1345 case "Query.directiveFieldDef": 1346 if e.complexity.Query.DirectiveFieldDef == nil { 1347 break 1348 } 1349 1350 args, err := ec.field_Query_directiveFieldDef_args(context.TODO(), rawArgs) 1351 if err != nil { 1352 return 0, false 1353 } 1354 1355 return e.complexity.Query.DirectiveFieldDef(childComplexity, args["ret"].(string)), true 1356 1357 case "Query.directiveInput": 1358 if e.complexity.Query.DirectiveInput == nil { 1359 break 1360 } 1361 1362 args, err := ec.field_Query_directiveInput_args(context.TODO(), rawArgs) 1363 if err != nil { 1364 return 0, false 1365 } 1366 1367 return e.complexity.Query.DirectiveInput(childComplexity, args["arg"].(InputDirectives)), true 1368 1369 case "Query.directiveInputNullable": 1370 if e.complexity.Query.DirectiveInputNullable == nil { 1371 break 1372 } 1373 1374 args, err := ec.field_Query_directiveInputNullable_args(context.TODO(), rawArgs) 1375 if err != nil { 1376 return 0, false 1377 } 1378 1379 return e.complexity.Query.DirectiveInputNullable(childComplexity, args["arg"].(*InputDirectives)), true 1380 1381 case "Query.directiveInputType": 1382 if e.complexity.Query.DirectiveInputType == nil { 1383 break 1384 } 1385 1386 args, err := ec.field_Query_directiveInputType_args(context.TODO(), rawArgs) 1387 if err != nil { 1388 return 0, false 1389 } 1390 1391 return e.complexity.Query.DirectiveInputType(childComplexity, args["arg"].(InnerInput)), true 1392 1393 case "Query.directiveNullableArg": 1394 if e.complexity.Query.DirectiveNullableArg == nil { 1395 break 1396 } 1397 1398 args, err := ec.field_Query_directiveNullableArg_args(context.TODO(), rawArgs) 1399 if err != nil { 1400 return 0, false 1401 } 1402 1403 return e.complexity.Query.DirectiveNullableArg(childComplexity, args["arg"].(*int), args["arg2"].(*int), args["arg3"].(*string)), true 1404 1405 case "Query.directiveObject": 1406 if e.complexity.Query.DirectiveObject == nil { 1407 break 1408 } 1409 1410 return e.complexity.Query.DirectiveObject(childComplexity), true 1411 1412 case "Query.directiveObjectWithCustomGoModel": 1413 if e.complexity.Query.DirectiveObjectWithCustomGoModel == nil { 1414 break 1415 } 1416 1417 return e.complexity.Query.DirectiveObjectWithCustomGoModel(childComplexity), true 1418 1419 case "Query.directiveUnimplemented": 1420 if e.complexity.Query.DirectiveUnimplemented == nil { 1421 break 1422 } 1423 1424 return e.complexity.Query.DirectiveUnimplemented(childComplexity), true 1425 1426 case "Query.dog": 1427 if e.complexity.Query.Dog == nil { 1428 break 1429 } 1430 1431 return e.complexity.Query.Dog(childComplexity), true 1432 1433 case "Query.embeddedCase1": 1434 if e.complexity.Query.EmbeddedCase1 == nil { 1435 break 1436 } 1437 1438 return e.complexity.Query.EmbeddedCase1(childComplexity), true 1439 1440 case "Query.embeddedCase2": 1441 if e.complexity.Query.EmbeddedCase2 == nil { 1442 break 1443 } 1444 1445 return e.complexity.Query.EmbeddedCase2(childComplexity), true 1446 1447 case "Query.embeddedCase3": 1448 if e.complexity.Query.EmbeddedCase3 == nil { 1449 break 1450 } 1451 1452 return e.complexity.Query.EmbeddedCase3(childComplexity), true 1453 1454 case "Query.enumInInput": 1455 if e.complexity.Query.EnumInInput == nil { 1456 break 1457 } 1458 1459 args, err := ec.field_Query_enumInInput_args(context.TODO(), rawArgs) 1460 if err != nil { 1461 return 0, false 1462 } 1463 1464 return e.complexity.Query.EnumInInput(childComplexity, args["input"].(*InputWithEnumValue)), true 1465 1466 case "Query.errorBubble": 1467 if e.complexity.Query.ErrorBubble == nil { 1468 break 1469 } 1470 1471 return e.complexity.Query.ErrorBubble(childComplexity), true 1472 1473 case "Query.errorBubbleList": 1474 if e.complexity.Query.ErrorBubbleList == nil { 1475 break 1476 } 1477 1478 return e.complexity.Query.ErrorBubbleList(childComplexity), true 1479 1480 case "Query.errorList": 1481 if e.complexity.Query.ErrorList == nil { 1482 break 1483 } 1484 1485 return e.complexity.Query.ErrorList(childComplexity), true 1486 1487 case "Query.errors": 1488 if e.complexity.Query.Errors == nil { 1489 break 1490 } 1491 1492 return e.complexity.Query.Errors(childComplexity), true 1493 1494 case "Query.fallback": 1495 if e.complexity.Query.Fallback == nil { 1496 break 1497 } 1498 1499 args, err := ec.field_Query_fallback_args(context.TODO(), rawArgs) 1500 if err != nil { 1501 return 0, false 1502 } 1503 1504 return e.complexity.Query.Fallback(childComplexity, args["arg"].(FallbackToStringEncoding)), true 1505 1506 case "Query.infinity": 1507 if e.complexity.Query.Infinity == nil { 1508 break 1509 } 1510 1511 return e.complexity.Query.Infinity(childComplexity), true 1512 1513 case "Query.inputNullableSlice": 1514 if e.complexity.Query.InputNullableSlice == nil { 1515 break 1516 } 1517 1518 args, err := ec.field_Query_inputNullableSlice_args(context.TODO(), rawArgs) 1519 if err != nil { 1520 return 0, false 1521 } 1522 1523 return e.complexity.Query.InputNullableSlice(childComplexity, args["arg"].([]string)), true 1524 1525 case "Query.inputSlice": 1526 if e.complexity.Query.InputSlice == nil { 1527 break 1528 } 1529 1530 args, err := ec.field_Query_inputSlice_args(context.TODO(), rawArgs) 1531 if err != nil { 1532 return 0, false 1533 } 1534 1535 return e.complexity.Query.InputSlice(childComplexity, args["arg"].([]string)), true 1536 1537 case "Query.invalidIdentifier": 1538 if e.complexity.Query.InvalidIdentifier == nil { 1539 break 1540 } 1541 1542 return e.complexity.Query.InvalidIdentifier(childComplexity), true 1543 1544 case "Query.issue896a": 1545 if e.complexity.Query.Issue896a == nil { 1546 break 1547 } 1548 1549 return e.complexity.Query.Issue896a(childComplexity), true 1550 1551 case "Query.mapInput": 1552 if e.complexity.Query.MapInput == nil { 1553 break 1554 } 1555 1556 args, err := ec.field_Query_mapInput_args(context.TODO(), rawArgs) 1557 if err != nil { 1558 return 0, false 1559 } 1560 1561 return e.complexity.Query.MapInput(childComplexity, args["input"].(map[string]interface{})), true 1562 1563 case "Query.mapNestedStringInterface": 1564 if e.complexity.Query.MapNestedStringInterface == nil { 1565 break 1566 } 1567 1568 args, err := ec.field_Query_mapNestedStringInterface_args(context.TODO(), rawArgs) 1569 if err != nil { 1570 return 0, false 1571 } 1572 1573 return e.complexity.Query.MapNestedStringInterface(childComplexity, args["in"].(*NestedMapInput)), true 1574 1575 case "Query.mapStringInterface": 1576 if e.complexity.Query.MapStringInterface == nil { 1577 break 1578 } 1579 1580 args, err := ec.field_Query_mapStringInterface_args(context.TODO(), rawArgs) 1581 if err != nil { 1582 return 0, false 1583 } 1584 1585 return e.complexity.Query.MapStringInterface(childComplexity, args["in"].(map[string]interface{})), true 1586 1587 case "Query.modelMethods": 1588 if e.complexity.Query.ModelMethods == nil { 1589 break 1590 } 1591 1592 return e.complexity.Query.ModelMethods(childComplexity), true 1593 1594 case "Query.nestedInputs": 1595 if e.complexity.Query.NestedInputs == nil { 1596 break 1597 } 1598 1599 args, err := ec.field_Query_nestedInputs_args(context.TODO(), rawArgs) 1600 if err != nil { 1601 return 0, false 1602 } 1603 1604 return e.complexity.Query.NestedInputs(childComplexity, args["input"].([][]*OuterInput)), true 1605 1606 case "Query.nestedOutputs": 1607 if e.complexity.Query.NestedOutputs == nil { 1608 break 1609 } 1610 1611 return e.complexity.Query.NestedOutputs(childComplexity), true 1612 1613 case "Query.noShape": 1614 if e.complexity.Query.NoShape == nil { 1615 break 1616 } 1617 1618 return e.complexity.Query.NoShape(childComplexity), true 1619 1620 case "Query.noShapeTypedNil": 1621 if e.complexity.Query.NoShapeTypedNil == nil { 1622 break 1623 } 1624 1625 return e.complexity.Query.NoShapeTypedNil(childComplexity), true 1626 1627 case "Query.node": 1628 if e.complexity.Query.Node == nil { 1629 break 1630 } 1631 1632 return e.complexity.Query.Node(childComplexity), true 1633 1634 case "Query.notAnInterface": 1635 if e.complexity.Query.NotAnInterface == nil { 1636 break 1637 } 1638 1639 return e.complexity.Query.NotAnInterface(childComplexity), true 1640 1641 case "Query.nullableArg": 1642 if e.complexity.Query.NullableArg == nil { 1643 break 1644 } 1645 1646 args, err := ec.field_Query_nullableArg_args(context.TODO(), rawArgs) 1647 if err != nil { 1648 return 0, false 1649 } 1650 1651 return e.complexity.Query.NullableArg(childComplexity, args["arg"].(*int)), true 1652 1653 case "Query.optionalUnion": 1654 if e.complexity.Query.OptionalUnion == nil { 1655 break 1656 } 1657 1658 return e.complexity.Query.OptionalUnion(childComplexity), true 1659 1660 case "Query.overlapping": 1661 if e.complexity.Query.Overlapping == nil { 1662 break 1663 } 1664 1665 return e.complexity.Query.Overlapping(childComplexity), true 1666 1667 case "Query.panics": 1668 if e.complexity.Query.Panics == nil { 1669 break 1670 } 1671 1672 return e.complexity.Query.Panics(childComplexity), true 1673 1674 case "Query.primitiveObject": 1675 if e.complexity.Query.PrimitiveObject == nil { 1676 break 1677 } 1678 1679 return e.complexity.Query.PrimitiveObject(childComplexity), true 1680 1681 case "Query.primitiveStringObject": 1682 if e.complexity.Query.PrimitiveStringObject == nil { 1683 break 1684 } 1685 1686 return e.complexity.Query.PrimitiveStringObject(childComplexity), true 1687 1688 case "Query.ptrToSliceContainer": 1689 if e.complexity.Query.PtrToSliceContainer == nil { 1690 break 1691 } 1692 1693 return e.complexity.Query.PtrToSliceContainer(childComplexity), true 1694 1695 case "Query.recursive": 1696 if e.complexity.Query.Recursive == nil { 1697 break 1698 } 1699 1700 args, err := ec.field_Query_recursive_args(context.TODO(), rawArgs) 1701 if err != nil { 1702 return 0, false 1703 } 1704 1705 return e.complexity.Query.Recursive(childComplexity, args["input"].(*RecursiveInputSlice)), true 1706 1707 case "Query.scalarSlice": 1708 if e.complexity.Query.ScalarSlice == nil { 1709 break 1710 } 1711 1712 return e.complexity.Query.ScalarSlice(childComplexity), true 1713 1714 case "Query.shapeUnion": 1715 if e.complexity.Query.ShapeUnion == nil { 1716 break 1717 } 1718 1719 return e.complexity.Query.ShapeUnion(childComplexity), true 1720 1721 case "Query.shapes": 1722 if e.complexity.Query.Shapes == nil { 1723 break 1724 } 1725 1726 return e.complexity.Query.Shapes(childComplexity), true 1727 1728 case "Query.slices": 1729 if e.complexity.Query.Slices == nil { 1730 break 1731 } 1732 1733 return e.complexity.Query.Slices(childComplexity), true 1734 1735 case "Query.stringFromContextFunction": 1736 if e.complexity.Query.StringFromContextFunction == nil { 1737 break 1738 } 1739 1740 return e.complexity.Query.StringFromContextFunction(childComplexity), true 1741 1742 case "Query.stringFromContextInterface": 1743 if e.complexity.Query.StringFromContextInterface == nil { 1744 break 1745 } 1746 1747 return e.complexity.Query.StringFromContextInterface(childComplexity), true 1748 1749 case "Query.user": 1750 if e.complexity.Query.User == nil { 1751 break 1752 } 1753 1754 args, err := ec.field_Query_user_args(context.TODO(), rawArgs) 1755 if err != nil { 1756 return 0, false 1757 } 1758 1759 return e.complexity.Query.User(childComplexity, args["id"].(int)), true 1760 1761 case "Query.vOkCaseNil": 1762 if e.complexity.Query.VOkCaseNil == nil { 1763 break 1764 } 1765 1766 return e.complexity.Query.VOkCaseNil(childComplexity), true 1767 1768 case "Query.vOkCaseValue": 1769 if e.complexity.Query.VOkCaseValue == nil { 1770 break 1771 } 1772 1773 return e.complexity.Query.VOkCaseValue(childComplexity), true 1774 1775 case "Query.valid": 1776 if e.complexity.Query.Valid == nil { 1777 break 1778 } 1779 1780 return e.complexity.Query.Valid(childComplexity), true 1781 1782 case "Query.validType": 1783 if e.complexity.Query.ValidType == nil { 1784 break 1785 } 1786 1787 return e.complexity.Query.ValidType(childComplexity), true 1788 1789 case "Query.variadicModel": 1790 if e.complexity.Query.VariadicModel == nil { 1791 break 1792 } 1793 1794 return e.complexity.Query.VariadicModel(childComplexity), true 1795 1796 case "Query.wrappedMap": 1797 if e.complexity.Query.WrappedMap == nil { 1798 break 1799 } 1800 1801 return e.complexity.Query.WrappedMap(childComplexity), true 1802 1803 case "Query.wrappedScalar": 1804 if e.complexity.Query.WrappedScalar == nil { 1805 break 1806 } 1807 1808 return e.complexity.Query.WrappedScalar(childComplexity), true 1809 1810 case "Query.wrappedSlice": 1811 if e.complexity.Query.WrappedSlice == nil { 1812 break 1813 } 1814 1815 return e.complexity.Query.WrappedSlice(childComplexity), true 1816 1817 case "Query.wrappedStruct": 1818 if e.complexity.Query.WrappedStruct == nil { 1819 break 1820 } 1821 1822 return e.complexity.Query.WrappedStruct(childComplexity), true 1823 1824 case "Rectangle.area": 1825 if e.complexity.Rectangle.Area == nil { 1826 break 1827 } 1828 1829 return e.complexity.Rectangle.Area(childComplexity), true 1830 1831 case "Rectangle.coordinates": 1832 if e.complexity.Rectangle.Coordinates == nil { 1833 break 1834 } 1835 1836 return e.complexity.Rectangle.Coordinates(childComplexity), true 1837 1838 case "Rectangle.length": 1839 if e.complexity.Rectangle.Length == nil { 1840 break 1841 } 1842 1843 return e.complexity.Rectangle.Length(childComplexity), true 1844 1845 case "Rectangle.width": 1846 if e.complexity.Rectangle.Width == nil { 1847 break 1848 } 1849 1850 return e.complexity.Rectangle.Width(childComplexity), true 1851 1852 case "Size.height": 1853 if e.complexity.Size.Height == nil { 1854 break 1855 } 1856 1857 return e.complexity.Size.Height(childComplexity), true 1858 1859 case "Size.weight": 1860 if e.complexity.Size.Weight == nil { 1861 break 1862 } 1863 1864 return e.complexity.Size.Weight(childComplexity), true 1865 1866 case "Slices.test1": 1867 if e.complexity.Slices.Test1 == nil { 1868 break 1869 } 1870 1871 return e.complexity.Slices.Test1(childComplexity), true 1872 1873 case "Slices.test2": 1874 if e.complexity.Slices.Test2 == nil { 1875 break 1876 } 1877 1878 return e.complexity.Slices.Test2(childComplexity), true 1879 1880 case "Slices.test3": 1881 if e.complexity.Slices.Test3 == nil { 1882 break 1883 } 1884 1885 return e.complexity.Slices.Test3(childComplexity), true 1886 1887 case "Slices.test4": 1888 if e.complexity.Slices.Test4 == nil { 1889 break 1890 } 1891 1892 return e.complexity.Slices.Test4(childComplexity), true 1893 1894 case "Subscription.directiveArg": 1895 if e.complexity.Subscription.DirectiveArg == nil { 1896 break 1897 } 1898 1899 args, err := ec.field_Subscription_directiveArg_args(context.TODO(), rawArgs) 1900 if err != nil { 1901 return 0, false 1902 } 1903 1904 return e.complexity.Subscription.DirectiveArg(childComplexity, args["arg"].(string)), true 1905 1906 case "Subscription.directiveDouble": 1907 if e.complexity.Subscription.DirectiveDouble == nil { 1908 break 1909 } 1910 1911 return e.complexity.Subscription.DirectiveDouble(childComplexity), true 1912 1913 case "Subscription.directiveNullableArg": 1914 if e.complexity.Subscription.DirectiveNullableArg == nil { 1915 break 1916 } 1917 1918 args, err := ec.field_Subscription_directiveNullableArg_args(context.TODO(), rawArgs) 1919 if err != nil { 1920 return 0, false 1921 } 1922 1923 return e.complexity.Subscription.DirectiveNullableArg(childComplexity, args["arg"].(*int), args["arg2"].(*int), args["arg3"].(*string)), true 1924 1925 case "Subscription.directiveUnimplemented": 1926 if e.complexity.Subscription.DirectiveUnimplemented == nil { 1927 break 1928 } 1929 1930 return e.complexity.Subscription.DirectiveUnimplemented(childComplexity), true 1931 1932 case "Subscription.errorRequired": 1933 if e.complexity.Subscription.ErrorRequired == nil { 1934 break 1935 } 1936 1937 return e.complexity.Subscription.ErrorRequired(childComplexity), true 1938 1939 case "Subscription.initPayload": 1940 if e.complexity.Subscription.InitPayload == nil { 1941 break 1942 } 1943 1944 return e.complexity.Subscription.InitPayload(childComplexity), true 1945 1946 case "Subscription.issue896b": 1947 if e.complexity.Subscription.Issue896b == nil { 1948 break 1949 } 1950 1951 return e.complexity.Subscription.Issue896b(childComplexity), true 1952 1953 case "Subscription.updated": 1954 if e.complexity.Subscription.Updated == nil { 1955 break 1956 } 1957 1958 return e.complexity.Subscription.Updated(childComplexity), true 1959 1960 case "User.created": 1961 if e.complexity.User.Created == nil { 1962 break 1963 } 1964 1965 return e.complexity.User.Created(childComplexity), true 1966 1967 case "User.friends": 1968 if e.complexity.User.Friends == nil { 1969 break 1970 } 1971 1972 return e.complexity.User.Friends(childComplexity), true 1973 1974 case "User.id": 1975 if e.complexity.User.ID == nil { 1976 break 1977 } 1978 1979 return e.complexity.User.ID(childComplexity), true 1980 1981 case "User.pets": 1982 if e.complexity.User.Pets == nil { 1983 break 1984 } 1985 1986 args, err := ec.field_User_pets_args(context.TODO(), rawArgs) 1987 if err != nil { 1988 return 0, false 1989 } 1990 1991 return e.complexity.User.Pets(childComplexity, args["limit"].(*int)), true 1992 1993 case "User.updated": 1994 if e.complexity.User.Updated == nil { 1995 break 1996 } 1997 1998 return e.complexity.User.Updated(childComplexity), true 1999 2000 case "VOkCaseNil.value": 2001 if e.complexity.VOkCaseNil.Value == nil { 2002 break 2003 } 2004 2005 return e.complexity.VOkCaseNil.Value(childComplexity), true 2006 2007 case "VOkCaseValue.value": 2008 if e.complexity.VOkCaseValue.Value == nil { 2009 break 2010 } 2011 2012 return e.complexity.VOkCaseValue.Value(childComplexity), true 2013 2014 case "ValidType.differentCase": 2015 if e.complexity.ValidType.DifferentCase == nil { 2016 break 2017 } 2018 2019 return e.complexity.ValidType.DifferentCase(childComplexity), true 2020 2021 case "ValidType.different_case": 2022 if e.complexity.ValidType.DifferentCaseOld == nil { 2023 break 2024 } 2025 2026 return e.complexity.ValidType.DifferentCaseOld(childComplexity), true 2027 2028 case "ValidType.validArgs": 2029 if e.complexity.ValidType.ValidArgs == nil { 2030 break 2031 } 2032 2033 args, err := ec.field_ValidType_validArgs_args(context.TODO(), rawArgs) 2034 if err != nil { 2035 return 0, false 2036 } 2037 2038 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 2039 2040 case "ValidType.validInputKeywords": 2041 if e.complexity.ValidType.ValidInputKeywords == nil { 2042 break 2043 } 2044 2045 args, err := ec.field_ValidType_validInputKeywords_args(context.TODO(), rawArgs) 2046 if err != nil { 2047 return 0, false 2048 } 2049 2050 return e.complexity.ValidType.ValidInputKeywords(childComplexity, args["input"].(*ValidInput)), true 2051 2052 case "VariadicModel.value": 2053 if e.complexity.VariadicModel.Value == nil { 2054 break 2055 } 2056 2057 args, err := ec.field_VariadicModel_value_args(context.TODO(), rawArgs) 2058 if err != nil { 2059 return 0, false 2060 } 2061 2062 return e.complexity.VariadicModel.Value(childComplexity, args["rank"].(int)), true 2063 2064 case "WrappedMap.get": 2065 if e.complexity.WrappedMap.Get == nil { 2066 break 2067 } 2068 2069 args, err := ec.field_WrappedMap_get_args(context.TODO(), rawArgs) 2070 if err != nil { 2071 return 0, false 2072 } 2073 2074 return e.complexity.WrappedMap.Get(childComplexity, args["key"].(string)), true 2075 2076 case "WrappedSlice.get": 2077 if e.complexity.WrappedSlice.Get == nil { 2078 break 2079 } 2080 2081 args, err := ec.field_WrappedSlice_get_args(context.TODO(), rawArgs) 2082 if err != nil { 2083 return 0, false 2084 } 2085 2086 return e.complexity.WrappedSlice.Get(childComplexity, args["idx"].(int)), true 2087 2088 case "WrappedStruct.desc": 2089 if e.complexity.WrappedStruct.Desc == nil { 2090 break 2091 } 2092 2093 return e.complexity.WrappedStruct.Desc(childComplexity), true 2094 2095 case "WrappedStruct.name": 2096 if e.complexity.WrappedStruct.Name == nil { 2097 break 2098 } 2099 2100 return e.complexity.WrappedStruct.Name(childComplexity), true 2101 2102 case "XXIt.id": 2103 if e.complexity.XXIt.ID == nil { 2104 break 2105 } 2106 2107 return e.complexity.XXIt.ID(childComplexity), true 2108 2109 case "XxIt.id": 2110 if e.complexity.XxIt.ID == nil { 2111 break 2112 } 2113 2114 return e.complexity.XxIt.ID(childComplexity), true 2115 2116 case "asdfIt.id": 2117 if e.complexity.AsdfIt.ID == nil { 2118 break 2119 } 2120 2121 return e.complexity.AsdfIt.ID(childComplexity), true 2122 2123 case "iIt.id": 2124 if e.complexity.IIt.ID == nil { 2125 break 2126 } 2127 2128 return e.complexity.IIt.ID(childComplexity), true 2129 2130 } 2131 return 0, false 2132 } 2133 2134 func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { 2135 rc := graphql.GetOperationContext(ctx) 2136 ec := executionContext{rc, e} 2137 inputUnmarshalMap := graphql.BuildUnmarshalerMap( 2138 ec.unmarshalInputDefaultInput, 2139 ec.unmarshalInputFieldsOrderInput, 2140 ec.unmarshalInputInnerDirectives, 2141 ec.unmarshalInputInnerInput, 2142 ec.unmarshalInputInputDirectives, 2143 ec.unmarshalInputInputWithEnumValue, 2144 ec.unmarshalInputNestedInput, 2145 ec.unmarshalInputNestedMapInput, 2146 ec.unmarshalInputOuterInput, 2147 ec.unmarshalInputRecursiveInputSlice, 2148 ec.unmarshalInputSpecialInput, 2149 ec.unmarshalInputUpdatePtrToPtrInner, 2150 ec.unmarshalInputUpdatePtrToPtrOuter, 2151 ec.unmarshalInputValidInput, 2152 ) 2153 first := true 2154 2155 switch rc.Operation.Operation { 2156 case ast.Query: 2157 return func(ctx context.Context) *graphql.Response { 2158 if !first { 2159 return nil 2160 } 2161 first = false 2162 ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) 2163 data := ec._Query(ctx, rc.Operation.SelectionSet) 2164 var buf bytes.Buffer 2165 data.MarshalGQL(&buf) 2166 2167 return &graphql.Response{ 2168 Data: buf.Bytes(), 2169 } 2170 } 2171 case ast.Mutation: 2172 return func(ctx context.Context) *graphql.Response { 2173 if !first { 2174 return nil 2175 } 2176 first = false 2177 ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) 2178 data := ec._Mutation(ctx, rc.Operation.SelectionSet) 2179 var buf bytes.Buffer 2180 data.MarshalGQL(&buf) 2181 2182 return &graphql.Response{ 2183 Data: buf.Bytes(), 2184 } 2185 } 2186 case ast.Subscription: 2187 next := ec._Subscription(ctx, rc.Operation.SelectionSet) 2188 2189 var buf bytes.Buffer 2190 return func(ctx context.Context) *graphql.Response { 2191 buf.Reset() 2192 data := next(ctx) 2193 2194 if data == nil { 2195 return nil 2196 } 2197 data.MarshalGQL(&buf) 2198 2199 return &graphql.Response{ 2200 Data: buf.Bytes(), 2201 } 2202 } 2203 2204 default: 2205 return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation")) 2206 } 2207 } 2208 2209 type executionContext struct { 2210 *graphql.OperationContext 2211 *executableSchema 2212 } 2213 2214 func (ec *executionContext) introspectSchema() (*introspection.Schema, error) { 2215 if ec.DisableIntrospection { 2216 return nil, errors.New("introspection disabled") 2217 } 2218 return introspection.WrapSchema(parsedSchema), nil 2219 } 2220 2221 func (ec *executionContext) introspectType(name string) (*introspection.Type, error) { 2222 if ec.DisableIntrospection { 2223 return nil, errors.New("introspection disabled") 2224 } 2225 return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil 2226 } 2227 2228 //go:embed "builtinscalar.graphql" "complexity.graphql" "defaults.graphql" "directive.graphql" "embedded.graphql" "enum.graphql" "fields_order.graphql" "interfaces.graphql" "issue896.graphql" "loops.graphql" "maps.graphql" "mutation_with_custom_scalar.graphql" "nulls.graphql" "panics.graphql" "primitive_objects.graphql" "ptr_to_ptr_input.graphql" "ptr_to_slice.graphql" "scalar_context.graphql" "scalar_default.graphql" "schema.graphql" "slices.graphql" "typefallback.graphql" "useptr.graphql" "v-ok.graphql" "validtypes.graphql" "variadic.graphql" "weird_type_cases.graphql" "wrapped_type.graphql" 2229 var sourcesFS embed.FS 2230 2231 func sourceData(filename string) string { 2232 data, err := sourcesFS.ReadFile(filename) 2233 if err != nil { 2234 panic(fmt.Sprintf("codegen problem: %s not available", filename)) 2235 } 2236 return string(data) 2237 } 2238 2239 var sources = []*ast.Source{ 2240 {Name: "builtinscalar.graphql", Input: sourceData("builtinscalar.graphql"), BuiltIn: false}, 2241 {Name: "complexity.graphql", Input: sourceData("complexity.graphql"), BuiltIn: false}, 2242 {Name: "defaults.graphql", Input: sourceData("defaults.graphql"), BuiltIn: false}, 2243 {Name: "directive.graphql", Input: sourceData("directive.graphql"), BuiltIn: false}, 2244 {Name: "embedded.graphql", Input: sourceData("embedded.graphql"), BuiltIn: false}, 2245 {Name: "enum.graphql", Input: sourceData("enum.graphql"), BuiltIn: false}, 2246 {Name: "fields_order.graphql", Input: sourceData("fields_order.graphql"), BuiltIn: false}, 2247 {Name: "interfaces.graphql", Input: sourceData("interfaces.graphql"), BuiltIn: false}, 2248 {Name: "issue896.graphql", Input: sourceData("issue896.graphql"), BuiltIn: false}, 2249 {Name: "loops.graphql", Input: sourceData("loops.graphql"), BuiltIn: false}, 2250 {Name: "maps.graphql", Input: sourceData("maps.graphql"), BuiltIn: false}, 2251 {Name: "mutation_with_custom_scalar.graphql", Input: sourceData("mutation_with_custom_scalar.graphql"), BuiltIn: false}, 2252 {Name: "nulls.graphql", Input: sourceData("nulls.graphql"), BuiltIn: false}, 2253 {Name: "panics.graphql", Input: sourceData("panics.graphql"), BuiltIn: false}, 2254 {Name: "primitive_objects.graphql", Input: sourceData("primitive_objects.graphql"), BuiltIn: false}, 2255 {Name: "ptr_to_ptr_input.graphql", Input: sourceData("ptr_to_ptr_input.graphql"), BuiltIn: false}, 2256 {Name: "ptr_to_slice.graphql", Input: sourceData("ptr_to_slice.graphql"), BuiltIn: false}, 2257 {Name: "scalar_context.graphql", Input: sourceData("scalar_context.graphql"), BuiltIn: false}, 2258 {Name: "scalar_default.graphql", Input: sourceData("scalar_default.graphql"), BuiltIn: false}, 2259 {Name: "schema.graphql", Input: sourceData("schema.graphql"), BuiltIn: false}, 2260 {Name: "slices.graphql", Input: sourceData("slices.graphql"), BuiltIn: false}, 2261 {Name: "typefallback.graphql", Input: sourceData("typefallback.graphql"), BuiltIn: false}, 2262 {Name: "useptr.graphql", Input: sourceData("useptr.graphql"), BuiltIn: false}, 2263 {Name: "v-ok.graphql", Input: sourceData("v-ok.graphql"), BuiltIn: false}, 2264 {Name: "validtypes.graphql", Input: sourceData("validtypes.graphql"), BuiltIn: false}, 2265 {Name: "variadic.graphql", Input: sourceData("variadic.graphql"), BuiltIn: false}, 2266 {Name: "weird_type_cases.graphql", Input: sourceData("weird_type_cases.graphql"), BuiltIn: false}, 2267 {Name: "wrapped_type.graphql", Input: sourceData("wrapped_type.graphql"), BuiltIn: false}, 2268 } 2269 var parsedSchema = gqlparser.MustLoadSchema(sources...) 2270 2271 // endregion ************************** generated!.gotpl ************************** 2272 2273 // region ***************************** args.gotpl ***************************** 2274 2275 func (ec *executionContext) dir_length_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2276 var err error 2277 args := map[string]interface{}{} 2278 var arg0 int 2279 if tmp, ok := rawArgs["min"]; ok { 2280 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("min")) 2281 arg0, err = ec.unmarshalNInt2int(ctx, tmp) 2282 if err != nil { 2283 return nil, err 2284 } 2285 } 2286 args["min"] = arg0 2287 var arg1 *int 2288 if tmp, ok := rawArgs["max"]; ok { 2289 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("max")) 2290 arg1, err = ec.unmarshalOInt2ᚖint(ctx, tmp) 2291 if err != nil { 2292 return nil, err 2293 } 2294 } 2295 args["max"] = arg1 2296 var arg2 *string 2297 if tmp, ok := rawArgs["message"]; ok { 2298 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("message")) 2299 arg2, err = ec.unmarshalOString2ᚖstring(ctx, tmp) 2300 if err != nil { 2301 return nil, err 2302 } 2303 } 2304 args["message"] = arg2 2305 return args, nil 2306 } 2307 2308 func (ec *executionContext) dir_logged_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2309 var err error 2310 args := map[string]interface{}{} 2311 var arg0 string 2312 if tmp, ok := rawArgs["id"]; ok { 2313 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) 2314 arg0, err = ec.unmarshalNUUID2string(ctx, tmp) 2315 if err != nil { 2316 return nil, err 2317 } 2318 } 2319 args["id"] = arg0 2320 return args, nil 2321 } 2322 2323 func (ec *executionContext) dir_order1_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2324 var err error 2325 args := map[string]interface{}{} 2326 var arg0 string 2327 if tmp, ok := rawArgs["location"]; ok { 2328 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("location")) 2329 arg0, err = ec.unmarshalNString2string(ctx, tmp) 2330 if err != nil { 2331 return nil, err 2332 } 2333 } 2334 args["location"] = arg0 2335 return args, nil 2336 } 2337 2338 func (ec *executionContext) dir_order2_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2339 var err error 2340 args := map[string]interface{}{} 2341 var arg0 string 2342 if tmp, ok := rawArgs["location"]; ok { 2343 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("location")) 2344 arg0, err = ec.unmarshalNString2string(ctx, tmp) 2345 if err != nil { 2346 return nil, err 2347 } 2348 } 2349 args["location"] = arg0 2350 return args, nil 2351 } 2352 2353 func (ec *executionContext) dir_range_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2354 var err error 2355 args := map[string]interface{}{} 2356 var arg0 *int 2357 if tmp, ok := rawArgs["min"]; ok { 2358 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("min")) 2359 arg0, err = ec.unmarshalOInt2ᚖint(ctx, tmp) 2360 if err != nil { 2361 return nil, err 2362 } 2363 } 2364 args["min"] = arg0 2365 var arg1 *int 2366 if tmp, ok := rawArgs["max"]; ok { 2367 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("max")) 2368 arg1, err = ec.unmarshalOInt2ᚖint(ctx, tmp) 2369 if err != nil { 2370 return nil, err 2371 } 2372 } 2373 args["max"] = arg1 2374 return args, nil 2375 } 2376 2377 func (ec *executionContext) field_Mutation_defaultInput_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2378 var err error 2379 args := map[string]interface{}{} 2380 var arg0 DefaultInput 2381 if tmp, ok := rawArgs["input"]; ok { 2382 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 2383 arg0, err = ec.unmarshalNDefaultInput2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐDefaultInput(ctx, tmp) 2384 if err != nil { 2385 return nil, err 2386 } 2387 } 2388 args["input"] = arg0 2389 return args, nil 2390 } 2391 2392 func (ec *executionContext) field_Mutation_overrideValueViaInput_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2393 var err error 2394 args := map[string]interface{}{} 2395 var arg0 FieldsOrderInput 2396 if tmp, ok := rawArgs["input"]; ok { 2397 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 2398 arg0, err = ec.unmarshalNFieldsOrderInput2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐFieldsOrderInput(ctx, tmp) 2399 if err != nil { 2400 return nil, err 2401 } 2402 } 2403 args["input"] = arg0 2404 return args, nil 2405 } 2406 2407 func (ec *executionContext) field_Mutation_updatePtrToPtr_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2408 var err error 2409 args := map[string]interface{}{} 2410 var arg0 UpdatePtrToPtrOuter 2411 if tmp, ok := rawArgs["input"]; ok { 2412 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 2413 arg0, err = ec.unmarshalNUpdatePtrToPtrOuter2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrOuter(ctx, tmp) 2414 if err != nil { 2415 return nil, err 2416 } 2417 } 2418 args["input"] = arg0 2419 return args, nil 2420 } 2421 2422 func (ec *executionContext) field_Mutation_updateSomething_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2423 var err error 2424 args := map[string]interface{}{} 2425 var arg0 SpecialInput 2426 if tmp, ok := rawArgs["input"]; ok { 2427 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 2428 arg0, err = ec.unmarshalNSpecialInput2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐSpecialInput(ctx, tmp) 2429 if err != nil { 2430 return nil, err 2431 } 2432 } 2433 args["input"] = arg0 2434 return args, nil 2435 } 2436 2437 func (ec *executionContext) field_Panics_argUnmarshal_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2438 var err error 2439 args := map[string]interface{}{} 2440 var arg0 []MarshalPanic 2441 if tmp, ok := rawArgs["u"]; ok { 2442 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("u")) 2443 arg0, err = ec.unmarshalNMarshalPanic2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanicᚄ(ctx, tmp) 2444 if err != nil { 2445 return nil, err 2446 } 2447 } 2448 args["u"] = arg0 2449 return args, nil 2450 } 2451 2452 func (ec *executionContext) field_Panics_fieldFuncMarshal_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2453 var err error 2454 args := map[string]interface{}{} 2455 var arg0 []MarshalPanic 2456 if tmp, ok := rawArgs["u"]; ok { 2457 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("u")) 2458 arg0, err = ec.unmarshalNMarshalPanic2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanicᚄ(ctx, tmp) 2459 if err != nil { 2460 return nil, err 2461 } 2462 } 2463 args["u"] = arg0 2464 return args, nil 2465 } 2466 2467 func (ec *executionContext) field_Pet_friends_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2468 var err error 2469 args := map[string]interface{}{} 2470 var arg0 *int 2471 if tmp, ok := rawArgs["limit"]; ok { 2472 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("limit")) 2473 arg0, err = ec.unmarshalOInt2ᚖint(ctx, tmp) 2474 if err != nil { 2475 return nil, err 2476 } 2477 } 2478 args["limit"] = arg0 2479 return args, nil 2480 } 2481 2482 func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2483 var err error 2484 args := map[string]interface{}{} 2485 var arg0 string 2486 if tmp, ok := rawArgs["name"]; ok { 2487 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) 2488 arg0, err = ec.unmarshalNString2string(ctx, tmp) 2489 if err != nil { 2490 return nil, err 2491 } 2492 } 2493 args["name"] = arg0 2494 return args, nil 2495 } 2496 2497 func (ec *executionContext) field_Query_defaultParameters_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2498 var err error 2499 args := map[string]interface{}{} 2500 var arg0 *bool 2501 if tmp, ok := rawArgs["falsyBoolean"]; ok { 2502 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("falsyBoolean")) 2503 arg0, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp) 2504 if err != nil { 2505 return nil, err 2506 } 2507 } 2508 args["falsyBoolean"] = arg0 2509 var arg1 *bool 2510 if tmp, ok := rawArgs["truthyBoolean"]; ok { 2511 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("truthyBoolean")) 2512 arg1, err = ec.unmarshalOBoolean2ᚖbool(ctx, tmp) 2513 if err != nil { 2514 return nil, err 2515 } 2516 } 2517 args["truthyBoolean"] = arg1 2518 return args, nil 2519 } 2520 2521 func (ec *executionContext) field_Query_defaultScalar_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2522 var err error 2523 args := map[string]interface{}{} 2524 var arg0 string 2525 if tmp, ok := rawArgs["arg"]; ok { 2526 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 2527 arg0, err = ec.unmarshalNDefaultScalarImplementation2string(ctx, tmp) 2528 if err != nil { 2529 return nil, err 2530 } 2531 } 2532 args["arg"] = arg0 2533 return args, nil 2534 } 2535 2536 func (ec *executionContext) field_Query_directiveArg_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2537 var err error 2538 args := map[string]interface{}{} 2539 var arg0 string 2540 if tmp, ok := rawArgs["arg"]; ok { 2541 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 2542 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalNString2string(ctx, tmp) } 2543 directive1 := func(ctx context.Context) (interface{}, error) { 2544 min, err := ec.unmarshalNInt2int(ctx, 1) 2545 if err != nil { 2546 return nil, err 2547 } 2548 max, err := ec.unmarshalOInt2ᚖint(ctx, 255) 2549 if err != nil { 2550 return nil, err 2551 } 2552 message, err := ec.unmarshalOString2ᚖstring(ctx, "invalid length") 2553 if err != nil { 2554 return nil, err 2555 } 2556 if ec.directives.Length == nil { 2557 return nil, errors.New("directive length is not implemented") 2558 } 2559 return ec.directives.Length(ctx, rawArgs, directive0, min, max, message) 2560 } 2561 2562 tmp, err = directive1(ctx) 2563 if err != nil { 2564 return nil, graphql.ErrorOnPath(ctx, err) 2565 } 2566 if data, ok := tmp.(string); ok { 2567 arg0 = data 2568 } else { 2569 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)) 2570 } 2571 } 2572 args["arg"] = arg0 2573 return args, nil 2574 } 2575 2576 func (ec *executionContext) field_Query_directiveFieldDef_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2577 var err error 2578 args := map[string]interface{}{} 2579 var arg0 string 2580 if tmp, ok := rawArgs["ret"]; ok { 2581 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ret")) 2582 arg0, err = ec.unmarshalNString2string(ctx, tmp) 2583 if err != nil { 2584 return nil, err 2585 } 2586 } 2587 args["ret"] = arg0 2588 return args, nil 2589 } 2590 2591 func (ec *executionContext) field_Query_directiveInputNullable_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2592 var err error 2593 args := map[string]interface{}{} 2594 var arg0 *InputDirectives 2595 if tmp, ok := rawArgs["arg"]; ok { 2596 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 2597 arg0, err = ec.unmarshalOInputDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInputDirectives(ctx, tmp) 2598 if err != nil { 2599 return nil, err 2600 } 2601 } 2602 args["arg"] = arg0 2603 return args, nil 2604 } 2605 2606 func (ec *executionContext) field_Query_directiveInputType_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2607 var err error 2608 args := map[string]interface{}{} 2609 var arg0 InnerInput 2610 if tmp, ok := rawArgs["arg"]; ok { 2611 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 2612 directive0 := func(ctx context.Context) (interface{}, error) { 2613 return ec.unmarshalNInnerInput2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInnerInput(ctx, tmp) 2614 } 2615 directive1 := func(ctx context.Context) (interface{}, error) { 2616 if ec.directives.Custom == nil { 2617 return nil, errors.New("directive custom is not implemented") 2618 } 2619 return ec.directives.Custom(ctx, rawArgs, directive0) 2620 } 2621 2622 tmp, err = directive1(ctx) 2623 if err != nil { 2624 return nil, graphql.ErrorOnPath(ctx, err) 2625 } 2626 if data, ok := tmp.(InnerInput); ok { 2627 arg0 = data 2628 } else { 2629 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be github.com/spread-ai/gqlgen/codegen/testserver/singlefile.InnerInput`, tmp)) 2630 } 2631 } 2632 args["arg"] = arg0 2633 return args, nil 2634 } 2635 2636 func (ec *executionContext) field_Query_directiveInput_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2637 var err error 2638 args := map[string]interface{}{} 2639 var arg0 InputDirectives 2640 if tmp, ok := rawArgs["arg"]; ok { 2641 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 2642 arg0, err = ec.unmarshalNInputDirectives2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInputDirectives(ctx, tmp) 2643 if err != nil { 2644 return nil, err 2645 } 2646 } 2647 args["arg"] = arg0 2648 return args, nil 2649 } 2650 2651 func (ec *executionContext) field_Query_directiveNullableArg_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2652 var err error 2653 args := map[string]interface{}{} 2654 var arg0 *int 2655 if tmp, ok := rawArgs["arg"]; ok { 2656 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 2657 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOInt2ᚖint(ctx, tmp) } 2658 directive1 := func(ctx context.Context) (interface{}, error) { 2659 min, err := ec.unmarshalOInt2ᚖint(ctx, 0) 2660 if err != nil { 2661 return nil, err 2662 } 2663 if ec.directives.Range == nil { 2664 return nil, errors.New("directive range is not implemented") 2665 } 2666 return ec.directives.Range(ctx, rawArgs, directive0, min, nil) 2667 } 2668 2669 tmp, err = directive1(ctx) 2670 if err != nil { 2671 return nil, graphql.ErrorOnPath(ctx, err) 2672 } 2673 if data, ok := tmp.(*int); ok { 2674 arg0 = data 2675 } else if tmp == nil { 2676 arg0 = nil 2677 } else { 2678 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *int`, tmp)) 2679 } 2680 } 2681 args["arg"] = arg0 2682 var arg1 *int 2683 if tmp, ok := rawArgs["arg2"]; ok { 2684 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg2")) 2685 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOInt2ᚖint(ctx, tmp) } 2686 directive1 := func(ctx context.Context) (interface{}, error) { 2687 min, err := ec.unmarshalOInt2ᚖint(ctx, 0) 2688 if err != nil { 2689 return nil, err 2690 } 2691 if ec.directives.Range == nil { 2692 return nil, errors.New("directive range is not implemented") 2693 } 2694 return ec.directives.Range(ctx, rawArgs, directive0, min, nil) 2695 } 2696 2697 tmp, err = directive1(ctx) 2698 if err != nil { 2699 return nil, graphql.ErrorOnPath(ctx, err) 2700 } 2701 if data, ok := tmp.(*int); ok { 2702 arg1 = data 2703 } else if tmp == nil { 2704 arg1 = nil 2705 } else { 2706 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *int`, tmp)) 2707 } 2708 } 2709 args["arg2"] = arg1 2710 var arg2 *string 2711 if tmp, ok := rawArgs["arg3"]; ok { 2712 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg3")) 2713 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOString2ᚖstring(ctx, tmp) } 2714 directive1 := func(ctx context.Context) (interface{}, error) { 2715 if ec.directives.ToNull == nil { 2716 return nil, errors.New("directive toNull is not implemented") 2717 } 2718 return ec.directives.ToNull(ctx, rawArgs, directive0) 2719 } 2720 2721 tmp, err = directive1(ctx) 2722 if err != nil { 2723 return nil, graphql.ErrorOnPath(ctx, err) 2724 } 2725 if data, ok := tmp.(*string); ok { 2726 arg2 = data 2727 } else if tmp == nil { 2728 arg2 = nil 2729 } else { 2730 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp)) 2731 } 2732 } 2733 args["arg3"] = arg2 2734 return args, nil 2735 } 2736 2737 func (ec *executionContext) field_Query_enumInInput_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2738 var err error 2739 args := map[string]interface{}{} 2740 var arg0 *InputWithEnumValue 2741 if tmp, ok := rawArgs["input"]; ok { 2742 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 2743 arg0, err = ec.unmarshalOInputWithEnumValue2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInputWithEnumValue(ctx, tmp) 2744 if err != nil { 2745 return nil, err 2746 } 2747 } 2748 args["input"] = arg0 2749 return args, nil 2750 } 2751 2752 func (ec *executionContext) field_Query_fallback_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2753 var err error 2754 args := map[string]interface{}{} 2755 var arg0 FallbackToStringEncoding 2756 if tmp, ok := rawArgs["arg"]; ok { 2757 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 2758 arg0, err = ec.unmarshalNFallbackToStringEncoding2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐFallbackToStringEncoding(ctx, tmp) 2759 if err != nil { 2760 return nil, err 2761 } 2762 } 2763 args["arg"] = arg0 2764 return args, nil 2765 } 2766 2767 func (ec *executionContext) field_Query_inputNullableSlice_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2768 var err error 2769 args := map[string]interface{}{} 2770 var arg0 []string 2771 if tmp, ok := rawArgs["arg"]; ok { 2772 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 2773 arg0, err = ec.unmarshalOString2ᚕstringᚄ(ctx, tmp) 2774 if err != nil { 2775 return nil, err 2776 } 2777 } 2778 args["arg"] = arg0 2779 return args, nil 2780 } 2781 2782 func (ec *executionContext) field_Query_inputSlice_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2783 var err error 2784 args := map[string]interface{}{} 2785 var arg0 []string 2786 if tmp, ok := rawArgs["arg"]; ok { 2787 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 2788 arg0, err = ec.unmarshalNString2ᚕstringᚄ(ctx, tmp) 2789 if err != nil { 2790 return nil, err 2791 } 2792 } 2793 args["arg"] = arg0 2794 return args, nil 2795 } 2796 2797 func (ec *executionContext) field_Query_mapInput_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2798 var err error 2799 args := map[string]interface{}{} 2800 var arg0 map[string]interface{} 2801 if tmp, ok := rawArgs["input"]; ok { 2802 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 2803 arg0, err = ec.unmarshalOChanges2map(ctx, tmp) 2804 if err != nil { 2805 return nil, err 2806 } 2807 } 2808 args["input"] = arg0 2809 return args, nil 2810 } 2811 2812 func (ec *executionContext) field_Query_mapNestedStringInterface_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2813 var err error 2814 args := map[string]interface{}{} 2815 var arg0 *NestedMapInput 2816 if tmp, ok := rawArgs["in"]; ok { 2817 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) 2818 arg0, err = ec.unmarshalONestedMapInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐNestedMapInput(ctx, tmp) 2819 if err != nil { 2820 return nil, err 2821 } 2822 } 2823 args["in"] = arg0 2824 return args, nil 2825 } 2826 2827 func (ec *executionContext) field_Query_mapStringInterface_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2828 var err error 2829 args := map[string]interface{}{} 2830 var arg0 map[string]interface{} 2831 if tmp, ok := rawArgs["in"]; ok { 2832 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) 2833 arg0, err = ec.unmarshalOMapStringInterfaceInput2map(ctx, tmp) 2834 if err != nil { 2835 return nil, err 2836 } 2837 } 2838 args["in"] = arg0 2839 return args, nil 2840 } 2841 2842 func (ec *executionContext) field_Query_nestedInputs_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2843 var err error 2844 args := map[string]interface{}{} 2845 var arg0 [][]*OuterInput 2846 if tmp, ok := rawArgs["input"]; ok { 2847 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 2848 arg0, err = ec.unmarshalOOuterInput2ᚕᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterInput(ctx, tmp) 2849 if err != nil { 2850 return nil, err 2851 } 2852 } 2853 args["input"] = arg0 2854 return args, nil 2855 } 2856 2857 func (ec *executionContext) field_Query_nullableArg_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2858 var err error 2859 args := map[string]interface{}{} 2860 var arg0 *int 2861 if tmp, ok := rawArgs["arg"]; ok { 2862 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 2863 arg0, err = ec.unmarshalOInt2ᚖint(ctx, tmp) 2864 if err != nil { 2865 return nil, err 2866 } 2867 } 2868 args["arg"] = arg0 2869 return args, nil 2870 } 2871 2872 func (ec *executionContext) field_Query_recursive_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2873 var err error 2874 args := map[string]interface{}{} 2875 var arg0 *RecursiveInputSlice 2876 if tmp, ok := rawArgs["input"]; ok { 2877 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 2878 arg0, err = ec.unmarshalORecursiveInputSlice2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐRecursiveInputSlice(ctx, tmp) 2879 if err != nil { 2880 return nil, err 2881 } 2882 } 2883 args["input"] = arg0 2884 return args, nil 2885 } 2886 2887 func (ec *executionContext) field_Query_user_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2888 var err error 2889 args := map[string]interface{}{} 2890 var arg0 int 2891 if tmp, ok := rawArgs["id"]; ok { 2892 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) 2893 arg0, err = ec.unmarshalNInt2int(ctx, tmp) 2894 if err != nil { 2895 return nil, err 2896 } 2897 } 2898 args["id"] = arg0 2899 return args, nil 2900 } 2901 2902 func (ec *executionContext) field_Subscription_directiveArg_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2903 var err error 2904 args := map[string]interface{}{} 2905 var arg0 string 2906 if tmp, ok := rawArgs["arg"]; ok { 2907 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 2908 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalNString2string(ctx, tmp) } 2909 directive1 := func(ctx context.Context) (interface{}, error) { 2910 min, err := ec.unmarshalNInt2int(ctx, 1) 2911 if err != nil { 2912 return nil, err 2913 } 2914 max, err := ec.unmarshalOInt2ᚖint(ctx, 255) 2915 if err != nil { 2916 return nil, err 2917 } 2918 message, err := ec.unmarshalOString2ᚖstring(ctx, "invalid length") 2919 if err != nil { 2920 return nil, err 2921 } 2922 if ec.directives.Length == nil { 2923 return nil, errors.New("directive length is not implemented") 2924 } 2925 return ec.directives.Length(ctx, rawArgs, directive0, min, max, message) 2926 } 2927 2928 tmp, err = directive1(ctx) 2929 if err != nil { 2930 return nil, graphql.ErrorOnPath(ctx, err) 2931 } 2932 if data, ok := tmp.(string); ok { 2933 arg0 = data 2934 } else { 2935 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp)) 2936 } 2937 } 2938 args["arg"] = arg0 2939 return args, nil 2940 } 2941 2942 func (ec *executionContext) field_Subscription_directiveNullableArg_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 2943 var err error 2944 args := map[string]interface{}{} 2945 var arg0 *int 2946 if tmp, ok := rawArgs["arg"]; ok { 2947 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg")) 2948 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOInt2ᚖint(ctx, tmp) } 2949 directive1 := func(ctx context.Context) (interface{}, error) { 2950 min, err := ec.unmarshalOInt2ᚖint(ctx, 0) 2951 if err != nil { 2952 return nil, err 2953 } 2954 if ec.directives.Range == nil { 2955 return nil, errors.New("directive range is not implemented") 2956 } 2957 return ec.directives.Range(ctx, rawArgs, directive0, min, nil) 2958 } 2959 2960 tmp, err = directive1(ctx) 2961 if err != nil { 2962 return nil, graphql.ErrorOnPath(ctx, err) 2963 } 2964 if data, ok := tmp.(*int); ok { 2965 arg0 = data 2966 } else if tmp == nil { 2967 arg0 = nil 2968 } else { 2969 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *int`, tmp)) 2970 } 2971 } 2972 args["arg"] = arg0 2973 var arg1 *int 2974 if tmp, ok := rawArgs["arg2"]; ok { 2975 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg2")) 2976 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOInt2ᚖint(ctx, tmp) } 2977 directive1 := func(ctx context.Context) (interface{}, error) { 2978 min, err := ec.unmarshalOInt2ᚖint(ctx, 0) 2979 if err != nil { 2980 return nil, err 2981 } 2982 if ec.directives.Range == nil { 2983 return nil, errors.New("directive range is not implemented") 2984 } 2985 return ec.directives.Range(ctx, rawArgs, directive0, min, nil) 2986 } 2987 2988 tmp, err = directive1(ctx) 2989 if err != nil { 2990 return nil, graphql.ErrorOnPath(ctx, err) 2991 } 2992 if data, ok := tmp.(*int); ok { 2993 arg1 = data 2994 } else if tmp == nil { 2995 arg1 = nil 2996 } else { 2997 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *int`, tmp)) 2998 } 2999 } 3000 args["arg2"] = arg1 3001 var arg2 *string 3002 if tmp, ok := rawArgs["arg3"]; ok { 3003 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("arg3")) 3004 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOString2ᚖstring(ctx, tmp) } 3005 directive1 := func(ctx context.Context) (interface{}, error) { 3006 if ec.directives.ToNull == nil { 3007 return nil, errors.New("directive toNull is not implemented") 3008 } 3009 return ec.directives.ToNull(ctx, rawArgs, directive0) 3010 } 3011 3012 tmp, err = directive1(ctx) 3013 if err != nil { 3014 return nil, graphql.ErrorOnPath(ctx, err) 3015 } 3016 if data, ok := tmp.(*string); ok { 3017 arg2 = data 3018 } else if tmp == nil { 3019 arg2 = nil 3020 } else { 3021 return nil, graphql.ErrorOnPath(ctx, fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp)) 3022 } 3023 } 3024 args["arg3"] = arg2 3025 return args, nil 3026 } 3027 3028 func (ec *executionContext) field_User_pets_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3029 var err error 3030 args := map[string]interface{}{} 3031 var arg0 *int 3032 if tmp, ok := rawArgs["limit"]; ok { 3033 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("limit")) 3034 arg0, err = ec.unmarshalOInt2ᚖint(ctx, tmp) 3035 if err != nil { 3036 return nil, err 3037 } 3038 } 3039 args["limit"] = arg0 3040 return args, nil 3041 } 3042 3043 func (ec *executionContext) field_ValidType_validArgs_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3044 var err error 3045 args := map[string]interface{}{} 3046 var arg0 string 3047 if tmp, ok := rawArgs["break"]; ok { 3048 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("break")) 3049 arg0, err = ec.unmarshalNString2string(ctx, tmp) 3050 if err != nil { 3051 return nil, err 3052 } 3053 } 3054 args["break"] = arg0 3055 var arg1 string 3056 if tmp, ok := rawArgs["default"]; ok { 3057 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("default")) 3058 arg1, err = ec.unmarshalNString2string(ctx, tmp) 3059 if err != nil { 3060 return nil, err 3061 } 3062 } 3063 args["default"] = arg1 3064 var arg2 string 3065 if tmp, ok := rawArgs["func"]; ok { 3066 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("func")) 3067 arg2, err = ec.unmarshalNString2string(ctx, tmp) 3068 if err != nil { 3069 return nil, err 3070 } 3071 } 3072 args["func"] = arg2 3073 var arg3 string 3074 if tmp, ok := rawArgs["interface"]; ok { 3075 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("interface")) 3076 arg3, err = ec.unmarshalNString2string(ctx, tmp) 3077 if err != nil { 3078 return nil, err 3079 } 3080 } 3081 args["interface"] = arg3 3082 var arg4 string 3083 if tmp, ok := rawArgs["select"]; ok { 3084 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("select")) 3085 arg4, err = ec.unmarshalNString2string(ctx, tmp) 3086 if err != nil { 3087 return nil, err 3088 } 3089 } 3090 args["select"] = arg4 3091 var arg5 string 3092 if tmp, ok := rawArgs["case"]; ok { 3093 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("case")) 3094 arg5, err = ec.unmarshalNString2string(ctx, tmp) 3095 if err != nil { 3096 return nil, err 3097 } 3098 } 3099 args["case"] = arg5 3100 var arg6 string 3101 if tmp, ok := rawArgs["defer"]; ok { 3102 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("defer")) 3103 arg6, err = ec.unmarshalNString2string(ctx, tmp) 3104 if err != nil { 3105 return nil, err 3106 } 3107 } 3108 args["defer"] = arg6 3109 var arg7 string 3110 if tmp, ok := rawArgs["go"]; ok { 3111 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("go")) 3112 arg7, err = ec.unmarshalNString2string(ctx, tmp) 3113 if err != nil { 3114 return nil, err 3115 } 3116 } 3117 args["go"] = arg7 3118 var arg8 string 3119 if tmp, ok := rawArgs["map"]; ok { 3120 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("map")) 3121 arg8, err = ec.unmarshalNString2string(ctx, tmp) 3122 if err != nil { 3123 return nil, err 3124 } 3125 } 3126 args["map"] = arg8 3127 var arg9 string 3128 if tmp, ok := rawArgs["struct"]; ok { 3129 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("struct")) 3130 arg9, err = ec.unmarshalNString2string(ctx, tmp) 3131 if err != nil { 3132 return nil, err 3133 } 3134 } 3135 args["struct"] = arg9 3136 var arg10 string 3137 if tmp, ok := rawArgs["chan"]; ok { 3138 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("chan")) 3139 arg10, err = ec.unmarshalNString2string(ctx, tmp) 3140 if err != nil { 3141 return nil, err 3142 } 3143 } 3144 args["chan"] = arg10 3145 var arg11 string 3146 if tmp, ok := rawArgs["else"]; ok { 3147 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("else")) 3148 arg11, err = ec.unmarshalNString2string(ctx, tmp) 3149 if err != nil { 3150 return nil, err 3151 } 3152 } 3153 args["else"] = arg11 3154 var arg12 string 3155 if tmp, ok := rawArgs["goto"]; ok { 3156 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("goto")) 3157 arg12, err = ec.unmarshalNString2string(ctx, tmp) 3158 if err != nil { 3159 return nil, err 3160 } 3161 } 3162 args["goto"] = arg12 3163 var arg13 string 3164 if tmp, ok := rawArgs["package"]; ok { 3165 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("package")) 3166 arg13, err = ec.unmarshalNString2string(ctx, tmp) 3167 if err != nil { 3168 return nil, err 3169 } 3170 } 3171 args["package"] = arg13 3172 var arg14 string 3173 if tmp, ok := rawArgs["switch"]; ok { 3174 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("switch")) 3175 arg14, err = ec.unmarshalNString2string(ctx, tmp) 3176 if err != nil { 3177 return nil, err 3178 } 3179 } 3180 args["switch"] = arg14 3181 var arg15 string 3182 if tmp, ok := rawArgs["const"]; ok { 3183 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("const")) 3184 arg15, err = ec.unmarshalNString2string(ctx, tmp) 3185 if err != nil { 3186 return nil, err 3187 } 3188 } 3189 args["const"] = arg15 3190 var arg16 string 3191 if tmp, ok := rawArgs["fallthrough"]; ok { 3192 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fallthrough")) 3193 arg16, err = ec.unmarshalNString2string(ctx, tmp) 3194 if err != nil { 3195 return nil, err 3196 } 3197 } 3198 args["fallthrough"] = arg16 3199 var arg17 string 3200 if tmp, ok := rawArgs["if"]; ok { 3201 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("if")) 3202 arg17, err = ec.unmarshalNString2string(ctx, tmp) 3203 if err != nil { 3204 return nil, err 3205 } 3206 } 3207 args["if"] = arg17 3208 var arg18 string 3209 if tmp, ok := rawArgs["range"]; ok { 3210 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("range")) 3211 arg18, err = ec.unmarshalNString2string(ctx, tmp) 3212 if err != nil { 3213 return nil, err 3214 } 3215 } 3216 args["range"] = arg18 3217 var arg19 string 3218 if tmp, ok := rawArgs["type"]; ok { 3219 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type")) 3220 arg19, err = ec.unmarshalNString2string(ctx, tmp) 3221 if err != nil { 3222 return nil, err 3223 } 3224 } 3225 args["type"] = arg19 3226 var arg20 string 3227 if tmp, ok := rawArgs["continue"]; ok { 3228 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("continue")) 3229 arg20, err = ec.unmarshalNString2string(ctx, tmp) 3230 if err != nil { 3231 return nil, err 3232 } 3233 } 3234 args["continue"] = arg20 3235 var arg21 string 3236 if tmp, ok := rawArgs["for"]; ok { 3237 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("for")) 3238 arg21, err = ec.unmarshalNString2string(ctx, tmp) 3239 if err != nil { 3240 return nil, err 3241 } 3242 } 3243 args["for"] = arg21 3244 var arg22 string 3245 if tmp, ok := rawArgs["import"]; ok { 3246 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("import")) 3247 arg22, err = ec.unmarshalNString2string(ctx, tmp) 3248 if err != nil { 3249 return nil, err 3250 } 3251 } 3252 args["import"] = arg22 3253 var arg23 string 3254 if tmp, ok := rawArgs["return"]; ok { 3255 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("return")) 3256 arg23, err = ec.unmarshalNString2string(ctx, tmp) 3257 if err != nil { 3258 return nil, err 3259 } 3260 } 3261 args["return"] = arg23 3262 var arg24 string 3263 if tmp, ok := rawArgs["var"]; ok { 3264 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("var")) 3265 arg24, err = ec.unmarshalNString2string(ctx, tmp) 3266 if err != nil { 3267 return nil, err 3268 } 3269 } 3270 args["var"] = arg24 3271 var arg25 string 3272 if tmp, ok := rawArgs["_"]; ok { 3273 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("_")) 3274 arg25, err = ec.unmarshalNString2string(ctx, tmp) 3275 if err != nil { 3276 return nil, err 3277 } 3278 } 3279 args["_"] = arg25 3280 return args, nil 3281 } 3282 3283 func (ec *executionContext) field_ValidType_validInputKeywords_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3284 var err error 3285 args := map[string]interface{}{} 3286 var arg0 *ValidInput 3287 if tmp, ok := rawArgs["input"]; ok { 3288 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 3289 arg0, err = ec.unmarshalOValidInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐValidInput(ctx, tmp) 3290 if err != nil { 3291 return nil, err 3292 } 3293 } 3294 args["input"] = arg0 3295 return args, nil 3296 } 3297 3298 func (ec *executionContext) field_VariadicModel_value_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3299 var err error 3300 args := map[string]interface{}{} 3301 var arg0 int 3302 if tmp, ok := rawArgs["rank"]; ok { 3303 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("rank")) 3304 arg0, err = ec.unmarshalNInt2int(ctx, tmp) 3305 if err != nil { 3306 return nil, err 3307 } 3308 } 3309 args["rank"] = arg0 3310 return args, nil 3311 } 3312 3313 func (ec *executionContext) field_WrappedMap_get_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3314 var err error 3315 args := map[string]interface{}{} 3316 var arg0 string 3317 if tmp, ok := rawArgs["key"]; ok { 3318 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) 3319 arg0, err = ec.unmarshalNString2string(ctx, tmp) 3320 if err != nil { 3321 return nil, err 3322 } 3323 } 3324 args["key"] = arg0 3325 return args, nil 3326 } 3327 3328 func (ec *executionContext) field_WrappedSlice_get_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3329 var err error 3330 args := map[string]interface{}{} 3331 var arg0 int 3332 if tmp, ok := rawArgs["idx"]; ok { 3333 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idx")) 3334 arg0, err = ec.unmarshalNInt2int(ctx, tmp) 3335 if err != nil { 3336 return nil, err 3337 } 3338 } 3339 args["idx"] = arg0 3340 return args, nil 3341 } 3342 3343 func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3344 var err error 3345 args := map[string]interface{}{} 3346 var arg0 bool 3347 if tmp, ok := rawArgs["includeDeprecated"]; ok { 3348 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) 3349 arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) 3350 if err != nil { 3351 return nil, err 3352 } 3353 } 3354 args["includeDeprecated"] = arg0 3355 return args, nil 3356 } 3357 3358 func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 3359 var err error 3360 args := map[string]interface{}{} 3361 var arg0 bool 3362 if tmp, ok := rawArgs["includeDeprecated"]; ok { 3363 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) 3364 arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) 3365 if err != nil { 3366 return nil, err 3367 } 3368 } 3369 args["includeDeprecated"] = arg0 3370 return args, nil 3371 } 3372 3373 // endregion ***************************** args.gotpl ***************************** 3374 3375 // region ************************** directives.gotpl ************************** 3376 3377 func (ec *executionContext) _fieldMiddleware(ctx context.Context, obj interface{}, next graphql.Resolver) interface{} { 3378 fc := graphql.GetFieldContext(ctx) 3379 for _, d := range fc.Field.Directives { 3380 switch d.Name { 3381 case "logged": 3382 rawArgs := d.ArgumentMap(ec.Variables) 3383 args, err := ec.dir_logged_args(ctx, rawArgs) 3384 if err != nil { 3385 ec.Error(ctx, err) 3386 return nil 3387 } 3388 n := next 3389 next = func(ctx context.Context) (interface{}, error) { 3390 if ec.directives.Logged == nil { 3391 return nil, errors.New("directive logged is not implemented") 3392 } 3393 return ec.directives.Logged(ctx, obj, n, args["id"].(string)) 3394 } 3395 } 3396 } 3397 res, err := ec.ResolverMiddleware(ctx, next) 3398 if err != nil { 3399 ec.Error(ctx, err) 3400 return nil 3401 } 3402 return res 3403 } 3404 3405 // endregion ************************** directives.gotpl ************************** 3406 3407 // region **************************** field.gotpl ***************************** 3408 3409 func (ec *executionContext) _A_id(ctx context.Context, field graphql.CollectedField, obj *A) (ret graphql.Marshaler) { 3410 fc, err := ec.fieldContext_A_id(ctx, field) 3411 if err != nil { 3412 return graphql.Null 3413 } 3414 ctx = graphql.WithFieldContext(ctx, fc) 3415 defer func() { 3416 if r := recover(); r != nil { 3417 ec.Error(ctx, ec.Recover(ctx, r)) 3418 ret = graphql.Null 3419 } 3420 }() 3421 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 3422 ctx = rctx // use context from middleware stack in children 3423 return obj.ID, nil 3424 }) 3425 3426 if resTmp == nil { 3427 if !graphql.HasFieldError(ctx, fc) { 3428 ec.Errorf(ctx, "must not be null") 3429 } 3430 return graphql.Null 3431 } 3432 res := resTmp.(string) 3433 fc.Result = res 3434 return ec.marshalNID2string(ctx, field.Selections, res) 3435 } 3436 3437 func (ec *executionContext) fieldContext_A_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3438 fc = &graphql.FieldContext{ 3439 Object: "A", 3440 Field: field, 3441 IsMethod: false, 3442 IsResolver: false, 3443 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3444 return nil, errors.New("field of type ID does not have child fields") 3445 }, 3446 } 3447 return fc, nil 3448 } 3449 3450 func (ec *executionContext) _AIt_id(ctx context.Context, field graphql.CollectedField, obj *AIt) (ret graphql.Marshaler) { 3451 fc, err := ec.fieldContext_AIt_id(ctx, field) 3452 if err != nil { 3453 return graphql.Null 3454 } 3455 ctx = graphql.WithFieldContext(ctx, fc) 3456 defer func() { 3457 if r := recover(); r != nil { 3458 ec.Error(ctx, ec.Recover(ctx, r)) 3459 ret = graphql.Null 3460 } 3461 }() 3462 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 3463 ctx = rctx // use context from middleware stack in children 3464 return obj.ID, nil 3465 }) 3466 3467 if resTmp == nil { 3468 if !graphql.HasFieldError(ctx, fc) { 3469 ec.Errorf(ctx, "must not be null") 3470 } 3471 return graphql.Null 3472 } 3473 res := resTmp.(string) 3474 fc.Result = res 3475 return ec.marshalNID2string(ctx, field.Selections, res) 3476 } 3477 3478 func (ec *executionContext) fieldContext_AIt_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3479 fc = &graphql.FieldContext{ 3480 Object: "AIt", 3481 Field: field, 3482 IsMethod: false, 3483 IsResolver: false, 3484 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3485 return nil, errors.New("field of type ID does not have child fields") 3486 }, 3487 } 3488 return fc, nil 3489 } 3490 3491 func (ec *executionContext) _AbIt_id(ctx context.Context, field graphql.CollectedField, obj *AbIt) (ret graphql.Marshaler) { 3492 fc, err := ec.fieldContext_AbIt_id(ctx, field) 3493 if err != nil { 3494 return graphql.Null 3495 } 3496 ctx = graphql.WithFieldContext(ctx, fc) 3497 defer func() { 3498 if r := recover(); r != nil { 3499 ec.Error(ctx, ec.Recover(ctx, r)) 3500 ret = graphql.Null 3501 } 3502 }() 3503 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 3504 ctx = rctx // use context from middleware stack in children 3505 return obj.ID, nil 3506 }) 3507 3508 if resTmp == nil { 3509 if !graphql.HasFieldError(ctx, fc) { 3510 ec.Errorf(ctx, "must not be null") 3511 } 3512 return graphql.Null 3513 } 3514 res := resTmp.(string) 3515 fc.Result = res 3516 return ec.marshalNID2string(ctx, field.Selections, res) 3517 } 3518 3519 func (ec *executionContext) fieldContext_AbIt_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3520 fc = &graphql.FieldContext{ 3521 Object: "AbIt", 3522 Field: field, 3523 IsMethod: false, 3524 IsResolver: false, 3525 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3526 return nil, errors.New("field of type ID does not have child fields") 3527 }, 3528 } 3529 return fc, nil 3530 } 3531 3532 func (ec *executionContext) _Autobind_int(ctx context.Context, field graphql.CollectedField, obj *Autobind) (ret graphql.Marshaler) { 3533 fc, err := ec.fieldContext_Autobind_int(ctx, field) 3534 if err != nil { 3535 return graphql.Null 3536 } 3537 ctx = graphql.WithFieldContext(ctx, fc) 3538 defer func() { 3539 if r := recover(); r != nil { 3540 ec.Error(ctx, ec.Recover(ctx, r)) 3541 ret = graphql.Null 3542 } 3543 }() 3544 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 3545 ctx = rctx // use context from middleware stack in children 3546 return obj.Int, nil 3547 }) 3548 3549 if resTmp == nil { 3550 if !graphql.HasFieldError(ctx, fc) { 3551 ec.Errorf(ctx, "must not be null") 3552 } 3553 return graphql.Null 3554 } 3555 res := resTmp.(int) 3556 fc.Result = res 3557 return ec.marshalNInt2int(ctx, field.Selections, res) 3558 } 3559 3560 func (ec *executionContext) fieldContext_Autobind_int(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3561 fc = &graphql.FieldContext{ 3562 Object: "Autobind", 3563 Field: field, 3564 IsMethod: false, 3565 IsResolver: false, 3566 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3567 return nil, errors.New("field of type Int does not have child fields") 3568 }, 3569 } 3570 return fc, nil 3571 } 3572 3573 func (ec *executionContext) _Autobind_int32(ctx context.Context, field graphql.CollectedField, obj *Autobind) (ret graphql.Marshaler) { 3574 fc, err := ec.fieldContext_Autobind_int32(ctx, field) 3575 if err != nil { 3576 return graphql.Null 3577 } 3578 ctx = graphql.WithFieldContext(ctx, fc) 3579 defer func() { 3580 if r := recover(); r != nil { 3581 ec.Error(ctx, ec.Recover(ctx, r)) 3582 ret = graphql.Null 3583 } 3584 }() 3585 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 3586 ctx = rctx // use context from middleware stack in children 3587 return obj.Int32, nil 3588 }) 3589 3590 if resTmp == nil { 3591 if !graphql.HasFieldError(ctx, fc) { 3592 ec.Errorf(ctx, "must not be null") 3593 } 3594 return graphql.Null 3595 } 3596 res := resTmp.(int32) 3597 fc.Result = res 3598 return ec.marshalNInt2int32(ctx, field.Selections, res) 3599 } 3600 3601 func (ec *executionContext) fieldContext_Autobind_int32(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3602 fc = &graphql.FieldContext{ 3603 Object: "Autobind", 3604 Field: field, 3605 IsMethod: false, 3606 IsResolver: false, 3607 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3608 return nil, errors.New("field of type Int does not have child fields") 3609 }, 3610 } 3611 return fc, nil 3612 } 3613 3614 func (ec *executionContext) _Autobind_int64(ctx context.Context, field graphql.CollectedField, obj *Autobind) (ret graphql.Marshaler) { 3615 fc, err := ec.fieldContext_Autobind_int64(ctx, field) 3616 if err != nil { 3617 return graphql.Null 3618 } 3619 ctx = graphql.WithFieldContext(ctx, fc) 3620 defer func() { 3621 if r := recover(); r != nil { 3622 ec.Error(ctx, ec.Recover(ctx, r)) 3623 ret = graphql.Null 3624 } 3625 }() 3626 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 3627 ctx = rctx // use context from middleware stack in children 3628 return obj.Int64, nil 3629 }) 3630 3631 if resTmp == nil { 3632 if !graphql.HasFieldError(ctx, fc) { 3633 ec.Errorf(ctx, "must not be null") 3634 } 3635 return graphql.Null 3636 } 3637 res := resTmp.(int64) 3638 fc.Result = res 3639 return ec.marshalNInt2int64(ctx, field.Selections, res) 3640 } 3641 3642 func (ec *executionContext) fieldContext_Autobind_int64(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3643 fc = &graphql.FieldContext{ 3644 Object: "Autobind", 3645 Field: field, 3646 IsMethod: false, 3647 IsResolver: false, 3648 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3649 return nil, errors.New("field of type Int does not have child fields") 3650 }, 3651 } 3652 return fc, nil 3653 } 3654 3655 func (ec *executionContext) _Autobind_idStr(ctx context.Context, field graphql.CollectedField, obj *Autobind) (ret graphql.Marshaler) { 3656 fc, err := ec.fieldContext_Autobind_idStr(ctx, field) 3657 if err != nil { 3658 return graphql.Null 3659 } 3660 ctx = graphql.WithFieldContext(ctx, fc) 3661 defer func() { 3662 if r := recover(); r != nil { 3663 ec.Error(ctx, ec.Recover(ctx, r)) 3664 ret = graphql.Null 3665 } 3666 }() 3667 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 3668 ctx = rctx // use context from middleware stack in children 3669 return obj.IdStr, nil 3670 }) 3671 3672 if resTmp == nil { 3673 if !graphql.HasFieldError(ctx, fc) { 3674 ec.Errorf(ctx, "must not be null") 3675 } 3676 return graphql.Null 3677 } 3678 res := resTmp.(string) 3679 fc.Result = res 3680 return ec.marshalNID2string(ctx, field.Selections, res) 3681 } 3682 3683 func (ec *executionContext) fieldContext_Autobind_idStr(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3684 fc = &graphql.FieldContext{ 3685 Object: "Autobind", 3686 Field: field, 3687 IsMethod: false, 3688 IsResolver: false, 3689 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3690 return nil, errors.New("field of type ID does not have child fields") 3691 }, 3692 } 3693 return fc, nil 3694 } 3695 3696 func (ec *executionContext) _Autobind_idInt(ctx context.Context, field graphql.CollectedField, obj *Autobind) (ret graphql.Marshaler) { 3697 fc, err := ec.fieldContext_Autobind_idInt(ctx, field) 3698 if err != nil { 3699 return graphql.Null 3700 } 3701 ctx = graphql.WithFieldContext(ctx, fc) 3702 defer func() { 3703 if r := recover(); r != nil { 3704 ec.Error(ctx, ec.Recover(ctx, r)) 3705 ret = graphql.Null 3706 } 3707 }() 3708 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 3709 ctx = rctx // use context from middleware stack in children 3710 return obj.IdInt, nil 3711 }) 3712 3713 if resTmp == nil { 3714 if !graphql.HasFieldError(ctx, fc) { 3715 ec.Errorf(ctx, "must not be null") 3716 } 3717 return graphql.Null 3718 } 3719 res := resTmp.(int) 3720 fc.Result = res 3721 return ec.marshalNID2int(ctx, field.Selections, res) 3722 } 3723 3724 func (ec *executionContext) fieldContext_Autobind_idInt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3725 fc = &graphql.FieldContext{ 3726 Object: "Autobind", 3727 Field: field, 3728 IsMethod: false, 3729 IsResolver: false, 3730 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3731 return nil, errors.New("field of type ID does not have child fields") 3732 }, 3733 } 3734 return fc, nil 3735 } 3736 3737 func (ec *executionContext) _B_id(ctx context.Context, field graphql.CollectedField, obj *B) (ret graphql.Marshaler) { 3738 fc, err := ec.fieldContext_B_id(ctx, field) 3739 if err != nil { 3740 return graphql.Null 3741 } 3742 ctx = graphql.WithFieldContext(ctx, fc) 3743 defer func() { 3744 if r := recover(); r != nil { 3745 ec.Error(ctx, ec.Recover(ctx, r)) 3746 ret = graphql.Null 3747 } 3748 }() 3749 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 3750 ctx = rctx // use context from middleware stack in children 3751 return obj.ID, nil 3752 }) 3753 3754 if resTmp == nil { 3755 if !graphql.HasFieldError(ctx, fc) { 3756 ec.Errorf(ctx, "must not be null") 3757 } 3758 return graphql.Null 3759 } 3760 res := resTmp.(string) 3761 fc.Result = res 3762 return ec.marshalNID2string(ctx, field.Selections, res) 3763 } 3764 3765 func (ec *executionContext) fieldContext_B_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3766 fc = &graphql.FieldContext{ 3767 Object: "B", 3768 Field: field, 3769 IsMethod: false, 3770 IsResolver: false, 3771 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3772 return nil, errors.New("field of type ID does not have child fields") 3773 }, 3774 } 3775 return fc, nil 3776 } 3777 3778 func (ec *executionContext) _BackedByInterface_id(ctx context.Context, field graphql.CollectedField, obj BackedByInterface) (ret graphql.Marshaler) { 3779 fc, err := ec.fieldContext_BackedByInterface_id(ctx, field) 3780 if err != nil { 3781 return graphql.Null 3782 } 3783 ctx = graphql.WithFieldContext(ctx, fc) 3784 defer func() { 3785 if r := recover(); r != nil { 3786 ec.Error(ctx, ec.Recover(ctx, r)) 3787 ret = graphql.Null 3788 } 3789 }() 3790 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 3791 ctx = rctx // use context from middleware stack in children 3792 return ec.resolvers.BackedByInterface().ID(rctx, obj) 3793 }) 3794 3795 if resTmp == nil { 3796 if !graphql.HasFieldError(ctx, fc) { 3797 ec.Errorf(ctx, "must not be null") 3798 } 3799 return graphql.Null 3800 } 3801 res := resTmp.(string) 3802 fc.Result = res 3803 return ec.marshalNString2string(ctx, field.Selections, res) 3804 } 3805 3806 func (ec *executionContext) fieldContext_BackedByInterface_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3807 fc = &graphql.FieldContext{ 3808 Object: "BackedByInterface", 3809 Field: field, 3810 IsMethod: true, 3811 IsResolver: true, 3812 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3813 return nil, errors.New("field of type String does not have child fields") 3814 }, 3815 } 3816 return fc, nil 3817 } 3818 3819 func (ec *executionContext) _BackedByInterface_thisShouldBind(ctx context.Context, field graphql.CollectedField, obj BackedByInterface) (ret graphql.Marshaler) { 3820 fc, err := ec.fieldContext_BackedByInterface_thisShouldBind(ctx, field) 3821 if err != nil { 3822 return graphql.Null 3823 } 3824 ctx = graphql.WithFieldContext(ctx, fc) 3825 defer func() { 3826 if r := recover(); r != nil { 3827 ec.Error(ctx, ec.Recover(ctx, r)) 3828 ret = graphql.Null 3829 } 3830 }() 3831 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 3832 ctx = rctx // use context from middleware stack in children 3833 return obj.ThisShouldBind(), nil 3834 }) 3835 3836 if resTmp == nil { 3837 if !graphql.HasFieldError(ctx, fc) { 3838 ec.Errorf(ctx, "must not be null") 3839 } 3840 return graphql.Null 3841 } 3842 res := resTmp.(string) 3843 fc.Result = res 3844 return ec.marshalNString2string(ctx, field.Selections, res) 3845 } 3846 3847 func (ec *executionContext) fieldContext_BackedByInterface_thisShouldBind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3848 fc = &graphql.FieldContext{ 3849 Object: "BackedByInterface", 3850 Field: field, 3851 IsMethod: true, 3852 IsResolver: false, 3853 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3854 return nil, errors.New("field of type String does not have child fields") 3855 }, 3856 } 3857 return fc, nil 3858 } 3859 3860 func (ec *executionContext) _BackedByInterface_thisShouldBindWithError(ctx context.Context, field graphql.CollectedField, obj BackedByInterface) (ret graphql.Marshaler) { 3861 fc, err := ec.fieldContext_BackedByInterface_thisShouldBindWithError(ctx, field) 3862 if err != nil { 3863 return graphql.Null 3864 } 3865 ctx = graphql.WithFieldContext(ctx, fc) 3866 defer func() { 3867 if r := recover(); r != nil { 3868 ec.Error(ctx, ec.Recover(ctx, r)) 3869 ret = graphql.Null 3870 } 3871 }() 3872 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 3873 ctx = rctx // use context from middleware stack in children 3874 return obj.ThisShouldBindWithError() 3875 }) 3876 3877 if resTmp == nil { 3878 if !graphql.HasFieldError(ctx, fc) { 3879 ec.Errorf(ctx, "must not be null") 3880 } 3881 return graphql.Null 3882 } 3883 res := resTmp.(string) 3884 fc.Result = res 3885 return ec.marshalNString2string(ctx, field.Selections, res) 3886 } 3887 3888 func (ec *executionContext) fieldContext_BackedByInterface_thisShouldBindWithError(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3889 fc = &graphql.FieldContext{ 3890 Object: "BackedByInterface", 3891 Field: field, 3892 IsMethod: true, 3893 IsResolver: false, 3894 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3895 return nil, errors.New("field of type String does not have child fields") 3896 }, 3897 } 3898 return fc, nil 3899 } 3900 3901 func (ec *executionContext) _Cat_species(ctx context.Context, field graphql.CollectedField, obj *Cat) (ret graphql.Marshaler) { 3902 fc, err := ec.fieldContext_Cat_species(ctx, field) 3903 if err != nil { 3904 return graphql.Null 3905 } 3906 ctx = graphql.WithFieldContext(ctx, fc) 3907 defer func() { 3908 if r := recover(); r != nil { 3909 ec.Error(ctx, ec.Recover(ctx, r)) 3910 ret = graphql.Null 3911 } 3912 }() 3913 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 3914 ctx = rctx // use context from middleware stack in children 3915 return obj.Species, nil 3916 }) 3917 3918 if resTmp == nil { 3919 if !graphql.HasFieldError(ctx, fc) { 3920 ec.Errorf(ctx, "must not be null") 3921 } 3922 return graphql.Null 3923 } 3924 res := resTmp.(string) 3925 fc.Result = res 3926 return ec.marshalNString2string(ctx, field.Selections, res) 3927 } 3928 3929 func (ec *executionContext) fieldContext_Cat_species(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3930 fc = &graphql.FieldContext{ 3931 Object: "Cat", 3932 Field: field, 3933 IsMethod: false, 3934 IsResolver: false, 3935 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3936 return nil, errors.New("field of type String does not have child fields") 3937 }, 3938 } 3939 return fc, nil 3940 } 3941 3942 func (ec *executionContext) _Cat_size(ctx context.Context, field graphql.CollectedField, obj *Cat) (ret graphql.Marshaler) { 3943 fc, err := ec.fieldContext_Cat_size(ctx, field) 3944 if err != nil { 3945 return graphql.Null 3946 } 3947 ctx = graphql.WithFieldContext(ctx, fc) 3948 defer func() { 3949 if r := recover(); r != nil { 3950 ec.Error(ctx, ec.Recover(ctx, r)) 3951 ret = graphql.Null 3952 } 3953 }() 3954 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 3955 ctx = rctx // use context from middleware stack in children 3956 return obj.Size, nil 3957 }) 3958 3959 if resTmp == nil { 3960 if !graphql.HasFieldError(ctx, fc) { 3961 ec.Errorf(ctx, "must not be null") 3962 } 3963 return graphql.Null 3964 } 3965 res := resTmp.(*Size) 3966 fc.Result = res 3967 return ec.marshalNSize2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐSize(ctx, field.Selections, res) 3968 } 3969 3970 func (ec *executionContext) fieldContext_Cat_size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 3971 fc = &graphql.FieldContext{ 3972 Object: "Cat", 3973 Field: field, 3974 IsMethod: false, 3975 IsResolver: false, 3976 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 3977 switch field.Name { 3978 case "height": 3979 return ec.fieldContext_Size_height(ctx, field) 3980 case "weight": 3981 return ec.fieldContext_Size_weight(ctx, field) 3982 } 3983 return nil, fmt.Errorf("no field named %q was found under type Size", field.Name) 3984 }, 3985 } 3986 return fc, nil 3987 } 3988 3989 func (ec *executionContext) _Cat_catBreed(ctx context.Context, field graphql.CollectedField, obj *Cat) (ret graphql.Marshaler) { 3990 fc, err := ec.fieldContext_Cat_catBreed(ctx, field) 3991 if err != nil { 3992 return graphql.Null 3993 } 3994 ctx = graphql.WithFieldContext(ctx, fc) 3995 defer func() { 3996 if r := recover(); r != nil { 3997 ec.Error(ctx, ec.Recover(ctx, r)) 3998 ret = graphql.Null 3999 } 4000 }() 4001 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4002 ctx = rctx // use context from middleware stack in children 4003 return obj.CatBreed, nil 4004 }) 4005 4006 if resTmp == nil { 4007 if !graphql.HasFieldError(ctx, fc) { 4008 ec.Errorf(ctx, "must not be null") 4009 } 4010 return graphql.Null 4011 } 4012 res := resTmp.(string) 4013 fc.Result = res 4014 return ec.marshalNString2string(ctx, field.Selections, res) 4015 } 4016 4017 func (ec *executionContext) fieldContext_Cat_catBreed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4018 fc = &graphql.FieldContext{ 4019 Object: "Cat", 4020 Field: field, 4021 IsMethod: false, 4022 IsResolver: false, 4023 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4024 return nil, errors.New("field of type String does not have child fields") 4025 }, 4026 } 4027 return fc, nil 4028 } 4029 4030 func (ec *executionContext) _CheckIssue896_id(ctx context.Context, field graphql.CollectedField, obj *CheckIssue896) (ret graphql.Marshaler) { 4031 fc, err := ec.fieldContext_CheckIssue896_id(ctx, field) 4032 if err != nil { 4033 return graphql.Null 4034 } 4035 ctx = graphql.WithFieldContext(ctx, fc) 4036 defer func() { 4037 if r := recover(); r != nil { 4038 ec.Error(ctx, ec.Recover(ctx, r)) 4039 ret = graphql.Null 4040 } 4041 }() 4042 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4043 ctx = rctx // use context from middleware stack in children 4044 return obj.ID, nil 4045 }) 4046 4047 if resTmp == nil { 4048 return graphql.Null 4049 } 4050 res := resTmp.(*int) 4051 fc.Result = res 4052 return ec.marshalOInt2ᚖint(ctx, field.Selections, res) 4053 } 4054 4055 func (ec *executionContext) fieldContext_CheckIssue896_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4056 fc = &graphql.FieldContext{ 4057 Object: "CheckIssue896", 4058 Field: field, 4059 IsMethod: false, 4060 IsResolver: false, 4061 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4062 return nil, errors.New("field of type Int does not have child fields") 4063 }, 4064 } 4065 return fc, nil 4066 } 4067 4068 func (ec *executionContext) _Circle_radius(ctx context.Context, field graphql.CollectedField, obj *Circle) (ret graphql.Marshaler) { 4069 fc, err := ec.fieldContext_Circle_radius(ctx, field) 4070 if err != nil { 4071 return graphql.Null 4072 } 4073 ctx = graphql.WithFieldContext(ctx, fc) 4074 defer func() { 4075 if r := recover(); r != nil { 4076 ec.Error(ctx, ec.Recover(ctx, r)) 4077 ret = graphql.Null 4078 } 4079 }() 4080 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4081 ctx = rctx // use context from middleware stack in children 4082 return obj.Radius, nil 4083 }) 4084 4085 if resTmp == nil { 4086 return graphql.Null 4087 } 4088 res := resTmp.(float64) 4089 fc.Result = res 4090 return ec.marshalOFloat2float64(ctx, field.Selections, res) 4091 } 4092 4093 func (ec *executionContext) fieldContext_Circle_radius(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4094 fc = &graphql.FieldContext{ 4095 Object: "Circle", 4096 Field: field, 4097 IsMethod: false, 4098 IsResolver: false, 4099 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4100 return nil, errors.New("field of type Float does not have child fields") 4101 }, 4102 } 4103 return fc, nil 4104 } 4105 4106 func (ec *executionContext) _Circle_area(ctx context.Context, field graphql.CollectedField, obj *Circle) (ret graphql.Marshaler) { 4107 fc, err := ec.fieldContext_Circle_area(ctx, field) 4108 if err != nil { 4109 return graphql.Null 4110 } 4111 ctx = graphql.WithFieldContext(ctx, fc) 4112 defer func() { 4113 if r := recover(); r != nil { 4114 ec.Error(ctx, ec.Recover(ctx, r)) 4115 ret = graphql.Null 4116 } 4117 }() 4118 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4119 ctx = rctx // use context from middleware stack in children 4120 return obj.Area(), nil 4121 }) 4122 4123 if resTmp == nil { 4124 return graphql.Null 4125 } 4126 res := resTmp.(float64) 4127 fc.Result = res 4128 return ec.marshalOFloat2float64(ctx, field.Selections, res) 4129 } 4130 4131 func (ec *executionContext) fieldContext_Circle_area(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4132 fc = &graphql.FieldContext{ 4133 Object: "Circle", 4134 Field: field, 4135 IsMethod: true, 4136 IsResolver: false, 4137 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4138 return nil, errors.New("field of type Float does not have child fields") 4139 }, 4140 } 4141 return fc, nil 4142 } 4143 4144 func (ec *executionContext) _Circle_coordinates(ctx context.Context, field graphql.CollectedField, obj *Circle) (ret graphql.Marshaler) { 4145 fc, err := ec.fieldContext_Circle_coordinates(ctx, field) 4146 if err != nil { 4147 return graphql.Null 4148 } 4149 ctx = graphql.WithFieldContext(ctx, fc) 4150 defer func() { 4151 if r := recover(); r != nil { 4152 ec.Error(ctx, ec.Recover(ctx, r)) 4153 ret = graphql.Null 4154 } 4155 }() 4156 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4157 ctx = rctx // use context from middleware stack in children 4158 return obj.Coordinates, nil 4159 }) 4160 4161 if resTmp == nil { 4162 return graphql.Null 4163 } 4164 res := resTmp.(Coordinates) 4165 fc.Result = res 4166 return ec.marshalOCoordinates2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCoordinates(ctx, field.Selections, res) 4167 } 4168 4169 func (ec *executionContext) fieldContext_Circle_coordinates(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4170 fc = &graphql.FieldContext{ 4171 Object: "Circle", 4172 Field: field, 4173 IsMethod: false, 4174 IsResolver: false, 4175 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4176 switch field.Name { 4177 case "x": 4178 return ec.fieldContext_Coordinates_x(ctx, field) 4179 case "y": 4180 return ec.fieldContext_Coordinates_y(ctx, field) 4181 } 4182 return nil, fmt.Errorf("no field named %q was found under type Coordinates", field.Name) 4183 }, 4184 } 4185 return fc, nil 4186 } 4187 4188 func (ec *executionContext) _ConcreteNodeA_id(ctx context.Context, field graphql.CollectedField, obj *ConcreteNodeA) (ret graphql.Marshaler) { 4189 fc, err := ec.fieldContext_ConcreteNodeA_id(ctx, field) 4190 if err != nil { 4191 return graphql.Null 4192 } 4193 ctx = graphql.WithFieldContext(ctx, fc) 4194 defer func() { 4195 if r := recover(); r != nil { 4196 ec.Error(ctx, ec.Recover(ctx, r)) 4197 ret = graphql.Null 4198 } 4199 }() 4200 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4201 ctx = rctx // use context from middleware stack in children 4202 return obj.ID, nil 4203 }) 4204 4205 if resTmp == nil { 4206 if !graphql.HasFieldError(ctx, fc) { 4207 ec.Errorf(ctx, "must not be null") 4208 } 4209 return graphql.Null 4210 } 4211 res := resTmp.(string) 4212 fc.Result = res 4213 return ec.marshalNID2string(ctx, field.Selections, res) 4214 } 4215 4216 func (ec *executionContext) fieldContext_ConcreteNodeA_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4217 fc = &graphql.FieldContext{ 4218 Object: "ConcreteNodeA", 4219 Field: field, 4220 IsMethod: false, 4221 IsResolver: false, 4222 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4223 return nil, errors.New("field of type ID does not have child fields") 4224 }, 4225 } 4226 return fc, nil 4227 } 4228 4229 func (ec *executionContext) _ConcreteNodeA_child(ctx context.Context, field graphql.CollectedField, obj *ConcreteNodeA) (ret graphql.Marshaler) { 4230 fc, err := ec.fieldContext_ConcreteNodeA_child(ctx, field) 4231 if err != nil { 4232 return graphql.Null 4233 } 4234 ctx = graphql.WithFieldContext(ctx, fc) 4235 defer func() { 4236 if r := recover(); r != nil { 4237 ec.Error(ctx, ec.Recover(ctx, r)) 4238 ret = graphql.Null 4239 } 4240 }() 4241 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4242 ctx = rctx // use context from middleware stack in children 4243 return obj.Child() 4244 }) 4245 4246 if resTmp == nil { 4247 if !graphql.HasFieldError(ctx, fc) { 4248 ec.Errorf(ctx, "must not be null") 4249 } 4250 return graphql.Null 4251 } 4252 res := resTmp.(Node) 4253 fc.Result = res 4254 return ec.marshalNNode2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐNode(ctx, field.Selections, res) 4255 } 4256 4257 func (ec *executionContext) fieldContext_ConcreteNodeA_child(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4258 fc = &graphql.FieldContext{ 4259 Object: "ConcreteNodeA", 4260 Field: field, 4261 IsMethod: true, 4262 IsResolver: false, 4263 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4264 return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE") 4265 }, 4266 } 4267 return fc, nil 4268 } 4269 4270 func (ec *executionContext) _ConcreteNodeA_name(ctx context.Context, field graphql.CollectedField, obj *ConcreteNodeA) (ret graphql.Marshaler) { 4271 fc, err := ec.fieldContext_ConcreteNodeA_name(ctx, field) 4272 if err != nil { 4273 return graphql.Null 4274 } 4275 ctx = graphql.WithFieldContext(ctx, fc) 4276 defer func() { 4277 if r := recover(); r != nil { 4278 ec.Error(ctx, ec.Recover(ctx, r)) 4279 ret = graphql.Null 4280 } 4281 }() 4282 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4283 ctx = rctx // use context from middleware stack in children 4284 return obj.Name, nil 4285 }) 4286 4287 if resTmp == nil { 4288 if !graphql.HasFieldError(ctx, fc) { 4289 ec.Errorf(ctx, "must not be null") 4290 } 4291 return graphql.Null 4292 } 4293 res := resTmp.(string) 4294 fc.Result = res 4295 return ec.marshalNString2string(ctx, field.Selections, res) 4296 } 4297 4298 func (ec *executionContext) fieldContext_ConcreteNodeA_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4299 fc = &graphql.FieldContext{ 4300 Object: "ConcreteNodeA", 4301 Field: field, 4302 IsMethod: false, 4303 IsResolver: false, 4304 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4305 return nil, errors.New("field of type String does not have child fields") 4306 }, 4307 } 4308 return fc, nil 4309 } 4310 4311 func (ec *executionContext) _ConcreteNodeInterface_id(ctx context.Context, field graphql.CollectedField, obj ConcreteNodeInterface) (ret graphql.Marshaler) { 4312 fc, err := ec.fieldContext_ConcreteNodeInterface_id(ctx, field) 4313 if err != nil { 4314 return graphql.Null 4315 } 4316 ctx = graphql.WithFieldContext(ctx, fc) 4317 defer func() { 4318 if r := recover(); r != nil { 4319 ec.Error(ctx, ec.Recover(ctx, r)) 4320 ret = graphql.Null 4321 } 4322 }() 4323 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4324 ctx = rctx // use context from middleware stack in children 4325 return obj.ID(), nil 4326 }) 4327 4328 if resTmp == nil { 4329 if !graphql.HasFieldError(ctx, fc) { 4330 ec.Errorf(ctx, "must not be null") 4331 } 4332 return graphql.Null 4333 } 4334 res := resTmp.(string) 4335 fc.Result = res 4336 return ec.marshalNID2string(ctx, field.Selections, res) 4337 } 4338 4339 func (ec *executionContext) fieldContext_ConcreteNodeInterface_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4340 fc = &graphql.FieldContext{ 4341 Object: "ConcreteNodeInterface", 4342 Field: field, 4343 IsMethod: true, 4344 IsResolver: false, 4345 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4346 return nil, errors.New("field of type ID does not have child fields") 4347 }, 4348 } 4349 return fc, nil 4350 } 4351 4352 func (ec *executionContext) _ConcreteNodeInterface_child(ctx context.Context, field graphql.CollectedField, obj ConcreteNodeInterface) (ret graphql.Marshaler) { 4353 fc, err := ec.fieldContext_ConcreteNodeInterface_child(ctx, field) 4354 if err != nil { 4355 return graphql.Null 4356 } 4357 ctx = graphql.WithFieldContext(ctx, fc) 4358 defer func() { 4359 if r := recover(); r != nil { 4360 ec.Error(ctx, ec.Recover(ctx, r)) 4361 ret = graphql.Null 4362 } 4363 }() 4364 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4365 ctx = rctx // use context from middleware stack in children 4366 return obj.Child() 4367 }) 4368 4369 if resTmp == nil { 4370 if !graphql.HasFieldError(ctx, fc) { 4371 ec.Errorf(ctx, "must not be null") 4372 } 4373 return graphql.Null 4374 } 4375 res := resTmp.(Node) 4376 fc.Result = res 4377 return ec.marshalNNode2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐNode(ctx, field.Selections, res) 4378 } 4379 4380 func (ec *executionContext) fieldContext_ConcreteNodeInterface_child(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4381 fc = &graphql.FieldContext{ 4382 Object: "ConcreteNodeInterface", 4383 Field: field, 4384 IsMethod: true, 4385 IsResolver: false, 4386 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4387 return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE") 4388 }, 4389 } 4390 return fc, nil 4391 } 4392 4393 func (ec *executionContext) _Content_Post_foo(ctx context.Context, field graphql.CollectedField, obj *ContentPost) (ret graphql.Marshaler) { 4394 fc, err := ec.fieldContext_Content_Post_foo(ctx, field) 4395 if err != nil { 4396 return graphql.Null 4397 } 4398 ctx = graphql.WithFieldContext(ctx, fc) 4399 defer func() { 4400 if r := recover(); r != nil { 4401 ec.Error(ctx, ec.Recover(ctx, r)) 4402 ret = graphql.Null 4403 } 4404 }() 4405 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4406 ctx = rctx // use context from middleware stack in children 4407 return obj.Foo, nil 4408 }) 4409 4410 if resTmp == nil { 4411 return graphql.Null 4412 } 4413 res := resTmp.(*string) 4414 fc.Result = res 4415 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 4416 } 4417 4418 func (ec *executionContext) fieldContext_Content_Post_foo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4419 fc = &graphql.FieldContext{ 4420 Object: "Content_Post", 4421 Field: field, 4422 IsMethod: false, 4423 IsResolver: false, 4424 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4425 return nil, errors.New("field of type String does not have child fields") 4426 }, 4427 } 4428 return fc, nil 4429 } 4430 4431 func (ec *executionContext) _Content_User_foo(ctx context.Context, field graphql.CollectedField, obj *ContentUser) (ret graphql.Marshaler) { 4432 fc, err := ec.fieldContext_Content_User_foo(ctx, field) 4433 if err != nil { 4434 return graphql.Null 4435 } 4436 ctx = graphql.WithFieldContext(ctx, fc) 4437 defer func() { 4438 if r := recover(); r != nil { 4439 ec.Error(ctx, ec.Recover(ctx, r)) 4440 ret = graphql.Null 4441 } 4442 }() 4443 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4444 ctx = rctx // use context from middleware stack in children 4445 return obj.Foo, nil 4446 }) 4447 4448 if resTmp == nil { 4449 return graphql.Null 4450 } 4451 res := resTmp.(*string) 4452 fc.Result = res 4453 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 4454 } 4455 4456 func (ec *executionContext) fieldContext_Content_User_foo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4457 fc = &graphql.FieldContext{ 4458 Object: "Content_User", 4459 Field: field, 4460 IsMethod: false, 4461 IsResolver: false, 4462 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4463 return nil, errors.New("field of type String does not have child fields") 4464 }, 4465 } 4466 return fc, nil 4467 } 4468 4469 func (ec *executionContext) _Coordinates_x(ctx context.Context, field graphql.CollectedField, obj *Coordinates) (ret graphql.Marshaler) { 4470 fc, err := ec.fieldContext_Coordinates_x(ctx, field) 4471 if err != nil { 4472 return graphql.Null 4473 } 4474 ctx = graphql.WithFieldContext(ctx, fc) 4475 defer func() { 4476 if r := recover(); r != nil { 4477 ec.Error(ctx, ec.Recover(ctx, r)) 4478 ret = graphql.Null 4479 } 4480 }() 4481 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4482 ctx = rctx // use context from middleware stack in children 4483 return obj.X, nil 4484 }) 4485 4486 if resTmp == nil { 4487 if !graphql.HasFieldError(ctx, fc) { 4488 ec.Errorf(ctx, "must not be null") 4489 } 4490 return graphql.Null 4491 } 4492 res := resTmp.(float64) 4493 fc.Result = res 4494 return ec.marshalNFloat2float64(ctx, field.Selections, res) 4495 } 4496 4497 func (ec *executionContext) fieldContext_Coordinates_x(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4498 fc = &graphql.FieldContext{ 4499 Object: "Coordinates", 4500 Field: field, 4501 IsMethod: false, 4502 IsResolver: false, 4503 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4504 return nil, errors.New("field of type Float does not have child fields") 4505 }, 4506 } 4507 return fc, nil 4508 } 4509 4510 func (ec *executionContext) _Coordinates_y(ctx context.Context, field graphql.CollectedField, obj *Coordinates) (ret graphql.Marshaler) { 4511 fc, err := ec.fieldContext_Coordinates_y(ctx, field) 4512 if err != nil { 4513 return graphql.Null 4514 } 4515 ctx = graphql.WithFieldContext(ctx, fc) 4516 defer func() { 4517 if r := recover(); r != nil { 4518 ec.Error(ctx, ec.Recover(ctx, r)) 4519 ret = graphql.Null 4520 } 4521 }() 4522 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4523 ctx = rctx // use context from middleware stack in children 4524 return obj.Y, nil 4525 }) 4526 4527 if resTmp == nil { 4528 if !graphql.HasFieldError(ctx, fc) { 4529 ec.Errorf(ctx, "must not be null") 4530 } 4531 return graphql.Null 4532 } 4533 res := resTmp.(float64) 4534 fc.Result = res 4535 return ec.marshalNFloat2float64(ctx, field.Selections, res) 4536 } 4537 4538 func (ec *executionContext) fieldContext_Coordinates_y(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4539 fc = &graphql.FieldContext{ 4540 Object: "Coordinates", 4541 Field: field, 4542 IsMethod: false, 4543 IsResolver: false, 4544 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4545 return nil, errors.New("field of type Float does not have child fields") 4546 }, 4547 } 4548 return fc, nil 4549 } 4550 4551 func (ec *executionContext) _DefaultParametersMirror_falsyBoolean(ctx context.Context, field graphql.CollectedField, obj *DefaultParametersMirror) (ret graphql.Marshaler) { 4552 fc, err := ec.fieldContext_DefaultParametersMirror_falsyBoolean(ctx, field) 4553 if err != nil { 4554 return graphql.Null 4555 } 4556 ctx = graphql.WithFieldContext(ctx, fc) 4557 defer func() { 4558 if r := recover(); r != nil { 4559 ec.Error(ctx, ec.Recover(ctx, r)) 4560 ret = graphql.Null 4561 } 4562 }() 4563 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4564 ctx = rctx // use context from middleware stack in children 4565 return obj.FalsyBoolean, nil 4566 }) 4567 4568 if resTmp == nil { 4569 return graphql.Null 4570 } 4571 res := resTmp.(*bool) 4572 fc.Result = res 4573 return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) 4574 } 4575 4576 func (ec *executionContext) fieldContext_DefaultParametersMirror_falsyBoolean(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4577 fc = &graphql.FieldContext{ 4578 Object: "DefaultParametersMirror", 4579 Field: field, 4580 IsMethod: false, 4581 IsResolver: false, 4582 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4583 return nil, errors.New("field of type Boolean does not have child fields") 4584 }, 4585 } 4586 return fc, nil 4587 } 4588 4589 func (ec *executionContext) _DefaultParametersMirror_truthyBoolean(ctx context.Context, field graphql.CollectedField, obj *DefaultParametersMirror) (ret graphql.Marshaler) { 4590 fc, err := ec.fieldContext_DefaultParametersMirror_truthyBoolean(ctx, field) 4591 if err != nil { 4592 return graphql.Null 4593 } 4594 ctx = graphql.WithFieldContext(ctx, fc) 4595 defer func() { 4596 if r := recover(); r != nil { 4597 ec.Error(ctx, ec.Recover(ctx, r)) 4598 ret = graphql.Null 4599 } 4600 }() 4601 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4602 ctx = rctx // use context from middleware stack in children 4603 return obj.TruthyBoolean, nil 4604 }) 4605 4606 if resTmp == nil { 4607 return graphql.Null 4608 } 4609 res := resTmp.(*bool) 4610 fc.Result = res 4611 return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) 4612 } 4613 4614 func (ec *executionContext) fieldContext_DefaultParametersMirror_truthyBoolean(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4615 fc = &graphql.FieldContext{ 4616 Object: "DefaultParametersMirror", 4617 Field: field, 4618 IsMethod: false, 4619 IsResolver: false, 4620 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4621 return nil, errors.New("field of type Boolean does not have child fields") 4622 }, 4623 } 4624 return fc, nil 4625 } 4626 4627 func (ec *executionContext) _Dog_species(ctx context.Context, field graphql.CollectedField, obj *Dog) (ret graphql.Marshaler) { 4628 fc, err := ec.fieldContext_Dog_species(ctx, field) 4629 if err != nil { 4630 return graphql.Null 4631 } 4632 ctx = graphql.WithFieldContext(ctx, fc) 4633 defer func() { 4634 if r := recover(); r != nil { 4635 ec.Error(ctx, ec.Recover(ctx, r)) 4636 ret = graphql.Null 4637 } 4638 }() 4639 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4640 ctx = rctx // use context from middleware stack in children 4641 return obj.Species, nil 4642 }) 4643 4644 if resTmp == nil { 4645 if !graphql.HasFieldError(ctx, fc) { 4646 ec.Errorf(ctx, "must not be null") 4647 } 4648 return graphql.Null 4649 } 4650 res := resTmp.(string) 4651 fc.Result = res 4652 return ec.marshalNString2string(ctx, field.Selections, res) 4653 } 4654 4655 func (ec *executionContext) fieldContext_Dog_species(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4656 fc = &graphql.FieldContext{ 4657 Object: "Dog", 4658 Field: field, 4659 IsMethod: false, 4660 IsResolver: false, 4661 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4662 return nil, errors.New("field of type String does not have child fields") 4663 }, 4664 } 4665 return fc, nil 4666 } 4667 4668 func (ec *executionContext) _Dog_size(ctx context.Context, field graphql.CollectedField, obj *Dog) (ret graphql.Marshaler) { 4669 fc, err := ec.fieldContext_Dog_size(ctx, field) 4670 if err != nil { 4671 return graphql.Null 4672 } 4673 ctx = graphql.WithFieldContext(ctx, fc) 4674 defer func() { 4675 if r := recover(); r != nil { 4676 ec.Error(ctx, ec.Recover(ctx, r)) 4677 ret = graphql.Null 4678 } 4679 }() 4680 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4681 ctx = rctx // use context from middleware stack in children 4682 return obj.Size, nil 4683 }) 4684 4685 if resTmp == nil { 4686 if !graphql.HasFieldError(ctx, fc) { 4687 ec.Errorf(ctx, "must not be null") 4688 } 4689 return graphql.Null 4690 } 4691 res := resTmp.(*Size) 4692 fc.Result = res 4693 return ec.marshalNSize2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐSize(ctx, field.Selections, res) 4694 } 4695 4696 func (ec *executionContext) fieldContext_Dog_size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4697 fc = &graphql.FieldContext{ 4698 Object: "Dog", 4699 Field: field, 4700 IsMethod: false, 4701 IsResolver: false, 4702 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4703 switch field.Name { 4704 case "height": 4705 return ec.fieldContext_Size_height(ctx, field) 4706 case "weight": 4707 return ec.fieldContext_Size_weight(ctx, field) 4708 } 4709 return nil, fmt.Errorf("no field named %q was found under type Size", field.Name) 4710 }, 4711 } 4712 return fc, nil 4713 } 4714 4715 func (ec *executionContext) _Dog_dogBreed(ctx context.Context, field graphql.CollectedField, obj *Dog) (ret graphql.Marshaler) { 4716 fc, err := ec.fieldContext_Dog_dogBreed(ctx, field) 4717 if err != nil { 4718 return graphql.Null 4719 } 4720 ctx = graphql.WithFieldContext(ctx, fc) 4721 defer func() { 4722 if r := recover(); r != nil { 4723 ec.Error(ctx, ec.Recover(ctx, r)) 4724 ret = graphql.Null 4725 } 4726 }() 4727 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4728 ctx = rctx // use context from middleware stack in children 4729 return obj.DogBreed, nil 4730 }) 4731 4732 if resTmp == nil { 4733 if !graphql.HasFieldError(ctx, fc) { 4734 ec.Errorf(ctx, "must not be null") 4735 } 4736 return graphql.Null 4737 } 4738 res := resTmp.(string) 4739 fc.Result = res 4740 return ec.marshalNString2string(ctx, field.Selections, res) 4741 } 4742 4743 func (ec *executionContext) fieldContext_Dog_dogBreed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4744 fc = &graphql.FieldContext{ 4745 Object: "Dog", 4746 Field: field, 4747 IsMethod: false, 4748 IsResolver: false, 4749 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4750 return nil, errors.New("field of type String does not have child fields") 4751 }, 4752 } 4753 return fc, nil 4754 } 4755 4756 func (ec *executionContext) _EmbeddedCase1_exportedEmbeddedPointerExportedMethod(ctx context.Context, field graphql.CollectedField, obj *EmbeddedCase1) (ret graphql.Marshaler) { 4757 fc, err := ec.fieldContext_EmbeddedCase1_exportedEmbeddedPointerExportedMethod(ctx, field) 4758 if err != nil { 4759 return graphql.Null 4760 } 4761 ctx = graphql.WithFieldContext(ctx, fc) 4762 defer func() { 4763 if r := recover(); r != nil { 4764 ec.Error(ctx, ec.Recover(ctx, r)) 4765 ret = graphql.Null 4766 } 4767 }() 4768 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4769 ctx = rctx // use context from middleware stack in children 4770 return obj.ExportedEmbeddedPointerExportedMethod(), nil 4771 }) 4772 4773 if resTmp == nil { 4774 if !graphql.HasFieldError(ctx, fc) { 4775 ec.Errorf(ctx, "must not be null") 4776 } 4777 return graphql.Null 4778 } 4779 res := resTmp.(string) 4780 fc.Result = res 4781 return ec.marshalNString2string(ctx, field.Selections, res) 4782 } 4783 4784 func (ec *executionContext) fieldContext_EmbeddedCase1_exportedEmbeddedPointerExportedMethod(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4785 fc = &graphql.FieldContext{ 4786 Object: "EmbeddedCase1", 4787 Field: field, 4788 IsMethod: true, 4789 IsResolver: false, 4790 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4791 return nil, errors.New("field of type String does not have child fields") 4792 }, 4793 } 4794 return fc, nil 4795 } 4796 4797 func (ec *executionContext) _EmbeddedCase2_unexportedEmbeddedPointerExportedMethod(ctx context.Context, field graphql.CollectedField, obj *EmbeddedCase2) (ret graphql.Marshaler) { 4798 fc, err := ec.fieldContext_EmbeddedCase2_unexportedEmbeddedPointerExportedMethod(ctx, field) 4799 if err != nil { 4800 return graphql.Null 4801 } 4802 ctx = graphql.WithFieldContext(ctx, fc) 4803 defer func() { 4804 if r := recover(); r != nil { 4805 ec.Error(ctx, ec.Recover(ctx, r)) 4806 ret = graphql.Null 4807 } 4808 }() 4809 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4810 ctx = rctx // use context from middleware stack in children 4811 return obj.UnexportedEmbeddedPointerExportedMethod(), nil 4812 }) 4813 4814 if resTmp == nil { 4815 if !graphql.HasFieldError(ctx, fc) { 4816 ec.Errorf(ctx, "must not be null") 4817 } 4818 return graphql.Null 4819 } 4820 res := resTmp.(string) 4821 fc.Result = res 4822 return ec.marshalNString2string(ctx, field.Selections, res) 4823 } 4824 4825 func (ec *executionContext) fieldContext_EmbeddedCase2_unexportedEmbeddedPointerExportedMethod(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4826 fc = &graphql.FieldContext{ 4827 Object: "EmbeddedCase2", 4828 Field: field, 4829 IsMethod: true, 4830 IsResolver: false, 4831 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4832 return nil, errors.New("field of type String does not have child fields") 4833 }, 4834 } 4835 return fc, nil 4836 } 4837 4838 func (ec *executionContext) _EmbeddedCase3_unexportedEmbeddedInterfaceExportedMethod(ctx context.Context, field graphql.CollectedField, obj *EmbeddedCase3) (ret graphql.Marshaler) { 4839 fc, err := ec.fieldContext_EmbeddedCase3_unexportedEmbeddedInterfaceExportedMethod(ctx, field) 4840 if err != nil { 4841 return graphql.Null 4842 } 4843 ctx = graphql.WithFieldContext(ctx, fc) 4844 defer func() { 4845 if r := recover(); r != nil { 4846 ec.Error(ctx, ec.Recover(ctx, r)) 4847 ret = graphql.Null 4848 } 4849 }() 4850 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4851 ctx = rctx // use context from middleware stack in children 4852 return obj.UnexportedEmbeddedInterfaceExportedMethod(), nil 4853 }) 4854 4855 if resTmp == nil { 4856 if !graphql.HasFieldError(ctx, fc) { 4857 ec.Errorf(ctx, "must not be null") 4858 } 4859 return graphql.Null 4860 } 4861 res := resTmp.(string) 4862 fc.Result = res 4863 return ec.marshalNString2string(ctx, field.Selections, res) 4864 } 4865 4866 func (ec *executionContext) fieldContext_EmbeddedCase3_unexportedEmbeddedInterfaceExportedMethod(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4867 fc = &graphql.FieldContext{ 4868 Object: "EmbeddedCase3", 4869 Field: field, 4870 IsMethod: true, 4871 IsResolver: false, 4872 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4873 return nil, errors.New("field of type String does not have child fields") 4874 }, 4875 } 4876 return fc, nil 4877 } 4878 4879 func (ec *executionContext) _EmbeddedDefaultScalar_value(ctx context.Context, field graphql.CollectedField, obj *EmbeddedDefaultScalar) (ret graphql.Marshaler) { 4880 fc, err := ec.fieldContext_EmbeddedDefaultScalar_value(ctx, field) 4881 if err != nil { 4882 return graphql.Null 4883 } 4884 ctx = graphql.WithFieldContext(ctx, fc) 4885 defer func() { 4886 if r := recover(); r != nil { 4887 ec.Error(ctx, ec.Recover(ctx, r)) 4888 ret = graphql.Null 4889 } 4890 }() 4891 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4892 ctx = rctx // use context from middleware stack in children 4893 return obj.Value, nil 4894 }) 4895 4896 if resTmp == nil { 4897 return graphql.Null 4898 } 4899 res := resTmp.(*string) 4900 fc.Result = res 4901 return ec.marshalODefaultScalarImplementation2ᚖstring(ctx, field.Selections, res) 4902 } 4903 4904 func (ec *executionContext) fieldContext_EmbeddedDefaultScalar_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4905 fc = &graphql.FieldContext{ 4906 Object: "EmbeddedDefaultScalar", 4907 Field: field, 4908 IsMethod: false, 4909 IsResolver: false, 4910 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4911 return nil, errors.New("field of type DefaultScalarImplementation does not have child fields") 4912 }, 4913 } 4914 return fc, nil 4915 } 4916 4917 func (ec *executionContext) _EmbeddedPointer_ID(ctx context.Context, field graphql.CollectedField, obj *EmbeddedPointerModel) (ret graphql.Marshaler) { 4918 fc, err := ec.fieldContext_EmbeddedPointer_ID(ctx, field) 4919 if err != nil { 4920 return graphql.Null 4921 } 4922 ctx = graphql.WithFieldContext(ctx, fc) 4923 defer func() { 4924 if r := recover(); r != nil { 4925 ec.Error(ctx, ec.Recover(ctx, r)) 4926 ret = graphql.Null 4927 } 4928 }() 4929 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4930 ctx = rctx // use context from middleware stack in children 4931 return obj.ID, nil 4932 }) 4933 4934 if resTmp == nil { 4935 return graphql.Null 4936 } 4937 res := resTmp.(string) 4938 fc.Result = res 4939 return ec.marshalOString2string(ctx, field.Selections, res) 4940 } 4941 4942 func (ec *executionContext) fieldContext_EmbeddedPointer_ID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4943 fc = &graphql.FieldContext{ 4944 Object: "EmbeddedPointer", 4945 Field: field, 4946 IsMethod: false, 4947 IsResolver: false, 4948 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4949 return nil, errors.New("field of type String does not have child fields") 4950 }, 4951 } 4952 return fc, nil 4953 } 4954 4955 func (ec *executionContext) _EmbeddedPointer_Title(ctx context.Context, field graphql.CollectedField, obj *EmbeddedPointerModel) (ret graphql.Marshaler) { 4956 fc, err := ec.fieldContext_EmbeddedPointer_Title(ctx, field) 4957 if err != nil { 4958 return graphql.Null 4959 } 4960 ctx = graphql.WithFieldContext(ctx, fc) 4961 defer func() { 4962 if r := recover(); r != nil { 4963 ec.Error(ctx, ec.Recover(ctx, r)) 4964 ret = graphql.Null 4965 } 4966 }() 4967 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 4968 ctx = rctx // use context from middleware stack in children 4969 return obj.Title, nil 4970 }) 4971 4972 if resTmp == nil { 4973 return graphql.Null 4974 } 4975 res := resTmp.(string) 4976 fc.Result = res 4977 return ec.marshalOString2string(ctx, field.Selections, res) 4978 } 4979 4980 func (ec *executionContext) fieldContext_EmbeddedPointer_Title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 4981 fc = &graphql.FieldContext{ 4982 Object: "EmbeddedPointer", 4983 Field: field, 4984 IsMethod: false, 4985 IsResolver: false, 4986 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 4987 return nil, errors.New("field of type String does not have child fields") 4988 }, 4989 } 4990 return fc, nil 4991 } 4992 4993 func (ec *executionContext) _Error_id(ctx context.Context, field graphql.CollectedField, obj *Error) (ret graphql.Marshaler) { 4994 fc, err := ec.fieldContext_Error_id(ctx, field) 4995 if err != nil { 4996 return graphql.Null 4997 } 4998 ctx = graphql.WithFieldContext(ctx, fc) 4999 defer func() { 5000 if r := recover(); r != nil { 5001 ec.Error(ctx, ec.Recover(ctx, r)) 5002 ret = graphql.Null 5003 } 5004 }() 5005 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5006 ctx = rctx // use context from middleware stack in children 5007 return obj.ID, nil 5008 }) 5009 5010 if resTmp == nil { 5011 if !graphql.HasFieldError(ctx, fc) { 5012 ec.Errorf(ctx, "must not be null") 5013 } 5014 return graphql.Null 5015 } 5016 res := resTmp.(string) 5017 fc.Result = res 5018 return ec.marshalNID2string(ctx, field.Selections, res) 5019 } 5020 5021 func (ec *executionContext) fieldContext_Error_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5022 fc = &graphql.FieldContext{ 5023 Object: "Error", 5024 Field: field, 5025 IsMethod: false, 5026 IsResolver: false, 5027 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5028 return nil, errors.New("field of type ID does not have child fields") 5029 }, 5030 } 5031 return fc, nil 5032 } 5033 5034 func (ec *executionContext) _Error_errorOnNonRequiredField(ctx context.Context, field graphql.CollectedField, obj *Error) (ret graphql.Marshaler) { 5035 fc, err := ec.fieldContext_Error_errorOnNonRequiredField(ctx, field) 5036 if err != nil { 5037 return graphql.Null 5038 } 5039 ctx = graphql.WithFieldContext(ctx, fc) 5040 defer func() { 5041 if r := recover(); r != nil { 5042 ec.Error(ctx, ec.Recover(ctx, r)) 5043 ret = graphql.Null 5044 } 5045 }() 5046 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5047 ctx = rctx // use context from middleware stack in children 5048 return obj.ErrorOnNonRequiredField() 5049 }) 5050 5051 if resTmp == nil { 5052 return graphql.Null 5053 } 5054 res := resTmp.(string) 5055 fc.Result = res 5056 return ec.marshalOString2string(ctx, field.Selections, res) 5057 } 5058 5059 func (ec *executionContext) fieldContext_Error_errorOnNonRequiredField(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5060 fc = &graphql.FieldContext{ 5061 Object: "Error", 5062 Field: field, 5063 IsMethod: true, 5064 IsResolver: false, 5065 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5066 return nil, errors.New("field of type String does not have child fields") 5067 }, 5068 } 5069 return fc, nil 5070 } 5071 5072 func (ec *executionContext) _Error_errorOnRequiredField(ctx context.Context, field graphql.CollectedField, obj *Error) (ret graphql.Marshaler) { 5073 fc, err := ec.fieldContext_Error_errorOnRequiredField(ctx, field) 5074 if err != nil { 5075 return graphql.Null 5076 } 5077 ctx = graphql.WithFieldContext(ctx, fc) 5078 defer func() { 5079 if r := recover(); r != nil { 5080 ec.Error(ctx, ec.Recover(ctx, r)) 5081 ret = graphql.Null 5082 } 5083 }() 5084 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5085 ctx = rctx // use context from middleware stack in children 5086 return obj.ErrorOnRequiredField() 5087 }) 5088 5089 if resTmp == nil { 5090 if !graphql.HasFieldError(ctx, fc) { 5091 ec.Errorf(ctx, "must not be null") 5092 } 5093 return graphql.Null 5094 } 5095 res := resTmp.(string) 5096 fc.Result = res 5097 return ec.marshalNString2string(ctx, field.Selections, res) 5098 } 5099 5100 func (ec *executionContext) fieldContext_Error_errorOnRequiredField(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5101 fc = &graphql.FieldContext{ 5102 Object: "Error", 5103 Field: field, 5104 IsMethod: true, 5105 IsResolver: false, 5106 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5107 return nil, errors.New("field of type String does not have child fields") 5108 }, 5109 } 5110 return fc, nil 5111 } 5112 5113 func (ec *executionContext) _Error_nilOnRequiredField(ctx context.Context, field graphql.CollectedField, obj *Error) (ret graphql.Marshaler) { 5114 fc, err := ec.fieldContext_Error_nilOnRequiredField(ctx, field) 5115 if err != nil { 5116 return graphql.Null 5117 } 5118 ctx = graphql.WithFieldContext(ctx, fc) 5119 defer func() { 5120 if r := recover(); r != nil { 5121 ec.Error(ctx, ec.Recover(ctx, r)) 5122 ret = graphql.Null 5123 } 5124 }() 5125 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5126 ctx = rctx // use context from middleware stack in children 5127 return obj.NilOnRequiredField(), nil 5128 }) 5129 5130 if resTmp == nil { 5131 if !graphql.HasFieldError(ctx, fc) { 5132 ec.Errorf(ctx, "must not be null") 5133 } 5134 return graphql.Null 5135 } 5136 res := resTmp.(*string) 5137 fc.Result = res 5138 return ec.marshalNString2ᚖstring(ctx, field.Selections, res) 5139 } 5140 5141 func (ec *executionContext) fieldContext_Error_nilOnRequiredField(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5142 fc = &graphql.FieldContext{ 5143 Object: "Error", 5144 Field: field, 5145 IsMethod: true, 5146 IsResolver: false, 5147 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5148 return nil, errors.New("field of type String does not have child fields") 5149 }, 5150 } 5151 return fc, nil 5152 } 5153 5154 func (ec *executionContext) _Errors_a(ctx context.Context, field graphql.CollectedField, obj *Errors) (ret graphql.Marshaler) { 5155 fc, err := ec.fieldContext_Errors_a(ctx, field) 5156 if err != nil { 5157 return graphql.Null 5158 } 5159 ctx = graphql.WithFieldContext(ctx, fc) 5160 defer func() { 5161 if r := recover(); r != nil { 5162 ec.Error(ctx, ec.Recover(ctx, r)) 5163 ret = graphql.Null 5164 } 5165 }() 5166 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5167 ctx = rctx // use context from middleware stack in children 5168 return ec.resolvers.Errors().A(rctx, obj) 5169 }) 5170 5171 if resTmp == nil { 5172 if !graphql.HasFieldError(ctx, fc) { 5173 ec.Errorf(ctx, "must not be null") 5174 } 5175 return graphql.Null 5176 } 5177 res := resTmp.(*Error) 5178 fc.Result = res 5179 return ec.marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx, field.Selections, res) 5180 } 5181 5182 func (ec *executionContext) fieldContext_Errors_a(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5183 fc = &graphql.FieldContext{ 5184 Object: "Errors", 5185 Field: field, 5186 IsMethod: true, 5187 IsResolver: true, 5188 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5189 switch field.Name { 5190 case "id": 5191 return ec.fieldContext_Error_id(ctx, field) 5192 case "errorOnNonRequiredField": 5193 return ec.fieldContext_Error_errorOnNonRequiredField(ctx, field) 5194 case "errorOnRequiredField": 5195 return ec.fieldContext_Error_errorOnRequiredField(ctx, field) 5196 case "nilOnRequiredField": 5197 return ec.fieldContext_Error_nilOnRequiredField(ctx, field) 5198 } 5199 return nil, fmt.Errorf("no field named %q was found under type Error", field.Name) 5200 }, 5201 } 5202 return fc, nil 5203 } 5204 5205 func (ec *executionContext) _Errors_b(ctx context.Context, field graphql.CollectedField, obj *Errors) (ret graphql.Marshaler) { 5206 fc, err := ec.fieldContext_Errors_b(ctx, field) 5207 if err != nil { 5208 return graphql.Null 5209 } 5210 ctx = graphql.WithFieldContext(ctx, fc) 5211 defer func() { 5212 if r := recover(); r != nil { 5213 ec.Error(ctx, ec.Recover(ctx, r)) 5214 ret = graphql.Null 5215 } 5216 }() 5217 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5218 ctx = rctx // use context from middleware stack in children 5219 return ec.resolvers.Errors().B(rctx, obj) 5220 }) 5221 5222 if resTmp == nil { 5223 if !graphql.HasFieldError(ctx, fc) { 5224 ec.Errorf(ctx, "must not be null") 5225 } 5226 return graphql.Null 5227 } 5228 res := resTmp.(*Error) 5229 fc.Result = res 5230 return ec.marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx, field.Selections, res) 5231 } 5232 5233 func (ec *executionContext) fieldContext_Errors_b(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5234 fc = &graphql.FieldContext{ 5235 Object: "Errors", 5236 Field: field, 5237 IsMethod: true, 5238 IsResolver: true, 5239 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5240 switch field.Name { 5241 case "id": 5242 return ec.fieldContext_Error_id(ctx, field) 5243 case "errorOnNonRequiredField": 5244 return ec.fieldContext_Error_errorOnNonRequiredField(ctx, field) 5245 case "errorOnRequiredField": 5246 return ec.fieldContext_Error_errorOnRequiredField(ctx, field) 5247 case "nilOnRequiredField": 5248 return ec.fieldContext_Error_nilOnRequiredField(ctx, field) 5249 } 5250 return nil, fmt.Errorf("no field named %q was found under type Error", field.Name) 5251 }, 5252 } 5253 return fc, nil 5254 } 5255 5256 func (ec *executionContext) _Errors_c(ctx context.Context, field graphql.CollectedField, obj *Errors) (ret graphql.Marshaler) { 5257 fc, err := ec.fieldContext_Errors_c(ctx, field) 5258 if err != nil { 5259 return graphql.Null 5260 } 5261 ctx = graphql.WithFieldContext(ctx, fc) 5262 defer func() { 5263 if r := recover(); r != nil { 5264 ec.Error(ctx, ec.Recover(ctx, r)) 5265 ret = graphql.Null 5266 } 5267 }() 5268 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5269 ctx = rctx // use context from middleware stack in children 5270 return ec.resolvers.Errors().C(rctx, obj) 5271 }) 5272 5273 if resTmp == nil { 5274 if !graphql.HasFieldError(ctx, fc) { 5275 ec.Errorf(ctx, "must not be null") 5276 } 5277 return graphql.Null 5278 } 5279 res := resTmp.(*Error) 5280 fc.Result = res 5281 return ec.marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx, field.Selections, res) 5282 } 5283 5284 func (ec *executionContext) fieldContext_Errors_c(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5285 fc = &graphql.FieldContext{ 5286 Object: "Errors", 5287 Field: field, 5288 IsMethod: true, 5289 IsResolver: true, 5290 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5291 switch field.Name { 5292 case "id": 5293 return ec.fieldContext_Error_id(ctx, field) 5294 case "errorOnNonRequiredField": 5295 return ec.fieldContext_Error_errorOnNonRequiredField(ctx, field) 5296 case "errorOnRequiredField": 5297 return ec.fieldContext_Error_errorOnRequiredField(ctx, field) 5298 case "nilOnRequiredField": 5299 return ec.fieldContext_Error_nilOnRequiredField(ctx, field) 5300 } 5301 return nil, fmt.Errorf("no field named %q was found under type Error", field.Name) 5302 }, 5303 } 5304 return fc, nil 5305 } 5306 5307 func (ec *executionContext) _Errors_d(ctx context.Context, field graphql.CollectedField, obj *Errors) (ret graphql.Marshaler) { 5308 fc, err := ec.fieldContext_Errors_d(ctx, field) 5309 if err != nil { 5310 return graphql.Null 5311 } 5312 ctx = graphql.WithFieldContext(ctx, fc) 5313 defer func() { 5314 if r := recover(); r != nil { 5315 ec.Error(ctx, ec.Recover(ctx, r)) 5316 ret = graphql.Null 5317 } 5318 }() 5319 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5320 ctx = rctx // use context from middleware stack in children 5321 return ec.resolvers.Errors().D(rctx, obj) 5322 }) 5323 5324 if resTmp == nil { 5325 if !graphql.HasFieldError(ctx, fc) { 5326 ec.Errorf(ctx, "must not be null") 5327 } 5328 return graphql.Null 5329 } 5330 res := resTmp.(*Error) 5331 fc.Result = res 5332 return ec.marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx, field.Selections, res) 5333 } 5334 5335 func (ec *executionContext) fieldContext_Errors_d(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5336 fc = &graphql.FieldContext{ 5337 Object: "Errors", 5338 Field: field, 5339 IsMethod: true, 5340 IsResolver: true, 5341 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5342 switch field.Name { 5343 case "id": 5344 return ec.fieldContext_Error_id(ctx, field) 5345 case "errorOnNonRequiredField": 5346 return ec.fieldContext_Error_errorOnNonRequiredField(ctx, field) 5347 case "errorOnRequiredField": 5348 return ec.fieldContext_Error_errorOnRequiredField(ctx, field) 5349 case "nilOnRequiredField": 5350 return ec.fieldContext_Error_nilOnRequiredField(ctx, field) 5351 } 5352 return nil, fmt.Errorf("no field named %q was found under type Error", field.Name) 5353 }, 5354 } 5355 return fc, nil 5356 } 5357 5358 func (ec *executionContext) _Errors_e(ctx context.Context, field graphql.CollectedField, obj *Errors) (ret graphql.Marshaler) { 5359 fc, err := ec.fieldContext_Errors_e(ctx, field) 5360 if err != nil { 5361 return graphql.Null 5362 } 5363 ctx = graphql.WithFieldContext(ctx, fc) 5364 defer func() { 5365 if r := recover(); r != nil { 5366 ec.Error(ctx, ec.Recover(ctx, r)) 5367 ret = graphql.Null 5368 } 5369 }() 5370 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5371 ctx = rctx // use context from middleware stack in children 5372 return ec.resolvers.Errors().E(rctx, obj) 5373 }) 5374 5375 if resTmp == nil { 5376 if !graphql.HasFieldError(ctx, fc) { 5377 ec.Errorf(ctx, "must not be null") 5378 } 5379 return graphql.Null 5380 } 5381 res := resTmp.(*Error) 5382 fc.Result = res 5383 return ec.marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx, field.Selections, res) 5384 } 5385 5386 func (ec *executionContext) fieldContext_Errors_e(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5387 fc = &graphql.FieldContext{ 5388 Object: "Errors", 5389 Field: field, 5390 IsMethod: true, 5391 IsResolver: true, 5392 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5393 switch field.Name { 5394 case "id": 5395 return ec.fieldContext_Error_id(ctx, field) 5396 case "errorOnNonRequiredField": 5397 return ec.fieldContext_Error_errorOnNonRequiredField(ctx, field) 5398 case "errorOnRequiredField": 5399 return ec.fieldContext_Error_errorOnRequiredField(ctx, field) 5400 case "nilOnRequiredField": 5401 return ec.fieldContext_Error_nilOnRequiredField(ctx, field) 5402 } 5403 return nil, fmt.Errorf("no field named %q was found under type Error", field.Name) 5404 }, 5405 } 5406 return fc, nil 5407 } 5408 5409 func (ec *executionContext) _FieldsOrderPayload_firstFieldValue(ctx context.Context, field graphql.CollectedField, obj *FieldsOrderPayload) (ret graphql.Marshaler) { 5410 fc, err := ec.fieldContext_FieldsOrderPayload_firstFieldValue(ctx, field) 5411 if err != nil { 5412 return graphql.Null 5413 } 5414 ctx = graphql.WithFieldContext(ctx, fc) 5415 defer func() { 5416 if r := recover(); r != nil { 5417 ec.Error(ctx, ec.Recover(ctx, r)) 5418 ret = graphql.Null 5419 } 5420 }() 5421 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5422 ctx = rctx // use context from middleware stack in children 5423 return obj.FirstFieldValue, nil 5424 }) 5425 5426 if resTmp == nil { 5427 return graphql.Null 5428 } 5429 res := resTmp.(*string) 5430 fc.Result = res 5431 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 5432 } 5433 5434 func (ec *executionContext) fieldContext_FieldsOrderPayload_firstFieldValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5435 fc = &graphql.FieldContext{ 5436 Object: "FieldsOrderPayload", 5437 Field: field, 5438 IsMethod: false, 5439 IsResolver: false, 5440 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5441 return nil, errors.New("field of type String does not have child fields") 5442 }, 5443 } 5444 return fc, nil 5445 } 5446 5447 func (ec *executionContext) _ForcedResolver_field(ctx context.Context, field graphql.CollectedField, obj *ForcedResolver) (ret graphql.Marshaler) { 5448 fc, err := ec.fieldContext_ForcedResolver_field(ctx, field) 5449 if err != nil { 5450 return graphql.Null 5451 } 5452 ctx = graphql.WithFieldContext(ctx, fc) 5453 defer func() { 5454 if r := recover(); r != nil { 5455 ec.Error(ctx, ec.Recover(ctx, r)) 5456 ret = graphql.Null 5457 } 5458 }() 5459 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5460 ctx = rctx // use context from middleware stack in children 5461 return ec.resolvers.ForcedResolver().Field(rctx, obj) 5462 }) 5463 5464 if resTmp == nil { 5465 return graphql.Null 5466 } 5467 res := resTmp.(*Circle) 5468 fc.Result = res 5469 return ec.marshalOCircle2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCircle(ctx, field.Selections, res) 5470 } 5471 5472 func (ec *executionContext) fieldContext_ForcedResolver_field(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5473 fc = &graphql.FieldContext{ 5474 Object: "ForcedResolver", 5475 Field: field, 5476 IsMethod: true, 5477 IsResolver: true, 5478 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5479 switch field.Name { 5480 case "radius": 5481 return ec.fieldContext_Circle_radius(ctx, field) 5482 case "area": 5483 return ec.fieldContext_Circle_area(ctx, field) 5484 case "coordinates": 5485 return ec.fieldContext_Circle_coordinates(ctx, field) 5486 } 5487 return nil, fmt.Errorf("no field named %q was found under type Circle", field.Name) 5488 }, 5489 } 5490 return fc, nil 5491 } 5492 5493 func (ec *executionContext) _InnerObject_id(ctx context.Context, field graphql.CollectedField, obj *InnerObject) (ret graphql.Marshaler) { 5494 fc, err := ec.fieldContext_InnerObject_id(ctx, field) 5495 if err != nil { 5496 return graphql.Null 5497 } 5498 ctx = graphql.WithFieldContext(ctx, fc) 5499 defer func() { 5500 if r := recover(); r != nil { 5501 ec.Error(ctx, ec.Recover(ctx, r)) 5502 ret = graphql.Null 5503 } 5504 }() 5505 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5506 ctx = rctx // use context from middleware stack in children 5507 return obj.ID, nil 5508 }) 5509 5510 if resTmp == nil { 5511 if !graphql.HasFieldError(ctx, fc) { 5512 ec.Errorf(ctx, "must not be null") 5513 } 5514 return graphql.Null 5515 } 5516 res := resTmp.(int) 5517 fc.Result = res 5518 return ec.marshalNInt2int(ctx, field.Selections, res) 5519 } 5520 5521 func (ec *executionContext) fieldContext_InnerObject_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5522 fc = &graphql.FieldContext{ 5523 Object: "InnerObject", 5524 Field: field, 5525 IsMethod: false, 5526 IsResolver: false, 5527 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5528 return nil, errors.New("field of type Int does not have child fields") 5529 }, 5530 } 5531 return fc, nil 5532 } 5533 5534 func (ec *executionContext) _InvalidIdentifier_id(ctx context.Context, field graphql.CollectedField, obj *invalid_packagename.InvalidIdentifier) (ret graphql.Marshaler) { 5535 fc, err := ec.fieldContext_InvalidIdentifier_id(ctx, field) 5536 if err != nil { 5537 return graphql.Null 5538 } 5539 ctx = graphql.WithFieldContext(ctx, fc) 5540 defer func() { 5541 if r := recover(); r != nil { 5542 ec.Error(ctx, ec.Recover(ctx, r)) 5543 ret = graphql.Null 5544 } 5545 }() 5546 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5547 ctx = rctx // use context from middleware stack in children 5548 return obj.ID, nil 5549 }) 5550 5551 if resTmp == nil { 5552 if !graphql.HasFieldError(ctx, fc) { 5553 ec.Errorf(ctx, "must not be null") 5554 } 5555 return graphql.Null 5556 } 5557 res := resTmp.(int) 5558 fc.Result = res 5559 return ec.marshalNInt2int(ctx, field.Selections, res) 5560 } 5561 5562 func (ec *executionContext) fieldContext_InvalidIdentifier_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5563 fc = &graphql.FieldContext{ 5564 Object: "InvalidIdentifier", 5565 Field: field, 5566 IsMethod: false, 5567 IsResolver: false, 5568 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5569 return nil, errors.New("field of type Int does not have child fields") 5570 }, 5571 } 5572 return fc, nil 5573 } 5574 5575 func (ec *executionContext) _It_id(ctx context.Context, field graphql.CollectedField, obj *introspection1.It) (ret graphql.Marshaler) { 5576 fc, err := ec.fieldContext_It_id(ctx, field) 5577 if err != nil { 5578 return graphql.Null 5579 } 5580 ctx = graphql.WithFieldContext(ctx, fc) 5581 defer func() { 5582 if r := recover(); r != nil { 5583 ec.Error(ctx, ec.Recover(ctx, r)) 5584 ret = graphql.Null 5585 } 5586 }() 5587 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5588 ctx = rctx // use context from middleware stack in children 5589 return obj.ID, nil 5590 }) 5591 5592 if resTmp == nil { 5593 if !graphql.HasFieldError(ctx, fc) { 5594 ec.Errorf(ctx, "must not be null") 5595 } 5596 return graphql.Null 5597 } 5598 res := resTmp.(string) 5599 fc.Result = res 5600 return ec.marshalNID2string(ctx, field.Selections, res) 5601 } 5602 5603 func (ec *executionContext) fieldContext_It_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5604 fc = &graphql.FieldContext{ 5605 Object: "It", 5606 Field: field, 5607 IsMethod: false, 5608 IsResolver: false, 5609 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5610 return nil, errors.New("field of type ID does not have child fields") 5611 }, 5612 } 5613 return fc, nil 5614 } 5615 5616 func (ec *executionContext) _LoopA_b(ctx context.Context, field graphql.CollectedField, obj *LoopA) (ret graphql.Marshaler) { 5617 fc, err := ec.fieldContext_LoopA_b(ctx, field) 5618 if err != nil { 5619 return graphql.Null 5620 } 5621 ctx = graphql.WithFieldContext(ctx, fc) 5622 defer func() { 5623 if r := recover(); r != nil { 5624 ec.Error(ctx, ec.Recover(ctx, r)) 5625 ret = graphql.Null 5626 } 5627 }() 5628 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5629 ctx = rctx // use context from middleware stack in children 5630 return obj.B, nil 5631 }) 5632 5633 if resTmp == nil { 5634 if !graphql.HasFieldError(ctx, fc) { 5635 ec.Errorf(ctx, "must not be null") 5636 } 5637 return graphql.Null 5638 } 5639 res := resTmp.(*LoopB) 5640 fc.Result = res 5641 return ec.marshalNLoopB2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐLoopB(ctx, field.Selections, res) 5642 } 5643 5644 func (ec *executionContext) fieldContext_LoopA_b(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5645 fc = &graphql.FieldContext{ 5646 Object: "LoopA", 5647 Field: field, 5648 IsMethod: false, 5649 IsResolver: false, 5650 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5651 switch field.Name { 5652 case "a": 5653 return ec.fieldContext_LoopB_a(ctx, field) 5654 } 5655 return nil, fmt.Errorf("no field named %q was found under type LoopB", field.Name) 5656 }, 5657 } 5658 return fc, nil 5659 } 5660 5661 func (ec *executionContext) _LoopB_a(ctx context.Context, field graphql.CollectedField, obj *LoopB) (ret graphql.Marshaler) { 5662 fc, err := ec.fieldContext_LoopB_a(ctx, field) 5663 if err != nil { 5664 return graphql.Null 5665 } 5666 ctx = graphql.WithFieldContext(ctx, fc) 5667 defer func() { 5668 if r := recover(); r != nil { 5669 ec.Error(ctx, ec.Recover(ctx, r)) 5670 ret = graphql.Null 5671 } 5672 }() 5673 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5674 ctx = rctx // use context from middleware stack in children 5675 return obj.A, nil 5676 }) 5677 5678 if resTmp == nil { 5679 if !graphql.HasFieldError(ctx, fc) { 5680 ec.Errorf(ctx, "must not be null") 5681 } 5682 return graphql.Null 5683 } 5684 res := resTmp.(*LoopA) 5685 fc.Result = res 5686 return ec.marshalNLoopA2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐLoopA(ctx, field.Selections, res) 5687 } 5688 5689 func (ec *executionContext) fieldContext_LoopB_a(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5690 fc = &graphql.FieldContext{ 5691 Object: "LoopB", 5692 Field: field, 5693 IsMethod: false, 5694 IsResolver: false, 5695 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5696 switch field.Name { 5697 case "b": 5698 return ec.fieldContext_LoopA_b(ctx, field) 5699 } 5700 return nil, fmt.Errorf("no field named %q was found under type LoopA", field.Name) 5701 }, 5702 } 5703 return fc, nil 5704 } 5705 5706 func (ec *executionContext) _Map_id(ctx context.Context, field graphql.CollectedField, obj *Map) (ret graphql.Marshaler) { 5707 fc, err := ec.fieldContext_Map_id(ctx, field) 5708 if err != nil { 5709 return graphql.Null 5710 } 5711 ctx = graphql.WithFieldContext(ctx, fc) 5712 defer func() { 5713 if r := recover(); r != nil { 5714 ec.Error(ctx, ec.Recover(ctx, r)) 5715 ret = graphql.Null 5716 } 5717 }() 5718 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5719 ctx = rctx // use context from middleware stack in children 5720 return obj.ID, nil 5721 }) 5722 5723 if resTmp == nil { 5724 if !graphql.HasFieldError(ctx, fc) { 5725 ec.Errorf(ctx, "must not be null") 5726 } 5727 return graphql.Null 5728 } 5729 res := resTmp.(string) 5730 fc.Result = res 5731 return ec.marshalNID2string(ctx, field.Selections, res) 5732 } 5733 5734 func (ec *executionContext) fieldContext_Map_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5735 fc = &graphql.FieldContext{ 5736 Object: "Map", 5737 Field: field, 5738 IsMethod: false, 5739 IsResolver: false, 5740 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5741 return nil, errors.New("field of type ID does not have child fields") 5742 }, 5743 } 5744 return fc, nil 5745 } 5746 5747 func (ec *executionContext) _MapStringInterfaceType_a(ctx context.Context, field graphql.CollectedField, obj map[string]interface{}) (ret graphql.Marshaler) { 5748 fc, err := ec.fieldContext_MapStringInterfaceType_a(ctx, field) 5749 if err != nil { 5750 return graphql.Null 5751 } 5752 ctx = graphql.WithFieldContext(ctx, fc) 5753 defer func() { 5754 if r := recover(); r != nil { 5755 ec.Error(ctx, ec.Recover(ctx, r)) 5756 ret = graphql.Null 5757 } 5758 }() 5759 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5760 ctx = rctx // use context from middleware stack in children 5761 switch v := obj["a"].(type) { 5762 case *string: 5763 return v, nil 5764 case string: 5765 return &v, nil 5766 case nil: 5767 return (*string)(nil), nil 5768 default: 5769 return nil, fmt.Errorf("unexpected type %T for field %s", v, "a") 5770 } 5771 }) 5772 5773 if resTmp == nil { 5774 return graphql.Null 5775 } 5776 res := resTmp.(*string) 5777 fc.Result = res 5778 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 5779 } 5780 5781 func (ec *executionContext) fieldContext_MapStringInterfaceType_a(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5782 fc = &graphql.FieldContext{ 5783 Object: "MapStringInterfaceType", 5784 Field: field, 5785 IsMethod: false, 5786 IsResolver: false, 5787 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5788 return nil, errors.New("field of type String does not have child fields") 5789 }, 5790 } 5791 return fc, nil 5792 } 5793 5794 func (ec *executionContext) _MapStringInterfaceType_b(ctx context.Context, field graphql.CollectedField, obj map[string]interface{}) (ret graphql.Marshaler) { 5795 fc, err := ec.fieldContext_MapStringInterfaceType_b(ctx, field) 5796 if err != nil { 5797 return graphql.Null 5798 } 5799 ctx = graphql.WithFieldContext(ctx, fc) 5800 defer func() { 5801 if r := recover(); r != nil { 5802 ec.Error(ctx, ec.Recover(ctx, r)) 5803 ret = graphql.Null 5804 } 5805 }() 5806 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5807 ctx = rctx // use context from middleware stack in children 5808 switch v := obj["b"].(type) { 5809 case *int: 5810 return v, nil 5811 case int: 5812 return &v, nil 5813 case nil: 5814 return (*int)(nil), nil 5815 default: 5816 return nil, fmt.Errorf("unexpected type %T for field %s", v, "b") 5817 } 5818 }) 5819 5820 if resTmp == nil { 5821 return graphql.Null 5822 } 5823 res := resTmp.(*int) 5824 fc.Result = res 5825 return ec.marshalOInt2ᚖint(ctx, field.Selections, res) 5826 } 5827 5828 func (ec *executionContext) fieldContext_MapStringInterfaceType_b(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5829 fc = &graphql.FieldContext{ 5830 Object: "MapStringInterfaceType", 5831 Field: field, 5832 IsMethod: false, 5833 IsResolver: false, 5834 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5835 return nil, errors.New("field of type Int does not have child fields") 5836 }, 5837 } 5838 return fc, nil 5839 } 5840 5841 func (ec *executionContext) _ModelMethods_resolverField(ctx context.Context, field graphql.CollectedField, obj *ModelMethods) (ret graphql.Marshaler) { 5842 fc, err := ec.fieldContext_ModelMethods_resolverField(ctx, field) 5843 if err != nil { 5844 return graphql.Null 5845 } 5846 ctx = graphql.WithFieldContext(ctx, fc) 5847 defer func() { 5848 if r := recover(); r != nil { 5849 ec.Error(ctx, ec.Recover(ctx, r)) 5850 ret = graphql.Null 5851 } 5852 }() 5853 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5854 ctx = rctx // use context from middleware stack in children 5855 return ec.resolvers.ModelMethods().ResolverField(rctx, obj) 5856 }) 5857 5858 if resTmp == nil { 5859 if !graphql.HasFieldError(ctx, fc) { 5860 ec.Errorf(ctx, "must not be null") 5861 } 5862 return graphql.Null 5863 } 5864 res := resTmp.(bool) 5865 fc.Result = res 5866 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 5867 } 5868 5869 func (ec *executionContext) fieldContext_ModelMethods_resolverField(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5870 fc = &graphql.FieldContext{ 5871 Object: "ModelMethods", 5872 Field: field, 5873 IsMethod: true, 5874 IsResolver: true, 5875 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5876 return nil, errors.New("field of type Boolean does not have child fields") 5877 }, 5878 } 5879 return fc, nil 5880 } 5881 5882 func (ec *executionContext) _ModelMethods_noContext(ctx context.Context, field graphql.CollectedField, obj *ModelMethods) (ret graphql.Marshaler) { 5883 fc, err := ec.fieldContext_ModelMethods_noContext(ctx, field) 5884 if err != nil { 5885 return graphql.Null 5886 } 5887 ctx = graphql.WithFieldContext(ctx, fc) 5888 defer func() { 5889 if r := recover(); r != nil { 5890 ec.Error(ctx, ec.Recover(ctx, r)) 5891 ret = graphql.Null 5892 } 5893 }() 5894 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5895 ctx = rctx // use context from middleware stack in children 5896 return obj.NoContext(), nil 5897 }) 5898 5899 if resTmp == nil { 5900 if !graphql.HasFieldError(ctx, fc) { 5901 ec.Errorf(ctx, "must not be null") 5902 } 5903 return graphql.Null 5904 } 5905 res := resTmp.(bool) 5906 fc.Result = res 5907 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 5908 } 5909 5910 func (ec *executionContext) fieldContext_ModelMethods_noContext(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5911 fc = &graphql.FieldContext{ 5912 Object: "ModelMethods", 5913 Field: field, 5914 IsMethod: true, 5915 IsResolver: false, 5916 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5917 return nil, errors.New("field of type Boolean does not have child fields") 5918 }, 5919 } 5920 return fc, nil 5921 } 5922 5923 func (ec *executionContext) _ModelMethods_withContext(ctx context.Context, field graphql.CollectedField, obj *ModelMethods) (ret graphql.Marshaler) { 5924 fc, err := ec.fieldContext_ModelMethods_withContext(ctx, field) 5925 if err != nil { 5926 return graphql.Null 5927 } 5928 ctx = graphql.WithFieldContext(ctx, fc) 5929 defer func() { 5930 if r := recover(); r != nil { 5931 ec.Error(ctx, ec.Recover(ctx, r)) 5932 ret = graphql.Null 5933 } 5934 }() 5935 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 5936 ctx = rctx // use context from middleware stack in children 5937 return obj.WithContext(ctx), nil 5938 }) 5939 5940 if resTmp == nil { 5941 if !graphql.HasFieldError(ctx, fc) { 5942 ec.Errorf(ctx, "must not be null") 5943 } 5944 return graphql.Null 5945 } 5946 res := resTmp.(bool) 5947 fc.Result = res 5948 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 5949 } 5950 5951 func (ec *executionContext) fieldContext_ModelMethods_withContext(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5952 fc = &graphql.FieldContext{ 5953 Object: "ModelMethods", 5954 Field: field, 5955 IsMethod: true, 5956 IsResolver: false, 5957 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5958 return nil, errors.New("field of type Boolean does not have child fields") 5959 }, 5960 } 5961 return fc, nil 5962 } 5963 5964 func (ec *executionContext) _Mutation_defaultInput(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 5965 fc, err := ec.fieldContext_Mutation_defaultInput(ctx, field) 5966 if err != nil { 5967 return graphql.Null 5968 } 5969 ctx = graphql.WithFieldContext(ctx, fc) 5970 defer func() { 5971 if r := recover(); r != nil { 5972 ec.Error(ctx, ec.Recover(ctx, r)) 5973 ret = graphql.Null 5974 } 5975 }() 5976 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 5977 ctx = rctx // use context from middleware stack in children 5978 return ec.resolvers.Mutation().DefaultInput(rctx, fc.Args["input"].(DefaultInput)) 5979 }) 5980 5981 if resTmp == nil { 5982 if !graphql.HasFieldError(ctx, fc) { 5983 ec.Errorf(ctx, "must not be null") 5984 } 5985 return graphql.Null 5986 } 5987 res := resTmp.(*DefaultParametersMirror) 5988 fc.Result = res 5989 return ec.marshalNDefaultParametersMirror2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐDefaultParametersMirror(ctx, field.Selections, res) 5990 } 5991 5992 func (ec *executionContext) fieldContext_Mutation_defaultInput(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 5993 fc = &graphql.FieldContext{ 5994 Object: "Mutation", 5995 Field: field, 5996 IsMethod: true, 5997 IsResolver: true, 5998 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 5999 switch field.Name { 6000 case "falsyBoolean": 6001 return ec.fieldContext_DefaultParametersMirror_falsyBoolean(ctx, field) 6002 case "truthyBoolean": 6003 return ec.fieldContext_DefaultParametersMirror_truthyBoolean(ctx, field) 6004 } 6005 return nil, fmt.Errorf("no field named %q was found under type DefaultParametersMirror", field.Name) 6006 }, 6007 } 6008 defer func() { 6009 if r := recover(); r != nil { 6010 err = ec.Recover(ctx, r) 6011 ec.Error(ctx, err) 6012 } 6013 }() 6014 ctx = graphql.WithFieldContext(ctx, fc) 6015 if fc.Args, err = ec.field_Mutation_defaultInput_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 6016 ec.Error(ctx, err) 6017 return 6018 } 6019 return fc, nil 6020 } 6021 6022 func (ec *executionContext) _Mutation_overrideValueViaInput(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 6023 fc, err := ec.fieldContext_Mutation_overrideValueViaInput(ctx, field) 6024 if err != nil { 6025 return graphql.Null 6026 } 6027 ctx = graphql.WithFieldContext(ctx, fc) 6028 defer func() { 6029 if r := recover(); r != nil { 6030 ec.Error(ctx, ec.Recover(ctx, r)) 6031 ret = graphql.Null 6032 } 6033 }() 6034 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 6035 ctx = rctx // use context from middleware stack in children 6036 return ec.resolvers.Mutation().OverrideValueViaInput(rctx, fc.Args["input"].(FieldsOrderInput)) 6037 }) 6038 6039 if resTmp == nil { 6040 if !graphql.HasFieldError(ctx, fc) { 6041 ec.Errorf(ctx, "must not be null") 6042 } 6043 return graphql.Null 6044 } 6045 res := resTmp.(*FieldsOrderPayload) 6046 fc.Result = res 6047 return ec.marshalNFieldsOrderPayload2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐFieldsOrderPayload(ctx, field.Selections, res) 6048 } 6049 6050 func (ec *executionContext) fieldContext_Mutation_overrideValueViaInput(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 6051 fc = &graphql.FieldContext{ 6052 Object: "Mutation", 6053 Field: field, 6054 IsMethod: true, 6055 IsResolver: true, 6056 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 6057 switch field.Name { 6058 case "firstFieldValue": 6059 return ec.fieldContext_FieldsOrderPayload_firstFieldValue(ctx, field) 6060 } 6061 return nil, fmt.Errorf("no field named %q was found under type FieldsOrderPayload", field.Name) 6062 }, 6063 } 6064 defer func() { 6065 if r := recover(); r != nil { 6066 err = ec.Recover(ctx, r) 6067 ec.Error(ctx, err) 6068 } 6069 }() 6070 ctx = graphql.WithFieldContext(ctx, fc) 6071 if fc.Args, err = ec.field_Mutation_overrideValueViaInput_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 6072 ec.Error(ctx, err) 6073 return 6074 } 6075 return fc, nil 6076 } 6077 6078 func (ec *executionContext) _Mutation_updateSomething(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 6079 fc, err := ec.fieldContext_Mutation_updateSomething(ctx, field) 6080 if err != nil { 6081 return graphql.Null 6082 } 6083 ctx = graphql.WithFieldContext(ctx, fc) 6084 defer func() { 6085 if r := recover(); r != nil { 6086 ec.Error(ctx, ec.Recover(ctx, r)) 6087 ret = graphql.Null 6088 } 6089 }() 6090 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 6091 ctx = rctx // use context from middleware stack in children 6092 return ec.resolvers.Mutation().UpdateSomething(rctx, fc.Args["input"].(SpecialInput)) 6093 }) 6094 6095 if resTmp == nil { 6096 if !graphql.HasFieldError(ctx, fc) { 6097 ec.Errorf(ctx, "must not be null") 6098 } 6099 return graphql.Null 6100 } 6101 res := resTmp.(string) 6102 fc.Result = res 6103 return ec.marshalNString2string(ctx, field.Selections, res) 6104 } 6105 6106 func (ec *executionContext) fieldContext_Mutation_updateSomething(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 6107 fc = &graphql.FieldContext{ 6108 Object: "Mutation", 6109 Field: field, 6110 IsMethod: true, 6111 IsResolver: true, 6112 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 6113 return nil, errors.New("field of type String does not have child fields") 6114 }, 6115 } 6116 defer func() { 6117 if r := recover(); r != nil { 6118 err = ec.Recover(ctx, r) 6119 ec.Error(ctx, err) 6120 } 6121 }() 6122 ctx = graphql.WithFieldContext(ctx, fc) 6123 if fc.Args, err = ec.field_Mutation_updateSomething_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 6124 ec.Error(ctx, err) 6125 return 6126 } 6127 return fc, nil 6128 } 6129 6130 func (ec *executionContext) _Mutation_updatePtrToPtr(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 6131 fc, err := ec.fieldContext_Mutation_updatePtrToPtr(ctx, field) 6132 if err != nil { 6133 return graphql.Null 6134 } 6135 ctx = graphql.WithFieldContext(ctx, fc) 6136 defer func() { 6137 if r := recover(); r != nil { 6138 ec.Error(ctx, ec.Recover(ctx, r)) 6139 ret = graphql.Null 6140 } 6141 }() 6142 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 6143 ctx = rctx // use context from middleware stack in children 6144 return ec.resolvers.Mutation().UpdatePtrToPtr(rctx, fc.Args["input"].(UpdatePtrToPtrOuter)) 6145 }) 6146 6147 if resTmp == nil { 6148 if !graphql.HasFieldError(ctx, fc) { 6149 ec.Errorf(ctx, "must not be null") 6150 } 6151 return graphql.Null 6152 } 6153 res := resTmp.(*PtrToPtrOuter) 6154 fc.Result = res 6155 return ec.marshalNPtrToPtrOuter2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrOuter(ctx, field.Selections, res) 6156 } 6157 6158 func (ec *executionContext) fieldContext_Mutation_updatePtrToPtr(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 6159 fc = &graphql.FieldContext{ 6160 Object: "Mutation", 6161 Field: field, 6162 IsMethod: true, 6163 IsResolver: true, 6164 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 6165 switch field.Name { 6166 case "name": 6167 return ec.fieldContext_PtrToPtrOuter_name(ctx, field) 6168 case "inner": 6169 return ec.fieldContext_PtrToPtrOuter_inner(ctx, field) 6170 case "stupidInner": 6171 return ec.fieldContext_PtrToPtrOuter_stupidInner(ctx, field) 6172 } 6173 return nil, fmt.Errorf("no field named %q was found under type PtrToPtrOuter", field.Name) 6174 }, 6175 } 6176 defer func() { 6177 if r := recover(); r != nil { 6178 err = ec.Recover(ctx, r) 6179 ec.Error(ctx, err) 6180 } 6181 }() 6182 ctx = graphql.WithFieldContext(ctx, fc) 6183 if fc.Args, err = ec.field_Mutation_updatePtrToPtr_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 6184 ec.Error(ctx, err) 6185 return 6186 } 6187 return fc, nil 6188 } 6189 6190 func (ec *executionContext) _ObjectDirectives_text(ctx context.Context, field graphql.CollectedField, obj *ObjectDirectives) (ret graphql.Marshaler) { 6191 fc, err := ec.fieldContext_ObjectDirectives_text(ctx, field) 6192 if err != nil { 6193 return graphql.Null 6194 } 6195 ctx = graphql.WithFieldContext(ctx, fc) 6196 defer func() { 6197 if r := recover(); r != nil { 6198 ec.Error(ctx, ec.Recover(ctx, r)) 6199 ret = graphql.Null 6200 } 6201 }() 6202 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6203 directive0 := func(rctx context.Context) (interface{}, error) { 6204 ctx = rctx // use context from middleware stack in children 6205 return obj.Text, nil 6206 } 6207 directive1 := func(ctx context.Context) (interface{}, error) { 6208 min, err := ec.unmarshalNInt2int(ctx, 0) 6209 if err != nil { 6210 return nil, err 6211 } 6212 max, err := ec.unmarshalOInt2ᚖint(ctx, 7) 6213 if err != nil { 6214 return nil, err 6215 } 6216 message, err := ec.unmarshalOString2ᚖstring(ctx, "not valid") 6217 if err != nil { 6218 return nil, err 6219 } 6220 if ec.directives.Length == nil { 6221 return nil, errors.New("directive length is not implemented") 6222 } 6223 return ec.directives.Length(ctx, obj, directive0, min, max, message) 6224 } 6225 6226 tmp, err := directive1(rctx) 6227 if err != nil { 6228 return nil, graphql.ErrorOnPath(ctx, err) 6229 } 6230 if tmp == nil { 6231 return nil, nil 6232 } 6233 if data, ok := tmp.(string); ok { 6234 return data, nil 6235 } 6236 return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp) 6237 }) 6238 6239 if resTmp == nil { 6240 if !graphql.HasFieldError(ctx, fc) { 6241 ec.Errorf(ctx, "must not be null") 6242 } 6243 return graphql.Null 6244 } 6245 res := resTmp.(string) 6246 fc.Result = res 6247 return ec.marshalNString2string(ctx, field.Selections, res) 6248 } 6249 6250 func (ec *executionContext) fieldContext_ObjectDirectives_text(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 6251 fc = &graphql.FieldContext{ 6252 Object: "ObjectDirectives", 6253 Field: field, 6254 IsMethod: false, 6255 IsResolver: false, 6256 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 6257 return nil, errors.New("field of type String does not have child fields") 6258 }, 6259 } 6260 return fc, nil 6261 } 6262 6263 func (ec *executionContext) _ObjectDirectives_nullableText(ctx context.Context, field graphql.CollectedField, obj *ObjectDirectives) (ret graphql.Marshaler) { 6264 fc, err := ec.fieldContext_ObjectDirectives_nullableText(ctx, field) 6265 if err != nil { 6266 return graphql.Null 6267 } 6268 ctx = graphql.WithFieldContext(ctx, fc) 6269 defer func() { 6270 if r := recover(); r != nil { 6271 ec.Error(ctx, ec.Recover(ctx, r)) 6272 ret = graphql.Null 6273 } 6274 }() 6275 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6276 directive0 := func(rctx context.Context) (interface{}, error) { 6277 ctx = rctx // use context from middleware stack in children 6278 return obj.NullableText, nil 6279 } 6280 directive1 := func(ctx context.Context) (interface{}, error) { 6281 if ec.directives.ToNull == nil { 6282 return nil, errors.New("directive toNull is not implemented") 6283 } 6284 return ec.directives.ToNull(ctx, obj, directive0) 6285 } 6286 6287 tmp, err := directive1(rctx) 6288 if err != nil { 6289 return nil, graphql.ErrorOnPath(ctx, err) 6290 } 6291 if tmp == nil { 6292 return nil, nil 6293 } 6294 if data, ok := tmp.(*string); ok { 6295 return data, nil 6296 } 6297 return nil, fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp) 6298 }) 6299 6300 if resTmp == nil { 6301 return graphql.Null 6302 } 6303 res := resTmp.(*string) 6304 fc.Result = res 6305 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 6306 } 6307 6308 func (ec *executionContext) fieldContext_ObjectDirectives_nullableText(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 6309 fc = &graphql.FieldContext{ 6310 Object: "ObjectDirectives", 6311 Field: field, 6312 IsMethod: false, 6313 IsResolver: false, 6314 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 6315 return nil, errors.New("field of type String does not have child fields") 6316 }, 6317 } 6318 return fc, nil 6319 } 6320 6321 func (ec *executionContext) _ObjectDirectives_order(ctx context.Context, field graphql.CollectedField, obj *ObjectDirectives) (ret graphql.Marshaler) { 6322 fc, err := ec.fieldContext_ObjectDirectives_order(ctx, field) 6323 if err != nil { 6324 return graphql.Null 6325 } 6326 ctx = graphql.WithFieldContext(ctx, fc) 6327 defer func() { 6328 if r := recover(); r != nil { 6329 ec.Error(ctx, ec.Recover(ctx, r)) 6330 ret = graphql.Null 6331 } 6332 }() 6333 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6334 ctx = rctx // use context from middleware stack in children 6335 return obj.Order, nil 6336 }) 6337 6338 if resTmp == nil { 6339 if !graphql.HasFieldError(ctx, fc) { 6340 ec.Errorf(ctx, "must not be null") 6341 } 6342 return graphql.Null 6343 } 6344 res := resTmp.([]string) 6345 fc.Result = res 6346 return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) 6347 } 6348 6349 func (ec *executionContext) fieldContext_ObjectDirectives_order(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 6350 fc = &graphql.FieldContext{ 6351 Object: "ObjectDirectives", 6352 Field: field, 6353 IsMethod: false, 6354 IsResolver: false, 6355 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 6356 return nil, errors.New("field of type String does not have child fields") 6357 }, 6358 } 6359 return fc, nil 6360 } 6361 6362 func (ec *executionContext) _ObjectDirectivesWithCustomGoModel_nullableText(ctx context.Context, field graphql.CollectedField, obj *ObjectDirectivesWithCustomGoModel) (ret graphql.Marshaler) { 6363 fc, err := ec.fieldContext_ObjectDirectivesWithCustomGoModel_nullableText(ctx, field) 6364 if err != nil { 6365 return graphql.Null 6366 } 6367 ctx = graphql.WithFieldContext(ctx, fc) 6368 defer func() { 6369 if r := recover(); r != nil { 6370 ec.Error(ctx, ec.Recover(ctx, r)) 6371 ret = graphql.Null 6372 } 6373 }() 6374 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6375 directive0 := func(rctx context.Context) (interface{}, error) { 6376 ctx = rctx // use context from middleware stack in children 6377 return obj.NullableText, nil 6378 } 6379 directive1 := func(ctx context.Context) (interface{}, error) { 6380 if ec.directives.ToNull == nil { 6381 return nil, errors.New("directive toNull is not implemented") 6382 } 6383 return ec.directives.ToNull(ctx, obj, directive0) 6384 } 6385 6386 tmp, err := directive1(rctx) 6387 if err != nil { 6388 return nil, graphql.ErrorOnPath(ctx, err) 6389 } 6390 if tmp == nil { 6391 return nil, nil 6392 } 6393 if data, ok := tmp.(string); ok { 6394 return data, nil 6395 } 6396 return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp) 6397 }) 6398 6399 if resTmp == nil { 6400 return graphql.Null 6401 } 6402 res := resTmp.(string) 6403 fc.Result = res 6404 return ec.marshalOString2string(ctx, field.Selections, res) 6405 } 6406 6407 func (ec *executionContext) fieldContext_ObjectDirectivesWithCustomGoModel_nullableText(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 6408 fc = &graphql.FieldContext{ 6409 Object: "ObjectDirectivesWithCustomGoModel", 6410 Field: field, 6411 IsMethod: false, 6412 IsResolver: false, 6413 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 6414 return nil, errors.New("field of type String does not have child fields") 6415 }, 6416 } 6417 return fc, nil 6418 } 6419 6420 func (ec *executionContext) _OuterObject_inner(ctx context.Context, field graphql.CollectedField, obj *OuterObject) (ret graphql.Marshaler) { 6421 fc, err := ec.fieldContext_OuterObject_inner(ctx, field) 6422 if err != nil { 6423 return graphql.Null 6424 } 6425 ctx = graphql.WithFieldContext(ctx, fc) 6426 defer func() { 6427 if r := recover(); r != nil { 6428 ec.Error(ctx, ec.Recover(ctx, r)) 6429 ret = graphql.Null 6430 } 6431 }() 6432 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6433 ctx = rctx // use context from middleware stack in children 6434 return obj.Inner, nil 6435 }) 6436 6437 if resTmp == nil { 6438 if !graphql.HasFieldError(ctx, fc) { 6439 ec.Errorf(ctx, "must not be null") 6440 } 6441 return graphql.Null 6442 } 6443 res := resTmp.(*InnerObject) 6444 fc.Result = res 6445 return ec.marshalNInnerObject2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInnerObject(ctx, field.Selections, res) 6446 } 6447 6448 func (ec *executionContext) fieldContext_OuterObject_inner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 6449 fc = &graphql.FieldContext{ 6450 Object: "OuterObject", 6451 Field: field, 6452 IsMethod: false, 6453 IsResolver: false, 6454 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 6455 switch field.Name { 6456 case "id": 6457 return ec.fieldContext_InnerObject_id(ctx, field) 6458 } 6459 return nil, fmt.Errorf("no field named %q was found under type InnerObject", field.Name) 6460 }, 6461 } 6462 return fc, nil 6463 } 6464 6465 func (ec *executionContext) _OverlappingFields_oneFoo(ctx context.Context, field graphql.CollectedField, obj *OverlappingFields) (ret graphql.Marshaler) { 6466 fc, err := ec.fieldContext_OverlappingFields_oneFoo(ctx, field) 6467 if err != nil { 6468 return graphql.Null 6469 } 6470 ctx = graphql.WithFieldContext(ctx, fc) 6471 defer func() { 6472 if r := recover(); r != nil { 6473 ec.Error(ctx, ec.Recover(ctx, r)) 6474 ret = graphql.Null 6475 } 6476 }() 6477 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6478 ctx = rctx // use context from middleware stack in children 6479 return obj.Foo, nil 6480 }) 6481 6482 if resTmp == nil { 6483 if !graphql.HasFieldError(ctx, fc) { 6484 ec.Errorf(ctx, "must not be null") 6485 } 6486 return graphql.Null 6487 } 6488 res := resTmp.(int) 6489 fc.Result = res 6490 return ec.marshalNInt2int(ctx, field.Selections, res) 6491 } 6492 6493 func (ec *executionContext) fieldContext_OverlappingFields_oneFoo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 6494 fc = &graphql.FieldContext{ 6495 Object: "OverlappingFields", 6496 Field: field, 6497 IsMethod: false, 6498 IsResolver: false, 6499 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 6500 return nil, errors.New("field of type Int does not have child fields") 6501 }, 6502 } 6503 return fc, nil 6504 } 6505 6506 func (ec *executionContext) _OverlappingFields_twoFoo(ctx context.Context, field graphql.CollectedField, obj *OverlappingFields) (ret graphql.Marshaler) { 6507 fc, err := ec.fieldContext_OverlappingFields_twoFoo(ctx, field) 6508 if err != nil { 6509 return graphql.Null 6510 } 6511 ctx = graphql.WithFieldContext(ctx, fc) 6512 defer func() { 6513 if r := recover(); r != nil { 6514 ec.Error(ctx, ec.Recover(ctx, r)) 6515 ret = graphql.Null 6516 } 6517 }() 6518 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6519 ctx = rctx // use context from middleware stack in children 6520 return obj.Foo, nil 6521 }) 6522 6523 if resTmp == nil { 6524 if !graphql.HasFieldError(ctx, fc) { 6525 ec.Errorf(ctx, "must not be null") 6526 } 6527 return graphql.Null 6528 } 6529 res := resTmp.(int) 6530 fc.Result = res 6531 return ec.marshalNInt2int(ctx, field.Selections, res) 6532 } 6533 6534 func (ec *executionContext) fieldContext_OverlappingFields_twoFoo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 6535 fc = &graphql.FieldContext{ 6536 Object: "OverlappingFields", 6537 Field: field, 6538 IsMethod: false, 6539 IsResolver: false, 6540 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 6541 return nil, errors.New("field of type Int does not have child fields") 6542 }, 6543 } 6544 return fc, nil 6545 } 6546 6547 func (ec *executionContext) _OverlappingFields_oldFoo(ctx context.Context, field graphql.CollectedField, obj *OverlappingFields) (ret graphql.Marshaler) { 6548 fc, err := ec.fieldContext_OverlappingFields_oldFoo(ctx, field) 6549 if err != nil { 6550 return graphql.Null 6551 } 6552 ctx = graphql.WithFieldContext(ctx, fc) 6553 defer func() { 6554 if r := recover(); r != nil { 6555 ec.Error(ctx, ec.Recover(ctx, r)) 6556 ret = graphql.Null 6557 } 6558 }() 6559 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6560 ctx = rctx // use context from middleware stack in children 6561 return ec.resolvers.OverlappingFields().OldFoo(rctx, obj) 6562 }) 6563 6564 if resTmp == nil { 6565 if !graphql.HasFieldError(ctx, fc) { 6566 ec.Errorf(ctx, "must not be null") 6567 } 6568 return graphql.Null 6569 } 6570 res := resTmp.(int) 6571 fc.Result = res 6572 return ec.marshalNInt2int(ctx, field.Selections, res) 6573 } 6574 6575 func (ec *executionContext) fieldContext_OverlappingFields_oldFoo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 6576 fc = &graphql.FieldContext{ 6577 Object: "OverlappingFields", 6578 Field: field, 6579 IsMethod: true, 6580 IsResolver: true, 6581 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 6582 return nil, errors.New("field of type Int does not have child fields") 6583 }, 6584 } 6585 return fc, nil 6586 } 6587 6588 func (ec *executionContext) _OverlappingFields_newFoo(ctx context.Context, field graphql.CollectedField, obj *OverlappingFields) (ret graphql.Marshaler) { 6589 fc, err := ec.fieldContext_OverlappingFields_newFoo(ctx, field) 6590 if err != nil { 6591 return graphql.Null 6592 } 6593 ctx = graphql.WithFieldContext(ctx, fc) 6594 defer func() { 6595 if r := recover(); r != nil { 6596 ec.Error(ctx, ec.Recover(ctx, r)) 6597 ret = graphql.Null 6598 } 6599 }() 6600 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6601 ctx = rctx // use context from middleware stack in children 6602 return obj.NewFoo, nil 6603 }) 6604 6605 if resTmp == nil { 6606 if !graphql.HasFieldError(ctx, fc) { 6607 ec.Errorf(ctx, "must not be null") 6608 } 6609 return graphql.Null 6610 } 6611 res := resTmp.(int) 6612 fc.Result = res 6613 return ec.marshalNInt2int(ctx, field.Selections, res) 6614 } 6615 6616 func (ec *executionContext) fieldContext_OverlappingFields_newFoo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 6617 fc = &graphql.FieldContext{ 6618 Object: "OverlappingFields", 6619 Field: field, 6620 IsMethod: false, 6621 IsResolver: false, 6622 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 6623 return nil, errors.New("field of type Int does not have child fields") 6624 }, 6625 } 6626 return fc, nil 6627 } 6628 6629 func (ec *executionContext) _OverlappingFields_new_foo(ctx context.Context, field graphql.CollectedField, obj *OverlappingFields) (ret graphql.Marshaler) { 6630 fc, err := ec.fieldContext_OverlappingFields_new_foo(ctx, field) 6631 if err != nil { 6632 return graphql.Null 6633 } 6634 ctx = graphql.WithFieldContext(ctx, fc) 6635 defer func() { 6636 if r := recover(); r != nil { 6637 ec.Error(ctx, ec.Recover(ctx, r)) 6638 ret = graphql.Null 6639 } 6640 }() 6641 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6642 ctx = rctx // use context from middleware stack in children 6643 return obj.NewFoo, nil 6644 }) 6645 6646 if resTmp == nil { 6647 if !graphql.HasFieldError(ctx, fc) { 6648 ec.Errorf(ctx, "must not be null") 6649 } 6650 return graphql.Null 6651 } 6652 res := resTmp.(int) 6653 fc.Result = res 6654 return ec.marshalNInt2int(ctx, field.Selections, res) 6655 } 6656 6657 func (ec *executionContext) fieldContext_OverlappingFields_new_foo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 6658 fc = &graphql.FieldContext{ 6659 Object: "OverlappingFields", 6660 Field: field, 6661 IsMethod: false, 6662 IsResolver: false, 6663 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 6664 return nil, errors.New("field of type Int does not have child fields") 6665 }, 6666 } 6667 return fc, nil 6668 } 6669 6670 func (ec *executionContext) _Panics_fieldScalarMarshal(ctx context.Context, field graphql.CollectedField, obj *Panics) (ret graphql.Marshaler) { 6671 fc, err := ec.fieldContext_Panics_fieldScalarMarshal(ctx, field) 6672 if err != nil { 6673 return graphql.Null 6674 } 6675 ctx = graphql.WithFieldContext(ctx, fc) 6676 defer func() { 6677 if r := recover(); r != nil { 6678 ec.Error(ctx, ec.Recover(ctx, r)) 6679 ret = graphql.Null 6680 } 6681 }() 6682 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6683 ctx = rctx // use context from middleware stack in children 6684 return ec.resolvers.Panics().FieldScalarMarshal(rctx, obj) 6685 }) 6686 6687 if resTmp == nil { 6688 if !graphql.HasFieldError(ctx, fc) { 6689 ec.Errorf(ctx, "must not be null") 6690 } 6691 return graphql.Null 6692 } 6693 res := resTmp.([]MarshalPanic) 6694 fc.Result = res 6695 return ec.marshalNMarshalPanic2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanicᚄ(ctx, field.Selections, res) 6696 } 6697 6698 func (ec *executionContext) fieldContext_Panics_fieldScalarMarshal(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 6699 fc = &graphql.FieldContext{ 6700 Object: "Panics", 6701 Field: field, 6702 IsMethod: true, 6703 IsResolver: true, 6704 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 6705 return nil, errors.New("field of type MarshalPanic does not have child fields") 6706 }, 6707 } 6708 return fc, nil 6709 } 6710 6711 func (ec *executionContext) _Panics_fieldFuncMarshal(ctx context.Context, field graphql.CollectedField, obj *Panics) (ret graphql.Marshaler) { 6712 fc, err := ec.fieldContext_Panics_fieldFuncMarshal(ctx, field) 6713 if err != nil { 6714 return graphql.Null 6715 } 6716 ctx = graphql.WithFieldContext(ctx, fc) 6717 defer func() { 6718 if r := recover(); r != nil { 6719 ec.Error(ctx, ec.Recover(ctx, r)) 6720 ret = graphql.Null 6721 } 6722 }() 6723 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6724 ctx = rctx // use context from middleware stack in children 6725 return obj.FieldFuncMarshal(ctx, fc.Args["u"].([]MarshalPanic)), nil 6726 }) 6727 6728 if resTmp == nil { 6729 if !graphql.HasFieldError(ctx, fc) { 6730 ec.Errorf(ctx, "must not be null") 6731 } 6732 return graphql.Null 6733 } 6734 res := resTmp.([]MarshalPanic) 6735 fc.Result = res 6736 return ec.marshalNMarshalPanic2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanicᚄ(ctx, field.Selections, res) 6737 } 6738 6739 func (ec *executionContext) fieldContext_Panics_fieldFuncMarshal(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 6740 fc = &graphql.FieldContext{ 6741 Object: "Panics", 6742 Field: field, 6743 IsMethod: true, 6744 IsResolver: false, 6745 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 6746 return nil, errors.New("field of type MarshalPanic does not have child fields") 6747 }, 6748 } 6749 defer func() { 6750 if r := recover(); r != nil { 6751 err = ec.Recover(ctx, r) 6752 ec.Error(ctx, err) 6753 } 6754 }() 6755 ctx = graphql.WithFieldContext(ctx, fc) 6756 if fc.Args, err = ec.field_Panics_fieldFuncMarshal_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 6757 ec.Error(ctx, err) 6758 return 6759 } 6760 return fc, nil 6761 } 6762 6763 func (ec *executionContext) _Panics_argUnmarshal(ctx context.Context, field graphql.CollectedField, obj *Panics) (ret graphql.Marshaler) { 6764 fc, err := ec.fieldContext_Panics_argUnmarshal(ctx, field) 6765 if err != nil { 6766 return graphql.Null 6767 } 6768 ctx = graphql.WithFieldContext(ctx, fc) 6769 defer func() { 6770 if r := recover(); r != nil { 6771 ec.Error(ctx, ec.Recover(ctx, r)) 6772 ret = graphql.Null 6773 } 6774 }() 6775 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6776 ctx = rctx // use context from middleware stack in children 6777 return ec.resolvers.Panics().ArgUnmarshal(rctx, obj, fc.Args["u"].([]MarshalPanic)) 6778 }) 6779 6780 if resTmp == nil { 6781 if !graphql.HasFieldError(ctx, fc) { 6782 ec.Errorf(ctx, "must not be null") 6783 } 6784 return graphql.Null 6785 } 6786 res := resTmp.(bool) 6787 fc.Result = res 6788 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 6789 } 6790 6791 func (ec *executionContext) fieldContext_Panics_argUnmarshal(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 6792 fc = &graphql.FieldContext{ 6793 Object: "Panics", 6794 Field: field, 6795 IsMethod: true, 6796 IsResolver: true, 6797 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 6798 return nil, errors.New("field of type Boolean does not have child fields") 6799 }, 6800 } 6801 defer func() { 6802 if r := recover(); r != nil { 6803 err = ec.Recover(ctx, r) 6804 ec.Error(ctx, err) 6805 } 6806 }() 6807 ctx = graphql.WithFieldContext(ctx, fc) 6808 if fc.Args, err = ec.field_Panics_argUnmarshal_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 6809 ec.Error(ctx, err) 6810 return 6811 } 6812 return fc, nil 6813 } 6814 6815 func (ec *executionContext) _Pet_id(ctx context.Context, field graphql.CollectedField, obj *Pet) (ret graphql.Marshaler) { 6816 fc, err := ec.fieldContext_Pet_id(ctx, field) 6817 if err != nil { 6818 return graphql.Null 6819 } 6820 ctx = graphql.WithFieldContext(ctx, fc) 6821 defer func() { 6822 if r := recover(); r != nil { 6823 ec.Error(ctx, ec.Recover(ctx, r)) 6824 ret = graphql.Null 6825 } 6826 }() 6827 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6828 ctx = rctx // use context from middleware stack in children 6829 return obj.ID, nil 6830 }) 6831 6832 if resTmp == nil { 6833 if !graphql.HasFieldError(ctx, fc) { 6834 ec.Errorf(ctx, "must not be null") 6835 } 6836 return graphql.Null 6837 } 6838 res := resTmp.(int) 6839 fc.Result = res 6840 return ec.marshalNInt2int(ctx, field.Selections, res) 6841 } 6842 6843 func (ec *executionContext) fieldContext_Pet_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 6844 fc = &graphql.FieldContext{ 6845 Object: "Pet", 6846 Field: field, 6847 IsMethod: false, 6848 IsResolver: false, 6849 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 6850 return nil, errors.New("field of type Int does not have child fields") 6851 }, 6852 } 6853 return fc, nil 6854 } 6855 6856 func (ec *executionContext) _Pet_friends(ctx context.Context, field graphql.CollectedField, obj *Pet) (ret graphql.Marshaler) { 6857 fc, err := ec.fieldContext_Pet_friends(ctx, field) 6858 if err != nil { 6859 return graphql.Null 6860 } 6861 ctx = graphql.WithFieldContext(ctx, fc) 6862 defer func() { 6863 if r := recover(); r != nil { 6864 ec.Error(ctx, ec.Recover(ctx, r)) 6865 ret = graphql.Null 6866 } 6867 }() 6868 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6869 ctx = rctx // use context from middleware stack in children 6870 return ec.resolvers.Pet().Friends(rctx, obj, fc.Args["limit"].(*int)) 6871 }) 6872 6873 if resTmp == nil { 6874 return graphql.Null 6875 } 6876 res := resTmp.([]*Pet) 6877 fc.Result = res 6878 return ec.marshalOPet2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPetᚄ(ctx, field.Selections, res) 6879 } 6880 6881 func (ec *executionContext) fieldContext_Pet_friends(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 6882 fc = &graphql.FieldContext{ 6883 Object: "Pet", 6884 Field: field, 6885 IsMethod: true, 6886 IsResolver: true, 6887 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 6888 switch field.Name { 6889 case "id": 6890 return ec.fieldContext_Pet_id(ctx, field) 6891 case "friends": 6892 return ec.fieldContext_Pet_friends(ctx, field) 6893 } 6894 return nil, fmt.Errorf("no field named %q was found under type Pet", field.Name) 6895 }, 6896 } 6897 defer func() { 6898 if r := recover(); r != nil { 6899 err = ec.Recover(ctx, r) 6900 ec.Error(ctx, err) 6901 } 6902 }() 6903 ctx = graphql.WithFieldContext(ctx, fc) 6904 if fc.Args, err = ec.field_Pet_friends_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 6905 ec.Error(ctx, err) 6906 return 6907 } 6908 return fc, nil 6909 } 6910 6911 func (ec *executionContext) _Primitive_value(ctx context.Context, field graphql.CollectedField, obj *Primitive) (ret graphql.Marshaler) { 6912 fc, err := ec.fieldContext_Primitive_value(ctx, field) 6913 if err != nil { 6914 return graphql.Null 6915 } 6916 ctx = graphql.WithFieldContext(ctx, fc) 6917 defer func() { 6918 if r := recover(); r != nil { 6919 ec.Error(ctx, ec.Recover(ctx, r)) 6920 ret = graphql.Null 6921 } 6922 }() 6923 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6924 ctx = rctx // use context from middleware stack in children 6925 return ec.resolvers.Primitive().Value(rctx, obj) 6926 }) 6927 6928 if resTmp == nil { 6929 if !graphql.HasFieldError(ctx, fc) { 6930 ec.Errorf(ctx, "must not be null") 6931 } 6932 return graphql.Null 6933 } 6934 res := resTmp.(int) 6935 fc.Result = res 6936 return ec.marshalNInt2int(ctx, field.Selections, res) 6937 } 6938 6939 func (ec *executionContext) fieldContext_Primitive_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 6940 fc = &graphql.FieldContext{ 6941 Object: "Primitive", 6942 Field: field, 6943 IsMethod: true, 6944 IsResolver: true, 6945 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 6946 return nil, errors.New("field of type Int does not have child fields") 6947 }, 6948 } 6949 return fc, nil 6950 } 6951 6952 func (ec *executionContext) _Primitive_squared(ctx context.Context, field graphql.CollectedField, obj *Primitive) (ret graphql.Marshaler) { 6953 fc, err := ec.fieldContext_Primitive_squared(ctx, field) 6954 if err != nil { 6955 return graphql.Null 6956 } 6957 ctx = graphql.WithFieldContext(ctx, fc) 6958 defer func() { 6959 if r := recover(); r != nil { 6960 ec.Error(ctx, ec.Recover(ctx, r)) 6961 ret = graphql.Null 6962 } 6963 }() 6964 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 6965 ctx = rctx // use context from middleware stack in children 6966 return obj.Squared(), nil 6967 }) 6968 6969 if resTmp == nil { 6970 if !graphql.HasFieldError(ctx, fc) { 6971 ec.Errorf(ctx, "must not be null") 6972 } 6973 return graphql.Null 6974 } 6975 res := resTmp.(int) 6976 fc.Result = res 6977 return ec.marshalNInt2int(ctx, field.Selections, res) 6978 } 6979 6980 func (ec *executionContext) fieldContext_Primitive_squared(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 6981 fc = &graphql.FieldContext{ 6982 Object: "Primitive", 6983 Field: field, 6984 IsMethod: true, 6985 IsResolver: false, 6986 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 6987 return nil, errors.New("field of type Int does not have child fields") 6988 }, 6989 } 6990 return fc, nil 6991 } 6992 6993 func (ec *executionContext) _PrimitiveString_value(ctx context.Context, field graphql.CollectedField, obj *PrimitiveString) (ret graphql.Marshaler) { 6994 fc, err := ec.fieldContext_PrimitiveString_value(ctx, field) 6995 if err != nil { 6996 return graphql.Null 6997 } 6998 ctx = graphql.WithFieldContext(ctx, fc) 6999 defer func() { 7000 if r := recover(); r != nil { 7001 ec.Error(ctx, ec.Recover(ctx, r)) 7002 ret = graphql.Null 7003 } 7004 }() 7005 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 7006 ctx = rctx // use context from middleware stack in children 7007 return ec.resolvers.PrimitiveString().Value(rctx, obj) 7008 }) 7009 7010 if resTmp == nil { 7011 if !graphql.HasFieldError(ctx, fc) { 7012 ec.Errorf(ctx, "must not be null") 7013 } 7014 return graphql.Null 7015 } 7016 res := resTmp.(string) 7017 fc.Result = res 7018 return ec.marshalNString2string(ctx, field.Selections, res) 7019 } 7020 7021 func (ec *executionContext) fieldContext_PrimitiveString_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7022 fc = &graphql.FieldContext{ 7023 Object: "PrimitiveString", 7024 Field: field, 7025 IsMethod: true, 7026 IsResolver: true, 7027 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7028 return nil, errors.New("field of type String does not have child fields") 7029 }, 7030 } 7031 return fc, nil 7032 } 7033 7034 func (ec *executionContext) _PrimitiveString_doubled(ctx context.Context, field graphql.CollectedField, obj *PrimitiveString) (ret graphql.Marshaler) { 7035 fc, err := ec.fieldContext_PrimitiveString_doubled(ctx, field) 7036 if err != nil { 7037 return graphql.Null 7038 } 7039 ctx = graphql.WithFieldContext(ctx, fc) 7040 defer func() { 7041 if r := recover(); r != nil { 7042 ec.Error(ctx, ec.Recover(ctx, r)) 7043 ret = graphql.Null 7044 } 7045 }() 7046 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 7047 ctx = rctx // use context from middleware stack in children 7048 return obj.Doubled(), nil 7049 }) 7050 7051 if resTmp == nil { 7052 if !graphql.HasFieldError(ctx, fc) { 7053 ec.Errorf(ctx, "must not be null") 7054 } 7055 return graphql.Null 7056 } 7057 res := resTmp.(string) 7058 fc.Result = res 7059 return ec.marshalNString2string(ctx, field.Selections, res) 7060 } 7061 7062 func (ec *executionContext) fieldContext_PrimitiveString_doubled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7063 fc = &graphql.FieldContext{ 7064 Object: "PrimitiveString", 7065 Field: field, 7066 IsMethod: true, 7067 IsResolver: false, 7068 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7069 return nil, errors.New("field of type String does not have child fields") 7070 }, 7071 } 7072 return fc, nil 7073 } 7074 7075 func (ec *executionContext) _PrimitiveString_len(ctx context.Context, field graphql.CollectedField, obj *PrimitiveString) (ret graphql.Marshaler) { 7076 fc, err := ec.fieldContext_PrimitiveString_len(ctx, field) 7077 if err != nil { 7078 return graphql.Null 7079 } 7080 ctx = graphql.WithFieldContext(ctx, fc) 7081 defer func() { 7082 if r := recover(); r != nil { 7083 ec.Error(ctx, ec.Recover(ctx, r)) 7084 ret = graphql.Null 7085 } 7086 }() 7087 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 7088 ctx = rctx // use context from middleware stack in children 7089 return ec.resolvers.PrimitiveString().Len(rctx, obj) 7090 }) 7091 7092 if resTmp == nil { 7093 if !graphql.HasFieldError(ctx, fc) { 7094 ec.Errorf(ctx, "must not be null") 7095 } 7096 return graphql.Null 7097 } 7098 res := resTmp.(int) 7099 fc.Result = res 7100 return ec.marshalNInt2int(ctx, field.Selections, res) 7101 } 7102 7103 func (ec *executionContext) fieldContext_PrimitiveString_len(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7104 fc = &graphql.FieldContext{ 7105 Object: "PrimitiveString", 7106 Field: field, 7107 IsMethod: true, 7108 IsResolver: true, 7109 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7110 return nil, errors.New("field of type Int does not have child fields") 7111 }, 7112 } 7113 return fc, nil 7114 } 7115 7116 func (ec *executionContext) _PtrToPtrInner_key(ctx context.Context, field graphql.CollectedField, obj *PtrToPtrInner) (ret graphql.Marshaler) { 7117 fc, err := ec.fieldContext_PtrToPtrInner_key(ctx, field) 7118 if err != nil { 7119 return graphql.Null 7120 } 7121 ctx = graphql.WithFieldContext(ctx, fc) 7122 defer func() { 7123 if r := recover(); r != nil { 7124 ec.Error(ctx, ec.Recover(ctx, r)) 7125 ret = graphql.Null 7126 } 7127 }() 7128 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 7129 ctx = rctx // use context from middleware stack in children 7130 return obj.Key, nil 7131 }) 7132 7133 if resTmp == nil { 7134 if !graphql.HasFieldError(ctx, fc) { 7135 ec.Errorf(ctx, "must not be null") 7136 } 7137 return graphql.Null 7138 } 7139 res := resTmp.(string) 7140 fc.Result = res 7141 return ec.marshalNString2string(ctx, field.Selections, res) 7142 } 7143 7144 func (ec *executionContext) fieldContext_PtrToPtrInner_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7145 fc = &graphql.FieldContext{ 7146 Object: "PtrToPtrInner", 7147 Field: field, 7148 IsMethod: false, 7149 IsResolver: false, 7150 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7151 return nil, errors.New("field of type String does not have child fields") 7152 }, 7153 } 7154 return fc, nil 7155 } 7156 7157 func (ec *executionContext) _PtrToPtrInner_value(ctx context.Context, field graphql.CollectedField, obj *PtrToPtrInner) (ret graphql.Marshaler) { 7158 fc, err := ec.fieldContext_PtrToPtrInner_value(ctx, field) 7159 if err != nil { 7160 return graphql.Null 7161 } 7162 ctx = graphql.WithFieldContext(ctx, fc) 7163 defer func() { 7164 if r := recover(); r != nil { 7165 ec.Error(ctx, ec.Recover(ctx, r)) 7166 ret = graphql.Null 7167 } 7168 }() 7169 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 7170 ctx = rctx // use context from middleware stack in children 7171 return obj.Value, nil 7172 }) 7173 7174 if resTmp == nil { 7175 if !graphql.HasFieldError(ctx, fc) { 7176 ec.Errorf(ctx, "must not be null") 7177 } 7178 return graphql.Null 7179 } 7180 res := resTmp.(string) 7181 fc.Result = res 7182 return ec.marshalNString2string(ctx, field.Selections, res) 7183 } 7184 7185 func (ec *executionContext) fieldContext_PtrToPtrInner_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7186 fc = &graphql.FieldContext{ 7187 Object: "PtrToPtrInner", 7188 Field: field, 7189 IsMethod: false, 7190 IsResolver: false, 7191 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7192 return nil, errors.New("field of type String does not have child fields") 7193 }, 7194 } 7195 return fc, nil 7196 } 7197 7198 func (ec *executionContext) _PtrToPtrOuter_name(ctx context.Context, field graphql.CollectedField, obj *PtrToPtrOuter) (ret graphql.Marshaler) { 7199 fc, err := ec.fieldContext_PtrToPtrOuter_name(ctx, field) 7200 if err != nil { 7201 return graphql.Null 7202 } 7203 ctx = graphql.WithFieldContext(ctx, fc) 7204 defer func() { 7205 if r := recover(); r != nil { 7206 ec.Error(ctx, ec.Recover(ctx, r)) 7207 ret = graphql.Null 7208 } 7209 }() 7210 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 7211 ctx = rctx // use context from middleware stack in children 7212 return obj.Name, nil 7213 }) 7214 7215 if resTmp == nil { 7216 if !graphql.HasFieldError(ctx, fc) { 7217 ec.Errorf(ctx, "must not be null") 7218 } 7219 return graphql.Null 7220 } 7221 res := resTmp.(string) 7222 fc.Result = res 7223 return ec.marshalNString2string(ctx, field.Selections, res) 7224 } 7225 7226 func (ec *executionContext) fieldContext_PtrToPtrOuter_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7227 fc = &graphql.FieldContext{ 7228 Object: "PtrToPtrOuter", 7229 Field: field, 7230 IsMethod: false, 7231 IsResolver: false, 7232 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7233 return nil, errors.New("field of type String does not have child fields") 7234 }, 7235 } 7236 return fc, nil 7237 } 7238 7239 func (ec *executionContext) _PtrToPtrOuter_inner(ctx context.Context, field graphql.CollectedField, obj *PtrToPtrOuter) (ret graphql.Marshaler) { 7240 fc, err := ec.fieldContext_PtrToPtrOuter_inner(ctx, field) 7241 if err != nil { 7242 return graphql.Null 7243 } 7244 ctx = graphql.WithFieldContext(ctx, fc) 7245 defer func() { 7246 if r := recover(); r != nil { 7247 ec.Error(ctx, ec.Recover(ctx, r)) 7248 ret = graphql.Null 7249 } 7250 }() 7251 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 7252 ctx = rctx // use context from middleware stack in children 7253 return obj.Inner, nil 7254 }) 7255 7256 if resTmp == nil { 7257 return graphql.Null 7258 } 7259 res := resTmp.(*PtrToPtrInner) 7260 fc.Result = res 7261 return ec.marshalOPtrToPtrInner2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, field.Selections, res) 7262 } 7263 7264 func (ec *executionContext) fieldContext_PtrToPtrOuter_inner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7265 fc = &graphql.FieldContext{ 7266 Object: "PtrToPtrOuter", 7267 Field: field, 7268 IsMethod: false, 7269 IsResolver: false, 7270 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7271 switch field.Name { 7272 case "key": 7273 return ec.fieldContext_PtrToPtrInner_key(ctx, field) 7274 case "value": 7275 return ec.fieldContext_PtrToPtrInner_value(ctx, field) 7276 } 7277 return nil, fmt.Errorf("no field named %q was found under type PtrToPtrInner", field.Name) 7278 }, 7279 } 7280 return fc, nil 7281 } 7282 7283 func (ec *executionContext) _PtrToPtrOuter_stupidInner(ctx context.Context, field graphql.CollectedField, obj *PtrToPtrOuter) (ret graphql.Marshaler) { 7284 fc, err := ec.fieldContext_PtrToPtrOuter_stupidInner(ctx, field) 7285 if err != nil { 7286 return graphql.Null 7287 } 7288 ctx = graphql.WithFieldContext(ctx, fc) 7289 defer func() { 7290 if r := recover(); r != nil { 7291 ec.Error(ctx, ec.Recover(ctx, r)) 7292 ret = graphql.Null 7293 } 7294 }() 7295 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 7296 ctx = rctx // use context from middleware stack in children 7297 return obj.StupidInner, nil 7298 }) 7299 7300 if resTmp == nil { 7301 return graphql.Null 7302 } 7303 res := resTmp.(*******PtrToPtrInner) 7304 fc.Result = res 7305 return ec.marshalOPtrToPtrInner2ᚖᚖᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, field.Selections, res) 7306 } 7307 7308 func (ec *executionContext) fieldContext_PtrToPtrOuter_stupidInner(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7309 fc = &graphql.FieldContext{ 7310 Object: "PtrToPtrOuter", 7311 Field: field, 7312 IsMethod: false, 7313 IsResolver: false, 7314 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7315 switch field.Name { 7316 case "key": 7317 return ec.fieldContext_PtrToPtrInner_key(ctx, field) 7318 case "value": 7319 return ec.fieldContext_PtrToPtrInner_value(ctx, field) 7320 } 7321 return nil, fmt.Errorf("no field named %q was found under type PtrToPtrInner", field.Name) 7322 }, 7323 } 7324 return fc, nil 7325 } 7326 7327 func (ec *executionContext) _PtrToSliceContainer_ptrToSlice(ctx context.Context, field graphql.CollectedField, obj *PtrToSliceContainer) (ret graphql.Marshaler) { 7328 fc, err := ec.fieldContext_PtrToSliceContainer_ptrToSlice(ctx, field) 7329 if err != nil { 7330 return graphql.Null 7331 } 7332 ctx = graphql.WithFieldContext(ctx, fc) 7333 defer func() { 7334 if r := recover(); r != nil { 7335 ec.Error(ctx, ec.Recover(ctx, r)) 7336 ret = graphql.Null 7337 } 7338 }() 7339 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 7340 ctx = rctx // use context from middleware stack in children 7341 return obj.PtrToSlice, nil 7342 }) 7343 7344 if resTmp == nil { 7345 return graphql.Null 7346 } 7347 res := resTmp.(*[]string) 7348 fc.Result = res 7349 return ec.marshalOString2ᚖᚕstringᚄ(ctx, field.Selections, res) 7350 } 7351 7352 func (ec *executionContext) fieldContext_PtrToSliceContainer_ptrToSlice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7353 fc = &graphql.FieldContext{ 7354 Object: "PtrToSliceContainer", 7355 Field: field, 7356 IsMethod: false, 7357 IsResolver: false, 7358 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7359 return nil, errors.New("field of type String does not have child fields") 7360 }, 7361 } 7362 return fc, nil 7363 } 7364 7365 func (ec *executionContext) _Query_invalidIdentifier(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7366 fc, err := ec.fieldContext_Query_invalidIdentifier(ctx, field) 7367 if err != nil { 7368 return graphql.Null 7369 } 7370 ctx = graphql.WithFieldContext(ctx, fc) 7371 defer func() { 7372 if r := recover(); r != nil { 7373 ec.Error(ctx, ec.Recover(ctx, r)) 7374 ret = graphql.Null 7375 } 7376 }() 7377 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7378 ctx = rctx // use context from middleware stack in children 7379 return ec.resolvers.Query().InvalidIdentifier(rctx) 7380 }) 7381 7382 if resTmp == nil { 7383 return graphql.Null 7384 } 7385 res := resTmp.(*invalid_packagename.InvalidIdentifier) 7386 fc.Result = res 7387 return ec.marshalOInvalidIdentifier2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚋinvalidᚑpackagenameᚐInvalidIdentifier(ctx, field.Selections, res) 7388 } 7389 7390 func (ec *executionContext) fieldContext_Query_invalidIdentifier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7391 fc = &graphql.FieldContext{ 7392 Object: "Query", 7393 Field: field, 7394 IsMethod: true, 7395 IsResolver: true, 7396 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7397 switch field.Name { 7398 case "id": 7399 return ec.fieldContext_InvalidIdentifier_id(ctx, field) 7400 } 7401 return nil, fmt.Errorf("no field named %q was found under type InvalidIdentifier", field.Name) 7402 }, 7403 } 7404 return fc, nil 7405 } 7406 7407 func (ec *executionContext) _Query_collision(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7408 fc, err := ec.fieldContext_Query_collision(ctx, field) 7409 if err != nil { 7410 return graphql.Null 7411 } 7412 ctx = graphql.WithFieldContext(ctx, fc) 7413 defer func() { 7414 if r := recover(); r != nil { 7415 ec.Error(ctx, ec.Recover(ctx, r)) 7416 ret = graphql.Null 7417 } 7418 }() 7419 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7420 ctx = rctx // use context from middleware stack in children 7421 return ec.resolvers.Query().Collision(rctx) 7422 }) 7423 7424 if resTmp == nil { 7425 return graphql.Null 7426 } 7427 res := resTmp.(*introspection1.It) 7428 fc.Result = res 7429 return ec.marshalOIt2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚋintrospectionᚐIt(ctx, field.Selections, res) 7430 } 7431 7432 func (ec *executionContext) fieldContext_Query_collision(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7433 fc = &graphql.FieldContext{ 7434 Object: "Query", 7435 Field: field, 7436 IsMethod: true, 7437 IsResolver: true, 7438 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7439 switch field.Name { 7440 case "id": 7441 return ec.fieldContext_It_id(ctx, field) 7442 } 7443 return nil, fmt.Errorf("no field named %q was found under type It", field.Name) 7444 }, 7445 } 7446 return fc, nil 7447 } 7448 7449 func (ec *executionContext) _Query_mapInput(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7450 fc, err := ec.fieldContext_Query_mapInput(ctx, field) 7451 if err != nil { 7452 return graphql.Null 7453 } 7454 ctx = graphql.WithFieldContext(ctx, fc) 7455 defer func() { 7456 if r := recover(); r != nil { 7457 ec.Error(ctx, ec.Recover(ctx, r)) 7458 ret = graphql.Null 7459 } 7460 }() 7461 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7462 ctx = rctx // use context from middleware stack in children 7463 return ec.resolvers.Query().MapInput(rctx, fc.Args["input"].(map[string]interface{})) 7464 }) 7465 7466 if resTmp == nil { 7467 return graphql.Null 7468 } 7469 res := resTmp.(*bool) 7470 fc.Result = res 7471 return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) 7472 } 7473 7474 func (ec *executionContext) fieldContext_Query_mapInput(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7475 fc = &graphql.FieldContext{ 7476 Object: "Query", 7477 Field: field, 7478 IsMethod: true, 7479 IsResolver: true, 7480 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7481 return nil, errors.New("field of type Boolean does not have child fields") 7482 }, 7483 } 7484 defer func() { 7485 if r := recover(); r != nil { 7486 err = ec.Recover(ctx, r) 7487 ec.Error(ctx, err) 7488 } 7489 }() 7490 ctx = graphql.WithFieldContext(ctx, fc) 7491 if fc.Args, err = ec.field_Query_mapInput_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 7492 ec.Error(ctx, err) 7493 return 7494 } 7495 return fc, nil 7496 } 7497 7498 func (ec *executionContext) _Query_recursive(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7499 fc, err := ec.fieldContext_Query_recursive(ctx, field) 7500 if err != nil { 7501 return graphql.Null 7502 } 7503 ctx = graphql.WithFieldContext(ctx, fc) 7504 defer func() { 7505 if r := recover(); r != nil { 7506 ec.Error(ctx, ec.Recover(ctx, r)) 7507 ret = graphql.Null 7508 } 7509 }() 7510 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7511 ctx = rctx // use context from middleware stack in children 7512 return ec.resolvers.Query().Recursive(rctx, fc.Args["input"].(*RecursiveInputSlice)) 7513 }) 7514 7515 if resTmp == nil { 7516 return graphql.Null 7517 } 7518 res := resTmp.(*bool) 7519 fc.Result = res 7520 return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) 7521 } 7522 7523 func (ec *executionContext) fieldContext_Query_recursive(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7524 fc = &graphql.FieldContext{ 7525 Object: "Query", 7526 Field: field, 7527 IsMethod: true, 7528 IsResolver: true, 7529 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7530 return nil, errors.New("field of type Boolean does not have child fields") 7531 }, 7532 } 7533 defer func() { 7534 if r := recover(); r != nil { 7535 err = ec.Recover(ctx, r) 7536 ec.Error(ctx, err) 7537 } 7538 }() 7539 ctx = graphql.WithFieldContext(ctx, fc) 7540 if fc.Args, err = ec.field_Query_recursive_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 7541 ec.Error(ctx, err) 7542 return 7543 } 7544 return fc, nil 7545 } 7546 7547 func (ec *executionContext) _Query_nestedInputs(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7548 fc, err := ec.fieldContext_Query_nestedInputs(ctx, field) 7549 if err != nil { 7550 return graphql.Null 7551 } 7552 ctx = graphql.WithFieldContext(ctx, fc) 7553 defer func() { 7554 if r := recover(); r != nil { 7555 ec.Error(ctx, ec.Recover(ctx, r)) 7556 ret = graphql.Null 7557 } 7558 }() 7559 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7560 ctx = rctx // use context from middleware stack in children 7561 return ec.resolvers.Query().NestedInputs(rctx, fc.Args["input"].([][]*OuterInput)) 7562 }) 7563 7564 if resTmp == nil { 7565 return graphql.Null 7566 } 7567 res := resTmp.(*bool) 7568 fc.Result = res 7569 return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) 7570 } 7571 7572 func (ec *executionContext) fieldContext_Query_nestedInputs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7573 fc = &graphql.FieldContext{ 7574 Object: "Query", 7575 Field: field, 7576 IsMethod: true, 7577 IsResolver: true, 7578 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7579 return nil, errors.New("field of type Boolean does not have child fields") 7580 }, 7581 } 7582 defer func() { 7583 if r := recover(); r != nil { 7584 err = ec.Recover(ctx, r) 7585 ec.Error(ctx, err) 7586 } 7587 }() 7588 ctx = graphql.WithFieldContext(ctx, fc) 7589 if fc.Args, err = ec.field_Query_nestedInputs_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 7590 ec.Error(ctx, err) 7591 return 7592 } 7593 return fc, nil 7594 } 7595 7596 func (ec *executionContext) _Query_nestedOutputs(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7597 fc, err := ec.fieldContext_Query_nestedOutputs(ctx, field) 7598 if err != nil { 7599 return graphql.Null 7600 } 7601 ctx = graphql.WithFieldContext(ctx, fc) 7602 defer func() { 7603 if r := recover(); r != nil { 7604 ec.Error(ctx, ec.Recover(ctx, r)) 7605 ret = graphql.Null 7606 } 7607 }() 7608 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7609 ctx = rctx // use context from middleware stack in children 7610 return ec.resolvers.Query().NestedOutputs(rctx) 7611 }) 7612 7613 if resTmp == nil { 7614 return graphql.Null 7615 } 7616 res := resTmp.([][]*OuterObject) 7617 fc.Result = res 7618 return ec.marshalOOuterObject2ᚕᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterObject(ctx, field.Selections, res) 7619 } 7620 7621 func (ec *executionContext) fieldContext_Query_nestedOutputs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7622 fc = &graphql.FieldContext{ 7623 Object: "Query", 7624 Field: field, 7625 IsMethod: true, 7626 IsResolver: true, 7627 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7628 switch field.Name { 7629 case "inner": 7630 return ec.fieldContext_OuterObject_inner(ctx, field) 7631 } 7632 return nil, fmt.Errorf("no field named %q was found under type OuterObject", field.Name) 7633 }, 7634 } 7635 return fc, nil 7636 } 7637 7638 func (ec *executionContext) _Query_modelMethods(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7639 fc, err := ec.fieldContext_Query_modelMethods(ctx, field) 7640 if err != nil { 7641 return graphql.Null 7642 } 7643 ctx = graphql.WithFieldContext(ctx, fc) 7644 defer func() { 7645 if r := recover(); r != nil { 7646 ec.Error(ctx, ec.Recover(ctx, r)) 7647 ret = graphql.Null 7648 } 7649 }() 7650 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7651 ctx = rctx // use context from middleware stack in children 7652 return ec.resolvers.Query().ModelMethods(rctx) 7653 }) 7654 7655 if resTmp == nil { 7656 return graphql.Null 7657 } 7658 res := resTmp.(*ModelMethods) 7659 fc.Result = res 7660 return ec.marshalOModelMethods2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐModelMethods(ctx, field.Selections, res) 7661 } 7662 7663 func (ec *executionContext) fieldContext_Query_modelMethods(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7664 fc = &graphql.FieldContext{ 7665 Object: "Query", 7666 Field: field, 7667 IsMethod: true, 7668 IsResolver: true, 7669 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7670 switch field.Name { 7671 case "resolverField": 7672 return ec.fieldContext_ModelMethods_resolverField(ctx, field) 7673 case "noContext": 7674 return ec.fieldContext_ModelMethods_noContext(ctx, field) 7675 case "withContext": 7676 return ec.fieldContext_ModelMethods_withContext(ctx, field) 7677 } 7678 return nil, fmt.Errorf("no field named %q was found under type ModelMethods", field.Name) 7679 }, 7680 } 7681 return fc, nil 7682 } 7683 7684 func (ec *executionContext) _Query_user(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7685 fc, err := ec.fieldContext_Query_user(ctx, field) 7686 if err != nil { 7687 return graphql.Null 7688 } 7689 ctx = graphql.WithFieldContext(ctx, fc) 7690 defer func() { 7691 if r := recover(); r != nil { 7692 ec.Error(ctx, ec.Recover(ctx, r)) 7693 ret = graphql.Null 7694 } 7695 }() 7696 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7697 ctx = rctx // use context from middleware stack in children 7698 return ec.resolvers.Query().User(rctx, fc.Args["id"].(int)) 7699 }) 7700 7701 if resTmp == nil { 7702 if !graphql.HasFieldError(ctx, fc) { 7703 ec.Errorf(ctx, "must not be null") 7704 } 7705 return graphql.Null 7706 } 7707 res := resTmp.(*User) 7708 fc.Result = res 7709 return ec.marshalNUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUser(ctx, field.Selections, res) 7710 } 7711 7712 func (ec *executionContext) fieldContext_Query_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7713 fc = &graphql.FieldContext{ 7714 Object: "Query", 7715 Field: field, 7716 IsMethod: true, 7717 IsResolver: true, 7718 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7719 switch field.Name { 7720 case "id": 7721 return ec.fieldContext_User_id(ctx, field) 7722 case "friends": 7723 return ec.fieldContext_User_friends(ctx, field) 7724 case "created": 7725 return ec.fieldContext_User_created(ctx, field) 7726 case "updated": 7727 return ec.fieldContext_User_updated(ctx, field) 7728 case "pets": 7729 return ec.fieldContext_User_pets(ctx, field) 7730 } 7731 return nil, fmt.Errorf("no field named %q was found under type User", field.Name) 7732 }, 7733 } 7734 defer func() { 7735 if r := recover(); r != nil { 7736 err = ec.Recover(ctx, r) 7737 ec.Error(ctx, err) 7738 } 7739 }() 7740 ctx = graphql.WithFieldContext(ctx, fc) 7741 if fc.Args, err = ec.field_Query_user_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 7742 ec.Error(ctx, err) 7743 return 7744 } 7745 return fc, nil 7746 } 7747 7748 func (ec *executionContext) _Query_nullableArg(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7749 fc, err := ec.fieldContext_Query_nullableArg(ctx, field) 7750 if err != nil { 7751 return graphql.Null 7752 } 7753 ctx = graphql.WithFieldContext(ctx, fc) 7754 defer func() { 7755 if r := recover(); r != nil { 7756 ec.Error(ctx, ec.Recover(ctx, r)) 7757 ret = graphql.Null 7758 } 7759 }() 7760 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7761 ctx = rctx // use context from middleware stack in children 7762 return ec.resolvers.Query().NullableArg(rctx, fc.Args["arg"].(*int)) 7763 }) 7764 7765 if resTmp == nil { 7766 return graphql.Null 7767 } 7768 res := resTmp.(*string) 7769 fc.Result = res 7770 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 7771 } 7772 7773 func (ec *executionContext) fieldContext_Query_nullableArg(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7774 fc = &graphql.FieldContext{ 7775 Object: "Query", 7776 Field: field, 7777 IsMethod: true, 7778 IsResolver: true, 7779 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7780 return nil, errors.New("field of type String does not have child fields") 7781 }, 7782 } 7783 defer func() { 7784 if r := recover(); r != nil { 7785 err = ec.Recover(ctx, r) 7786 ec.Error(ctx, err) 7787 } 7788 }() 7789 ctx = graphql.WithFieldContext(ctx, fc) 7790 if fc.Args, err = ec.field_Query_nullableArg_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 7791 ec.Error(ctx, err) 7792 return 7793 } 7794 return fc, nil 7795 } 7796 7797 func (ec *executionContext) _Query_inputSlice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7798 fc, err := ec.fieldContext_Query_inputSlice(ctx, field) 7799 if err != nil { 7800 return graphql.Null 7801 } 7802 ctx = graphql.WithFieldContext(ctx, fc) 7803 defer func() { 7804 if r := recover(); r != nil { 7805 ec.Error(ctx, ec.Recover(ctx, r)) 7806 ret = graphql.Null 7807 } 7808 }() 7809 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7810 ctx = rctx // use context from middleware stack in children 7811 return ec.resolvers.Query().InputSlice(rctx, fc.Args["arg"].([]string)) 7812 }) 7813 7814 if resTmp == nil { 7815 if !graphql.HasFieldError(ctx, fc) { 7816 ec.Errorf(ctx, "must not be null") 7817 } 7818 return graphql.Null 7819 } 7820 res := resTmp.(bool) 7821 fc.Result = res 7822 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 7823 } 7824 7825 func (ec *executionContext) fieldContext_Query_inputSlice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7826 fc = &graphql.FieldContext{ 7827 Object: "Query", 7828 Field: field, 7829 IsMethod: true, 7830 IsResolver: true, 7831 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7832 return nil, errors.New("field of type Boolean does not have child fields") 7833 }, 7834 } 7835 defer func() { 7836 if r := recover(); r != nil { 7837 err = ec.Recover(ctx, r) 7838 ec.Error(ctx, err) 7839 } 7840 }() 7841 ctx = graphql.WithFieldContext(ctx, fc) 7842 if fc.Args, err = ec.field_Query_inputSlice_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 7843 ec.Error(ctx, err) 7844 return 7845 } 7846 return fc, nil 7847 } 7848 7849 func (ec *executionContext) _Query_inputNullableSlice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7850 fc, err := ec.fieldContext_Query_inputNullableSlice(ctx, field) 7851 if err != nil { 7852 return graphql.Null 7853 } 7854 ctx = graphql.WithFieldContext(ctx, fc) 7855 defer func() { 7856 if r := recover(); r != nil { 7857 ec.Error(ctx, ec.Recover(ctx, r)) 7858 ret = graphql.Null 7859 } 7860 }() 7861 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7862 ctx = rctx // use context from middleware stack in children 7863 return ec.resolvers.Query().InputNullableSlice(rctx, fc.Args["arg"].([]string)) 7864 }) 7865 7866 if resTmp == nil { 7867 if !graphql.HasFieldError(ctx, fc) { 7868 ec.Errorf(ctx, "must not be null") 7869 } 7870 return graphql.Null 7871 } 7872 res := resTmp.(bool) 7873 fc.Result = res 7874 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 7875 } 7876 7877 func (ec *executionContext) fieldContext_Query_inputNullableSlice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7878 fc = &graphql.FieldContext{ 7879 Object: "Query", 7880 Field: field, 7881 IsMethod: true, 7882 IsResolver: true, 7883 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7884 return nil, errors.New("field of type Boolean does not have child fields") 7885 }, 7886 } 7887 defer func() { 7888 if r := recover(); r != nil { 7889 err = ec.Recover(ctx, r) 7890 ec.Error(ctx, err) 7891 } 7892 }() 7893 ctx = graphql.WithFieldContext(ctx, fc) 7894 if fc.Args, err = ec.field_Query_inputNullableSlice_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 7895 ec.Error(ctx, err) 7896 return 7897 } 7898 return fc, nil 7899 } 7900 7901 func (ec *executionContext) _Query_shapeUnion(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7902 fc, err := ec.fieldContext_Query_shapeUnion(ctx, field) 7903 if err != nil { 7904 return graphql.Null 7905 } 7906 ctx = graphql.WithFieldContext(ctx, fc) 7907 defer func() { 7908 if r := recover(); r != nil { 7909 ec.Error(ctx, ec.Recover(ctx, r)) 7910 ret = graphql.Null 7911 } 7912 }() 7913 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7914 ctx = rctx // use context from middleware stack in children 7915 return ec.resolvers.Query().ShapeUnion(rctx) 7916 }) 7917 7918 if resTmp == nil { 7919 if !graphql.HasFieldError(ctx, fc) { 7920 ec.Errorf(ctx, "must not be null") 7921 } 7922 return graphql.Null 7923 } 7924 res := resTmp.(ShapeUnion) 7925 fc.Result = res 7926 return ec.marshalNShapeUnion2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐShapeUnion(ctx, field.Selections, res) 7927 } 7928 7929 func (ec *executionContext) fieldContext_Query_shapeUnion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7930 fc = &graphql.FieldContext{ 7931 Object: "Query", 7932 Field: field, 7933 IsMethod: true, 7934 IsResolver: true, 7935 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7936 return nil, errors.New("field of type ShapeUnion does not have child fields") 7937 }, 7938 } 7939 return fc, nil 7940 } 7941 7942 func (ec *executionContext) _Query_autobind(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7943 fc, err := ec.fieldContext_Query_autobind(ctx, field) 7944 if err != nil { 7945 return graphql.Null 7946 } 7947 ctx = graphql.WithFieldContext(ctx, fc) 7948 defer func() { 7949 if r := recover(); r != nil { 7950 ec.Error(ctx, ec.Recover(ctx, r)) 7951 ret = graphql.Null 7952 } 7953 }() 7954 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 7955 ctx = rctx // use context from middleware stack in children 7956 return ec.resolvers.Query().Autobind(rctx) 7957 }) 7958 7959 if resTmp == nil { 7960 return graphql.Null 7961 } 7962 res := resTmp.(*Autobind) 7963 fc.Result = res 7964 return ec.marshalOAutobind2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐAutobind(ctx, field.Selections, res) 7965 } 7966 7967 func (ec *executionContext) fieldContext_Query_autobind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 7968 fc = &graphql.FieldContext{ 7969 Object: "Query", 7970 Field: field, 7971 IsMethod: true, 7972 IsResolver: true, 7973 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 7974 switch field.Name { 7975 case "int": 7976 return ec.fieldContext_Autobind_int(ctx, field) 7977 case "int32": 7978 return ec.fieldContext_Autobind_int32(ctx, field) 7979 case "int64": 7980 return ec.fieldContext_Autobind_int64(ctx, field) 7981 case "idStr": 7982 return ec.fieldContext_Autobind_idStr(ctx, field) 7983 case "idInt": 7984 return ec.fieldContext_Autobind_idInt(ctx, field) 7985 } 7986 return nil, fmt.Errorf("no field named %q was found under type Autobind", field.Name) 7987 }, 7988 } 7989 return fc, nil 7990 } 7991 7992 func (ec *executionContext) _Query_deprecatedField(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 7993 fc, err := ec.fieldContext_Query_deprecatedField(ctx, field) 7994 if err != nil { 7995 return graphql.Null 7996 } 7997 ctx = graphql.WithFieldContext(ctx, fc) 7998 defer func() { 7999 if r := recover(); r != nil { 8000 ec.Error(ctx, ec.Recover(ctx, r)) 8001 ret = graphql.Null 8002 } 8003 }() 8004 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8005 ctx = rctx // use context from middleware stack in children 8006 return ec.resolvers.Query().DeprecatedField(rctx) 8007 }) 8008 8009 if resTmp == nil { 8010 if !graphql.HasFieldError(ctx, fc) { 8011 ec.Errorf(ctx, "must not be null") 8012 } 8013 return graphql.Null 8014 } 8015 res := resTmp.(string) 8016 fc.Result = res 8017 return ec.marshalNString2string(ctx, field.Selections, res) 8018 } 8019 8020 func (ec *executionContext) fieldContext_Query_deprecatedField(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 8021 fc = &graphql.FieldContext{ 8022 Object: "Query", 8023 Field: field, 8024 IsMethod: true, 8025 IsResolver: true, 8026 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 8027 return nil, errors.New("field of type String does not have child fields") 8028 }, 8029 } 8030 return fc, nil 8031 } 8032 8033 func (ec *executionContext) _Query_overlapping(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8034 fc, err := ec.fieldContext_Query_overlapping(ctx, field) 8035 if err != nil { 8036 return graphql.Null 8037 } 8038 ctx = graphql.WithFieldContext(ctx, fc) 8039 defer func() { 8040 if r := recover(); r != nil { 8041 ec.Error(ctx, ec.Recover(ctx, r)) 8042 ret = graphql.Null 8043 } 8044 }() 8045 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8046 ctx = rctx // use context from middleware stack in children 8047 return ec.resolvers.Query().Overlapping(rctx) 8048 }) 8049 8050 if resTmp == nil { 8051 return graphql.Null 8052 } 8053 res := resTmp.(*OverlappingFields) 8054 fc.Result = res 8055 return ec.marshalOOverlappingFields2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOverlappingFields(ctx, field.Selections, res) 8056 } 8057 8058 func (ec *executionContext) fieldContext_Query_overlapping(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 8059 fc = &graphql.FieldContext{ 8060 Object: "Query", 8061 Field: field, 8062 IsMethod: true, 8063 IsResolver: true, 8064 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 8065 switch field.Name { 8066 case "oneFoo": 8067 return ec.fieldContext_OverlappingFields_oneFoo(ctx, field) 8068 case "twoFoo": 8069 return ec.fieldContext_OverlappingFields_twoFoo(ctx, field) 8070 case "oldFoo": 8071 return ec.fieldContext_OverlappingFields_oldFoo(ctx, field) 8072 case "newFoo": 8073 return ec.fieldContext_OverlappingFields_newFoo(ctx, field) 8074 case "new_foo": 8075 return ec.fieldContext_OverlappingFields_new_foo(ctx, field) 8076 } 8077 return nil, fmt.Errorf("no field named %q was found under type OverlappingFields", field.Name) 8078 }, 8079 } 8080 return fc, nil 8081 } 8082 8083 func (ec *executionContext) _Query_defaultParameters(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8084 fc, err := ec.fieldContext_Query_defaultParameters(ctx, field) 8085 if err != nil { 8086 return graphql.Null 8087 } 8088 ctx = graphql.WithFieldContext(ctx, fc) 8089 defer func() { 8090 if r := recover(); r != nil { 8091 ec.Error(ctx, ec.Recover(ctx, r)) 8092 ret = graphql.Null 8093 } 8094 }() 8095 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8096 ctx = rctx // use context from middleware stack in children 8097 return ec.resolvers.Query().DefaultParameters(rctx, fc.Args["falsyBoolean"].(*bool), fc.Args["truthyBoolean"].(*bool)) 8098 }) 8099 8100 if resTmp == nil { 8101 if !graphql.HasFieldError(ctx, fc) { 8102 ec.Errorf(ctx, "must not be null") 8103 } 8104 return graphql.Null 8105 } 8106 res := resTmp.(*DefaultParametersMirror) 8107 fc.Result = res 8108 return ec.marshalNDefaultParametersMirror2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐDefaultParametersMirror(ctx, field.Selections, res) 8109 } 8110 8111 func (ec *executionContext) fieldContext_Query_defaultParameters(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 8112 fc = &graphql.FieldContext{ 8113 Object: "Query", 8114 Field: field, 8115 IsMethod: true, 8116 IsResolver: true, 8117 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 8118 switch field.Name { 8119 case "falsyBoolean": 8120 return ec.fieldContext_DefaultParametersMirror_falsyBoolean(ctx, field) 8121 case "truthyBoolean": 8122 return ec.fieldContext_DefaultParametersMirror_truthyBoolean(ctx, field) 8123 } 8124 return nil, fmt.Errorf("no field named %q was found under type DefaultParametersMirror", field.Name) 8125 }, 8126 } 8127 defer func() { 8128 if r := recover(); r != nil { 8129 err = ec.Recover(ctx, r) 8130 ec.Error(ctx, err) 8131 } 8132 }() 8133 ctx = graphql.WithFieldContext(ctx, fc) 8134 if fc.Args, err = ec.field_Query_defaultParameters_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 8135 ec.Error(ctx, err) 8136 return 8137 } 8138 return fc, nil 8139 } 8140 8141 func (ec *executionContext) _Query_directiveArg(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8142 fc, err := ec.fieldContext_Query_directiveArg(ctx, field) 8143 if err != nil { 8144 return graphql.Null 8145 } 8146 ctx = graphql.WithFieldContext(ctx, fc) 8147 defer func() { 8148 if r := recover(); r != nil { 8149 ec.Error(ctx, ec.Recover(ctx, r)) 8150 ret = graphql.Null 8151 } 8152 }() 8153 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8154 ctx = rctx // use context from middleware stack in children 8155 return ec.resolvers.Query().DirectiveArg(rctx, fc.Args["arg"].(string)) 8156 }) 8157 8158 if resTmp == nil { 8159 return graphql.Null 8160 } 8161 res := resTmp.(*string) 8162 fc.Result = res 8163 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 8164 } 8165 8166 func (ec *executionContext) fieldContext_Query_directiveArg(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 8167 fc = &graphql.FieldContext{ 8168 Object: "Query", 8169 Field: field, 8170 IsMethod: true, 8171 IsResolver: true, 8172 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 8173 return nil, errors.New("field of type String does not have child fields") 8174 }, 8175 } 8176 defer func() { 8177 if r := recover(); r != nil { 8178 err = ec.Recover(ctx, r) 8179 ec.Error(ctx, err) 8180 } 8181 }() 8182 ctx = graphql.WithFieldContext(ctx, fc) 8183 if fc.Args, err = ec.field_Query_directiveArg_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 8184 ec.Error(ctx, err) 8185 return 8186 } 8187 return fc, nil 8188 } 8189 8190 func (ec *executionContext) _Query_directiveNullableArg(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8191 fc, err := ec.fieldContext_Query_directiveNullableArg(ctx, field) 8192 if err != nil { 8193 return graphql.Null 8194 } 8195 ctx = graphql.WithFieldContext(ctx, fc) 8196 defer func() { 8197 if r := recover(); r != nil { 8198 ec.Error(ctx, ec.Recover(ctx, r)) 8199 ret = graphql.Null 8200 } 8201 }() 8202 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8203 ctx = rctx // use context from middleware stack in children 8204 return ec.resolvers.Query().DirectiveNullableArg(rctx, fc.Args["arg"].(*int), fc.Args["arg2"].(*int), fc.Args["arg3"].(*string)) 8205 }) 8206 8207 if resTmp == nil { 8208 return graphql.Null 8209 } 8210 res := resTmp.(*string) 8211 fc.Result = res 8212 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 8213 } 8214 8215 func (ec *executionContext) fieldContext_Query_directiveNullableArg(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 8216 fc = &graphql.FieldContext{ 8217 Object: "Query", 8218 Field: field, 8219 IsMethod: true, 8220 IsResolver: true, 8221 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 8222 return nil, errors.New("field of type String does not have child fields") 8223 }, 8224 } 8225 defer func() { 8226 if r := recover(); r != nil { 8227 err = ec.Recover(ctx, r) 8228 ec.Error(ctx, err) 8229 } 8230 }() 8231 ctx = graphql.WithFieldContext(ctx, fc) 8232 if fc.Args, err = ec.field_Query_directiveNullableArg_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 8233 ec.Error(ctx, err) 8234 return 8235 } 8236 return fc, nil 8237 } 8238 8239 func (ec *executionContext) _Query_directiveInputNullable(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8240 fc, err := ec.fieldContext_Query_directiveInputNullable(ctx, field) 8241 if err != nil { 8242 return graphql.Null 8243 } 8244 ctx = graphql.WithFieldContext(ctx, fc) 8245 defer func() { 8246 if r := recover(); r != nil { 8247 ec.Error(ctx, ec.Recover(ctx, r)) 8248 ret = graphql.Null 8249 } 8250 }() 8251 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8252 ctx = rctx // use context from middleware stack in children 8253 return ec.resolvers.Query().DirectiveInputNullable(rctx, fc.Args["arg"].(*InputDirectives)) 8254 }) 8255 8256 if resTmp == nil { 8257 return graphql.Null 8258 } 8259 res := resTmp.(*string) 8260 fc.Result = res 8261 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 8262 } 8263 8264 func (ec *executionContext) fieldContext_Query_directiveInputNullable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 8265 fc = &graphql.FieldContext{ 8266 Object: "Query", 8267 Field: field, 8268 IsMethod: true, 8269 IsResolver: true, 8270 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 8271 return nil, errors.New("field of type String does not have child fields") 8272 }, 8273 } 8274 defer func() { 8275 if r := recover(); r != nil { 8276 err = ec.Recover(ctx, r) 8277 ec.Error(ctx, err) 8278 } 8279 }() 8280 ctx = graphql.WithFieldContext(ctx, fc) 8281 if fc.Args, err = ec.field_Query_directiveInputNullable_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 8282 ec.Error(ctx, err) 8283 return 8284 } 8285 return fc, nil 8286 } 8287 8288 func (ec *executionContext) _Query_directiveInput(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8289 fc, err := ec.fieldContext_Query_directiveInput(ctx, field) 8290 if err != nil { 8291 return graphql.Null 8292 } 8293 ctx = graphql.WithFieldContext(ctx, fc) 8294 defer func() { 8295 if r := recover(); r != nil { 8296 ec.Error(ctx, ec.Recover(ctx, r)) 8297 ret = graphql.Null 8298 } 8299 }() 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().DirectiveInput(rctx, fc.Args["arg"].(InputDirectives)) 8303 }) 8304 8305 if resTmp == nil { 8306 return graphql.Null 8307 } 8308 res := resTmp.(*string) 8309 fc.Result = res 8310 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 8311 } 8312 8313 func (ec *executionContext) fieldContext_Query_directiveInput(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 8314 fc = &graphql.FieldContext{ 8315 Object: "Query", 8316 Field: field, 8317 IsMethod: true, 8318 IsResolver: true, 8319 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 8320 return nil, errors.New("field of type String does not have child fields") 8321 }, 8322 } 8323 defer func() { 8324 if r := recover(); r != nil { 8325 err = ec.Recover(ctx, r) 8326 ec.Error(ctx, err) 8327 } 8328 }() 8329 ctx = graphql.WithFieldContext(ctx, fc) 8330 if fc.Args, err = ec.field_Query_directiveInput_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 8331 ec.Error(ctx, err) 8332 return 8333 } 8334 return fc, nil 8335 } 8336 8337 func (ec *executionContext) _Query_directiveInputType(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8338 fc, err := ec.fieldContext_Query_directiveInputType(ctx, field) 8339 if err != nil { 8340 return graphql.Null 8341 } 8342 ctx = graphql.WithFieldContext(ctx, fc) 8343 defer func() { 8344 if r := recover(); r != nil { 8345 ec.Error(ctx, ec.Recover(ctx, r)) 8346 ret = graphql.Null 8347 } 8348 }() 8349 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8350 ctx = rctx // use context from middleware stack in children 8351 return ec.resolvers.Query().DirectiveInputType(rctx, fc.Args["arg"].(InnerInput)) 8352 }) 8353 8354 if resTmp == nil { 8355 return graphql.Null 8356 } 8357 res := resTmp.(*string) 8358 fc.Result = res 8359 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 8360 } 8361 8362 func (ec *executionContext) fieldContext_Query_directiveInputType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 8363 fc = &graphql.FieldContext{ 8364 Object: "Query", 8365 Field: field, 8366 IsMethod: true, 8367 IsResolver: true, 8368 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 8369 return nil, errors.New("field of type String does not have child fields") 8370 }, 8371 } 8372 defer func() { 8373 if r := recover(); r != nil { 8374 err = ec.Recover(ctx, r) 8375 ec.Error(ctx, err) 8376 } 8377 }() 8378 ctx = graphql.WithFieldContext(ctx, fc) 8379 if fc.Args, err = ec.field_Query_directiveInputType_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 8380 ec.Error(ctx, err) 8381 return 8382 } 8383 return fc, nil 8384 } 8385 8386 func (ec *executionContext) _Query_directiveObject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8387 fc, err := ec.fieldContext_Query_directiveObject(ctx, field) 8388 if err != nil { 8389 return graphql.Null 8390 } 8391 ctx = graphql.WithFieldContext(ctx, fc) 8392 defer func() { 8393 if r := recover(); r != nil { 8394 ec.Error(ctx, ec.Recover(ctx, r)) 8395 ret = graphql.Null 8396 } 8397 }() 8398 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8399 directive0 := func(rctx context.Context) (interface{}, error) { 8400 ctx = rctx // use context from middleware stack in children 8401 return ec.resolvers.Query().DirectiveObject(rctx) 8402 } 8403 directive1 := func(ctx context.Context) (interface{}, error) { 8404 location, err := ec.unmarshalNString2string(ctx, "order1_1") 8405 if err != nil { 8406 return nil, err 8407 } 8408 if ec.directives.Order1 == nil { 8409 return nil, errors.New("directive order1 is not implemented") 8410 } 8411 return ec.directives.Order1(ctx, nil, directive0, location) 8412 } 8413 directive2 := func(ctx context.Context) (interface{}, error) { 8414 location, err := ec.unmarshalNString2string(ctx, "order1_2") 8415 if err != nil { 8416 return nil, err 8417 } 8418 if ec.directives.Order1 == nil { 8419 return nil, errors.New("directive order1 is not implemented") 8420 } 8421 return ec.directives.Order1(ctx, nil, directive1, location) 8422 } 8423 directive3 := func(ctx context.Context) (interface{}, error) { 8424 location, err := ec.unmarshalNString2string(ctx, "order2_1") 8425 if err != nil { 8426 return nil, err 8427 } 8428 if ec.directives.Order2 == nil { 8429 return nil, errors.New("directive order2 is not implemented") 8430 } 8431 return ec.directives.Order2(ctx, nil, directive2, location) 8432 } 8433 directive4 := func(ctx context.Context) (interface{}, error) { 8434 location, err := ec.unmarshalNString2string(ctx, "Query_field") 8435 if err != nil { 8436 return nil, err 8437 } 8438 if ec.directives.Order1 == nil { 8439 return nil, errors.New("directive order1 is not implemented") 8440 } 8441 return ec.directives.Order1(ctx, nil, directive3, location) 8442 } 8443 8444 tmp, err := directive4(rctx) 8445 if err != nil { 8446 return nil, graphql.ErrorOnPath(ctx, err) 8447 } 8448 if tmp == nil { 8449 return nil, nil 8450 } 8451 if data, ok := tmp.(*ObjectDirectives); ok { 8452 return data, nil 8453 } 8454 return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/spread-ai/gqlgen/codegen/testserver/singlefile.ObjectDirectives`, tmp) 8455 }) 8456 8457 if resTmp == nil { 8458 return graphql.Null 8459 } 8460 res := resTmp.(*ObjectDirectives) 8461 fc.Result = res 8462 return ec.marshalOObjectDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐObjectDirectives(ctx, field.Selections, res) 8463 } 8464 8465 func (ec *executionContext) fieldContext_Query_directiveObject(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 8466 fc = &graphql.FieldContext{ 8467 Object: "Query", 8468 Field: field, 8469 IsMethod: true, 8470 IsResolver: true, 8471 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 8472 switch field.Name { 8473 case "text": 8474 return ec.fieldContext_ObjectDirectives_text(ctx, field) 8475 case "nullableText": 8476 return ec.fieldContext_ObjectDirectives_nullableText(ctx, field) 8477 case "order": 8478 return ec.fieldContext_ObjectDirectives_order(ctx, field) 8479 } 8480 return nil, fmt.Errorf("no field named %q was found under type ObjectDirectives", field.Name) 8481 }, 8482 } 8483 return fc, nil 8484 } 8485 8486 func (ec *executionContext) _Query_directiveObjectWithCustomGoModel(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8487 fc, err := ec.fieldContext_Query_directiveObjectWithCustomGoModel(ctx, field) 8488 if err != nil { 8489 return graphql.Null 8490 } 8491 ctx = graphql.WithFieldContext(ctx, fc) 8492 defer func() { 8493 if r := recover(); r != nil { 8494 ec.Error(ctx, ec.Recover(ctx, r)) 8495 ret = graphql.Null 8496 } 8497 }() 8498 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8499 ctx = rctx // use context from middleware stack in children 8500 return ec.resolvers.Query().DirectiveObjectWithCustomGoModel(rctx) 8501 }) 8502 8503 if resTmp == nil { 8504 return graphql.Null 8505 } 8506 res := resTmp.(*ObjectDirectivesWithCustomGoModel) 8507 fc.Result = res 8508 return ec.marshalOObjectDirectivesWithCustomGoModel2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐObjectDirectivesWithCustomGoModel(ctx, field.Selections, res) 8509 } 8510 8511 func (ec *executionContext) fieldContext_Query_directiveObjectWithCustomGoModel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 8512 fc = &graphql.FieldContext{ 8513 Object: "Query", 8514 Field: field, 8515 IsMethod: true, 8516 IsResolver: true, 8517 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 8518 switch field.Name { 8519 case "nullableText": 8520 return ec.fieldContext_ObjectDirectivesWithCustomGoModel_nullableText(ctx, field) 8521 } 8522 return nil, fmt.Errorf("no field named %q was found under type ObjectDirectivesWithCustomGoModel", field.Name) 8523 }, 8524 } 8525 return fc, nil 8526 } 8527 8528 func (ec *executionContext) _Query_directiveFieldDef(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8529 fc, err := ec.fieldContext_Query_directiveFieldDef(ctx, field) 8530 if err != nil { 8531 return graphql.Null 8532 } 8533 ctx = graphql.WithFieldContext(ctx, fc) 8534 defer func() { 8535 if r := recover(); r != nil { 8536 ec.Error(ctx, ec.Recover(ctx, r)) 8537 ret = graphql.Null 8538 } 8539 }() 8540 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8541 directive0 := func(rctx context.Context) (interface{}, error) { 8542 ctx = rctx // use context from middleware stack in children 8543 return ec.resolvers.Query().DirectiveFieldDef(rctx, fc.Args["ret"].(string)) 8544 } 8545 directive1 := func(ctx context.Context) (interface{}, error) { 8546 min, err := ec.unmarshalNInt2int(ctx, 1) 8547 if err != nil { 8548 return nil, err 8549 } 8550 message, err := ec.unmarshalOString2ᚖstring(ctx, "not valid") 8551 if err != nil { 8552 return nil, err 8553 } 8554 if ec.directives.Length == nil { 8555 return nil, errors.New("directive length is not implemented") 8556 } 8557 return ec.directives.Length(ctx, nil, directive0, min, nil, message) 8558 } 8559 8560 tmp, err := directive1(rctx) 8561 if err != nil { 8562 return nil, graphql.ErrorOnPath(ctx, err) 8563 } 8564 if tmp == nil { 8565 return nil, nil 8566 } 8567 if data, ok := tmp.(string); ok { 8568 return data, nil 8569 } 8570 return nil, fmt.Errorf(`unexpected type %T from directive, should be string`, tmp) 8571 }) 8572 8573 if resTmp == nil { 8574 if !graphql.HasFieldError(ctx, fc) { 8575 ec.Errorf(ctx, "must not be null") 8576 } 8577 return graphql.Null 8578 } 8579 res := resTmp.(string) 8580 fc.Result = res 8581 return ec.marshalNString2string(ctx, field.Selections, res) 8582 } 8583 8584 func (ec *executionContext) fieldContext_Query_directiveFieldDef(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 8585 fc = &graphql.FieldContext{ 8586 Object: "Query", 8587 Field: field, 8588 IsMethod: true, 8589 IsResolver: true, 8590 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 8591 return nil, errors.New("field of type String does not have child fields") 8592 }, 8593 } 8594 defer func() { 8595 if r := recover(); r != nil { 8596 err = ec.Recover(ctx, r) 8597 ec.Error(ctx, err) 8598 } 8599 }() 8600 ctx = graphql.WithFieldContext(ctx, fc) 8601 if fc.Args, err = ec.field_Query_directiveFieldDef_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 8602 ec.Error(ctx, err) 8603 return 8604 } 8605 return fc, nil 8606 } 8607 8608 func (ec *executionContext) _Query_directiveField(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8609 fc, err := ec.fieldContext_Query_directiveField(ctx, field) 8610 if err != nil { 8611 return graphql.Null 8612 } 8613 ctx = graphql.WithFieldContext(ctx, fc) 8614 defer func() { 8615 if r := recover(); r != nil { 8616 ec.Error(ctx, ec.Recover(ctx, r)) 8617 ret = graphql.Null 8618 } 8619 }() 8620 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8621 ctx = rctx // use context from middleware stack in children 8622 return ec.resolvers.Query().DirectiveField(rctx) 8623 }) 8624 8625 if resTmp == nil { 8626 return graphql.Null 8627 } 8628 res := resTmp.(*string) 8629 fc.Result = res 8630 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 8631 } 8632 8633 func (ec *executionContext) fieldContext_Query_directiveField(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 8634 fc = &graphql.FieldContext{ 8635 Object: "Query", 8636 Field: field, 8637 IsMethod: true, 8638 IsResolver: true, 8639 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 8640 return nil, errors.New("field of type String does not have child fields") 8641 }, 8642 } 8643 return fc, nil 8644 } 8645 8646 func (ec *executionContext) _Query_directiveDouble(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8647 fc, err := ec.fieldContext_Query_directiveDouble(ctx, field) 8648 if err != nil { 8649 return graphql.Null 8650 } 8651 ctx = graphql.WithFieldContext(ctx, fc) 8652 defer func() { 8653 if r := recover(); r != nil { 8654 ec.Error(ctx, ec.Recover(ctx, r)) 8655 ret = graphql.Null 8656 } 8657 }() 8658 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8659 directive0 := func(rctx context.Context) (interface{}, error) { 8660 ctx = rctx // use context from middleware stack in children 8661 return ec.resolvers.Query().DirectiveDouble(rctx) 8662 } 8663 directive1 := func(ctx context.Context) (interface{}, error) { 8664 if ec.directives.Directive1 == nil { 8665 return nil, errors.New("directive directive1 is not implemented") 8666 } 8667 return ec.directives.Directive1(ctx, nil, directive0) 8668 } 8669 directive2 := func(ctx context.Context) (interface{}, error) { 8670 if ec.directives.Directive2 == nil { 8671 return nil, errors.New("directive directive2 is not implemented") 8672 } 8673 return ec.directives.Directive2(ctx, nil, directive1) 8674 } 8675 8676 tmp, err := directive2(rctx) 8677 if err != nil { 8678 return nil, graphql.ErrorOnPath(ctx, err) 8679 } 8680 if tmp == nil { 8681 return nil, nil 8682 } 8683 if data, ok := tmp.(*string); ok { 8684 return data, nil 8685 } 8686 return nil, fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp) 8687 }) 8688 8689 if resTmp == nil { 8690 return graphql.Null 8691 } 8692 res := resTmp.(*string) 8693 fc.Result = res 8694 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 8695 } 8696 8697 func (ec *executionContext) fieldContext_Query_directiveDouble(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 8698 fc = &graphql.FieldContext{ 8699 Object: "Query", 8700 Field: field, 8701 IsMethod: true, 8702 IsResolver: true, 8703 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 8704 return nil, errors.New("field of type String does not have child fields") 8705 }, 8706 } 8707 return fc, nil 8708 } 8709 8710 func (ec *executionContext) _Query_directiveUnimplemented(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8711 fc, err := ec.fieldContext_Query_directiveUnimplemented(ctx, field) 8712 if err != nil { 8713 return graphql.Null 8714 } 8715 ctx = graphql.WithFieldContext(ctx, fc) 8716 defer func() { 8717 if r := recover(); r != nil { 8718 ec.Error(ctx, ec.Recover(ctx, r)) 8719 ret = graphql.Null 8720 } 8721 }() 8722 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8723 directive0 := func(rctx context.Context) (interface{}, error) { 8724 ctx = rctx // use context from middleware stack in children 8725 return ec.resolvers.Query().DirectiveUnimplemented(rctx) 8726 } 8727 directive1 := func(ctx context.Context) (interface{}, error) { 8728 if ec.directives.Unimplemented == nil { 8729 return nil, errors.New("directive unimplemented is not implemented") 8730 } 8731 return ec.directives.Unimplemented(ctx, nil, directive0) 8732 } 8733 8734 tmp, err := directive1(rctx) 8735 if err != nil { 8736 return nil, graphql.ErrorOnPath(ctx, err) 8737 } 8738 if tmp == nil { 8739 return nil, nil 8740 } 8741 if data, ok := tmp.(*string); ok { 8742 return data, nil 8743 } 8744 return nil, fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp) 8745 }) 8746 8747 if resTmp == nil { 8748 return graphql.Null 8749 } 8750 res := resTmp.(*string) 8751 fc.Result = res 8752 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 8753 } 8754 8755 func (ec *executionContext) fieldContext_Query_directiveUnimplemented(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 8756 fc = &graphql.FieldContext{ 8757 Object: "Query", 8758 Field: field, 8759 IsMethod: true, 8760 IsResolver: true, 8761 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 8762 return nil, errors.New("field of type String does not have child fields") 8763 }, 8764 } 8765 return fc, nil 8766 } 8767 8768 func (ec *executionContext) _Query_embeddedCase1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8769 fc, err := ec.fieldContext_Query_embeddedCase1(ctx, field) 8770 if err != nil { 8771 return graphql.Null 8772 } 8773 ctx = graphql.WithFieldContext(ctx, fc) 8774 defer func() { 8775 if r := recover(); r != nil { 8776 ec.Error(ctx, ec.Recover(ctx, r)) 8777 ret = graphql.Null 8778 } 8779 }() 8780 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8781 ctx = rctx // use context from middleware stack in children 8782 return ec.resolvers.Query().EmbeddedCase1(rctx) 8783 }) 8784 8785 if resTmp == nil { 8786 return graphql.Null 8787 } 8788 res := resTmp.(*EmbeddedCase1) 8789 fc.Result = res 8790 return ec.marshalOEmbeddedCase12ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEmbeddedCase1(ctx, field.Selections, res) 8791 } 8792 8793 func (ec *executionContext) fieldContext_Query_embeddedCase1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 8794 fc = &graphql.FieldContext{ 8795 Object: "Query", 8796 Field: field, 8797 IsMethod: true, 8798 IsResolver: true, 8799 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 8800 switch field.Name { 8801 case "exportedEmbeddedPointerExportedMethod": 8802 return ec.fieldContext_EmbeddedCase1_exportedEmbeddedPointerExportedMethod(ctx, field) 8803 } 8804 return nil, fmt.Errorf("no field named %q was found under type EmbeddedCase1", field.Name) 8805 }, 8806 } 8807 return fc, nil 8808 } 8809 8810 func (ec *executionContext) _Query_embeddedCase2(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8811 fc, err := ec.fieldContext_Query_embeddedCase2(ctx, field) 8812 if err != nil { 8813 return graphql.Null 8814 } 8815 ctx = graphql.WithFieldContext(ctx, fc) 8816 defer func() { 8817 if r := recover(); r != nil { 8818 ec.Error(ctx, ec.Recover(ctx, r)) 8819 ret = graphql.Null 8820 } 8821 }() 8822 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8823 ctx = rctx // use context from middleware stack in children 8824 return ec.resolvers.Query().EmbeddedCase2(rctx) 8825 }) 8826 8827 if resTmp == nil { 8828 return graphql.Null 8829 } 8830 res := resTmp.(*EmbeddedCase2) 8831 fc.Result = res 8832 return ec.marshalOEmbeddedCase22ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEmbeddedCase2(ctx, field.Selections, res) 8833 } 8834 8835 func (ec *executionContext) fieldContext_Query_embeddedCase2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 8836 fc = &graphql.FieldContext{ 8837 Object: "Query", 8838 Field: field, 8839 IsMethod: true, 8840 IsResolver: true, 8841 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 8842 switch field.Name { 8843 case "unexportedEmbeddedPointerExportedMethod": 8844 return ec.fieldContext_EmbeddedCase2_unexportedEmbeddedPointerExportedMethod(ctx, field) 8845 } 8846 return nil, fmt.Errorf("no field named %q was found under type EmbeddedCase2", field.Name) 8847 }, 8848 } 8849 return fc, nil 8850 } 8851 8852 func (ec *executionContext) _Query_embeddedCase3(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8853 fc, err := ec.fieldContext_Query_embeddedCase3(ctx, field) 8854 if err != nil { 8855 return graphql.Null 8856 } 8857 ctx = graphql.WithFieldContext(ctx, fc) 8858 defer func() { 8859 if r := recover(); r != nil { 8860 ec.Error(ctx, ec.Recover(ctx, r)) 8861 ret = graphql.Null 8862 } 8863 }() 8864 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8865 ctx = rctx // use context from middleware stack in children 8866 return ec.resolvers.Query().EmbeddedCase3(rctx) 8867 }) 8868 8869 if resTmp == nil { 8870 return graphql.Null 8871 } 8872 res := resTmp.(*EmbeddedCase3) 8873 fc.Result = res 8874 return ec.marshalOEmbeddedCase32ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEmbeddedCase3(ctx, field.Selections, res) 8875 } 8876 8877 func (ec *executionContext) fieldContext_Query_embeddedCase3(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 8878 fc = &graphql.FieldContext{ 8879 Object: "Query", 8880 Field: field, 8881 IsMethod: true, 8882 IsResolver: true, 8883 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 8884 switch field.Name { 8885 case "unexportedEmbeddedInterfaceExportedMethod": 8886 return ec.fieldContext_EmbeddedCase3_unexportedEmbeddedInterfaceExportedMethod(ctx, field) 8887 } 8888 return nil, fmt.Errorf("no field named %q was found under type EmbeddedCase3", field.Name) 8889 }, 8890 } 8891 return fc, nil 8892 } 8893 8894 func (ec *executionContext) _Query_enumInInput(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8895 fc, err := ec.fieldContext_Query_enumInInput(ctx, field) 8896 if err != nil { 8897 return graphql.Null 8898 } 8899 ctx = graphql.WithFieldContext(ctx, fc) 8900 defer func() { 8901 if r := recover(); r != nil { 8902 ec.Error(ctx, ec.Recover(ctx, r)) 8903 ret = graphql.Null 8904 } 8905 }() 8906 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8907 ctx = rctx // use context from middleware stack in children 8908 return ec.resolvers.Query().EnumInInput(rctx, fc.Args["input"].(*InputWithEnumValue)) 8909 }) 8910 8911 if resTmp == nil { 8912 if !graphql.HasFieldError(ctx, fc) { 8913 ec.Errorf(ctx, "must not be null") 8914 } 8915 return graphql.Null 8916 } 8917 res := resTmp.(EnumTest) 8918 fc.Result = res 8919 return ec.marshalNEnumTest2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEnumTest(ctx, field.Selections, res) 8920 } 8921 8922 func (ec *executionContext) fieldContext_Query_enumInInput(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 8923 fc = &graphql.FieldContext{ 8924 Object: "Query", 8925 Field: field, 8926 IsMethod: true, 8927 IsResolver: true, 8928 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 8929 return nil, errors.New("field of type EnumTest does not have child fields") 8930 }, 8931 } 8932 defer func() { 8933 if r := recover(); r != nil { 8934 err = ec.Recover(ctx, r) 8935 ec.Error(ctx, err) 8936 } 8937 }() 8938 ctx = graphql.WithFieldContext(ctx, fc) 8939 if fc.Args, err = ec.field_Query_enumInInput_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 8940 ec.Error(ctx, err) 8941 return 8942 } 8943 return fc, nil 8944 } 8945 8946 func (ec *executionContext) _Query_shapes(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8947 fc, err := ec.fieldContext_Query_shapes(ctx, field) 8948 if err != nil { 8949 return graphql.Null 8950 } 8951 ctx = graphql.WithFieldContext(ctx, fc) 8952 defer func() { 8953 if r := recover(); r != nil { 8954 ec.Error(ctx, ec.Recover(ctx, r)) 8955 ret = graphql.Null 8956 } 8957 }() 8958 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8959 ctx = rctx // use context from middleware stack in children 8960 return ec.resolvers.Query().Shapes(rctx) 8961 }) 8962 8963 if resTmp == nil { 8964 return graphql.Null 8965 } 8966 res := resTmp.([]Shape) 8967 fc.Result = res 8968 return ec.marshalOShape2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐShape(ctx, field.Selections, res) 8969 } 8970 8971 func (ec *executionContext) fieldContext_Query_shapes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 8972 fc = &graphql.FieldContext{ 8973 Object: "Query", 8974 Field: field, 8975 IsMethod: true, 8976 IsResolver: true, 8977 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 8978 return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE") 8979 }, 8980 } 8981 return fc, nil 8982 } 8983 8984 func (ec *executionContext) _Query_noShape(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 8985 fc, err := ec.fieldContext_Query_noShape(ctx, field) 8986 if err != nil { 8987 return graphql.Null 8988 } 8989 ctx = graphql.WithFieldContext(ctx, fc) 8990 defer func() { 8991 if r := recover(); r != nil { 8992 ec.Error(ctx, ec.Recover(ctx, r)) 8993 ret = graphql.Null 8994 } 8995 }() 8996 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 8997 directive0 := func(rctx context.Context) (interface{}, error) { 8998 ctx = rctx // use context from middleware stack in children 8999 return ec.resolvers.Query().NoShape(rctx) 9000 } 9001 directive1 := func(ctx context.Context) (interface{}, error) { 9002 if ec.directives.MakeNil == nil { 9003 return nil, errors.New("directive makeNil is not implemented") 9004 } 9005 return ec.directives.MakeNil(ctx, nil, directive0) 9006 } 9007 9008 tmp, err := directive1(rctx) 9009 if err != nil { 9010 return nil, graphql.ErrorOnPath(ctx, err) 9011 } 9012 if tmp == nil { 9013 return nil, nil 9014 } 9015 if data, ok := tmp.(Shape); ok { 9016 return data, nil 9017 } 9018 return nil, fmt.Errorf(`unexpected type %T from directive, should be github.com/spread-ai/gqlgen/codegen/testserver/singlefile.Shape`, tmp) 9019 }) 9020 9021 if resTmp == nil { 9022 return graphql.Null 9023 } 9024 res := resTmp.(Shape) 9025 fc.Result = res 9026 return ec.marshalOShape2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐShape(ctx, field.Selections, res) 9027 } 9028 9029 func (ec *executionContext) fieldContext_Query_noShape(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 9030 fc = &graphql.FieldContext{ 9031 Object: "Query", 9032 Field: field, 9033 IsMethod: true, 9034 IsResolver: true, 9035 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 9036 return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE") 9037 }, 9038 } 9039 return fc, nil 9040 } 9041 9042 func (ec *executionContext) _Query_node(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 9043 fc, err := ec.fieldContext_Query_node(ctx, field) 9044 if err != nil { 9045 return graphql.Null 9046 } 9047 ctx = graphql.WithFieldContext(ctx, fc) 9048 defer func() { 9049 if r := recover(); r != nil { 9050 ec.Error(ctx, ec.Recover(ctx, r)) 9051 ret = graphql.Null 9052 } 9053 }() 9054 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9055 ctx = rctx // use context from middleware stack in children 9056 return ec.resolvers.Query().Node(rctx) 9057 }) 9058 9059 if resTmp == nil { 9060 if !graphql.HasFieldError(ctx, fc) { 9061 ec.Errorf(ctx, "must not be null") 9062 } 9063 return graphql.Null 9064 } 9065 res := resTmp.(Node) 9066 fc.Result = res 9067 return ec.marshalNNode2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐNode(ctx, field.Selections, res) 9068 } 9069 9070 func (ec *executionContext) fieldContext_Query_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 9071 fc = &graphql.FieldContext{ 9072 Object: "Query", 9073 Field: field, 9074 IsMethod: true, 9075 IsResolver: true, 9076 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 9077 return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE") 9078 }, 9079 } 9080 return fc, nil 9081 } 9082 9083 func (ec *executionContext) _Query_noShapeTypedNil(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 9084 fc, err := ec.fieldContext_Query_noShapeTypedNil(ctx, field) 9085 if err != nil { 9086 return graphql.Null 9087 } 9088 ctx = graphql.WithFieldContext(ctx, fc) 9089 defer func() { 9090 if r := recover(); r != nil { 9091 ec.Error(ctx, ec.Recover(ctx, r)) 9092 ret = graphql.Null 9093 } 9094 }() 9095 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9096 directive0 := func(rctx context.Context) (interface{}, error) { 9097 ctx = rctx // use context from middleware stack in children 9098 return ec.resolvers.Query().NoShapeTypedNil(rctx) 9099 } 9100 directive1 := func(ctx context.Context) (interface{}, error) { 9101 if ec.directives.MakeTypedNil == nil { 9102 return nil, errors.New("directive makeTypedNil is not implemented") 9103 } 9104 return ec.directives.MakeTypedNil(ctx, nil, directive0) 9105 } 9106 9107 tmp, err := directive1(rctx) 9108 if err != nil { 9109 return nil, graphql.ErrorOnPath(ctx, err) 9110 } 9111 if tmp == nil { 9112 return nil, nil 9113 } 9114 if data, ok := tmp.(Shape); ok { 9115 return data, nil 9116 } 9117 return nil, fmt.Errorf(`unexpected type %T from directive, should be github.com/spread-ai/gqlgen/codegen/testserver/singlefile.Shape`, tmp) 9118 }) 9119 9120 if resTmp == nil { 9121 return graphql.Null 9122 } 9123 res := resTmp.(Shape) 9124 fc.Result = res 9125 return ec.marshalOShape2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐShape(ctx, field.Selections, res) 9126 } 9127 9128 func (ec *executionContext) fieldContext_Query_noShapeTypedNil(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 9129 fc = &graphql.FieldContext{ 9130 Object: "Query", 9131 Field: field, 9132 IsMethod: true, 9133 IsResolver: true, 9134 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 9135 return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE") 9136 }, 9137 } 9138 return fc, nil 9139 } 9140 9141 func (ec *executionContext) _Query_animal(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 9142 fc, err := ec.fieldContext_Query_animal(ctx, field) 9143 if err != nil { 9144 return graphql.Null 9145 } 9146 ctx = graphql.WithFieldContext(ctx, fc) 9147 defer func() { 9148 if r := recover(); r != nil { 9149 ec.Error(ctx, ec.Recover(ctx, r)) 9150 ret = graphql.Null 9151 } 9152 }() 9153 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9154 directive0 := func(rctx context.Context) (interface{}, error) { 9155 ctx = rctx // use context from middleware stack in children 9156 return ec.resolvers.Query().Animal(rctx) 9157 } 9158 directive1 := func(ctx context.Context) (interface{}, error) { 9159 if ec.directives.MakeTypedNil == nil { 9160 return nil, errors.New("directive makeTypedNil is not implemented") 9161 } 9162 return ec.directives.MakeTypedNil(ctx, nil, directive0) 9163 } 9164 9165 tmp, err := directive1(rctx) 9166 if err != nil { 9167 return nil, graphql.ErrorOnPath(ctx, err) 9168 } 9169 if tmp == nil { 9170 return nil, nil 9171 } 9172 if data, ok := tmp.(Animal); ok { 9173 return data, nil 9174 } 9175 return nil, fmt.Errorf(`unexpected type %T from directive, should be github.com/spread-ai/gqlgen/codegen/testserver/singlefile.Animal`, tmp) 9176 }) 9177 9178 if resTmp == nil { 9179 return graphql.Null 9180 } 9181 res := resTmp.(Animal) 9182 fc.Result = res 9183 return ec.marshalOAnimal2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐAnimal(ctx, field.Selections, res) 9184 } 9185 9186 func (ec *executionContext) fieldContext_Query_animal(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 9187 fc = &graphql.FieldContext{ 9188 Object: "Query", 9189 Field: field, 9190 IsMethod: true, 9191 IsResolver: true, 9192 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 9193 return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE") 9194 }, 9195 } 9196 return fc, nil 9197 } 9198 9199 func (ec *executionContext) _Query_notAnInterface(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 9200 fc, err := ec.fieldContext_Query_notAnInterface(ctx, field) 9201 if err != nil { 9202 return graphql.Null 9203 } 9204 ctx = graphql.WithFieldContext(ctx, fc) 9205 defer func() { 9206 if r := recover(); r != nil { 9207 ec.Error(ctx, ec.Recover(ctx, r)) 9208 ret = graphql.Null 9209 } 9210 }() 9211 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9212 ctx = rctx // use context from middleware stack in children 9213 return ec.resolvers.Query().NotAnInterface(rctx) 9214 }) 9215 9216 if resTmp == nil { 9217 return graphql.Null 9218 } 9219 res := resTmp.(BackedByInterface) 9220 fc.Result = res 9221 return ec.marshalOBackedByInterface2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐBackedByInterface(ctx, field.Selections, res) 9222 } 9223 9224 func (ec *executionContext) fieldContext_Query_notAnInterface(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 9225 fc = &graphql.FieldContext{ 9226 Object: "Query", 9227 Field: field, 9228 IsMethod: true, 9229 IsResolver: true, 9230 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 9231 switch field.Name { 9232 case "id": 9233 return ec.fieldContext_BackedByInterface_id(ctx, field) 9234 case "thisShouldBind": 9235 return ec.fieldContext_BackedByInterface_thisShouldBind(ctx, field) 9236 case "thisShouldBindWithError": 9237 return ec.fieldContext_BackedByInterface_thisShouldBindWithError(ctx, field) 9238 } 9239 return nil, fmt.Errorf("no field named %q was found under type BackedByInterface", field.Name) 9240 }, 9241 } 9242 return fc, nil 9243 } 9244 9245 func (ec *executionContext) _Query_dog(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 9246 fc, err := ec.fieldContext_Query_dog(ctx, field) 9247 if err != nil { 9248 return graphql.Null 9249 } 9250 ctx = graphql.WithFieldContext(ctx, fc) 9251 defer func() { 9252 if r := recover(); r != nil { 9253 ec.Error(ctx, ec.Recover(ctx, r)) 9254 ret = graphql.Null 9255 } 9256 }() 9257 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9258 ctx = rctx // use context from middleware stack in children 9259 return ec.resolvers.Query().Dog(rctx) 9260 }) 9261 9262 if resTmp == nil { 9263 return graphql.Null 9264 } 9265 res := resTmp.(*Dog) 9266 fc.Result = res 9267 return ec.marshalODog2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐDog(ctx, field.Selections, res) 9268 } 9269 9270 func (ec *executionContext) fieldContext_Query_dog(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 9271 fc = &graphql.FieldContext{ 9272 Object: "Query", 9273 Field: field, 9274 IsMethod: true, 9275 IsResolver: true, 9276 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 9277 switch field.Name { 9278 case "species": 9279 return ec.fieldContext_Dog_species(ctx, field) 9280 case "size": 9281 return ec.fieldContext_Dog_size(ctx, field) 9282 case "dogBreed": 9283 return ec.fieldContext_Dog_dogBreed(ctx, field) 9284 } 9285 return nil, fmt.Errorf("no field named %q was found under type Dog", field.Name) 9286 }, 9287 } 9288 return fc, nil 9289 } 9290 9291 func (ec *executionContext) _Query_issue896a(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 9292 fc, err := ec.fieldContext_Query_issue896a(ctx, field) 9293 if err != nil { 9294 return graphql.Null 9295 } 9296 ctx = graphql.WithFieldContext(ctx, fc) 9297 defer func() { 9298 if r := recover(); r != nil { 9299 ec.Error(ctx, ec.Recover(ctx, r)) 9300 ret = graphql.Null 9301 } 9302 }() 9303 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9304 ctx = rctx // use context from middleware stack in children 9305 return ec.resolvers.Query().Issue896a(rctx) 9306 }) 9307 9308 if resTmp == nil { 9309 return graphql.Null 9310 } 9311 res := resTmp.([]*CheckIssue896) 9312 fc.Result = res 9313 return ec.marshalOCheckIssue8962ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896ᚄ(ctx, field.Selections, res) 9314 } 9315 9316 func (ec *executionContext) fieldContext_Query_issue896a(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 9317 fc = &graphql.FieldContext{ 9318 Object: "Query", 9319 Field: field, 9320 IsMethod: true, 9321 IsResolver: true, 9322 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 9323 switch field.Name { 9324 case "id": 9325 return ec.fieldContext_CheckIssue896_id(ctx, field) 9326 } 9327 return nil, fmt.Errorf("no field named %q was found under type CheckIssue896", field.Name) 9328 }, 9329 } 9330 return fc, nil 9331 } 9332 9333 func (ec *executionContext) _Query_mapStringInterface(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 9334 fc, err := ec.fieldContext_Query_mapStringInterface(ctx, field) 9335 if err != nil { 9336 return graphql.Null 9337 } 9338 ctx = graphql.WithFieldContext(ctx, fc) 9339 defer func() { 9340 if r := recover(); r != nil { 9341 ec.Error(ctx, ec.Recover(ctx, r)) 9342 ret = graphql.Null 9343 } 9344 }() 9345 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9346 ctx = rctx // use context from middleware stack in children 9347 return ec.resolvers.Query().MapStringInterface(rctx, fc.Args["in"].(map[string]interface{})) 9348 }) 9349 9350 if resTmp == nil { 9351 return graphql.Null 9352 } 9353 res := resTmp.(map[string]interface{}) 9354 fc.Result = res 9355 return ec.marshalOMapStringInterfaceType2map(ctx, field.Selections, res) 9356 } 9357 9358 func (ec *executionContext) fieldContext_Query_mapStringInterface(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 9359 fc = &graphql.FieldContext{ 9360 Object: "Query", 9361 Field: field, 9362 IsMethod: true, 9363 IsResolver: true, 9364 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 9365 switch field.Name { 9366 case "a": 9367 return ec.fieldContext_MapStringInterfaceType_a(ctx, field) 9368 case "b": 9369 return ec.fieldContext_MapStringInterfaceType_b(ctx, field) 9370 } 9371 return nil, fmt.Errorf("no field named %q was found under type MapStringInterfaceType", field.Name) 9372 }, 9373 } 9374 defer func() { 9375 if r := recover(); r != nil { 9376 err = ec.Recover(ctx, r) 9377 ec.Error(ctx, err) 9378 } 9379 }() 9380 ctx = graphql.WithFieldContext(ctx, fc) 9381 if fc.Args, err = ec.field_Query_mapStringInterface_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 9382 ec.Error(ctx, err) 9383 return 9384 } 9385 return fc, nil 9386 } 9387 9388 func (ec *executionContext) _Query_mapNestedStringInterface(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 9389 fc, err := ec.fieldContext_Query_mapNestedStringInterface(ctx, field) 9390 if err != nil { 9391 return graphql.Null 9392 } 9393 ctx = graphql.WithFieldContext(ctx, fc) 9394 defer func() { 9395 if r := recover(); r != nil { 9396 ec.Error(ctx, ec.Recover(ctx, r)) 9397 ret = graphql.Null 9398 } 9399 }() 9400 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9401 ctx = rctx // use context from middleware stack in children 9402 return ec.resolvers.Query().MapNestedStringInterface(rctx, fc.Args["in"].(*NestedMapInput)) 9403 }) 9404 9405 if resTmp == nil { 9406 return graphql.Null 9407 } 9408 res := resTmp.(map[string]interface{}) 9409 fc.Result = res 9410 return ec.marshalOMapStringInterfaceType2map(ctx, field.Selections, res) 9411 } 9412 9413 func (ec *executionContext) fieldContext_Query_mapNestedStringInterface(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 9414 fc = &graphql.FieldContext{ 9415 Object: "Query", 9416 Field: field, 9417 IsMethod: true, 9418 IsResolver: true, 9419 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 9420 switch field.Name { 9421 case "a": 9422 return ec.fieldContext_MapStringInterfaceType_a(ctx, field) 9423 case "b": 9424 return ec.fieldContext_MapStringInterfaceType_b(ctx, field) 9425 } 9426 return nil, fmt.Errorf("no field named %q was found under type MapStringInterfaceType", field.Name) 9427 }, 9428 } 9429 defer func() { 9430 if r := recover(); r != nil { 9431 err = ec.Recover(ctx, r) 9432 ec.Error(ctx, err) 9433 } 9434 }() 9435 ctx = graphql.WithFieldContext(ctx, fc) 9436 if fc.Args, err = ec.field_Query_mapNestedStringInterface_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 9437 ec.Error(ctx, err) 9438 return 9439 } 9440 return fc, nil 9441 } 9442 9443 func (ec *executionContext) _Query_errorBubble(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 9444 fc, err := ec.fieldContext_Query_errorBubble(ctx, field) 9445 if err != nil { 9446 return graphql.Null 9447 } 9448 ctx = graphql.WithFieldContext(ctx, fc) 9449 defer func() { 9450 if r := recover(); r != nil { 9451 ec.Error(ctx, ec.Recover(ctx, r)) 9452 ret = graphql.Null 9453 } 9454 }() 9455 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9456 ctx = rctx // use context from middleware stack in children 9457 return ec.resolvers.Query().ErrorBubble(rctx) 9458 }) 9459 9460 if resTmp == nil { 9461 return graphql.Null 9462 } 9463 res := resTmp.(*Error) 9464 fc.Result = res 9465 return ec.marshalOError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx, field.Selections, res) 9466 } 9467 9468 func (ec *executionContext) fieldContext_Query_errorBubble(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 9469 fc = &graphql.FieldContext{ 9470 Object: "Query", 9471 Field: field, 9472 IsMethod: true, 9473 IsResolver: true, 9474 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 9475 switch field.Name { 9476 case "id": 9477 return ec.fieldContext_Error_id(ctx, field) 9478 case "errorOnNonRequiredField": 9479 return ec.fieldContext_Error_errorOnNonRequiredField(ctx, field) 9480 case "errorOnRequiredField": 9481 return ec.fieldContext_Error_errorOnRequiredField(ctx, field) 9482 case "nilOnRequiredField": 9483 return ec.fieldContext_Error_nilOnRequiredField(ctx, field) 9484 } 9485 return nil, fmt.Errorf("no field named %q was found under type Error", field.Name) 9486 }, 9487 } 9488 return fc, nil 9489 } 9490 9491 func (ec *executionContext) _Query_errorBubbleList(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 9492 fc, err := ec.fieldContext_Query_errorBubbleList(ctx, field) 9493 if err != nil { 9494 return graphql.Null 9495 } 9496 ctx = graphql.WithFieldContext(ctx, fc) 9497 defer func() { 9498 if r := recover(); r != nil { 9499 ec.Error(ctx, ec.Recover(ctx, r)) 9500 ret = graphql.Null 9501 } 9502 }() 9503 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9504 ctx = rctx // use context from middleware stack in children 9505 return ec.resolvers.Query().ErrorBubbleList(rctx) 9506 }) 9507 9508 if resTmp == nil { 9509 return graphql.Null 9510 } 9511 res := resTmp.([]*Error) 9512 fc.Result = res 9513 return ec.marshalOError2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐErrorᚄ(ctx, field.Selections, res) 9514 } 9515 9516 func (ec *executionContext) fieldContext_Query_errorBubbleList(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 9517 fc = &graphql.FieldContext{ 9518 Object: "Query", 9519 Field: field, 9520 IsMethod: true, 9521 IsResolver: true, 9522 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 9523 switch field.Name { 9524 case "id": 9525 return ec.fieldContext_Error_id(ctx, field) 9526 case "errorOnNonRequiredField": 9527 return ec.fieldContext_Error_errorOnNonRequiredField(ctx, field) 9528 case "errorOnRequiredField": 9529 return ec.fieldContext_Error_errorOnRequiredField(ctx, field) 9530 case "nilOnRequiredField": 9531 return ec.fieldContext_Error_nilOnRequiredField(ctx, field) 9532 } 9533 return nil, fmt.Errorf("no field named %q was found under type Error", field.Name) 9534 }, 9535 } 9536 return fc, nil 9537 } 9538 9539 func (ec *executionContext) _Query_errorList(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 9540 fc, err := ec.fieldContext_Query_errorList(ctx, field) 9541 if err != nil { 9542 return graphql.Null 9543 } 9544 ctx = graphql.WithFieldContext(ctx, fc) 9545 defer func() { 9546 if r := recover(); r != nil { 9547 ec.Error(ctx, ec.Recover(ctx, r)) 9548 ret = graphql.Null 9549 } 9550 }() 9551 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9552 ctx = rctx // use context from middleware stack in children 9553 return ec.resolvers.Query().ErrorList(rctx) 9554 }) 9555 9556 if resTmp == nil { 9557 return graphql.Null 9558 } 9559 res := resTmp.([]*Error) 9560 fc.Result = res 9561 return ec.marshalOError2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx, field.Selections, res) 9562 } 9563 9564 func (ec *executionContext) fieldContext_Query_errorList(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 9565 fc = &graphql.FieldContext{ 9566 Object: "Query", 9567 Field: field, 9568 IsMethod: true, 9569 IsResolver: true, 9570 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 9571 switch field.Name { 9572 case "id": 9573 return ec.fieldContext_Error_id(ctx, field) 9574 case "errorOnNonRequiredField": 9575 return ec.fieldContext_Error_errorOnNonRequiredField(ctx, field) 9576 case "errorOnRequiredField": 9577 return ec.fieldContext_Error_errorOnRequiredField(ctx, field) 9578 case "nilOnRequiredField": 9579 return ec.fieldContext_Error_nilOnRequiredField(ctx, field) 9580 } 9581 return nil, fmt.Errorf("no field named %q was found under type Error", field.Name) 9582 }, 9583 } 9584 return fc, nil 9585 } 9586 9587 func (ec *executionContext) _Query_errors(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 9588 fc, err := ec.fieldContext_Query_errors(ctx, field) 9589 if err != nil { 9590 return graphql.Null 9591 } 9592 ctx = graphql.WithFieldContext(ctx, fc) 9593 defer func() { 9594 if r := recover(); r != nil { 9595 ec.Error(ctx, ec.Recover(ctx, r)) 9596 ret = graphql.Null 9597 } 9598 }() 9599 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9600 ctx = rctx // use context from middleware stack in children 9601 return ec.resolvers.Query().Errors(rctx) 9602 }) 9603 9604 if resTmp == nil { 9605 return graphql.Null 9606 } 9607 res := resTmp.(*Errors) 9608 fc.Result = res 9609 return ec.marshalOErrors2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐErrors(ctx, field.Selections, res) 9610 } 9611 9612 func (ec *executionContext) fieldContext_Query_errors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 9613 fc = &graphql.FieldContext{ 9614 Object: "Query", 9615 Field: field, 9616 IsMethod: true, 9617 IsResolver: true, 9618 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 9619 switch field.Name { 9620 case "a": 9621 return ec.fieldContext_Errors_a(ctx, field) 9622 case "b": 9623 return ec.fieldContext_Errors_b(ctx, field) 9624 case "c": 9625 return ec.fieldContext_Errors_c(ctx, field) 9626 case "d": 9627 return ec.fieldContext_Errors_d(ctx, field) 9628 case "e": 9629 return ec.fieldContext_Errors_e(ctx, field) 9630 } 9631 return nil, fmt.Errorf("no field named %q was found under type Errors", field.Name) 9632 }, 9633 } 9634 return fc, nil 9635 } 9636 9637 func (ec *executionContext) _Query_valid(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 9638 fc, err := ec.fieldContext_Query_valid(ctx, field) 9639 if err != nil { 9640 return graphql.Null 9641 } 9642 ctx = graphql.WithFieldContext(ctx, fc) 9643 defer func() { 9644 if r := recover(); r != nil { 9645 ec.Error(ctx, ec.Recover(ctx, r)) 9646 ret = graphql.Null 9647 } 9648 }() 9649 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9650 ctx = rctx // use context from middleware stack in children 9651 return ec.resolvers.Query().Valid(rctx) 9652 }) 9653 9654 if resTmp == nil { 9655 if !graphql.HasFieldError(ctx, fc) { 9656 ec.Errorf(ctx, "must not be null") 9657 } 9658 return graphql.Null 9659 } 9660 res := resTmp.(string) 9661 fc.Result = res 9662 return ec.marshalNString2string(ctx, field.Selections, res) 9663 } 9664 9665 func (ec *executionContext) fieldContext_Query_valid(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 9666 fc = &graphql.FieldContext{ 9667 Object: "Query", 9668 Field: field, 9669 IsMethod: true, 9670 IsResolver: true, 9671 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 9672 return nil, errors.New("field of type String does not have child fields") 9673 }, 9674 } 9675 return fc, nil 9676 } 9677 9678 func (ec *executionContext) _Query_panics(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 9679 fc, err := ec.fieldContext_Query_panics(ctx, field) 9680 if err != nil { 9681 return graphql.Null 9682 } 9683 ctx = graphql.WithFieldContext(ctx, fc) 9684 defer func() { 9685 if r := recover(); r != nil { 9686 ec.Error(ctx, ec.Recover(ctx, r)) 9687 ret = graphql.Null 9688 } 9689 }() 9690 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9691 ctx = rctx // use context from middleware stack in children 9692 return ec.resolvers.Query().Panics(rctx) 9693 }) 9694 9695 if resTmp == nil { 9696 return graphql.Null 9697 } 9698 res := resTmp.(*Panics) 9699 fc.Result = res 9700 return ec.marshalOPanics2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPanics(ctx, field.Selections, res) 9701 } 9702 9703 func (ec *executionContext) fieldContext_Query_panics(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 9704 fc = &graphql.FieldContext{ 9705 Object: "Query", 9706 Field: field, 9707 IsMethod: true, 9708 IsResolver: true, 9709 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 9710 switch field.Name { 9711 case "fieldScalarMarshal": 9712 return ec.fieldContext_Panics_fieldScalarMarshal(ctx, field) 9713 case "fieldFuncMarshal": 9714 return ec.fieldContext_Panics_fieldFuncMarshal(ctx, field) 9715 case "argUnmarshal": 9716 return ec.fieldContext_Panics_argUnmarshal(ctx, field) 9717 } 9718 return nil, fmt.Errorf("no field named %q was found under type Panics", field.Name) 9719 }, 9720 } 9721 return fc, nil 9722 } 9723 9724 func (ec *executionContext) _Query_primitiveObject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 9725 fc, err := ec.fieldContext_Query_primitiveObject(ctx, field) 9726 if err != nil { 9727 return graphql.Null 9728 } 9729 ctx = graphql.WithFieldContext(ctx, fc) 9730 defer func() { 9731 if r := recover(); r != nil { 9732 ec.Error(ctx, ec.Recover(ctx, r)) 9733 ret = graphql.Null 9734 } 9735 }() 9736 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9737 ctx = rctx // use context from middleware stack in children 9738 return ec.resolvers.Query().PrimitiveObject(rctx) 9739 }) 9740 9741 if resTmp == nil { 9742 if !graphql.HasFieldError(ctx, fc) { 9743 ec.Errorf(ctx, "must not be null") 9744 } 9745 return graphql.Null 9746 } 9747 res := resTmp.([]Primitive) 9748 fc.Result = res 9749 return ec.marshalNPrimitive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitiveᚄ(ctx, field.Selections, res) 9750 } 9751 9752 func (ec *executionContext) fieldContext_Query_primitiveObject(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 9753 fc = &graphql.FieldContext{ 9754 Object: "Query", 9755 Field: field, 9756 IsMethod: true, 9757 IsResolver: true, 9758 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 9759 switch field.Name { 9760 case "value": 9761 return ec.fieldContext_Primitive_value(ctx, field) 9762 case "squared": 9763 return ec.fieldContext_Primitive_squared(ctx, field) 9764 } 9765 return nil, fmt.Errorf("no field named %q was found under type Primitive", field.Name) 9766 }, 9767 } 9768 return fc, nil 9769 } 9770 9771 func (ec *executionContext) _Query_primitiveStringObject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 9772 fc, err := ec.fieldContext_Query_primitiveStringObject(ctx, field) 9773 if err != nil { 9774 return graphql.Null 9775 } 9776 ctx = graphql.WithFieldContext(ctx, fc) 9777 defer func() { 9778 if r := recover(); r != nil { 9779 ec.Error(ctx, ec.Recover(ctx, r)) 9780 ret = graphql.Null 9781 } 9782 }() 9783 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9784 ctx = rctx // use context from middleware stack in children 9785 return ec.resolvers.Query().PrimitiveStringObject(rctx) 9786 }) 9787 9788 if resTmp == nil { 9789 if !graphql.HasFieldError(ctx, fc) { 9790 ec.Errorf(ctx, "must not be null") 9791 } 9792 return graphql.Null 9793 } 9794 res := resTmp.([]PrimitiveString) 9795 fc.Result = res 9796 return ec.marshalNPrimitiveString2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitiveStringᚄ(ctx, field.Selections, res) 9797 } 9798 9799 func (ec *executionContext) fieldContext_Query_primitiveStringObject(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 9800 fc = &graphql.FieldContext{ 9801 Object: "Query", 9802 Field: field, 9803 IsMethod: true, 9804 IsResolver: true, 9805 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 9806 switch field.Name { 9807 case "value": 9808 return ec.fieldContext_PrimitiveString_value(ctx, field) 9809 case "doubled": 9810 return ec.fieldContext_PrimitiveString_doubled(ctx, field) 9811 case "len": 9812 return ec.fieldContext_PrimitiveString_len(ctx, field) 9813 } 9814 return nil, fmt.Errorf("no field named %q was found under type PrimitiveString", field.Name) 9815 }, 9816 } 9817 return fc, nil 9818 } 9819 9820 func (ec *executionContext) _Query_ptrToSliceContainer(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 9821 fc, err := ec.fieldContext_Query_ptrToSliceContainer(ctx, field) 9822 if err != nil { 9823 return graphql.Null 9824 } 9825 ctx = graphql.WithFieldContext(ctx, fc) 9826 defer func() { 9827 if r := recover(); r != nil { 9828 ec.Error(ctx, ec.Recover(ctx, r)) 9829 ret = graphql.Null 9830 } 9831 }() 9832 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9833 ctx = rctx // use context from middleware stack in children 9834 return ec.resolvers.Query().PtrToSliceContainer(rctx) 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.(*PtrToSliceContainer) 9844 fc.Result = res 9845 return ec.marshalNPtrToSliceContainer2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToSliceContainer(ctx, field.Selections, res) 9846 } 9847 9848 func (ec *executionContext) fieldContext_Query_ptrToSliceContainer(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 9849 fc = &graphql.FieldContext{ 9850 Object: "Query", 9851 Field: field, 9852 IsMethod: true, 9853 IsResolver: true, 9854 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 9855 switch field.Name { 9856 case "ptrToSlice": 9857 return ec.fieldContext_PtrToSliceContainer_ptrToSlice(ctx, field) 9858 } 9859 return nil, fmt.Errorf("no field named %q was found under type PtrToSliceContainer", field.Name) 9860 }, 9861 } 9862 return fc, nil 9863 } 9864 9865 func (ec *executionContext) _Query_infinity(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 9866 fc, err := ec.fieldContext_Query_infinity(ctx, field) 9867 if err != nil { 9868 return graphql.Null 9869 } 9870 ctx = graphql.WithFieldContext(ctx, fc) 9871 defer func() { 9872 if r := recover(); r != nil { 9873 ec.Error(ctx, ec.Recover(ctx, r)) 9874 ret = graphql.Null 9875 } 9876 }() 9877 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9878 ctx = rctx // use context from middleware stack in children 9879 return ec.resolvers.Query().Infinity(rctx) 9880 }) 9881 9882 if resTmp == nil { 9883 if !graphql.HasFieldError(ctx, fc) { 9884 ec.Errorf(ctx, "must not be null") 9885 } 9886 return graphql.Null 9887 } 9888 res := resTmp.(float64) 9889 fc.Result = res 9890 return ec.marshalNFloat2float64(ctx, field.Selections, res) 9891 } 9892 9893 func (ec *executionContext) fieldContext_Query_infinity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 9894 fc = &graphql.FieldContext{ 9895 Object: "Query", 9896 Field: field, 9897 IsMethod: true, 9898 IsResolver: true, 9899 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 9900 return nil, errors.New("field of type Float does not have child fields") 9901 }, 9902 } 9903 return fc, nil 9904 } 9905 9906 func (ec *executionContext) _Query_stringFromContextInterface(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 9907 fc, err := ec.fieldContext_Query_stringFromContextInterface(ctx, field) 9908 if err != nil { 9909 return graphql.Null 9910 } 9911 ctx = graphql.WithFieldContext(ctx, fc) 9912 defer func() { 9913 if r := recover(); r != nil { 9914 ec.Error(ctx, ec.Recover(ctx, r)) 9915 ret = graphql.Null 9916 } 9917 }() 9918 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9919 ctx = rctx // use context from middleware stack in children 9920 return ec.resolvers.Query().StringFromContextInterface(rctx) 9921 }) 9922 9923 if resTmp == nil { 9924 if !graphql.HasFieldError(ctx, fc) { 9925 ec.Errorf(ctx, "must not be null") 9926 } 9927 return graphql.Null 9928 } 9929 res := resTmp.(*StringFromContextInterface) 9930 fc.Result = res 9931 return ec.marshalNStringFromContextInterface2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐStringFromContextInterface(ctx, field.Selections, res) 9932 } 9933 9934 func (ec *executionContext) fieldContext_Query_stringFromContextInterface(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 9935 fc = &graphql.FieldContext{ 9936 Object: "Query", 9937 Field: field, 9938 IsMethod: true, 9939 IsResolver: true, 9940 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 9941 return nil, errors.New("field of type StringFromContextInterface does not have child fields") 9942 }, 9943 } 9944 return fc, nil 9945 } 9946 9947 func (ec *executionContext) _Query_stringFromContextFunction(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 9948 fc, err := ec.fieldContext_Query_stringFromContextFunction(ctx, field) 9949 if err != nil { 9950 return graphql.Null 9951 } 9952 ctx = graphql.WithFieldContext(ctx, fc) 9953 defer func() { 9954 if r := recover(); r != nil { 9955 ec.Error(ctx, ec.Recover(ctx, r)) 9956 ret = graphql.Null 9957 } 9958 }() 9959 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 9960 ctx = rctx // use context from middleware stack in children 9961 return ec.resolvers.Query().StringFromContextFunction(rctx) 9962 }) 9963 9964 if resTmp == nil { 9965 if !graphql.HasFieldError(ctx, fc) { 9966 ec.Errorf(ctx, "must not be null") 9967 } 9968 return graphql.Null 9969 } 9970 res := resTmp.(string) 9971 fc.Result = res 9972 return ec.marshalNStringFromContextFunction2string(ctx, field.Selections, res) 9973 } 9974 9975 func (ec *executionContext) fieldContext_Query_stringFromContextFunction(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 9976 fc = &graphql.FieldContext{ 9977 Object: "Query", 9978 Field: field, 9979 IsMethod: true, 9980 IsResolver: true, 9981 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 9982 return nil, errors.New("field of type StringFromContextFunction does not have child fields") 9983 }, 9984 } 9985 return fc, nil 9986 } 9987 9988 func (ec *executionContext) _Query_defaultScalar(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 9989 fc, err := ec.fieldContext_Query_defaultScalar(ctx, field) 9990 if err != nil { 9991 return graphql.Null 9992 } 9993 ctx = graphql.WithFieldContext(ctx, fc) 9994 defer func() { 9995 if r := recover(); r != nil { 9996 ec.Error(ctx, ec.Recover(ctx, r)) 9997 ret = graphql.Null 9998 } 9999 }() 10000 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 10001 ctx = rctx // use context from middleware stack in children 10002 return ec.resolvers.Query().DefaultScalar(rctx, fc.Args["arg"].(string)) 10003 }) 10004 10005 if resTmp == nil { 10006 if !graphql.HasFieldError(ctx, fc) { 10007 ec.Errorf(ctx, "must not be null") 10008 } 10009 return graphql.Null 10010 } 10011 res := resTmp.(string) 10012 fc.Result = res 10013 return ec.marshalNDefaultScalarImplementation2string(ctx, field.Selections, res) 10014 } 10015 10016 func (ec *executionContext) fieldContext_Query_defaultScalar(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10017 fc = &graphql.FieldContext{ 10018 Object: "Query", 10019 Field: field, 10020 IsMethod: true, 10021 IsResolver: true, 10022 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10023 return nil, errors.New("field of type DefaultScalarImplementation does not have child fields") 10024 }, 10025 } 10026 defer func() { 10027 if r := recover(); r != nil { 10028 err = ec.Recover(ctx, r) 10029 ec.Error(ctx, err) 10030 } 10031 }() 10032 ctx = graphql.WithFieldContext(ctx, fc) 10033 if fc.Args, err = ec.field_Query_defaultScalar_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 10034 ec.Error(ctx, err) 10035 return 10036 } 10037 return fc, nil 10038 } 10039 10040 func (ec *executionContext) _Query_slices(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 10041 fc, err := ec.fieldContext_Query_slices(ctx, field) 10042 if err != nil { 10043 return graphql.Null 10044 } 10045 ctx = graphql.WithFieldContext(ctx, fc) 10046 defer func() { 10047 if r := recover(); r != nil { 10048 ec.Error(ctx, ec.Recover(ctx, r)) 10049 ret = graphql.Null 10050 } 10051 }() 10052 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 10053 ctx = rctx // use context from middleware stack in children 10054 return ec.resolvers.Query().Slices(rctx) 10055 }) 10056 10057 if resTmp == nil { 10058 return graphql.Null 10059 } 10060 res := resTmp.(*Slices) 10061 fc.Result = res 10062 return ec.marshalOSlices2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐSlices(ctx, field.Selections, res) 10063 } 10064 10065 func (ec *executionContext) fieldContext_Query_slices(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10066 fc = &graphql.FieldContext{ 10067 Object: "Query", 10068 Field: field, 10069 IsMethod: true, 10070 IsResolver: true, 10071 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10072 switch field.Name { 10073 case "test1": 10074 return ec.fieldContext_Slices_test1(ctx, field) 10075 case "test2": 10076 return ec.fieldContext_Slices_test2(ctx, field) 10077 case "test3": 10078 return ec.fieldContext_Slices_test3(ctx, field) 10079 case "test4": 10080 return ec.fieldContext_Slices_test4(ctx, field) 10081 } 10082 return nil, fmt.Errorf("no field named %q was found under type Slices", field.Name) 10083 }, 10084 } 10085 return fc, nil 10086 } 10087 10088 func (ec *executionContext) _Query_scalarSlice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 10089 fc, err := ec.fieldContext_Query_scalarSlice(ctx, field) 10090 if err != nil { 10091 return graphql.Null 10092 } 10093 ctx = graphql.WithFieldContext(ctx, fc) 10094 defer func() { 10095 if r := recover(); r != nil { 10096 ec.Error(ctx, ec.Recover(ctx, r)) 10097 ret = graphql.Null 10098 } 10099 }() 10100 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 10101 ctx = rctx // use context from middleware stack in children 10102 return ec.resolvers.Query().ScalarSlice(rctx) 10103 }) 10104 10105 if resTmp == nil { 10106 if !graphql.HasFieldError(ctx, fc) { 10107 ec.Errorf(ctx, "must not be null") 10108 } 10109 return graphql.Null 10110 } 10111 res := resTmp.([]byte) 10112 fc.Result = res 10113 return ec.marshalNBytes2ᚕbyte(ctx, field.Selections, res) 10114 } 10115 10116 func (ec *executionContext) fieldContext_Query_scalarSlice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10117 fc = &graphql.FieldContext{ 10118 Object: "Query", 10119 Field: field, 10120 IsMethod: true, 10121 IsResolver: true, 10122 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10123 return nil, errors.New("field of type Bytes does not have child fields") 10124 }, 10125 } 10126 return fc, nil 10127 } 10128 10129 func (ec *executionContext) _Query_fallback(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 10130 fc, err := ec.fieldContext_Query_fallback(ctx, field) 10131 if err != nil { 10132 return graphql.Null 10133 } 10134 ctx = graphql.WithFieldContext(ctx, fc) 10135 defer func() { 10136 if r := recover(); r != nil { 10137 ec.Error(ctx, ec.Recover(ctx, r)) 10138 ret = graphql.Null 10139 } 10140 }() 10141 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 10142 ctx = rctx // use context from middleware stack in children 10143 return ec.resolvers.Query().Fallback(rctx, fc.Args["arg"].(FallbackToStringEncoding)) 10144 }) 10145 10146 if resTmp == nil { 10147 if !graphql.HasFieldError(ctx, fc) { 10148 ec.Errorf(ctx, "must not be null") 10149 } 10150 return graphql.Null 10151 } 10152 res := resTmp.(FallbackToStringEncoding) 10153 fc.Result = res 10154 return ec.marshalNFallbackToStringEncoding2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐFallbackToStringEncoding(ctx, field.Selections, res) 10155 } 10156 10157 func (ec *executionContext) fieldContext_Query_fallback(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10158 fc = &graphql.FieldContext{ 10159 Object: "Query", 10160 Field: field, 10161 IsMethod: true, 10162 IsResolver: true, 10163 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10164 return nil, errors.New("field of type FallbackToStringEncoding does not have child fields") 10165 }, 10166 } 10167 defer func() { 10168 if r := recover(); r != nil { 10169 err = ec.Recover(ctx, r) 10170 ec.Error(ctx, err) 10171 } 10172 }() 10173 ctx = graphql.WithFieldContext(ctx, fc) 10174 if fc.Args, err = ec.field_Query_fallback_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 10175 ec.Error(ctx, err) 10176 return 10177 } 10178 return fc, nil 10179 } 10180 10181 func (ec *executionContext) _Query_optionalUnion(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 10182 fc, err := ec.fieldContext_Query_optionalUnion(ctx, field) 10183 if err != nil { 10184 return graphql.Null 10185 } 10186 ctx = graphql.WithFieldContext(ctx, fc) 10187 defer func() { 10188 if r := recover(); r != nil { 10189 ec.Error(ctx, ec.Recover(ctx, r)) 10190 ret = graphql.Null 10191 } 10192 }() 10193 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 10194 ctx = rctx // use context from middleware stack in children 10195 return ec.resolvers.Query().OptionalUnion(rctx) 10196 }) 10197 10198 if resTmp == nil { 10199 return graphql.Null 10200 } 10201 res := resTmp.(TestUnion) 10202 fc.Result = res 10203 return ec.marshalOTestUnion2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐTestUnion(ctx, field.Selections, res) 10204 } 10205 10206 func (ec *executionContext) fieldContext_Query_optionalUnion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10207 fc = &graphql.FieldContext{ 10208 Object: "Query", 10209 Field: field, 10210 IsMethod: true, 10211 IsResolver: true, 10212 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10213 return nil, errors.New("field of type TestUnion does not have child fields") 10214 }, 10215 } 10216 return fc, nil 10217 } 10218 10219 func (ec *executionContext) _Query_vOkCaseValue(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 10220 fc, err := ec.fieldContext_Query_vOkCaseValue(ctx, field) 10221 if err != nil { 10222 return graphql.Null 10223 } 10224 ctx = graphql.WithFieldContext(ctx, fc) 10225 defer func() { 10226 if r := recover(); r != nil { 10227 ec.Error(ctx, ec.Recover(ctx, r)) 10228 ret = graphql.Null 10229 } 10230 }() 10231 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 10232 ctx = rctx // use context from middleware stack in children 10233 return ec.resolvers.Query().VOkCaseValue(rctx) 10234 }) 10235 10236 if resTmp == nil { 10237 return graphql.Null 10238 } 10239 res := resTmp.(*VOkCaseValue) 10240 fc.Result = res 10241 return ec.marshalOVOkCaseValue2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐVOkCaseValue(ctx, field.Selections, res) 10242 } 10243 10244 func (ec *executionContext) fieldContext_Query_vOkCaseValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10245 fc = &graphql.FieldContext{ 10246 Object: "Query", 10247 Field: field, 10248 IsMethod: true, 10249 IsResolver: true, 10250 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10251 switch field.Name { 10252 case "value": 10253 return ec.fieldContext_VOkCaseValue_value(ctx, field) 10254 } 10255 return nil, fmt.Errorf("no field named %q was found under type VOkCaseValue", field.Name) 10256 }, 10257 } 10258 return fc, nil 10259 } 10260 10261 func (ec *executionContext) _Query_vOkCaseNil(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 10262 fc, err := ec.fieldContext_Query_vOkCaseNil(ctx, field) 10263 if err != nil { 10264 return graphql.Null 10265 } 10266 ctx = graphql.WithFieldContext(ctx, fc) 10267 defer func() { 10268 if r := recover(); r != nil { 10269 ec.Error(ctx, ec.Recover(ctx, r)) 10270 ret = graphql.Null 10271 } 10272 }() 10273 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 10274 ctx = rctx // use context from middleware stack in children 10275 return ec.resolvers.Query().VOkCaseNil(rctx) 10276 }) 10277 10278 if resTmp == nil { 10279 return graphql.Null 10280 } 10281 res := resTmp.(*VOkCaseNil) 10282 fc.Result = res 10283 return ec.marshalOVOkCaseNil2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐVOkCaseNil(ctx, field.Selections, res) 10284 } 10285 10286 func (ec *executionContext) fieldContext_Query_vOkCaseNil(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10287 fc = &graphql.FieldContext{ 10288 Object: "Query", 10289 Field: field, 10290 IsMethod: true, 10291 IsResolver: true, 10292 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10293 switch field.Name { 10294 case "value": 10295 return ec.fieldContext_VOkCaseNil_value(ctx, field) 10296 } 10297 return nil, fmt.Errorf("no field named %q was found under type VOkCaseNil", field.Name) 10298 }, 10299 } 10300 return fc, nil 10301 } 10302 10303 func (ec *executionContext) _Query_validType(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 10304 fc, err := ec.fieldContext_Query_validType(ctx, field) 10305 if err != nil { 10306 return graphql.Null 10307 } 10308 ctx = graphql.WithFieldContext(ctx, fc) 10309 defer func() { 10310 if r := recover(); r != nil { 10311 ec.Error(ctx, ec.Recover(ctx, r)) 10312 ret = graphql.Null 10313 } 10314 }() 10315 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 10316 ctx = rctx // use context from middleware stack in children 10317 return ec.resolvers.Query().ValidType(rctx) 10318 }) 10319 10320 if resTmp == nil { 10321 return graphql.Null 10322 } 10323 res := resTmp.(*ValidType) 10324 fc.Result = res 10325 return ec.marshalOValidType2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐValidType(ctx, field.Selections, res) 10326 } 10327 10328 func (ec *executionContext) fieldContext_Query_validType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10329 fc = &graphql.FieldContext{ 10330 Object: "Query", 10331 Field: field, 10332 IsMethod: true, 10333 IsResolver: true, 10334 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10335 switch field.Name { 10336 case "differentCase": 10337 return ec.fieldContext_ValidType_differentCase(ctx, field) 10338 case "different_case": 10339 return ec.fieldContext_ValidType_different_case(ctx, field) 10340 case "validInputKeywords": 10341 return ec.fieldContext_ValidType_validInputKeywords(ctx, field) 10342 case "validArgs": 10343 return ec.fieldContext_ValidType_validArgs(ctx, field) 10344 } 10345 return nil, fmt.Errorf("no field named %q was found under type ValidType", field.Name) 10346 }, 10347 } 10348 return fc, nil 10349 } 10350 10351 func (ec *executionContext) _Query_variadicModel(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 10352 fc, err := ec.fieldContext_Query_variadicModel(ctx, field) 10353 if err != nil { 10354 return graphql.Null 10355 } 10356 ctx = graphql.WithFieldContext(ctx, fc) 10357 defer func() { 10358 if r := recover(); r != nil { 10359 ec.Error(ctx, ec.Recover(ctx, r)) 10360 ret = graphql.Null 10361 } 10362 }() 10363 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 10364 ctx = rctx // use context from middleware stack in children 10365 return ec.resolvers.Query().VariadicModel(rctx) 10366 }) 10367 10368 if resTmp == nil { 10369 return graphql.Null 10370 } 10371 res := resTmp.(*VariadicModel) 10372 fc.Result = res 10373 return ec.marshalOVariadicModel2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐVariadicModel(ctx, field.Selections, res) 10374 } 10375 10376 func (ec *executionContext) fieldContext_Query_variadicModel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10377 fc = &graphql.FieldContext{ 10378 Object: "Query", 10379 Field: field, 10380 IsMethod: true, 10381 IsResolver: true, 10382 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10383 switch field.Name { 10384 case "value": 10385 return ec.fieldContext_VariadicModel_value(ctx, field) 10386 } 10387 return nil, fmt.Errorf("no field named %q was found under type VariadicModel", field.Name) 10388 }, 10389 } 10390 return fc, nil 10391 } 10392 10393 func (ec *executionContext) _Query_wrappedStruct(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 10394 fc, err := ec.fieldContext_Query_wrappedStruct(ctx, field) 10395 if err != nil { 10396 return graphql.Null 10397 } 10398 ctx = graphql.WithFieldContext(ctx, fc) 10399 defer func() { 10400 if r := recover(); r != nil { 10401 ec.Error(ctx, ec.Recover(ctx, r)) 10402 ret = graphql.Null 10403 } 10404 }() 10405 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 10406 ctx = rctx // use context from middleware stack in children 10407 return ec.resolvers.Query().WrappedStruct(rctx) 10408 }) 10409 10410 if resTmp == nil { 10411 if !graphql.HasFieldError(ctx, fc) { 10412 ec.Errorf(ctx, "must not be null") 10413 } 10414 return graphql.Null 10415 } 10416 res := resTmp.(*WrappedStruct) 10417 fc.Result = res 10418 return ec.marshalNWrappedStruct2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐWrappedStruct(ctx, field.Selections, res) 10419 } 10420 10421 func (ec *executionContext) fieldContext_Query_wrappedStruct(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10422 fc = &graphql.FieldContext{ 10423 Object: "Query", 10424 Field: field, 10425 IsMethod: true, 10426 IsResolver: true, 10427 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10428 switch field.Name { 10429 case "name": 10430 return ec.fieldContext_WrappedStruct_name(ctx, field) 10431 case "desc": 10432 return ec.fieldContext_WrappedStruct_desc(ctx, field) 10433 } 10434 return nil, fmt.Errorf("no field named %q was found under type WrappedStruct", field.Name) 10435 }, 10436 } 10437 return fc, nil 10438 } 10439 10440 func (ec *executionContext) _Query_wrappedScalar(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 10441 fc, err := ec.fieldContext_Query_wrappedScalar(ctx, field) 10442 if err != nil { 10443 return graphql.Null 10444 } 10445 ctx = graphql.WithFieldContext(ctx, fc) 10446 defer func() { 10447 if r := recover(); r != nil { 10448 ec.Error(ctx, ec.Recover(ctx, r)) 10449 ret = graphql.Null 10450 } 10451 }() 10452 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 10453 ctx = rctx // use context from middleware stack in children 10454 return ec.resolvers.Query().WrappedScalar(rctx) 10455 }) 10456 10457 if resTmp == nil { 10458 if !graphql.HasFieldError(ctx, fc) { 10459 ec.Errorf(ctx, "must not be null") 10460 } 10461 return graphql.Null 10462 } 10463 res := resTmp.(otherpkg.Scalar) 10464 fc.Result = res 10465 return ec.marshalNWrappedScalar2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚋotherpkgᚐScalar(ctx, field.Selections, res) 10466 } 10467 10468 func (ec *executionContext) fieldContext_Query_wrappedScalar(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10469 fc = &graphql.FieldContext{ 10470 Object: "Query", 10471 Field: field, 10472 IsMethod: true, 10473 IsResolver: true, 10474 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10475 return nil, errors.New("field of type WrappedScalar does not have child fields") 10476 }, 10477 } 10478 return fc, nil 10479 } 10480 10481 func (ec *executionContext) _Query_wrappedMap(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 10482 fc, err := ec.fieldContext_Query_wrappedMap(ctx, field) 10483 if err != nil { 10484 return graphql.Null 10485 } 10486 ctx = graphql.WithFieldContext(ctx, fc) 10487 defer func() { 10488 if r := recover(); r != nil { 10489 ec.Error(ctx, ec.Recover(ctx, r)) 10490 ret = graphql.Null 10491 } 10492 }() 10493 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 10494 ctx = rctx // use context from middleware stack in children 10495 return ec.resolvers.Query().WrappedMap(rctx) 10496 }) 10497 10498 if resTmp == nil { 10499 if !graphql.HasFieldError(ctx, fc) { 10500 ec.Errorf(ctx, "must not be null") 10501 } 10502 return graphql.Null 10503 } 10504 res := resTmp.(WrappedMap) 10505 fc.Result = res 10506 return ec.marshalNWrappedMap2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐWrappedMap(ctx, field.Selections, res) 10507 } 10508 10509 func (ec *executionContext) fieldContext_Query_wrappedMap(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10510 fc = &graphql.FieldContext{ 10511 Object: "Query", 10512 Field: field, 10513 IsMethod: true, 10514 IsResolver: true, 10515 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10516 switch field.Name { 10517 case "get": 10518 return ec.fieldContext_WrappedMap_get(ctx, field) 10519 } 10520 return nil, fmt.Errorf("no field named %q was found under type WrappedMap", field.Name) 10521 }, 10522 } 10523 return fc, nil 10524 } 10525 10526 func (ec *executionContext) _Query_wrappedSlice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 10527 fc, err := ec.fieldContext_Query_wrappedSlice(ctx, field) 10528 if err != nil { 10529 return graphql.Null 10530 } 10531 ctx = graphql.WithFieldContext(ctx, fc) 10532 defer func() { 10533 if r := recover(); r != nil { 10534 ec.Error(ctx, ec.Recover(ctx, r)) 10535 ret = graphql.Null 10536 } 10537 }() 10538 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 10539 ctx = rctx // use context from middleware stack in children 10540 return ec.resolvers.Query().WrappedSlice(rctx) 10541 }) 10542 10543 if resTmp == nil { 10544 if !graphql.HasFieldError(ctx, fc) { 10545 ec.Errorf(ctx, "must not be null") 10546 } 10547 return graphql.Null 10548 } 10549 res := resTmp.(WrappedSlice) 10550 fc.Result = res 10551 return ec.marshalNWrappedSlice2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐWrappedSlice(ctx, field.Selections, res) 10552 } 10553 10554 func (ec *executionContext) fieldContext_Query_wrappedSlice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10555 fc = &graphql.FieldContext{ 10556 Object: "Query", 10557 Field: field, 10558 IsMethod: true, 10559 IsResolver: true, 10560 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10561 switch field.Name { 10562 case "get": 10563 return ec.fieldContext_WrappedSlice_get(ctx, field) 10564 } 10565 return nil, fmt.Errorf("no field named %q was found under type WrappedSlice", field.Name) 10566 }, 10567 } 10568 return fc, nil 10569 } 10570 10571 func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 10572 fc, err := ec.fieldContext_Query___type(ctx, field) 10573 if err != nil { 10574 return graphql.Null 10575 } 10576 ctx = graphql.WithFieldContext(ctx, fc) 10577 defer func() { 10578 if r := recover(); r != nil { 10579 ec.Error(ctx, ec.Recover(ctx, r)) 10580 ret = graphql.Null 10581 } 10582 }() 10583 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 10584 ctx = rctx // use context from middleware stack in children 10585 return ec.introspectType(fc.Args["name"].(string)) 10586 }) 10587 10588 if resTmp == nil { 10589 return graphql.Null 10590 } 10591 res := resTmp.(*introspection.Type) 10592 fc.Result = res 10593 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 10594 } 10595 10596 func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10597 fc = &graphql.FieldContext{ 10598 Object: "Query", 10599 Field: field, 10600 IsMethod: true, 10601 IsResolver: false, 10602 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10603 switch field.Name { 10604 case "kind": 10605 return ec.fieldContext___Type_kind(ctx, field) 10606 case "name": 10607 return ec.fieldContext___Type_name(ctx, field) 10608 case "description": 10609 return ec.fieldContext___Type_description(ctx, field) 10610 case "fields": 10611 return ec.fieldContext___Type_fields(ctx, field) 10612 case "interfaces": 10613 return ec.fieldContext___Type_interfaces(ctx, field) 10614 case "possibleTypes": 10615 return ec.fieldContext___Type_possibleTypes(ctx, field) 10616 case "enumValues": 10617 return ec.fieldContext___Type_enumValues(ctx, field) 10618 case "inputFields": 10619 return ec.fieldContext___Type_inputFields(ctx, field) 10620 case "ofType": 10621 return ec.fieldContext___Type_ofType(ctx, field) 10622 case "specifiedByURL": 10623 return ec.fieldContext___Type_specifiedByURL(ctx, field) 10624 } 10625 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 10626 }, 10627 } 10628 defer func() { 10629 if r := recover(); r != nil { 10630 err = ec.Recover(ctx, r) 10631 ec.Error(ctx, err) 10632 } 10633 }() 10634 ctx = graphql.WithFieldContext(ctx, fc) 10635 if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 10636 ec.Error(ctx, err) 10637 return 10638 } 10639 return fc, nil 10640 } 10641 10642 func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 10643 fc, err := ec.fieldContext_Query___schema(ctx, field) 10644 if err != nil { 10645 return graphql.Null 10646 } 10647 ctx = graphql.WithFieldContext(ctx, fc) 10648 defer func() { 10649 if r := recover(); r != nil { 10650 ec.Error(ctx, ec.Recover(ctx, r)) 10651 ret = graphql.Null 10652 } 10653 }() 10654 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 10655 ctx = rctx // use context from middleware stack in children 10656 return ec.introspectSchema() 10657 }) 10658 10659 if resTmp == nil { 10660 return graphql.Null 10661 } 10662 res := resTmp.(*introspection.Schema) 10663 fc.Result = res 10664 return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) 10665 } 10666 10667 func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10668 fc = &graphql.FieldContext{ 10669 Object: "Query", 10670 Field: field, 10671 IsMethod: true, 10672 IsResolver: false, 10673 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10674 switch field.Name { 10675 case "description": 10676 return ec.fieldContext___Schema_description(ctx, field) 10677 case "types": 10678 return ec.fieldContext___Schema_types(ctx, field) 10679 case "queryType": 10680 return ec.fieldContext___Schema_queryType(ctx, field) 10681 case "mutationType": 10682 return ec.fieldContext___Schema_mutationType(ctx, field) 10683 case "subscriptionType": 10684 return ec.fieldContext___Schema_subscriptionType(ctx, field) 10685 case "directives": 10686 return ec.fieldContext___Schema_directives(ctx, field) 10687 } 10688 return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name) 10689 }, 10690 } 10691 return fc, nil 10692 } 10693 10694 func (ec *executionContext) _Rectangle_length(ctx context.Context, field graphql.CollectedField, obj *Rectangle) (ret graphql.Marshaler) { 10695 fc, err := ec.fieldContext_Rectangle_length(ctx, field) 10696 if err != nil { 10697 return graphql.Null 10698 } 10699 ctx = graphql.WithFieldContext(ctx, fc) 10700 defer func() { 10701 if r := recover(); r != nil { 10702 ec.Error(ctx, ec.Recover(ctx, r)) 10703 ret = graphql.Null 10704 } 10705 }() 10706 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10707 ctx = rctx // use context from middleware stack in children 10708 return obj.Length, nil 10709 }) 10710 10711 if resTmp == nil { 10712 return graphql.Null 10713 } 10714 res := resTmp.(float64) 10715 fc.Result = res 10716 return ec.marshalOFloat2float64(ctx, field.Selections, res) 10717 } 10718 10719 func (ec *executionContext) fieldContext_Rectangle_length(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10720 fc = &graphql.FieldContext{ 10721 Object: "Rectangle", 10722 Field: field, 10723 IsMethod: false, 10724 IsResolver: false, 10725 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10726 return nil, errors.New("field of type Float does not have child fields") 10727 }, 10728 } 10729 return fc, nil 10730 } 10731 10732 func (ec *executionContext) _Rectangle_width(ctx context.Context, field graphql.CollectedField, obj *Rectangle) (ret graphql.Marshaler) { 10733 fc, err := ec.fieldContext_Rectangle_width(ctx, field) 10734 if err != nil { 10735 return graphql.Null 10736 } 10737 ctx = graphql.WithFieldContext(ctx, fc) 10738 defer func() { 10739 if r := recover(); r != nil { 10740 ec.Error(ctx, ec.Recover(ctx, r)) 10741 ret = graphql.Null 10742 } 10743 }() 10744 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10745 ctx = rctx // use context from middleware stack in children 10746 return obj.Width, nil 10747 }) 10748 10749 if resTmp == nil { 10750 return graphql.Null 10751 } 10752 res := resTmp.(float64) 10753 fc.Result = res 10754 return ec.marshalOFloat2float64(ctx, field.Selections, res) 10755 } 10756 10757 func (ec *executionContext) fieldContext_Rectangle_width(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10758 fc = &graphql.FieldContext{ 10759 Object: "Rectangle", 10760 Field: field, 10761 IsMethod: false, 10762 IsResolver: false, 10763 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10764 return nil, errors.New("field of type Float does not have child fields") 10765 }, 10766 } 10767 return fc, nil 10768 } 10769 10770 func (ec *executionContext) _Rectangle_area(ctx context.Context, field graphql.CollectedField, obj *Rectangle) (ret graphql.Marshaler) { 10771 fc, err := ec.fieldContext_Rectangle_area(ctx, field) 10772 if err != nil { 10773 return graphql.Null 10774 } 10775 ctx = graphql.WithFieldContext(ctx, fc) 10776 defer func() { 10777 if r := recover(); r != nil { 10778 ec.Error(ctx, ec.Recover(ctx, r)) 10779 ret = graphql.Null 10780 } 10781 }() 10782 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10783 ctx = rctx // use context from middleware stack in children 10784 return obj.Area(), nil 10785 }) 10786 10787 if resTmp == nil { 10788 return graphql.Null 10789 } 10790 res := resTmp.(float64) 10791 fc.Result = res 10792 return ec.marshalOFloat2float64(ctx, field.Selections, res) 10793 } 10794 10795 func (ec *executionContext) fieldContext_Rectangle_area(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10796 fc = &graphql.FieldContext{ 10797 Object: "Rectangle", 10798 Field: field, 10799 IsMethod: true, 10800 IsResolver: false, 10801 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10802 return nil, errors.New("field of type Float does not have child fields") 10803 }, 10804 } 10805 return fc, nil 10806 } 10807 10808 func (ec *executionContext) _Rectangle_coordinates(ctx context.Context, field graphql.CollectedField, obj *Rectangle) (ret graphql.Marshaler) { 10809 fc, err := ec.fieldContext_Rectangle_coordinates(ctx, field) 10810 if err != nil { 10811 return graphql.Null 10812 } 10813 ctx = graphql.WithFieldContext(ctx, fc) 10814 defer func() { 10815 if r := recover(); r != nil { 10816 ec.Error(ctx, ec.Recover(ctx, r)) 10817 ret = graphql.Null 10818 } 10819 }() 10820 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10821 ctx = rctx // use context from middleware stack in children 10822 return obj.Coordinates, nil 10823 }) 10824 10825 if resTmp == nil { 10826 return graphql.Null 10827 } 10828 res := resTmp.(Coordinates) 10829 fc.Result = res 10830 return ec.marshalOCoordinates2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCoordinates(ctx, field.Selections, res) 10831 } 10832 10833 func (ec *executionContext) fieldContext_Rectangle_coordinates(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10834 fc = &graphql.FieldContext{ 10835 Object: "Rectangle", 10836 Field: field, 10837 IsMethod: false, 10838 IsResolver: false, 10839 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10840 switch field.Name { 10841 case "x": 10842 return ec.fieldContext_Coordinates_x(ctx, field) 10843 case "y": 10844 return ec.fieldContext_Coordinates_y(ctx, field) 10845 } 10846 return nil, fmt.Errorf("no field named %q was found under type Coordinates", field.Name) 10847 }, 10848 } 10849 return fc, nil 10850 } 10851 10852 func (ec *executionContext) _Size_height(ctx context.Context, field graphql.CollectedField, obj *Size) (ret graphql.Marshaler) { 10853 fc, err := ec.fieldContext_Size_height(ctx, field) 10854 if err != nil { 10855 return graphql.Null 10856 } 10857 ctx = graphql.WithFieldContext(ctx, fc) 10858 defer func() { 10859 if r := recover(); r != nil { 10860 ec.Error(ctx, ec.Recover(ctx, r)) 10861 ret = graphql.Null 10862 } 10863 }() 10864 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10865 ctx = rctx // use context from middleware stack in children 10866 return obj.Height, nil 10867 }) 10868 10869 if resTmp == nil { 10870 if !graphql.HasFieldError(ctx, fc) { 10871 ec.Errorf(ctx, "must not be null") 10872 } 10873 return graphql.Null 10874 } 10875 res := resTmp.(int) 10876 fc.Result = res 10877 return ec.marshalNInt2int(ctx, field.Selections, res) 10878 } 10879 10880 func (ec *executionContext) fieldContext_Size_height(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10881 fc = &graphql.FieldContext{ 10882 Object: "Size", 10883 Field: field, 10884 IsMethod: false, 10885 IsResolver: false, 10886 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10887 return nil, errors.New("field of type Int does not have child fields") 10888 }, 10889 } 10890 return fc, nil 10891 } 10892 10893 func (ec *executionContext) _Size_weight(ctx context.Context, field graphql.CollectedField, obj *Size) (ret graphql.Marshaler) { 10894 fc, err := ec.fieldContext_Size_weight(ctx, field) 10895 if err != nil { 10896 return graphql.Null 10897 } 10898 ctx = graphql.WithFieldContext(ctx, fc) 10899 defer func() { 10900 if r := recover(); r != nil { 10901 ec.Error(ctx, ec.Recover(ctx, r)) 10902 ret = graphql.Null 10903 } 10904 }() 10905 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10906 ctx = rctx // use context from middleware stack in children 10907 return obj.Weight, nil 10908 }) 10909 10910 if resTmp == nil { 10911 if !graphql.HasFieldError(ctx, fc) { 10912 ec.Errorf(ctx, "must not be null") 10913 } 10914 return graphql.Null 10915 } 10916 res := resTmp.(int) 10917 fc.Result = res 10918 return ec.marshalNInt2int(ctx, field.Selections, res) 10919 } 10920 10921 func (ec *executionContext) fieldContext_Size_weight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10922 fc = &graphql.FieldContext{ 10923 Object: "Size", 10924 Field: field, 10925 IsMethod: false, 10926 IsResolver: false, 10927 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10928 return nil, errors.New("field of type Int does not have child fields") 10929 }, 10930 } 10931 return fc, nil 10932 } 10933 10934 func (ec *executionContext) _Slices_test1(ctx context.Context, field graphql.CollectedField, obj *Slices) (ret graphql.Marshaler) { 10935 fc, err := ec.fieldContext_Slices_test1(ctx, field) 10936 if err != nil { 10937 return graphql.Null 10938 } 10939 ctx = graphql.WithFieldContext(ctx, fc) 10940 defer func() { 10941 if r := recover(); r != nil { 10942 ec.Error(ctx, ec.Recover(ctx, r)) 10943 ret = graphql.Null 10944 } 10945 }() 10946 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10947 ctx = rctx // use context from middleware stack in children 10948 return obj.Test1, nil 10949 }) 10950 10951 if resTmp == nil { 10952 return graphql.Null 10953 } 10954 res := resTmp.([]*string) 10955 fc.Result = res 10956 return ec.marshalOString2ᚕᚖstring(ctx, field.Selections, res) 10957 } 10958 10959 func (ec *executionContext) fieldContext_Slices_test1(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10960 fc = &graphql.FieldContext{ 10961 Object: "Slices", 10962 Field: field, 10963 IsMethod: false, 10964 IsResolver: false, 10965 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 10966 return nil, errors.New("field of type String does not have child fields") 10967 }, 10968 } 10969 return fc, nil 10970 } 10971 10972 func (ec *executionContext) _Slices_test2(ctx context.Context, field graphql.CollectedField, obj *Slices) (ret graphql.Marshaler) { 10973 fc, err := ec.fieldContext_Slices_test2(ctx, field) 10974 if err != nil { 10975 return graphql.Null 10976 } 10977 ctx = graphql.WithFieldContext(ctx, fc) 10978 defer func() { 10979 if r := recover(); r != nil { 10980 ec.Error(ctx, ec.Recover(ctx, r)) 10981 ret = graphql.Null 10982 } 10983 }() 10984 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 10985 ctx = rctx // use context from middleware stack in children 10986 return obj.Test2, nil 10987 }) 10988 10989 if resTmp == nil { 10990 return graphql.Null 10991 } 10992 res := resTmp.([]string) 10993 fc.Result = res 10994 return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) 10995 } 10996 10997 func (ec *executionContext) fieldContext_Slices_test2(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 10998 fc = &graphql.FieldContext{ 10999 Object: "Slices", 11000 Field: field, 11001 IsMethod: false, 11002 IsResolver: false, 11003 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 11004 return nil, errors.New("field of type String does not have child fields") 11005 }, 11006 } 11007 return fc, nil 11008 } 11009 11010 func (ec *executionContext) _Slices_test3(ctx context.Context, field graphql.CollectedField, obj *Slices) (ret graphql.Marshaler) { 11011 fc, err := ec.fieldContext_Slices_test3(ctx, field) 11012 if err != nil { 11013 return graphql.Null 11014 } 11015 ctx = graphql.WithFieldContext(ctx, fc) 11016 defer func() { 11017 if r := recover(); r != nil { 11018 ec.Error(ctx, ec.Recover(ctx, r)) 11019 ret = graphql.Null 11020 } 11021 }() 11022 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 11023 ctx = rctx // use context from middleware stack in children 11024 return obj.Test3, nil 11025 }) 11026 11027 if resTmp == nil { 11028 if !graphql.HasFieldError(ctx, fc) { 11029 ec.Errorf(ctx, "must not be null") 11030 } 11031 return graphql.Null 11032 } 11033 res := resTmp.([]*string) 11034 fc.Result = res 11035 return ec.marshalNString2ᚕᚖstring(ctx, field.Selections, res) 11036 } 11037 11038 func (ec *executionContext) fieldContext_Slices_test3(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 11039 fc = &graphql.FieldContext{ 11040 Object: "Slices", 11041 Field: field, 11042 IsMethod: false, 11043 IsResolver: false, 11044 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 11045 return nil, errors.New("field of type String does not have child fields") 11046 }, 11047 } 11048 return fc, nil 11049 } 11050 11051 func (ec *executionContext) _Slices_test4(ctx context.Context, field graphql.CollectedField, obj *Slices) (ret graphql.Marshaler) { 11052 fc, err := ec.fieldContext_Slices_test4(ctx, field) 11053 if err != nil { 11054 return graphql.Null 11055 } 11056 ctx = graphql.WithFieldContext(ctx, fc) 11057 defer func() { 11058 if r := recover(); r != nil { 11059 ec.Error(ctx, ec.Recover(ctx, r)) 11060 ret = graphql.Null 11061 } 11062 }() 11063 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 11064 ctx = rctx // use context from middleware stack in children 11065 return obj.Test4, nil 11066 }) 11067 11068 if resTmp == nil { 11069 if !graphql.HasFieldError(ctx, fc) { 11070 ec.Errorf(ctx, "must not be null") 11071 } 11072 return graphql.Null 11073 } 11074 res := resTmp.([]string) 11075 fc.Result = res 11076 return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) 11077 } 11078 11079 func (ec *executionContext) fieldContext_Slices_test4(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 11080 fc = &graphql.FieldContext{ 11081 Object: "Slices", 11082 Field: field, 11083 IsMethod: false, 11084 IsResolver: false, 11085 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 11086 return nil, errors.New("field of type String does not have child fields") 11087 }, 11088 } 11089 return fc, nil 11090 } 11091 11092 func (ec *executionContext) _Subscription_updated(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { 11093 fc, err := ec.fieldContext_Subscription_updated(ctx, field) 11094 if err != nil { 11095 return nil 11096 } 11097 ctx = graphql.WithFieldContext(ctx, fc) 11098 defer func() { 11099 if r := recover(); r != nil { 11100 ec.Error(ctx, ec.Recover(ctx, r)) 11101 ret = nil 11102 } 11103 }() 11104 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 11105 ctx = rctx // use context from middleware stack in children 11106 return ec.resolvers.Subscription().Updated(rctx) 11107 }) 11108 11109 if resTmp == nil { 11110 if !graphql.HasFieldError(ctx, fc) { 11111 ec.Errorf(ctx, "must not be null") 11112 } 11113 return nil 11114 } 11115 return func(ctx context.Context) graphql.Marshaler { 11116 select { 11117 case res, ok := <-resTmp.(<-chan string): 11118 if !ok { 11119 return nil 11120 } 11121 return graphql.WriterFunc(func(w io.Writer) { 11122 w.Write([]byte{'{'}) 11123 graphql.MarshalString(field.Alias).MarshalGQL(w) 11124 w.Write([]byte{':'}) 11125 ec.marshalNString2string(ctx, field.Selections, res).MarshalGQL(w) 11126 w.Write([]byte{'}'}) 11127 }) 11128 case <-ctx.Done(): 11129 return nil 11130 } 11131 } 11132 } 11133 11134 func (ec *executionContext) fieldContext_Subscription_updated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 11135 fc = &graphql.FieldContext{ 11136 Object: "Subscription", 11137 Field: field, 11138 IsMethod: true, 11139 IsResolver: true, 11140 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 11141 return nil, errors.New("field of type String does not have child fields") 11142 }, 11143 } 11144 return fc, nil 11145 } 11146 11147 func (ec *executionContext) _Subscription_initPayload(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { 11148 fc, err := ec.fieldContext_Subscription_initPayload(ctx, field) 11149 if err != nil { 11150 return nil 11151 } 11152 ctx = graphql.WithFieldContext(ctx, fc) 11153 defer func() { 11154 if r := recover(); r != nil { 11155 ec.Error(ctx, ec.Recover(ctx, r)) 11156 ret = nil 11157 } 11158 }() 11159 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 11160 ctx = rctx // use context from middleware stack in children 11161 return ec.resolvers.Subscription().InitPayload(rctx) 11162 }) 11163 11164 if resTmp == nil { 11165 if !graphql.HasFieldError(ctx, fc) { 11166 ec.Errorf(ctx, "must not be null") 11167 } 11168 return nil 11169 } 11170 return func(ctx context.Context) graphql.Marshaler { 11171 select { 11172 case res, ok := <-resTmp.(<-chan string): 11173 if !ok { 11174 return nil 11175 } 11176 return graphql.WriterFunc(func(w io.Writer) { 11177 w.Write([]byte{'{'}) 11178 graphql.MarshalString(field.Alias).MarshalGQL(w) 11179 w.Write([]byte{':'}) 11180 ec.marshalNString2string(ctx, field.Selections, res).MarshalGQL(w) 11181 w.Write([]byte{'}'}) 11182 }) 11183 case <-ctx.Done(): 11184 return nil 11185 } 11186 } 11187 } 11188 11189 func (ec *executionContext) fieldContext_Subscription_initPayload(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 11190 fc = &graphql.FieldContext{ 11191 Object: "Subscription", 11192 Field: field, 11193 IsMethod: true, 11194 IsResolver: true, 11195 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 11196 return nil, errors.New("field of type String does not have child fields") 11197 }, 11198 } 11199 return fc, nil 11200 } 11201 11202 func (ec *executionContext) _Subscription_directiveArg(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { 11203 fc, err := ec.fieldContext_Subscription_directiveArg(ctx, field) 11204 if err != nil { 11205 return nil 11206 } 11207 ctx = graphql.WithFieldContext(ctx, fc) 11208 defer func() { 11209 if r := recover(); r != nil { 11210 ec.Error(ctx, ec.Recover(ctx, r)) 11211 ret = nil 11212 } 11213 }() 11214 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 11215 ctx = rctx // use context from middleware stack in children 11216 return ec.resolvers.Subscription().DirectiveArg(rctx, fc.Args["arg"].(string)) 11217 }) 11218 11219 if resTmp == nil { 11220 return nil 11221 } 11222 return func(ctx context.Context) graphql.Marshaler { 11223 select { 11224 case res, ok := <-resTmp.(<-chan *string): 11225 if !ok { 11226 return nil 11227 } 11228 return graphql.WriterFunc(func(w io.Writer) { 11229 w.Write([]byte{'{'}) 11230 graphql.MarshalString(field.Alias).MarshalGQL(w) 11231 w.Write([]byte{':'}) 11232 ec.marshalOString2ᚖstring(ctx, field.Selections, res).MarshalGQL(w) 11233 w.Write([]byte{'}'}) 11234 }) 11235 case <-ctx.Done(): 11236 return nil 11237 } 11238 } 11239 } 11240 11241 func (ec *executionContext) fieldContext_Subscription_directiveArg(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 11242 fc = &graphql.FieldContext{ 11243 Object: "Subscription", 11244 Field: field, 11245 IsMethod: true, 11246 IsResolver: true, 11247 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 11248 return nil, errors.New("field of type String does not have child fields") 11249 }, 11250 } 11251 defer func() { 11252 if r := recover(); r != nil { 11253 err = ec.Recover(ctx, r) 11254 ec.Error(ctx, err) 11255 } 11256 }() 11257 ctx = graphql.WithFieldContext(ctx, fc) 11258 if fc.Args, err = ec.field_Subscription_directiveArg_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 11259 ec.Error(ctx, err) 11260 return 11261 } 11262 return fc, nil 11263 } 11264 11265 func (ec *executionContext) _Subscription_directiveNullableArg(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { 11266 fc, err := ec.fieldContext_Subscription_directiveNullableArg(ctx, field) 11267 if err != nil { 11268 return nil 11269 } 11270 ctx = graphql.WithFieldContext(ctx, fc) 11271 defer func() { 11272 if r := recover(); r != nil { 11273 ec.Error(ctx, ec.Recover(ctx, r)) 11274 ret = nil 11275 } 11276 }() 11277 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 11278 ctx = rctx // use context from middleware stack in children 11279 return ec.resolvers.Subscription().DirectiveNullableArg(rctx, fc.Args["arg"].(*int), fc.Args["arg2"].(*int), fc.Args["arg3"].(*string)) 11280 }) 11281 11282 if resTmp == nil { 11283 return nil 11284 } 11285 return func(ctx context.Context) graphql.Marshaler { 11286 select { 11287 case res, ok := <-resTmp.(<-chan *string): 11288 if !ok { 11289 return nil 11290 } 11291 return graphql.WriterFunc(func(w io.Writer) { 11292 w.Write([]byte{'{'}) 11293 graphql.MarshalString(field.Alias).MarshalGQL(w) 11294 w.Write([]byte{':'}) 11295 ec.marshalOString2ᚖstring(ctx, field.Selections, res).MarshalGQL(w) 11296 w.Write([]byte{'}'}) 11297 }) 11298 case <-ctx.Done(): 11299 return nil 11300 } 11301 } 11302 } 11303 11304 func (ec *executionContext) fieldContext_Subscription_directiveNullableArg(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 11305 fc = &graphql.FieldContext{ 11306 Object: "Subscription", 11307 Field: field, 11308 IsMethod: true, 11309 IsResolver: true, 11310 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 11311 return nil, errors.New("field of type String does not have child fields") 11312 }, 11313 } 11314 defer func() { 11315 if r := recover(); r != nil { 11316 err = ec.Recover(ctx, r) 11317 ec.Error(ctx, err) 11318 } 11319 }() 11320 ctx = graphql.WithFieldContext(ctx, fc) 11321 if fc.Args, err = ec.field_Subscription_directiveNullableArg_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 11322 ec.Error(ctx, err) 11323 return 11324 } 11325 return fc, nil 11326 } 11327 11328 func (ec *executionContext) _Subscription_directiveDouble(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { 11329 fc, err := ec.fieldContext_Subscription_directiveDouble(ctx, field) 11330 if err != nil { 11331 return nil 11332 } 11333 ctx = graphql.WithFieldContext(ctx, fc) 11334 defer func() { 11335 if r := recover(); r != nil { 11336 ec.Error(ctx, ec.Recover(ctx, r)) 11337 ret = nil 11338 } 11339 }() 11340 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 11341 directive0 := func(rctx context.Context) (interface{}, error) { 11342 ctx = rctx // use context from middleware stack in children 11343 return ec.resolvers.Subscription().DirectiveDouble(rctx) 11344 } 11345 directive1 := func(ctx context.Context) (interface{}, error) { 11346 if ec.directives.Directive1 == nil { 11347 return nil, errors.New("directive directive1 is not implemented") 11348 } 11349 return ec.directives.Directive1(ctx, nil, directive0) 11350 } 11351 directive2 := func(ctx context.Context) (interface{}, error) { 11352 if ec.directives.Directive2 == nil { 11353 return nil, errors.New("directive directive2 is not implemented") 11354 } 11355 return ec.directives.Directive2(ctx, nil, directive1) 11356 } 11357 11358 tmp, err := directive2(rctx) 11359 if err != nil { 11360 return nil, graphql.ErrorOnPath(ctx, err) 11361 } 11362 if tmp == nil { 11363 return nil, nil 11364 } 11365 if data, ok := tmp.(<-chan *string); ok { 11366 return data, nil 11367 } 11368 return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *string`, tmp) 11369 }) 11370 11371 if resTmp == nil { 11372 return nil 11373 } 11374 return func(ctx context.Context) graphql.Marshaler { 11375 select { 11376 case res, ok := <-resTmp.(<-chan *string): 11377 if !ok { 11378 return nil 11379 } 11380 return graphql.WriterFunc(func(w io.Writer) { 11381 w.Write([]byte{'{'}) 11382 graphql.MarshalString(field.Alias).MarshalGQL(w) 11383 w.Write([]byte{':'}) 11384 ec.marshalOString2ᚖstring(ctx, field.Selections, res).MarshalGQL(w) 11385 w.Write([]byte{'}'}) 11386 }) 11387 case <-ctx.Done(): 11388 return nil 11389 } 11390 } 11391 } 11392 11393 func (ec *executionContext) fieldContext_Subscription_directiveDouble(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 11394 fc = &graphql.FieldContext{ 11395 Object: "Subscription", 11396 Field: field, 11397 IsMethod: true, 11398 IsResolver: true, 11399 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 11400 return nil, errors.New("field of type String does not have child fields") 11401 }, 11402 } 11403 return fc, nil 11404 } 11405 11406 func (ec *executionContext) _Subscription_directiveUnimplemented(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { 11407 fc, err := ec.fieldContext_Subscription_directiveUnimplemented(ctx, field) 11408 if err != nil { 11409 return nil 11410 } 11411 ctx = graphql.WithFieldContext(ctx, fc) 11412 defer func() { 11413 if r := recover(); r != nil { 11414 ec.Error(ctx, ec.Recover(ctx, r)) 11415 ret = nil 11416 } 11417 }() 11418 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 11419 directive0 := func(rctx context.Context) (interface{}, error) { 11420 ctx = rctx // use context from middleware stack in children 11421 return ec.resolvers.Subscription().DirectiveUnimplemented(rctx) 11422 } 11423 directive1 := func(ctx context.Context) (interface{}, error) { 11424 if ec.directives.Unimplemented == nil { 11425 return nil, errors.New("directive unimplemented is not implemented") 11426 } 11427 return ec.directives.Unimplemented(ctx, nil, directive0) 11428 } 11429 11430 tmp, err := directive1(rctx) 11431 if err != nil { 11432 return nil, graphql.ErrorOnPath(ctx, err) 11433 } 11434 if tmp == nil { 11435 return nil, nil 11436 } 11437 if data, ok := tmp.(<-chan *string); ok { 11438 return data, nil 11439 } 11440 return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *string`, tmp) 11441 }) 11442 11443 if resTmp == nil { 11444 return nil 11445 } 11446 return func(ctx context.Context) graphql.Marshaler { 11447 select { 11448 case res, ok := <-resTmp.(<-chan *string): 11449 if !ok { 11450 return nil 11451 } 11452 return graphql.WriterFunc(func(w io.Writer) { 11453 w.Write([]byte{'{'}) 11454 graphql.MarshalString(field.Alias).MarshalGQL(w) 11455 w.Write([]byte{':'}) 11456 ec.marshalOString2ᚖstring(ctx, field.Selections, res).MarshalGQL(w) 11457 w.Write([]byte{'}'}) 11458 }) 11459 case <-ctx.Done(): 11460 return nil 11461 } 11462 } 11463 } 11464 11465 func (ec *executionContext) fieldContext_Subscription_directiveUnimplemented(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 11466 fc = &graphql.FieldContext{ 11467 Object: "Subscription", 11468 Field: field, 11469 IsMethod: true, 11470 IsResolver: true, 11471 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 11472 return nil, errors.New("field of type String does not have child fields") 11473 }, 11474 } 11475 return fc, nil 11476 } 11477 11478 func (ec *executionContext) _Subscription_issue896b(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { 11479 fc, err := ec.fieldContext_Subscription_issue896b(ctx, field) 11480 if err != nil { 11481 return nil 11482 } 11483 ctx = graphql.WithFieldContext(ctx, fc) 11484 defer func() { 11485 if r := recover(); r != nil { 11486 ec.Error(ctx, ec.Recover(ctx, r)) 11487 ret = nil 11488 } 11489 }() 11490 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 11491 ctx = rctx // use context from middleware stack in children 11492 return ec.resolvers.Subscription().Issue896b(rctx) 11493 }) 11494 11495 if resTmp == nil { 11496 return nil 11497 } 11498 return func(ctx context.Context) graphql.Marshaler { 11499 select { 11500 case res, ok := <-resTmp.(<-chan []*CheckIssue896): 11501 if !ok { 11502 return nil 11503 } 11504 return graphql.WriterFunc(func(w io.Writer) { 11505 w.Write([]byte{'{'}) 11506 graphql.MarshalString(field.Alias).MarshalGQL(w) 11507 w.Write([]byte{':'}) 11508 ec.marshalOCheckIssue8962ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896(ctx, field.Selections, res).MarshalGQL(w) 11509 w.Write([]byte{'}'}) 11510 }) 11511 case <-ctx.Done(): 11512 return nil 11513 } 11514 } 11515 } 11516 11517 func (ec *executionContext) fieldContext_Subscription_issue896b(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 11518 fc = &graphql.FieldContext{ 11519 Object: "Subscription", 11520 Field: field, 11521 IsMethod: true, 11522 IsResolver: true, 11523 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 11524 switch field.Name { 11525 case "id": 11526 return ec.fieldContext_CheckIssue896_id(ctx, field) 11527 } 11528 return nil, fmt.Errorf("no field named %q was found under type CheckIssue896", field.Name) 11529 }, 11530 } 11531 return fc, nil 11532 } 11533 11534 func (ec *executionContext) _Subscription_errorRequired(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) { 11535 fc, err := ec.fieldContext_Subscription_errorRequired(ctx, field) 11536 if err != nil { 11537 return nil 11538 } 11539 ctx = graphql.WithFieldContext(ctx, fc) 11540 defer func() { 11541 if r := recover(); r != nil { 11542 ec.Error(ctx, ec.Recover(ctx, r)) 11543 ret = nil 11544 } 11545 }() 11546 resTmp := ec._fieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { 11547 ctx = rctx // use context from middleware stack in children 11548 return ec.resolvers.Subscription().ErrorRequired(rctx) 11549 }) 11550 11551 if resTmp == nil { 11552 if !graphql.HasFieldError(ctx, fc) { 11553 ec.Errorf(ctx, "must not be null") 11554 } 11555 return nil 11556 } 11557 return func(ctx context.Context) graphql.Marshaler { 11558 select { 11559 case res, ok := <-resTmp.(<-chan *Error): 11560 if !ok { 11561 return nil 11562 } 11563 return graphql.WriterFunc(func(w io.Writer) { 11564 w.Write([]byte{'{'}) 11565 graphql.MarshalString(field.Alias).MarshalGQL(w) 11566 w.Write([]byte{':'}) 11567 ec.marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx, field.Selections, res).MarshalGQL(w) 11568 w.Write([]byte{'}'}) 11569 }) 11570 case <-ctx.Done(): 11571 return nil 11572 } 11573 } 11574 } 11575 11576 func (ec *executionContext) fieldContext_Subscription_errorRequired(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 11577 fc = &graphql.FieldContext{ 11578 Object: "Subscription", 11579 Field: field, 11580 IsMethod: true, 11581 IsResolver: true, 11582 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 11583 switch field.Name { 11584 case "id": 11585 return ec.fieldContext_Error_id(ctx, field) 11586 case "errorOnNonRequiredField": 11587 return ec.fieldContext_Error_errorOnNonRequiredField(ctx, field) 11588 case "errorOnRequiredField": 11589 return ec.fieldContext_Error_errorOnRequiredField(ctx, field) 11590 case "nilOnRequiredField": 11591 return ec.fieldContext_Error_nilOnRequiredField(ctx, field) 11592 } 11593 return nil, fmt.Errorf("no field named %q was found under type Error", field.Name) 11594 }, 11595 } 11596 return fc, nil 11597 } 11598 11599 func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { 11600 fc, err := ec.fieldContext_User_id(ctx, field) 11601 if err != nil { 11602 return graphql.Null 11603 } 11604 ctx = graphql.WithFieldContext(ctx, fc) 11605 defer func() { 11606 if r := recover(); r != nil { 11607 ec.Error(ctx, ec.Recover(ctx, r)) 11608 ret = graphql.Null 11609 } 11610 }() 11611 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 11612 ctx = rctx // use context from middleware stack in children 11613 return obj.ID, nil 11614 }) 11615 11616 if resTmp == nil { 11617 if !graphql.HasFieldError(ctx, fc) { 11618 ec.Errorf(ctx, "must not be null") 11619 } 11620 return graphql.Null 11621 } 11622 res := resTmp.(int) 11623 fc.Result = res 11624 return ec.marshalNInt2int(ctx, field.Selections, res) 11625 } 11626 11627 func (ec *executionContext) fieldContext_User_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 11628 fc = &graphql.FieldContext{ 11629 Object: "User", 11630 Field: field, 11631 IsMethod: false, 11632 IsResolver: false, 11633 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 11634 return nil, errors.New("field of type Int does not have child fields") 11635 }, 11636 } 11637 return fc, nil 11638 } 11639 11640 func (ec *executionContext) _User_friends(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { 11641 fc, err := ec.fieldContext_User_friends(ctx, field) 11642 if err != nil { 11643 return graphql.Null 11644 } 11645 ctx = graphql.WithFieldContext(ctx, fc) 11646 defer func() { 11647 if r := recover(); r != nil { 11648 ec.Error(ctx, ec.Recover(ctx, r)) 11649 ret = graphql.Null 11650 } 11651 }() 11652 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 11653 ctx = rctx // use context from middleware stack in children 11654 return ec.resolvers.User().Friends(rctx, obj) 11655 }) 11656 11657 if resTmp == nil { 11658 if !graphql.HasFieldError(ctx, fc) { 11659 ec.Errorf(ctx, "must not be null") 11660 } 11661 return graphql.Null 11662 } 11663 res := resTmp.([]*User) 11664 fc.Result = res 11665 return ec.marshalNUser2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUserᚄ(ctx, field.Selections, res) 11666 } 11667 11668 func (ec *executionContext) fieldContext_User_friends(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 11669 fc = &graphql.FieldContext{ 11670 Object: "User", 11671 Field: field, 11672 IsMethod: true, 11673 IsResolver: true, 11674 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 11675 switch field.Name { 11676 case "id": 11677 return ec.fieldContext_User_id(ctx, field) 11678 case "friends": 11679 return ec.fieldContext_User_friends(ctx, field) 11680 case "created": 11681 return ec.fieldContext_User_created(ctx, field) 11682 case "updated": 11683 return ec.fieldContext_User_updated(ctx, field) 11684 case "pets": 11685 return ec.fieldContext_User_pets(ctx, field) 11686 } 11687 return nil, fmt.Errorf("no field named %q was found under type User", field.Name) 11688 }, 11689 } 11690 return fc, nil 11691 } 11692 11693 func (ec *executionContext) _User_created(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { 11694 fc, err := ec.fieldContext_User_created(ctx, field) 11695 if err != nil { 11696 return graphql.Null 11697 } 11698 ctx = graphql.WithFieldContext(ctx, fc) 11699 defer func() { 11700 if r := recover(); r != nil { 11701 ec.Error(ctx, ec.Recover(ctx, r)) 11702 ret = graphql.Null 11703 } 11704 }() 11705 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 11706 ctx = rctx // use context from middleware stack in children 11707 return obj.Created, nil 11708 }) 11709 11710 if resTmp == nil { 11711 if !graphql.HasFieldError(ctx, fc) { 11712 ec.Errorf(ctx, "must not be null") 11713 } 11714 return graphql.Null 11715 } 11716 res := resTmp.(time.Time) 11717 fc.Result = res 11718 return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) 11719 } 11720 11721 func (ec *executionContext) fieldContext_User_created(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 11722 fc = &graphql.FieldContext{ 11723 Object: "User", 11724 Field: field, 11725 IsMethod: false, 11726 IsResolver: false, 11727 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 11728 return nil, errors.New("field of type Time does not have child fields") 11729 }, 11730 } 11731 return fc, nil 11732 } 11733 11734 func (ec *executionContext) _User_updated(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { 11735 fc, err := ec.fieldContext_User_updated(ctx, field) 11736 if err != nil { 11737 return graphql.Null 11738 } 11739 ctx = graphql.WithFieldContext(ctx, fc) 11740 defer func() { 11741 if r := recover(); r != nil { 11742 ec.Error(ctx, ec.Recover(ctx, r)) 11743 ret = graphql.Null 11744 } 11745 }() 11746 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 11747 ctx = rctx // use context from middleware stack in children 11748 return obj.Updated, nil 11749 }) 11750 11751 if resTmp == nil { 11752 return graphql.Null 11753 } 11754 res := resTmp.(*time.Time) 11755 fc.Result = res 11756 return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res) 11757 } 11758 11759 func (ec *executionContext) fieldContext_User_updated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 11760 fc = &graphql.FieldContext{ 11761 Object: "User", 11762 Field: field, 11763 IsMethod: false, 11764 IsResolver: false, 11765 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 11766 return nil, errors.New("field of type Time does not have child fields") 11767 }, 11768 } 11769 return fc, nil 11770 } 11771 11772 func (ec *executionContext) _User_pets(ctx context.Context, field graphql.CollectedField, obj *User) (ret graphql.Marshaler) { 11773 fc, err := ec.fieldContext_User_pets(ctx, field) 11774 if err != nil { 11775 return graphql.Null 11776 } 11777 ctx = graphql.WithFieldContext(ctx, fc) 11778 defer func() { 11779 if r := recover(); r != nil { 11780 ec.Error(ctx, ec.Recover(ctx, r)) 11781 ret = graphql.Null 11782 } 11783 }() 11784 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 11785 ctx = rctx // use context from middleware stack in children 11786 return ec.resolvers.User().Pets(rctx, obj, fc.Args["limit"].(*int)) 11787 }) 11788 11789 if resTmp == nil { 11790 return graphql.Null 11791 } 11792 res := resTmp.([]*Pet) 11793 fc.Result = res 11794 return ec.marshalOPet2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPetᚄ(ctx, field.Selections, res) 11795 } 11796 11797 func (ec *executionContext) fieldContext_User_pets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 11798 fc = &graphql.FieldContext{ 11799 Object: "User", 11800 Field: field, 11801 IsMethod: true, 11802 IsResolver: true, 11803 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 11804 switch field.Name { 11805 case "id": 11806 return ec.fieldContext_Pet_id(ctx, field) 11807 case "friends": 11808 return ec.fieldContext_Pet_friends(ctx, field) 11809 } 11810 return nil, fmt.Errorf("no field named %q was found under type Pet", field.Name) 11811 }, 11812 } 11813 defer func() { 11814 if r := recover(); r != nil { 11815 err = ec.Recover(ctx, r) 11816 ec.Error(ctx, err) 11817 } 11818 }() 11819 ctx = graphql.WithFieldContext(ctx, fc) 11820 if fc.Args, err = ec.field_User_pets_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 11821 ec.Error(ctx, err) 11822 return 11823 } 11824 return fc, nil 11825 } 11826 11827 func (ec *executionContext) _VOkCaseNil_value(ctx context.Context, field graphql.CollectedField, obj *VOkCaseNil) (ret graphql.Marshaler) { 11828 fc, err := ec.fieldContext_VOkCaseNil_value(ctx, field) 11829 if err != nil { 11830 return graphql.Null 11831 } 11832 ctx = graphql.WithFieldContext(ctx, fc) 11833 defer func() { 11834 if r := recover(); r != nil { 11835 ec.Error(ctx, ec.Recover(ctx, r)) 11836 ret = graphql.Null 11837 } 11838 }() 11839 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 11840 ctx = rctx // use context from middleware stack in children 11841 v, ok := obj.Value() 11842 if !ok { 11843 return nil, nil 11844 } 11845 return v, nil 11846 }) 11847 11848 if resTmp == nil { 11849 return graphql.Null 11850 } 11851 res := resTmp.(string) 11852 fc.Result = res 11853 return ec.marshalOString2string(ctx, field.Selections, res) 11854 } 11855 11856 func (ec *executionContext) fieldContext_VOkCaseNil_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 11857 fc = &graphql.FieldContext{ 11858 Object: "VOkCaseNil", 11859 Field: field, 11860 IsMethod: true, 11861 IsResolver: false, 11862 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 11863 return nil, errors.New("field of type String does not have child fields") 11864 }, 11865 } 11866 return fc, nil 11867 } 11868 11869 func (ec *executionContext) _VOkCaseValue_value(ctx context.Context, field graphql.CollectedField, obj *VOkCaseValue) (ret graphql.Marshaler) { 11870 fc, err := ec.fieldContext_VOkCaseValue_value(ctx, field) 11871 if err != nil { 11872 return graphql.Null 11873 } 11874 ctx = graphql.WithFieldContext(ctx, fc) 11875 defer func() { 11876 if r := recover(); r != nil { 11877 ec.Error(ctx, ec.Recover(ctx, r)) 11878 ret = graphql.Null 11879 } 11880 }() 11881 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 11882 ctx = rctx // use context from middleware stack in children 11883 v, ok := obj.Value() 11884 if !ok { 11885 return nil, nil 11886 } 11887 return v, nil 11888 }) 11889 11890 if resTmp == nil { 11891 return graphql.Null 11892 } 11893 res := resTmp.(string) 11894 fc.Result = res 11895 return ec.marshalOString2string(ctx, field.Selections, res) 11896 } 11897 11898 func (ec *executionContext) fieldContext_VOkCaseValue_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 11899 fc = &graphql.FieldContext{ 11900 Object: "VOkCaseValue", 11901 Field: field, 11902 IsMethod: true, 11903 IsResolver: false, 11904 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 11905 return nil, errors.New("field of type String does not have child fields") 11906 }, 11907 } 11908 return fc, nil 11909 } 11910 11911 func (ec *executionContext) _ValidType_differentCase(ctx context.Context, field graphql.CollectedField, obj *ValidType) (ret graphql.Marshaler) { 11912 fc, err := ec.fieldContext_ValidType_differentCase(ctx, field) 11913 if err != nil { 11914 return graphql.Null 11915 } 11916 ctx = graphql.WithFieldContext(ctx, fc) 11917 defer func() { 11918 if r := recover(); r != nil { 11919 ec.Error(ctx, ec.Recover(ctx, r)) 11920 ret = graphql.Null 11921 } 11922 }() 11923 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 11924 ctx = rctx // use context from middleware stack in children 11925 return obj.DifferentCase, nil 11926 }) 11927 11928 if resTmp == nil { 11929 if !graphql.HasFieldError(ctx, fc) { 11930 ec.Errorf(ctx, "must not be null") 11931 } 11932 return graphql.Null 11933 } 11934 res := resTmp.(string) 11935 fc.Result = res 11936 return ec.marshalNString2string(ctx, field.Selections, res) 11937 } 11938 11939 func (ec *executionContext) fieldContext_ValidType_differentCase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 11940 fc = &graphql.FieldContext{ 11941 Object: "ValidType", 11942 Field: field, 11943 IsMethod: false, 11944 IsResolver: false, 11945 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 11946 return nil, errors.New("field of type String does not have child fields") 11947 }, 11948 } 11949 return fc, nil 11950 } 11951 11952 func (ec *executionContext) _ValidType_different_case(ctx context.Context, field graphql.CollectedField, obj *ValidType) (ret graphql.Marshaler) { 11953 fc, err := ec.fieldContext_ValidType_different_case(ctx, field) 11954 if err != nil { 11955 return graphql.Null 11956 } 11957 ctx = graphql.WithFieldContext(ctx, fc) 11958 defer func() { 11959 if r := recover(); r != nil { 11960 ec.Error(ctx, ec.Recover(ctx, r)) 11961 ret = graphql.Null 11962 } 11963 }() 11964 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 11965 ctx = rctx // use context from middleware stack in children 11966 return obj.DifferentCaseOld, nil 11967 }) 11968 11969 if resTmp == nil { 11970 if !graphql.HasFieldError(ctx, fc) { 11971 ec.Errorf(ctx, "must not be null") 11972 } 11973 return graphql.Null 11974 } 11975 res := resTmp.(string) 11976 fc.Result = res 11977 return ec.marshalNString2string(ctx, field.Selections, res) 11978 } 11979 11980 func (ec *executionContext) fieldContext_ValidType_different_case(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 11981 fc = &graphql.FieldContext{ 11982 Object: "ValidType", 11983 Field: field, 11984 IsMethod: false, 11985 IsResolver: false, 11986 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 11987 return nil, errors.New("field of type String does not have child fields") 11988 }, 11989 } 11990 return fc, nil 11991 } 11992 11993 func (ec *executionContext) _ValidType_validInputKeywords(ctx context.Context, field graphql.CollectedField, obj *ValidType) (ret graphql.Marshaler) { 11994 fc, err := ec.fieldContext_ValidType_validInputKeywords(ctx, field) 11995 if err != nil { 11996 return graphql.Null 11997 } 11998 ctx = graphql.WithFieldContext(ctx, fc) 11999 defer func() { 12000 if r := recover(); r != nil { 12001 ec.Error(ctx, ec.Recover(ctx, r)) 12002 ret = graphql.Null 12003 } 12004 }() 12005 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12006 ctx = rctx // use context from middleware stack in children 12007 return obj.ValidInputKeywords, nil 12008 }) 12009 12010 if resTmp == nil { 12011 if !graphql.HasFieldError(ctx, fc) { 12012 ec.Errorf(ctx, "must not be null") 12013 } 12014 return graphql.Null 12015 } 12016 res := resTmp.(bool) 12017 fc.Result = res 12018 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 12019 } 12020 12021 func (ec *executionContext) fieldContext_ValidType_validInputKeywords(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12022 fc = &graphql.FieldContext{ 12023 Object: "ValidType", 12024 Field: field, 12025 IsMethod: false, 12026 IsResolver: false, 12027 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12028 return nil, errors.New("field of type Boolean does not have child fields") 12029 }, 12030 } 12031 defer func() { 12032 if r := recover(); r != nil { 12033 err = ec.Recover(ctx, r) 12034 ec.Error(ctx, err) 12035 } 12036 }() 12037 ctx = graphql.WithFieldContext(ctx, fc) 12038 if fc.Args, err = ec.field_ValidType_validInputKeywords_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 12039 ec.Error(ctx, err) 12040 return 12041 } 12042 return fc, nil 12043 } 12044 12045 func (ec *executionContext) _ValidType_validArgs(ctx context.Context, field graphql.CollectedField, obj *ValidType) (ret graphql.Marshaler) { 12046 fc, err := ec.fieldContext_ValidType_validArgs(ctx, field) 12047 if err != nil { 12048 return graphql.Null 12049 } 12050 ctx = graphql.WithFieldContext(ctx, fc) 12051 defer func() { 12052 if r := recover(); r != nil { 12053 ec.Error(ctx, ec.Recover(ctx, r)) 12054 ret = graphql.Null 12055 } 12056 }() 12057 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12058 ctx = rctx // use context from middleware stack in children 12059 return obj.ValidArgs, nil 12060 }) 12061 12062 if resTmp == nil { 12063 if !graphql.HasFieldError(ctx, fc) { 12064 ec.Errorf(ctx, "must not be null") 12065 } 12066 return graphql.Null 12067 } 12068 res := resTmp.(bool) 12069 fc.Result = res 12070 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 12071 } 12072 12073 func (ec *executionContext) fieldContext_ValidType_validArgs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12074 fc = &graphql.FieldContext{ 12075 Object: "ValidType", 12076 Field: field, 12077 IsMethod: false, 12078 IsResolver: false, 12079 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12080 return nil, errors.New("field of type Boolean does not have child fields") 12081 }, 12082 } 12083 defer func() { 12084 if r := recover(); r != nil { 12085 err = ec.Recover(ctx, r) 12086 ec.Error(ctx, err) 12087 } 12088 }() 12089 ctx = graphql.WithFieldContext(ctx, fc) 12090 if fc.Args, err = ec.field_ValidType_validArgs_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 12091 ec.Error(ctx, err) 12092 return 12093 } 12094 return fc, nil 12095 } 12096 12097 func (ec *executionContext) _VariadicModel_value(ctx context.Context, field graphql.CollectedField, obj *VariadicModel) (ret graphql.Marshaler) { 12098 fc, err := ec.fieldContext_VariadicModel_value(ctx, field) 12099 if err != nil { 12100 return graphql.Null 12101 } 12102 ctx = graphql.WithFieldContext(ctx, fc) 12103 defer func() { 12104 if r := recover(); r != nil { 12105 ec.Error(ctx, ec.Recover(ctx, r)) 12106 ret = graphql.Null 12107 } 12108 }() 12109 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12110 ctx = rctx // use context from middleware stack in children 12111 return obj.Value(ctx, fc.Args["rank"].(int)) 12112 }) 12113 12114 if resTmp == nil { 12115 return graphql.Null 12116 } 12117 res := resTmp.(string) 12118 fc.Result = res 12119 return ec.marshalOString2string(ctx, field.Selections, res) 12120 } 12121 12122 func (ec *executionContext) fieldContext_VariadicModel_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12123 fc = &graphql.FieldContext{ 12124 Object: "VariadicModel", 12125 Field: field, 12126 IsMethod: true, 12127 IsResolver: false, 12128 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12129 return nil, errors.New("field of type String does not have child fields") 12130 }, 12131 } 12132 defer func() { 12133 if r := recover(); r != nil { 12134 err = ec.Recover(ctx, r) 12135 ec.Error(ctx, err) 12136 } 12137 }() 12138 ctx = graphql.WithFieldContext(ctx, fc) 12139 if fc.Args, err = ec.field_VariadicModel_value_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 12140 ec.Error(ctx, err) 12141 return 12142 } 12143 return fc, nil 12144 } 12145 12146 func (ec *executionContext) _WrappedMap_get(ctx context.Context, field graphql.CollectedField, obj WrappedMap) (ret graphql.Marshaler) { 12147 fc, err := ec.fieldContext_WrappedMap_get(ctx, field) 12148 if err != nil { 12149 return graphql.Null 12150 } 12151 ctx = graphql.WithFieldContext(ctx, fc) 12152 defer func() { 12153 if r := recover(); r != nil { 12154 ec.Error(ctx, ec.Recover(ctx, r)) 12155 ret = graphql.Null 12156 } 12157 }() 12158 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12159 ctx = rctx // use context from middleware stack in children 12160 return ec.resolvers.WrappedMap().Get(rctx, obj, fc.Args["key"].(string)) 12161 }) 12162 12163 if resTmp == nil { 12164 if !graphql.HasFieldError(ctx, fc) { 12165 ec.Errorf(ctx, "must not be null") 12166 } 12167 return graphql.Null 12168 } 12169 res := resTmp.(string) 12170 fc.Result = res 12171 return ec.marshalNString2string(ctx, field.Selections, res) 12172 } 12173 12174 func (ec *executionContext) fieldContext_WrappedMap_get(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12175 fc = &graphql.FieldContext{ 12176 Object: "WrappedMap", 12177 Field: field, 12178 IsMethod: true, 12179 IsResolver: true, 12180 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12181 return nil, errors.New("field of type String does not have child fields") 12182 }, 12183 } 12184 defer func() { 12185 if r := recover(); r != nil { 12186 err = ec.Recover(ctx, r) 12187 ec.Error(ctx, err) 12188 } 12189 }() 12190 ctx = graphql.WithFieldContext(ctx, fc) 12191 if fc.Args, err = ec.field_WrappedMap_get_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 12192 ec.Error(ctx, err) 12193 return 12194 } 12195 return fc, nil 12196 } 12197 12198 func (ec *executionContext) _WrappedSlice_get(ctx context.Context, field graphql.CollectedField, obj WrappedSlice) (ret graphql.Marshaler) { 12199 fc, err := ec.fieldContext_WrappedSlice_get(ctx, field) 12200 if err != nil { 12201 return graphql.Null 12202 } 12203 ctx = graphql.WithFieldContext(ctx, fc) 12204 defer func() { 12205 if r := recover(); r != nil { 12206 ec.Error(ctx, ec.Recover(ctx, r)) 12207 ret = graphql.Null 12208 } 12209 }() 12210 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12211 ctx = rctx // use context from middleware stack in children 12212 return ec.resolvers.WrappedSlice().Get(rctx, obj, fc.Args["idx"].(int)) 12213 }) 12214 12215 if resTmp == nil { 12216 if !graphql.HasFieldError(ctx, fc) { 12217 ec.Errorf(ctx, "must not be null") 12218 } 12219 return graphql.Null 12220 } 12221 res := resTmp.(string) 12222 fc.Result = res 12223 return ec.marshalNString2string(ctx, field.Selections, res) 12224 } 12225 12226 func (ec *executionContext) fieldContext_WrappedSlice_get(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12227 fc = &graphql.FieldContext{ 12228 Object: "WrappedSlice", 12229 Field: field, 12230 IsMethod: true, 12231 IsResolver: true, 12232 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12233 return nil, errors.New("field of type String does not have child fields") 12234 }, 12235 } 12236 defer func() { 12237 if r := recover(); r != nil { 12238 err = ec.Recover(ctx, r) 12239 ec.Error(ctx, err) 12240 } 12241 }() 12242 ctx = graphql.WithFieldContext(ctx, fc) 12243 if fc.Args, err = ec.field_WrappedSlice_get_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 12244 ec.Error(ctx, err) 12245 return 12246 } 12247 return fc, nil 12248 } 12249 12250 func (ec *executionContext) _WrappedStruct_name(ctx context.Context, field graphql.CollectedField, obj *WrappedStruct) (ret graphql.Marshaler) { 12251 fc, err := ec.fieldContext_WrappedStruct_name(ctx, field) 12252 if err != nil { 12253 return graphql.Null 12254 } 12255 ctx = graphql.WithFieldContext(ctx, fc) 12256 defer func() { 12257 if r := recover(); r != nil { 12258 ec.Error(ctx, ec.Recover(ctx, r)) 12259 ret = graphql.Null 12260 } 12261 }() 12262 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12263 ctx = rctx // use context from middleware stack in children 12264 return obj.Name, nil 12265 }) 12266 12267 if resTmp == nil { 12268 if !graphql.HasFieldError(ctx, fc) { 12269 ec.Errorf(ctx, "must not be null") 12270 } 12271 return graphql.Null 12272 } 12273 res := resTmp.(otherpkg.Scalar) 12274 fc.Result = res 12275 return ec.marshalNWrappedScalar2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚋotherpkgᚐScalar(ctx, field.Selections, res) 12276 } 12277 12278 func (ec *executionContext) fieldContext_WrappedStruct_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12279 fc = &graphql.FieldContext{ 12280 Object: "WrappedStruct", 12281 Field: field, 12282 IsMethod: false, 12283 IsResolver: false, 12284 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12285 return nil, errors.New("field of type WrappedScalar does not have child fields") 12286 }, 12287 } 12288 return fc, nil 12289 } 12290 12291 func (ec *executionContext) _WrappedStruct_desc(ctx context.Context, field graphql.CollectedField, obj *WrappedStruct) (ret graphql.Marshaler) { 12292 fc, err := ec.fieldContext_WrappedStruct_desc(ctx, field) 12293 if err != nil { 12294 return graphql.Null 12295 } 12296 ctx = graphql.WithFieldContext(ctx, fc) 12297 defer func() { 12298 if r := recover(); r != nil { 12299 ec.Error(ctx, ec.Recover(ctx, r)) 12300 ret = graphql.Null 12301 } 12302 }() 12303 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12304 ctx = rctx // use context from middleware stack in children 12305 return obj.Desc, nil 12306 }) 12307 12308 if resTmp == nil { 12309 return graphql.Null 12310 } 12311 res := resTmp.(*otherpkg.Scalar) 12312 fc.Result = res 12313 return ec.marshalOWrappedScalar2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚋotherpkgᚐScalar(ctx, field.Selections, res) 12314 } 12315 12316 func (ec *executionContext) fieldContext_WrappedStruct_desc(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12317 fc = &graphql.FieldContext{ 12318 Object: "WrappedStruct", 12319 Field: field, 12320 IsMethod: false, 12321 IsResolver: false, 12322 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12323 return nil, errors.New("field of type WrappedScalar does not have child fields") 12324 }, 12325 } 12326 return fc, nil 12327 } 12328 12329 func (ec *executionContext) _XXIt_id(ctx context.Context, field graphql.CollectedField, obj *XXIt) (ret graphql.Marshaler) { 12330 fc, err := ec.fieldContext_XXIt_id(ctx, field) 12331 if err != nil { 12332 return graphql.Null 12333 } 12334 ctx = graphql.WithFieldContext(ctx, fc) 12335 defer func() { 12336 if r := recover(); r != nil { 12337 ec.Error(ctx, ec.Recover(ctx, r)) 12338 ret = graphql.Null 12339 } 12340 }() 12341 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12342 ctx = rctx // use context from middleware stack in children 12343 return obj.ID, nil 12344 }) 12345 12346 if resTmp == nil { 12347 if !graphql.HasFieldError(ctx, fc) { 12348 ec.Errorf(ctx, "must not be null") 12349 } 12350 return graphql.Null 12351 } 12352 res := resTmp.(string) 12353 fc.Result = res 12354 return ec.marshalNID2string(ctx, field.Selections, res) 12355 } 12356 12357 func (ec *executionContext) fieldContext_XXIt_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12358 fc = &graphql.FieldContext{ 12359 Object: "XXIt", 12360 Field: field, 12361 IsMethod: false, 12362 IsResolver: false, 12363 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12364 return nil, errors.New("field of type ID does not have child fields") 12365 }, 12366 } 12367 return fc, nil 12368 } 12369 12370 func (ec *executionContext) _XxIt_id(ctx context.Context, field graphql.CollectedField, obj *XxIt) (ret graphql.Marshaler) { 12371 fc, err := ec.fieldContext_XxIt_id(ctx, field) 12372 if err != nil { 12373 return graphql.Null 12374 } 12375 ctx = graphql.WithFieldContext(ctx, fc) 12376 defer func() { 12377 if r := recover(); r != nil { 12378 ec.Error(ctx, ec.Recover(ctx, r)) 12379 ret = graphql.Null 12380 } 12381 }() 12382 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12383 ctx = rctx // use context from middleware stack in children 12384 return obj.ID, nil 12385 }) 12386 12387 if resTmp == nil { 12388 if !graphql.HasFieldError(ctx, fc) { 12389 ec.Errorf(ctx, "must not be null") 12390 } 12391 return graphql.Null 12392 } 12393 res := resTmp.(string) 12394 fc.Result = res 12395 return ec.marshalNID2string(ctx, field.Selections, res) 12396 } 12397 12398 func (ec *executionContext) fieldContext_XxIt_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12399 fc = &graphql.FieldContext{ 12400 Object: "XxIt", 12401 Field: field, 12402 IsMethod: false, 12403 IsResolver: false, 12404 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12405 return nil, errors.New("field of type ID does not have child fields") 12406 }, 12407 } 12408 return fc, nil 12409 } 12410 12411 func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 12412 fc, err := ec.fieldContext___Directive_name(ctx, field) 12413 if err != nil { 12414 return graphql.Null 12415 } 12416 ctx = graphql.WithFieldContext(ctx, fc) 12417 defer func() { 12418 if r := recover(); r != nil { 12419 ec.Error(ctx, ec.Recover(ctx, r)) 12420 ret = graphql.Null 12421 } 12422 }() 12423 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12424 ctx = rctx // use context from middleware stack in children 12425 return obj.Name, nil 12426 }) 12427 12428 if resTmp == nil { 12429 if !graphql.HasFieldError(ctx, fc) { 12430 ec.Errorf(ctx, "must not be null") 12431 } 12432 return graphql.Null 12433 } 12434 res := resTmp.(string) 12435 fc.Result = res 12436 return ec.marshalNString2string(ctx, field.Selections, res) 12437 } 12438 12439 func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12440 fc = &graphql.FieldContext{ 12441 Object: "__Directive", 12442 Field: field, 12443 IsMethod: false, 12444 IsResolver: false, 12445 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12446 return nil, errors.New("field of type String does not have child fields") 12447 }, 12448 } 12449 return fc, nil 12450 } 12451 12452 func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 12453 fc, err := ec.fieldContext___Directive_description(ctx, field) 12454 if err != nil { 12455 return graphql.Null 12456 } 12457 ctx = graphql.WithFieldContext(ctx, fc) 12458 defer func() { 12459 if r := recover(); r != nil { 12460 ec.Error(ctx, ec.Recover(ctx, r)) 12461 ret = graphql.Null 12462 } 12463 }() 12464 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12465 ctx = rctx // use context from middleware stack in children 12466 return obj.Description(), nil 12467 }) 12468 12469 if resTmp == nil { 12470 return graphql.Null 12471 } 12472 res := resTmp.(*string) 12473 fc.Result = res 12474 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 12475 } 12476 12477 func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12478 fc = &graphql.FieldContext{ 12479 Object: "__Directive", 12480 Field: field, 12481 IsMethod: true, 12482 IsResolver: false, 12483 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12484 return nil, errors.New("field of type String does not have child fields") 12485 }, 12486 } 12487 return fc, nil 12488 } 12489 12490 func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 12491 fc, err := ec.fieldContext___Directive_locations(ctx, field) 12492 if err != nil { 12493 return graphql.Null 12494 } 12495 ctx = graphql.WithFieldContext(ctx, fc) 12496 defer func() { 12497 if r := recover(); r != nil { 12498 ec.Error(ctx, ec.Recover(ctx, r)) 12499 ret = graphql.Null 12500 } 12501 }() 12502 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12503 ctx = rctx // use context from middleware stack in children 12504 return obj.Locations, nil 12505 }) 12506 12507 if resTmp == nil { 12508 if !graphql.HasFieldError(ctx, fc) { 12509 ec.Errorf(ctx, "must not be null") 12510 } 12511 return graphql.Null 12512 } 12513 res := resTmp.([]string) 12514 fc.Result = res 12515 return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) 12516 } 12517 12518 func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12519 fc = &graphql.FieldContext{ 12520 Object: "__Directive", 12521 Field: field, 12522 IsMethod: false, 12523 IsResolver: false, 12524 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12525 return nil, errors.New("field of type __DirectiveLocation does not have child fields") 12526 }, 12527 } 12528 return fc, nil 12529 } 12530 12531 func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 12532 fc, err := ec.fieldContext___Directive_args(ctx, field) 12533 if err != nil { 12534 return graphql.Null 12535 } 12536 ctx = graphql.WithFieldContext(ctx, fc) 12537 defer func() { 12538 if r := recover(); r != nil { 12539 ec.Error(ctx, ec.Recover(ctx, r)) 12540 ret = graphql.Null 12541 } 12542 }() 12543 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12544 ctx = rctx // use context from middleware stack in children 12545 return obj.Args, nil 12546 }) 12547 12548 if resTmp == nil { 12549 if !graphql.HasFieldError(ctx, fc) { 12550 ec.Errorf(ctx, "must not be null") 12551 } 12552 return graphql.Null 12553 } 12554 res := resTmp.([]introspection.InputValue) 12555 fc.Result = res 12556 return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 12557 } 12558 12559 func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12560 fc = &graphql.FieldContext{ 12561 Object: "__Directive", 12562 Field: field, 12563 IsMethod: false, 12564 IsResolver: false, 12565 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12566 switch field.Name { 12567 case "name": 12568 return ec.fieldContext___InputValue_name(ctx, field) 12569 case "description": 12570 return ec.fieldContext___InputValue_description(ctx, field) 12571 case "type": 12572 return ec.fieldContext___InputValue_type(ctx, field) 12573 case "defaultValue": 12574 return ec.fieldContext___InputValue_defaultValue(ctx, field) 12575 } 12576 return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) 12577 }, 12578 } 12579 return fc, nil 12580 } 12581 12582 func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 12583 fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field) 12584 if err != nil { 12585 return graphql.Null 12586 } 12587 ctx = graphql.WithFieldContext(ctx, fc) 12588 defer func() { 12589 if r := recover(); r != nil { 12590 ec.Error(ctx, ec.Recover(ctx, r)) 12591 ret = graphql.Null 12592 } 12593 }() 12594 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12595 ctx = rctx // use context from middleware stack in children 12596 return obj.IsRepeatable, nil 12597 }) 12598 12599 if resTmp == nil { 12600 if !graphql.HasFieldError(ctx, fc) { 12601 ec.Errorf(ctx, "must not be null") 12602 } 12603 return graphql.Null 12604 } 12605 res := resTmp.(bool) 12606 fc.Result = res 12607 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 12608 } 12609 12610 func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12611 fc = &graphql.FieldContext{ 12612 Object: "__Directive", 12613 Field: field, 12614 IsMethod: false, 12615 IsResolver: false, 12616 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12617 return nil, errors.New("field of type Boolean does not have child fields") 12618 }, 12619 } 12620 return fc, nil 12621 } 12622 12623 func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 12624 fc, err := ec.fieldContext___EnumValue_name(ctx, field) 12625 if err != nil { 12626 return graphql.Null 12627 } 12628 ctx = graphql.WithFieldContext(ctx, fc) 12629 defer func() { 12630 if r := recover(); r != nil { 12631 ec.Error(ctx, ec.Recover(ctx, r)) 12632 ret = graphql.Null 12633 } 12634 }() 12635 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12636 ctx = rctx // use context from middleware stack in children 12637 return obj.Name, nil 12638 }) 12639 12640 if resTmp == nil { 12641 if !graphql.HasFieldError(ctx, fc) { 12642 ec.Errorf(ctx, "must not be null") 12643 } 12644 return graphql.Null 12645 } 12646 res := resTmp.(string) 12647 fc.Result = res 12648 return ec.marshalNString2string(ctx, field.Selections, res) 12649 } 12650 12651 func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12652 fc = &graphql.FieldContext{ 12653 Object: "__EnumValue", 12654 Field: field, 12655 IsMethod: false, 12656 IsResolver: false, 12657 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12658 return nil, errors.New("field of type String does not have child fields") 12659 }, 12660 } 12661 return fc, nil 12662 } 12663 12664 func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 12665 fc, err := ec.fieldContext___EnumValue_description(ctx, field) 12666 if err != nil { 12667 return graphql.Null 12668 } 12669 ctx = graphql.WithFieldContext(ctx, fc) 12670 defer func() { 12671 if r := recover(); r != nil { 12672 ec.Error(ctx, ec.Recover(ctx, r)) 12673 ret = graphql.Null 12674 } 12675 }() 12676 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12677 ctx = rctx // use context from middleware stack in children 12678 return obj.Description(), nil 12679 }) 12680 12681 if resTmp == nil { 12682 return graphql.Null 12683 } 12684 res := resTmp.(*string) 12685 fc.Result = res 12686 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 12687 } 12688 12689 func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12690 fc = &graphql.FieldContext{ 12691 Object: "__EnumValue", 12692 Field: field, 12693 IsMethod: true, 12694 IsResolver: false, 12695 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12696 return nil, errors.New("field of type String does not have child fields") 12697 }, 12698 } 12699 return fc, nil 12700 } 12701 12702 func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 12703 fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field) 12704 if err != nil { 12705 return graphql.Null 12706 } 12707 ctx = graphql.WithFieldContext(ctx, fc) 12708 defer func() { 12709 if r := recover(); r != nil { 12710 ec.Error(ctx, ec.Recover(ctx, r)) 12711 ret = graphql.Null 12712 } 12713 }() 12714 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12715 ctx = rctx // use context from middleware stack in children 12716 return obj.IsDeprecated(), nil 12717 }) 12718 12719 if resTmp == nil { 12720 if !graphql.HasFieldError(ctx, fc) { 12721 ec.Errorf(ctx, "must not be null") 12722 } 12723 return graphql.Null 12724 } 12725 res := resTmp.(bool) 12726 fc.Result = res 12727 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 12728 } 12729 12730 func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12731 fc = &graphql.FieldContext{ 12732 Object: "__EnumValue", 12733 Field: field, 12734 IsMethod: true, 12735 IsResolver: false, 12736 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12737 return nil, errors.New("field of type Boolean does not have child fields") 12738 }, 12739 } 12740 return fc, nil 12741 } 12742 12743 func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 12744 fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field) 12745 if err != nil { 12746 return graphql.Null 12747 } 12748 ctx = graphql.WithFieldContext(ctx, fc) 12749 defer func() { 12750 if r := recover(); r != nil { 12751 ec.Error(ctx, ec.Recover(ctx, r)) 12752 ret = graphql.Null 12753 } 12754 }() 12755 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12756 ctx = rctx // use context from middleware stack in children 12757 return obj.DeprecationReason(), nil 12758 }) 12759 12760 if resTmp == nil { 12761 return graphql.Null 12762 } 12763 res := resTmp.(*string) 12764 fc.Result = res 12765 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 12766 } 12767 12768 func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12769 fc = &graphql.FieldContext{ 12770 Object: "__EnumValue", 12771 Field: field, 12772 IsMethod: true, 12773 IsResolver: false, 12774 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12775 return nil, errors.New("field of type String does not have child fields") 12776 }, 12777 } 12778 return fc, nil 12779 } 12780 12781 func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 12782 fc, err := ec.fieldContext___Field_name(ctx, field) 12783 if err != nil { 12784 return graphql.Null 12785 } 12786 ctx = graphql.WithFieldContext(ctx, fc) 12787 defer func() { 12788 if r := recover(); r != nil { 12789 ec.Error(ctx, ec.Recover(ctx, r)) 12790 ret = graphql.Null 12791 } 12792 }() 12793 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12794 ctx = rctx // use context from middleware stack in children 12795 return obj.Name, nil 12796 }) 12797 12798 if resTmp == nil { 12799 if !graphql.HasFieldError(ctx, fc) { 12800 ec.Errorf(ctx, "must not be null") 12801 } 12802 return graphql.Null 12803 } 12804 res := resTmp.(string) 12805 fc.Result = res 12806 return ec.marshalNString2string(ctx, field.Selections, res) 12807 } 12808 12809 func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12810 fc = &graphql.FieldContext{ 12811 Object: "__Field", 12812 Field: field, 12813 IsMethod: false, 12814 IsResolver: false, 12815 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12816 return nil, errors.New("field of type String does not have child fields") 12817 }, 12818 } 12819 return fc, nil 12820 } 12821 12822 func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 12823 fc, err := ec.fieldContext___Field_description(ctx, field) 12824 if err != nil { 12825 return graphql.Null 12826 } 12827 ctx = graphql.WithFieldContext(ctx, fc) 12828 defer func() { 12829 if r := recover(); r != nil { 12830 ec.Error(ctx, ec.Recover(ctx, r)) 12831 ret = graphql.Null 12832 } 12833 }() 12834 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12835 ctx = rctx // use context from middleware stack in children 12836 return obj.Description(), nil 12837 }) 12838 12839 if resTmp == nil { 12840 return graphql.Null 12841 } 12842 res := resTmp.(*string) 12843 fc.Result = res 12844 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 12845 } 12846 12847 func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12848 fc = &graphql.FieldContext{ 12849 Object: "__Field", 12850 Field: field, 12851 IsMethod: true, 12852 IsResolver: false, 12853 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12854 return nil, errors.New("field of type String does not have child fields") 12855 }, 12856 } 12857 return fc, nil 12858 } 12859 12860 func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 12861 fc, err := ec.fieldContext___Field_args(ctx, field) 12862 if err != nil { 12863 return graphql.Null 12864 } 12865 ctx = graphql.WithFieldContext(ctx, fc) 12866 defer func() { 12867 if r := recover(); r != nil { 12868 ec.Error(ctx, ec.Recover(ctx, r)) 12869 ret = graphql.Null 12870 } 12871 }() 12872 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12873 ctx = rctx // use context from middleware stack in children 12874 return obj.Args, nil 12875 }) 12876 12877 if resTmp == nil { 12878 if !graphql.HasFieldError(ctx, fc) { 12879 ec.Errorf(ctx, "must not be null") 12880 } 12881 return graphql.Null 12882 } 12883 res := resTmp.([]introspection.InputValue) 12884 fc.Result = res 12885 return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 12886 } 12887 12888 func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12889 fc = &graphql.FieldContext{ 12890 Object: "__Field", 12891 Field: field, 12892 IsMethod: false, 12893 IsResolver: false, 12894 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12895 switch field.Name { 12896 case "name": 12897 return ec.fieldContext___InputValue_name(ctx, field) 12898 case "description": 12899 return ec.fieldContext___InputValue_description(ctx, field) 12900 case "type": 12901 return ec.fieldContext___InputValue_type(ctx, field) 12902 case "defaultValue": 12903 return ec.fieldContext___InputValue_defaultValue(ctx, field) 12904 } 12905 return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) 12906 }, 12907 } 12908 return fc, nil 12909 } 12910 12911 func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 12912 fc, err := ec.fieldContext___Field_type(ctx, field) 12913 if err != nil { 12914 return graphql.Null 12915 } 12916 ctx = graphql.WithFieldContext(ctx, fc) 12917 defer func() { 12918 if r := recover(); r != nil { 12919 ec.Error(ctx, ec.Recover(ctx, r)) 12920 ret = graphql.Null 12921 } 12922 }() 12923 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12924 ctx = rctx // use context from middleware stack in children 12925 return obj.Type, nil 12926 }) 12927 12928 if resTmp == nil { 12929 if !graphql.HasFieldError(ctx, fc) { 12930 ec.Errorf(ctx, "must not be null") 12931 } 12932 return graphql.Null 12933 } 12934 res := resTmp.(*introspection.Type) 12935 fc.Result = res 12936 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 12937 } 12938 12939 func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 12940 fc = &graphql.FieldContext{ 12941 Object: "__Field", 12942 Field: field, 12943 IsMethod: false, 12944 IsResolver: false, 12945 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 12946 switch field.Name { 12947 case "kind": 12948 return ec.fieldContext___Type_kind(ctx, field) 12949 case "name": 12950 return ec.fieldContext___Type_name(ctx, field) 12951 case "description": 12952 return ec.fieldContext___Type_description(ctx, field) 12953 case "fields": 12954 return ec.fieldContext___Type_fields(ctx, field) 12955 case "interfaces": 12956 return ec.fieldContext___Type_interfaces(ctx, field) 12957 case "possibleTypes": 12958 return ec.fieldContext___Type_possibleTypes(ctx, field) 12959 case "enumValues": 12960 return ec.fieldContext___Type_enumValues(ctx, field) 12961 case "inputFields": 12962 return ec.fieldContext___Type_inputFields(ctx, field) 12963 case "ofType": 12964 return ec.fieldContext___Type_ofType(ctx, field) 12965 case "specifiedByURL": 12966 return ec.fieldContext___Type_specifiedByURL(ctx, field) 12967 } 12968 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 12969 }, 12970 } 12971 return fc, nil 12972 } 12973 12974 func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 12975 fc, err := ec.fieldContext___Field_isDeprecated(ctx, field) 12976 if err != nil { 12977 return graphql.Null 12978 } 12979 ctx = graphql.WithFieldContext(ctx, fc) 12980 defer func() { 12981 if r := recover(); r != nil { 12982 ec.Error(ctx, ec.Recover(ctx, r)) 12983 ret = graphql.Null 12984 } 12985 }() 12986 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 12987 ctx = rctx // use context from middleware stack in children 12988 return obj.IsDeprecated(), nil 12989 }) 12990 12991 if resTmp == nil { 12992 if !graphql.HasFieldError(ctx, fc) { 12993 ec.Errorf(ctx, "must not be null") 12994 } 12995 return graphql.Null 12996 } 12997 res := resTmp.(bool) 12998 fc.Result = res 12999 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 13000 } 13001 13002 func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 13003 fc = &graphql.FieldContext{ 13004 Object: "__Field", 13005 Field: field, 13006 IsMethod: true, 13007 IsResolver: false, 13008 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 13009 return nil, errors.New("field of type Boolean does not have child fields") 13010 }, 13011 } 13012 return fc, nil 13013 } 13014 13015 func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 13016 fc, err := ec.fieldContext___Field_deprecationReason(ctx, field) 13017 if err != nil { 13018 return graphql.Null 13019 } 13020 ctx = graphql.WithFieldContext(ctx, fc) 13021 defer func() { 13022 if r := recover(); r != nil { 13023 ec.Error(ctx, ec.Recover(ctx, r)) 13024 ret = graphql.Null 13025 } 13026 }() 13027 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 13028 ctx = rctx // use context from middleware stack in children 13029 return obj.DeprecationReason(), nil 13030 }) 13031 13032 if resTmp == nil { 13033 return graphql.Null 13034 } 13035 res := resTmp.(*string) 13036 fc.Result = res 13037 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 13038 } 13039 13040 func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 13041 fc = &graphql.FieldContext{ 13042 Object: "__Field", 13043 Field: field, 13044 IsMethod: true, 13045 IsResolver: false, 13046 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 13047 return nil, errors.New("field of type String does not have child fields") 13048 }, 13049 } 13050 return fc, nil 13051 } 13052 13053 func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 13054 fc, err := ec.fieldContext___InputValue_name(ctx, field) 13055 if err != nil { 13056 return graphql.Null 13057 } 13058 ctx = graphql.WithFieldContext(ctx, fc) 13059 defer func() { 13060 if r := recover(); r != nil { 13061 ec.Error(ctx, ec.Recover(ctx, r)) 13062 ret = graphql.Null 13063 } 13064 }() 13065 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 13066 ctx = rctx // use context from middleware stack in children 13067 return obj.Name, nil 13068 }) 13069 13070 if resTmp == nil { 13071 if !graphql.HasFieldError(ctx, fc) { 13072 ec.Errorf(ctx, "must not be null") 13073 } 13074 return graphql.Null 13075 } 13076 res := resTmp.(string) 13077 fc.Result = res 13078 return ec.marshalNString2string(ctx, field.Selections, res) 13079 } 13080 13081 func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 13082 fc = &graphql.FieldContext{ 13083 Object: "__InputValue", 13084 Field: field, 13085 IsMethod: false, 13086 IsResolver: false, 13087 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 13088 return nil, errors.New("field of type String does not have child fields") 13089 }, 13090 } 13091 return fc, nil 13092 } 13093 13094 func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 13095 fc, err := ec.fieldContext___InputValue_description(ctx, field) 13096 if err != nil { 13097 return graphql.Null 13098 } 13099 ctx = graphql.WithFieldContext(ctx, fc) 13100 defer func() { 13101 if r := recover(); r != nil { 13102 ec.Error(ctx, ec.Recover(ctx, r)) 13103 ret = graphql.Null 13104 } 13105 }() 13106 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 13107 ctx = rctx // use context from middleware stack in children 13108 return obj.Description(), nil 13109 }) 13110 13111 if resTmp == nil { 13112 return graphql.Null 13113 } 13114 res := resTmp.(*string) 13115 fc.Result = res 13116 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 13117 } 13118 13119 func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 13120 fc = &graphql.FieldContext{ 13121 Object: "__InputValue", 13122 Field: field, 13123 IsMethod: true, 13124 IsResolver: false, 13125 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 13126 return nil, errors.New("field of type String does not have child fields") 13127 }, 13128 } 13129 return fc, nil 13130 } 13131 13132 func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 13133 fc, err := ec.fieldContext___InputValue_type(ctx, field) 13134 if err != nil { 13135 return graphql.Null 13136 } 13137 ctx = graphql.WithFieldContext(ctx, fc) 13138 defer func() { 13139 if r := recover(); r != nil { 13140 ec.Error(ctx, ec.Recover(ctx, r)) 13141 ret = graphql.Null 13142 } 13143 }() 13144 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 13145 ctx = rctx // use context from middleware stack in children 13146 return obj.Type, nil 13147 }) 13148 13149 if resTmp == nil { 13150 if !graphql.HasFieldError(ctx, fc) { 13151 ec.Errorf(ctx, "must not be null") 13152 } 13153 return graphql.Null 13154 } 13155 res := resTmp.(*introspection.Type) 13156 fc.Result = res 13157 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 13158 } 13159 13160 func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 13161 fc = &graphql.FieldContext{ 13162 Object: "__InputValue", 13163 Field: field, 13164 IsMethod: false, 13165 IsResolver: false, 13166 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 13167 switch field.Name { 13168 case "kind": 13169 return ec.fieldContext___Type_kind(ctx, field) 13170 case "name": 13171 return ec.fieldContext___Type_name(ctx, field) 13172 case "description": 13173 return ec.fieldContext___Type_description(ctx, field) 13174 case "fields": 13175 return ec.fieldContext___Type_fields(ctx, field) 13176 case "interfaces": 13177 return ec.fieldContext___Type_interfaces(ctx, field) 13178 case "possibleTypes": 13179 return ec.fieldContext___Type_possibleTypes(ctx, field) 13180 case "enumValues": 13181 return ec.fieldContext___Type_enumValues(ctx, field) 13182 case "inputFields": 13183 return ec.fieldContext___Type_inputFields(ctx, field) 13184 case "ofType": 13185 return ec.fieldContext___Type_ofType(ctx, field) 13186 case "specifiedByURL": 13187 return ec.fieldContext___Type_specifiedByURL(ctx, field) 13188 } 13189 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 13190 }, 13191 } 13192 return fc, nil 13193 } 13194 13195 func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 13196 fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field) 13197 if err != nil { 13198 return graphql.Null 13199 } 13200 ctx = graphql.WithFieldContext(ctx, fc) 13201 defer func() { 13202 if r := recover(); r != nil { 13203 ec.Error(ctx, ec.Recover(ctx, r)) 13204 ret = graphql.Null 13205 } 13206 }() 13207 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 13208 ctx = rctx // use context from middleware stack in children 13209 return obj.DefaultValue, nil 13210 }) 13211 13212 if resTmp == nil { 13213 return graphql.Null 13214 } 13215 res := resTmp.(*string) 13216 fc.Result = res 13217 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 13218 } 13219 13220 func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 13221 fc = &graphql.FieldContext{ 13222 Object: "__InputValue", 13223 Field: field, 13224 IsMethod: false, 13225 IsResolver: false, 13226 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 13227 return nil, errors.New("field of type String does not have child fields") 13228 }, 13229 } 13230 return fc, nil 13231 } 13232 13233 func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 13234 fc, err := ec.fieldContext___Schema_description(ctx, field) 13235 if err != nil { 13236 return graphql.Null 13237 } 13238 ctx = graphql.WithFieldContext(ctx, fc) 13239 defer func() { 13240 if r := recover(); r != nil { 13241 ec.Error(ctx, ec.Recover(ctx, r)) 13242 ret = graphql.Null 13243 } 13244 }() 13245 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 13246 ctx = rctx // use context from middleware stack in children 13247 return obj.Description(), nil 13248 }) 13249 13250 if resTmp == nil { 13251 return graphql.Null 13252 } 13253 res := resTmp.(*string) 13254 fc.Result = res 13255 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 13256 } 13257 13258 func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 13259 fc = &graphql.FieldContext{ 13260 Object: "__Schema", 13261 Field: field, 13262 IsMethod: true, 13263 IsResolver: false, 13264 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 13265 return nil, errors.New("field of type String does not have child fields") 13266 }, 13267 } 13268 return fc, nil 13269 } 13270 13271 func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 13272 fc, err := ec.fieldContext___Schema_types(ctx, field) 13273 if err != nil { 13274 return graphql.Null 13275 } 13276 ctx = graphql.WithFieldContext(ctx, fc) 13277 defer func() { 13278 if r := recover(); r != nil { 13279 ec.Error(ctx, ec.Recover(ctx, r)) 13280 ret = graphql.Null 13281 } 13282 }() 13283 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 13284 ctx = rctx // use context from middleware stack in children 13285 return obj.Types(), nil 13286 }) 13287 13288 if resTmp == nil { 13289 if !graphql.HasFieldError(ctx, fc) { 13290 ec.Errorf(ctx, "must not be null") 13291 } 13292 return graphql.Null 13293 } 13294 res := resTmp.([]introspection.Type) 13295 fc.Result = res 13296 return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 13297 } 13298 13299 func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 13300 fc = &graphql.FieldContext{ 13301 Object: "__Schema", 13302 Field: field, 13303 IsMethod: true, 13304 IsResolver: false, 13305 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 13306 switch field.Name { 13307 case "kind": 13308 return ec.fieldContext___Type_kind(ctx, field) 13309 case "name": 13310 return ec.fieldContext___Type_name(ctx, field) 13311 case "description": 13312 return ec.fieldContext___Type_description(ctx, field) 13313 case "fields": 13314 return ec.fieldContext___Type_fields(ctx, field) 13315 case "interfaces": 13316 return ec.fieldContext___Type_interfaces(ctx, field) 13317 case "possibleTypes": 13318 return ec.fieldContext___Type_possibleTypes(ctx, field) 13319 case "enumValues": 13320 return ec.fieldContext___Type_enumValues(ctx, field) 13321 case "inputFields": 13322 return ec.fieldContext___Type_inputFields(ctx, field) 13323 case "ofType": 13324 return ec.fieldContext___Type_ofType(ctx, field) 13325 case "specifiedByURL": 13326 return ec.fieldContext___Type_specifiedByURL(ctx, field) 13327 } 13328 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 13329 }, 13330 } 13331 return fc, nil 13332 } 13333 13334 func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 13335 fc, err := ec.fieldContext___Schema_queryType(ctx, field) 13336 if err != nil { 13337 return graphql.Null 13338 } 13339 ctx = graphql.WithFieldContext(ctx, fc) 13340 defer func() { 13341 if r := recover(); r != nil { 13342 ec.Error(ctx, ec.Recover(ctx, r)) 13343 ret = graphql.Null 13344 } 13345 }() 13346 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 13347 ctx = rctx // use context from middleware stack in children 13348 return obj.QueryType(), nil 13349 }) 13350 13351 if resTmp == nil { 13352 if !graphql.HasFieldError(ctx, fc) { 13353 ec.Errorf(ctx, "must not be null") 13354 } 13355 return graphql.Null 13356 } 13357 res := resTmp.(*introspection.Type) 13358 fc.Result = res 13359 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 13360 } 13361 13362 func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 13363 fc = &graphql.FieldContext{ 13364 Object: "__Schema", 13365 Field: field, 13366 IsMethod: true, 13367 IsResolver: false, 13368 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 13369 switch field.Name { 13370 case "kind": 13371 return ec.fieldContext___Type_kind(ctx, field) 13372 case "name": 13373 return ec.fieldContext___Type_name(ctx, field) 13374 case "description": 13375 return ec.fieldContext___Type_description(ctx, field) 13376 case "fields": 13377 return ec.fieldContext___Type_fields(ctx, field) 13378 case "interfaces": 13379 return ec.fieldContext___Type_interfaces(ctx, field) 13380 case "possibleTypes": 13381 return ec.fieldContext___Type_possibleTypes(ctx, field) 13382 case "enumValues": 13383 return ec.fieldContext___Type_enumValues(ctx, field) 13384 case "inputFields": 13385 return ec.fieldContext___Type_inputFields(ctx, field) 13386 case "ofType": 13387 return ec.fieldContext___Type_ofType(ctx, field) 13388 case "specifiedByURL": 13389 return ec.fieldContext___Type_specifiedByURL(ctx, field) 13390 } 13391 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 13392 }, 13393 } 13394 return fc, nil 13395 } 13396 13397 func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 13398 fc, err := ec.fieldContext___Schema_mutationType(ctx, field) 13399 if err != nil { 13400 return graphql.Null 13401 } 13402 ctx = graphql.WithFieldContext(ctx, fc) 13403 defer func() { 13404 if r := recover(); r != nil { 13405 ec.Error(ctx, ec.Recover(ctx, r)) 13406 ret = graphql.Null 13407 } 13408 }() 13409 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 13410 ctx = rctx // use context from middleware stack in children 13411 return obj.MutationType(), nil 13412 }) 13413 13414 if resTmp == nil { 13415 return graphql.Null 13416 } 13417 res := resTmp.(*introspection.Type) 13418 fc.Result = res 13419 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 13420 } 13421 13422 func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 13423 fc = &graphql.FieldContext{ 13424 Object: "__Schema", 13425 Field: field, 13426 IsMethod: true, 13427 IsResolver: false, 13428 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 13429 switch field.Name { 13430 case "kind": 13431 return ec.fieldContext___Type_kind(ctx, field) 13432 case "name": 13433 return ec.fieldContext___Type_name(ctx, field) 13434 case "description": 13435 return ec.fieldContext___Type_description(ctx, field) 13436 case "fields": 13437 return ec.fieldContext___Type_fields(ctx, field) 13438 case "interfaces": 13439 return ec.fieldContext___Type_interfaces(ctx, field) 13440 case "possibleTypes": 13441 return ec.fieldContext___Type_possibleTypes(ctx, field) 13442 case "enumValues": 13443 return ec.fieldContext___Type_enumValues(ctx, field) 13444 case "inputFields": 13445 return ec.fieldContext___Type_inputFields(ctx, field) 13446 case "ofType": 13447 return ec.fieldContext___Type_ofType(ctx, field) 13448 case "specifiedByURL": 13449 return ec.fieldContext___Type_specifiedByURL(ctx, field) 13450 } 13451 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 13452 }, 13453 } 13454 return fc, nil 13455 } 13456 13457 func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 13458 fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field) 13459 if err != nil { 13460 return graphql.Null 13461 } 13462 ctx = graphql.WithFieldContext(ctx, fc) 13463 defer func() { 13464 if r := recover(); r != nil { 13465 ec.Error(ctx, ec.Recover(ctx, r)) 13466 ret = graphql.Null 13467 } 13468 }() 13469 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 13470 ctx = rctx // use context from middleware stack in children 13471 return obj.SubscriptionType(), nil 13472 }) 13473 13474 if resTmp == nil { 13475 return graphql.Null 13476 } 13477 res := resTmp.(*introspection.Type) 13478 fc.Result = res 13479 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 13480 } 13481 13482 func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 13483 fc = &graphql.FieldContext{ 13484 Object: "__Schema", 13485 Field: field, 13486 IsMethod: true, 13487 IsResolver: false, 13488 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 13489 switch field.Name { 13490 case "kind": 13491 return ec.fieldContext___Type_kind(ctx, field) 13492 case "name": 13493 return ec.fieldContext___Type_name(ctx, field) 13494 case "description": 13495 return ec.fieldContext___Type_description(ctx, field) 13496 case "fields": 13497 return ec.fieldContext___Type_fields(ctx, field) 13498 case "interfaces": 13499 return ec.fieldContext___Type_interfaces(ctx, field) 13500 case "possibleTypes": 13501 return ec.fieldContext___Type_possibleTypes(ctx, field) 13502 case "enumValues": 13503 return ec.fieldContext___Type_enumValues(ctx, field) 13504 case "inputFields": 13505 return ec.fieldContext___Type_inputFields(ctx, field) 13506 case "ofType": 13507 return ec.fieldContext___Type_ofType(ctx, field) 13508 case "specifiedByURL": 13509 return ec.fieldContext___Type_specifiedByURL(ctx, field) 13510 } 13511 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 13512 }, 13513 } 13514 return fc, nil 13515 } 13516 13517 func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 13518 fc, err := ec.fieldContext___Schema_directives(ctx, field) 13519 if err != nil { 13520 return graphql.Null 13521 } 13522 ctx = graphql.WithFieldContext(ctx, fc) 13523 defer func() { 13524 if r := recover(); r != nil { 13525 ec.Error(ctx, ec.Recover(ctx, r)) 13526 ret = graphql.Null 13527 } 13528 }() 13529 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 13530 ctx = rctx // use context from middleware stack in children 13531 return obj.Directives(), nil 13532 }) 13533 13534 if resTmp == nil { 13535 if !graphql.HasFieldError(ctx, fc) { 13536 ec.Errorf(ctx, "must not be null") 13537 } 13538 return graphql.Null 13539 } 13540 res := resTmp.([]introspection.Directive) 13541 fc.Result = res 13542 return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) 13543 } 13544 13545 func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 13546 fc = &graphql.FieldContext{ 13547 Object: "__Schema", 13548 Field: field, 13549 IsMethod: true, 13550 IsResolver: false, 13551 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 13552 switch field.Name { 13553 case "name": 13554 return ec.fieldContext___Directive_name(ctx, field) 13555 case "description": 13556 return ec.fieldContext___Directive_description(ctx, field) 13557 case "locations": 13558 return ec.fieldContext___Directive_locations(ctx, field) 13559 case "args": 13560 return ec.fieldContext___Directive_args(ctx, field) 13561 case "isRepeatable": 13562 return ec.fieldContext___Directive_isRepeatable(ctx, field) 13563 } 13564 return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name) 13565 }, 13566 } 13567 return fc, nil 13568 } 13569 13570 func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 13571 fc, err := ec.fieldContext___Type_kind(ctx, field) 13572 if err != nil { 13573 return graphql.Null 13574 } 13575 ctx = graphql.WithFieldContext(ctx, fc) 13576 defer func() { 13577 if r := recover(); r != nil { 13578 ec.Error(ctx, ec.Recover(ctx, r)) 13579 ret = graphql.Null 13580 } 13581 }() 13582 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 13583 ctx = rctx // use context from middleware stack in children 13584 return obj.Kind(), nil 13585 }) 13586 13587 if resTmp == nil { 13588 if !graphql.HasFieldError(ctx, fc) { 13589 ec.Errorf(ctx, "must not be null") 13590 } 13591 return graphql.Null 13592 } 13593 res := resTmp.(string) 13594 fc.Result = res 13595 return ec.marshalN__TypeKind2string(ctx, field.Selections, res) 13596 } 13597 13598 func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 13599 fc = &graphql.FieldContext{ 13600 Object: "__Type", 13601 Field: field, 13602 IsMethod: true, 13603 IsResolver: false, 13604 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 13605 return nil, errors.New("field of type __TypeKind does not have child fields") 13606 }, 13607 } 13608 return fc, nil 13609 } 13610 13611 func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 13612 fc, err := ec.fieldContext___Type_name(ctx, field) 13613 if err != nil { 13614 return graphql.Null 13615 } 13616 ctx = graphql.WithFieldContext(ctx, fc) 13617 defer func() { 13618 if r := recover(); r != nil { 13619 ec.Error(ctx, ec.Recover(ctx, r)) 13620 ret = graphql.Null 13621 } 13622 }() 13623 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 13624 ctx = rctx // use context from middleware stack in children 13625 return obj.Name(), nil 13626 }) 13627 13628 if resTmp == nil { 13629 return graphql.Null 13630 } 13631 res := resTmp.(*string) 13632 fc.Result = res 13633 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 13634 } 13635 13636 func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 13637 fc = &graphql.FieldContext{ 13638 Object: "__Type", 13639 Field: field, 13640 IsMethod: true, 13641 IsResolver: false, 13642 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 13643 return nil, errors.New("field of type String does not have child fields") 13644 }, 13645 } 13646 return fc, nil 13647 } 13648 13649 func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 13650 fc, err := ec.fieldContext___Type_description(ctx, field) 13651 if err != nil { 13652 return graphql.Null 13653 } 13654 ctx = graphql.WithFieldContext(ctx, fc) 13655 defer func() { 13656 if r := recover(); r != nil { 13657 ec.Error(ctx, ec.Recover(ctx, r)) 13658 ret = graphql.Null 13659 } 13660 }() 13661 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 13662 ctx = rctx // use context from middleware stack in children 13663 return obj.Description(), nil 13664 }) 13665 13666 if resTmp == nil { 13667 return graphql.Null 13668 } 13669 res := resTmp.(*string) 13670 fc.Result = res 13671 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 13672 } 13673 13674 func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 13675 fc = &graphql.FieldContext{ 13676 Object: "__Type", 13677 Field: field, 13678 IsMethod: true, 13679 IsResolver: false, 13680 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 13681 return nil, errors.New("field of type String does not have child fields") 13682 }, 13683 } 13684 return fc, nil 13685 } 13686 13687 func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 13688 fc, err := ec.fieldContext___Type_fields(ctx, field) 13689 if err != nil { 13690 return graphql.Null 13691 } 13692 ctx = graphql.WithFieldContext(ctx, fc) 13693 defer func() { 13694 if r := recover(); r != nil { 13695 ec.Error(ctx, ec.Recover(ctx, r)) 13696 ret = graphql.Null 13697 } 13698 }() 13699 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 13700 ctx = rctx // use context from middleware stack in children 13701 return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil 13702 }) 13703 13704 if resTmp == nil { 13705 return graphql.Null 13706 } 13707 res := resTmp.([]introspection.Field) 13708 fc.Result = res 13709 return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) 13710 } 13711 13712 func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 13713 fc = &graphql.FieldContext{ 13714 Object: "__Type", 13715 Field: field, 13716 IsMethod: true, 13717 IsResolver: false, 13718 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 13719 switch field.Name { 13720 case "name": 13721 return ec.fieldContext___Field_name(ctx, field) 13722 case "description": 13723 return ec.fieldContext___Field_description(ctx, field) 13724 case "args": 13725 return ec.fieldContext___Field_args(ctx, field) 13726 case "type": 13727 return ec.fieldContext___Field_type(ctx, field) 13728 case "isDeprecated": 13729 return ec.fieldContext___Field_isDeprecated(ctx, field) 13730 case "deprecationReason": 13731 return ec.fieldContext___Field_deprecationReason(ctx, field) 13732 } 13733 return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name) 13734 }, 13735 } 13736 defer func() { 13737 if r := recover(); r != nil { 13738 err = ec.Recover(ctx, r) 13739 ec.Error(ctx, err) 13740 } 13741 }() 13742 ctx = graphql.WithFieldContext(ctx, fc) 13743 if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 13744 ec.Error(ctx, err) 13745 return 13746 } 13747 return fc, nil 13748 } 13749 13750 func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 13751 fc, err := ec.fieldContext___Type_interfaces(ctx, field) 13752 if err != nil { 13753 return graphql.Null 13754 } 13755 ctx = graphql.WithFieldContext(ctx, fc) 13756 defer func() { 13757 if r := recover(); r != nil { 13758 ec.Error(ctx, ec.Recover(ctx, r)) 13759 ret = graphql.Null 13760 } 13761 }() 13762 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 13763 ctx = rctx // use context from middleware stack in children 13764 return obj.Interfaces(), nil 13765 }) 13766 13767 if resTmp == nil { 13768 return graphql.Null 13769 } 13770 res := resTmp.([]introspection.Type) 13771 fc.Result = res 13772 return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 13773 } 13774 13775 func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 13776 fc = &graphql.FieldContext{ 13777 Object: "__Type", 13778 Field: field, 13779 IsMethod: true, 13780 IsResolver: false, 13781 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 13782 switch field.Name { 13783 case "kind": 13784 return ec.fieldContext___Type_kind(ctx, field) 13785 case "name": 13786 return ec.fieldContext___Type_name(ctx, field) 13787 case "description": 13788 return ec.fieldContext___Type_description(ctx, field) 13789 case "fields": 13790 return ec.fieldContext___Type_fields(ctx, field) 13791 case "interfaces": 13792 return ec.fieldContext___Type_interfaces(ctx, field) 13793 case "possibleTypes": 13794 return ec.fieldContext___Type_possibleTypes(ctx, field) 13795 case "enumValues": 13796 return ec.fieldContext___Type_enumValues(ctx, field) 13797 case "inputFields": 13798 return ec.fieldContext___Type_inputFields(ctx, field) 13799 case "ofType": 13800 return ec.fieldContext___Type_ofType(ctx, field) 13801 case "specifiedByURL": 13802 return ec.fieldContext___Type_specifiedByURL(ctx, field) 13803 } 13804 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 13805 }, 13806 } 13807 return fc, nil 13808 } 13809 13810 func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 13811 fc, err := ec.fieldContext___Type_possibleTypes(ctx, field) 13812 if err != nil { 13813 return graphql.Null 13814 } 13815 ctx = graphql.WithFieldContext(ctx, fc) 13816 defer func() { 13817 if r := recover(); r != nil { 13818 ec.Error(ctx, ec.Recover(ctx, r)) 13819 ret = graphql.Null 13820 } 13821 }() 13822 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 13823 ctx = rctx // use context from middleware stack in children 13824 return obj.PossibleTypes(), nil 13825 }) 13826 13827 if resTmp == nil { 13828 return graphql.Null 13829 } 13830 res := resTmp.([]introspection.Type) 13831 fc.Result = res 13832 return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 13833 } 13834 13835 func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 13836 fc = &graphql.FieldContext{ 13837 Object: "__Type", 13838 Field: field, 13839 IsMethod: true, 13840 IsResolver: false, 13841 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 13842 switch field.Name { 13843 case "kind": 13844 return ec.fieldContext___Type_kind(ctx, field) 13845 case "name": 13846 return ec.fieldContext___Type_name(ctx, field) 13847 case "description": 13848 return ec.fieldContext___Type_description(ctx, field) 13849 case "fields": 13850 return ec.fieldContext___Type_fields(ctx, field) 13851 case "interfaces": 13852 return ec.fieldContext___Type_interfaces(ctx, field) 13853 case "possibleTypes": 13854 return ec.fieldContext___Type_possibleTypes(ctx, field) 13855 case "enumValues": 13856 return ec.fieldContext___Type_enumValues(ctx, field) 13857 case "inputFields": 13858 return ec.fieldContext___Type_inputFields(ctx, field) 13859 case "ofType": 13860 return ec.fieldContext___Type_ofType(ctx, field) 13861 case "specifiedByURL": 13862 return ec.fieldContext___Type_specifiedByURL(ctx, field) 13863 } 13864 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 13865 }, 13866 } 13867 return fc, nil 13868 } 13869 13870 func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 13871 fc, err := ec.fieldContext___Type_enumValues(ctx, field) 13872 if err != nil { 13873 return graphql.Null 13874 } 13875 ctx = graphql.WithFieldContext(ctx, fc) 13876 defer func() { 13877 if r := recover(); r != nil { 13878 ec.Error(ctx, ec.Recover(ctx, r)) 13879 ret = graphql.Null 13880 } 13881 }() 13882 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 13883 ctx = rctx // use context from middleware stack in children 13884 return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil 13885 }) 13886 13887 if resTmp == nil { 13888 return graphql.Null 13889 } 13890 res := resTmp.([]introspection.EnumValue) 13891 fc.Result = res 13892 return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) 13893 } 13894 13895 func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 13896 fc = &graphql.FieldContext{ 13897 Object: "__Type", 13898 Field: field, 13899 IsMethod: true, 13900 IsResolver: false, 13901 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 13902 switch field.Name { 13903 case "name": 13904 return ec.fieldContext___EnumValue_name(ctx, field) 13905 case "description": 13906 return ec.fieldContext___EnumValue_description(ctx, field) 13907 case "isDeprecated": 13908 return ec.fieldContext___EnumValue_isDeprecated(ctx, field) 13909 case "deprecationReason": 13910 return ec.fieldContext___EnumValue_deprecationReason(ctx, field) 13911 } 13912 return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name) 13913 }, 13914 } 13915 defer func() { 13916 if r := recover(); r != nil { 13917 err = ec.Recover(ctx, r) 13918 ec.Error(ctx, err) 13919 } 13920 }() 13921 ctx = graphql.WithFieldContext(ctx, fc) 13922 if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 13923 ec.Error(ctx, err) 13924 return 13925 } 13926 return fc, nil 13927 } 13928 13929 func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 13930 fc, err := ec.fieldContext___Type_inputFields(ctx, field) 13931 if err != nil { 13932 return graphql.Null 13933 } 13934 ctx = graphql.WithFieldContext(ctx, fc) 13935 defer func() { 13936 if r := recover(); r != nil { 13937 ec.Error(ctx, ec.Recover(ctx, r)) 13938 ret = graphql.Null 13939 } 13940 }() 13941 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 13942 ctx = rctx // use context from middleware stack in children 13943 return obj.InputFields(), nil 13944 }) 13945 13946 if resTmp == nil { 13947 return graphql.Null 13948 } 13949 res := resTmp.([]introspection.InputValue) 13950 fc.Result = res 13951 return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 13952 } 13953 13954 func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 13955 fc = &graphql.FieldContext{ 13956 Object: "__Type", 13957 Field: field, 13958 IsMethod: true, 13959 IsResolver: false, 13960 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 13961 switch field.Name { 13962 case "name": 13963 return ec.fieldContext___InputValue_name(ctx, field) 13964 case "description": 13965 return ec.fieldContext___InputValue_description(ctx, field) 13966 case "type": 13967 return ec.fieldContext___InputValue_type(ctx, field) 13968 case "defaultValue": 13969 return ec.fieldContext___InputValue_defaultValue(ctx, field) 13970 } 13971 return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) 13972 }, 13973 } 13974 return fc, nil 13975 } 13976 13977 func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 13978 fc, err := ec.fieldContext___Type_ofType(ctx, field) 13979 if err != nil { 13980 return graphql.Null 13981 } 13982 ctx = graphql.WithFieldContext(ctx, fc) 13983 defer func() { 13984 if r := recover(); r != nil { 13985 ec.Error(ctx, ec.Recover(ctx, r)) 13986 ret = graphql.Null 13987 } 13988 }() 13989 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 13990 ctx = rctx // use context from middleware stack in children 13991 return obj.OfType(), nil 13992 }) 13993 13994 if resTmp == nil { 13995 return graphql.Null 13996 } 13997 res := resTmp.(*introspection.Type) 13998 fc.Result = res 13999 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 14000 } 14001 14002 func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 14003 fc = &graphql.FieldContext{ 14004 Object: "__Type", 14005 Field: field, 14006 IsMethod: true, 14007 IsResolver: false, 14008 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 14009 switch field.Name { 14010 case "kind": 14011 return ec.fieldContext___Type_kind(ctx, field) 14012 case "name": 14013 return ec.fieldContext___Type_name(ctx, field) 14014 case "description": 14015 return ec.fieldContext___Type_description(ctx, field) 14016 case "fields": 14017 return ec.fieldContext___Type_fields(ctx, field) 14018 case "interfaces": 14019 return ec.fieldContext___Type_interfaces(ctx, field) 14020 case "possibleTypes": 14021 return ec.fieldContext___Type_possibleTypes(ctx, field) 14022 case "enumValues": 14023 return ec.fieldContext___Type_enumValues(ctx, field) 14024 case "inputFields": 14025 return ec.fieldContext___Type_inputFields(ctx, field) 14026 case "ofType": 14027 return ec.fieldContext___Type_ofType(ctx, field) 14028 case "specifiedByURL": 14029 return ec.fieldContext___Type_specifiedByURL(ctx, field) 14030 } 14031 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 14032 }, 14033 } 14034 return fc, nil 14035 } 14036 14037 func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 14038 fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field) 14039 if err != nil { 14040 return graphql.Null 14041 } 14042 ctx = graphql.WithFieldContext(ctx, fc) 14043 defer func() { 14044 if r := recover(); r != nil { 14045 ec.Error(ctx, ec.Recover(ctx, r)) 14046 ret = graphql.Null 14047 } 14048 }() 14049 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 14050 ctx = rctx // use context from middleware stack in children 14051 return obj.SpecifiedByURL(), nil 14052 }) 14053 14054 if resTmp == nil { 14055 return graphql.Null 14056 } 14057 res := resTmp.(*string) 14058 fc.Result = res 14059 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 14060 } 14061 14062 func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 14063 fc = &graphql.FieldContext{ 14064 Object: "__Type", 14065 Field: field, 14066 IsMethod: true, 14067 IsResolver: false, 14068 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 14069 return nil, errors.New("field of type String does not have child fields") 14070 }, 14071 } 14072 return fc, nil 14073 } 14074 14075 func (ec *executionContext) _asdfIt_id(ctx context.Context, field graphql.CollectedField, obj *AsdfIt) (ret graphql.Marshaler) { 14076 fc, err := ec.fieldContext_asdfIt_id(ctx, field) 14077 if err != nil { 14078 return graphql.Null 14079 } 14080 ctx = graphql.WithFieldContext(ctx, fc) 14081 defer func() { 14082 if r := recover(); r != nil { 14083 ec.Error(ctx, ec.Recover(ctx, r)) 14084 ret = graphql.Null 14085 } 14086 }() 14087 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 14088 ctx = rctx // use context from middleware stack in children 14089 return obj.ID, nil 14090 }) 14091 14092 if resTmp == nil { 14093 if !graphql.HasFieldError(ctx, fc) { 14094 ec.Errorf(ctx, "must not be null") 14095 } 14096 return graphql.Null 14097 } 14098 res := resTmp.(string) 14099 fc.Result = res 14100 return ec.marshalNID2string(ctx, field.Selections, res) 14101 } 14102 14103 func (ec *executionContext) fieldContext_asdfIt_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 14104 fc = &graphql.FieldContext{ 14105 Object: "asdfIt", 14106 Field: field, 14107 IsMethod: false, 14108 IsResolver: false, 14109 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 14110 return nil, errors.New("field of type ID does not have child fields") 14111 }, 14112 } 14113 return fc, nil 14114 } 14115 14116 func (ec *executionContext) _iIt_id(ctx context.Context, field graphql.CollectedField, obj *IIt) (ret graphql.Marshaler) { 14117 fc, err := ec.fieldContext_iIt_id(ctx, field) 14118 if err != nil { 14119 return graphql.Null 14120 } 14121 ctx = graphql.WithFieldContext(ctx, fc) 14122 defer func() { 14123 if r := recover(); r != nil { 14124 ec.Error(ctx, ec.Recover(ctx, r)) 14125 ret = graphql.Null 14126 } 14127 }() 14128 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 14129 ctx = rctx // use context from middleware stack in children 14130 return obj.ID, nil 14131 }) 14132 14133 if resTmp == nil { 14134 if !graphql.HasFieldError(ctx, fc) { 14135 ec.Errorf(ctx, "must not be null") 14136 } 14137 return graphql.Null 14138 } 14139 res := resTmp.(string) 14140 fc.Result = res 14141 return ec.marshalNID2string(ctx, field.Selections, res) 14142 } 14143 14144 func (ec *executionContext) fieldContext_iIt_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 14145 fc = &graphql.FieldContext{ 14146 Object: "iIt", 14147 Field: field, 14148 IsMethod: false, 14149 IsResolver: false, 14150 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 14151 return nil, errors.New("field of type ID does not have child fields") 14152 }, 14153 } 14154 return fc, nil 14155 } 14156 14157 // endregion **************************** field.gotpl ***************************** 14158 14159 // region **************************** input.gotpl ***************************** 14160 14161 func (ec *executionContext) unmarshalInputDefaultInput(ctx context.Context, obj interface{}) (DefaultInput, error) { 14162 var it DefaultInput 14163 asMap := map[string]interface{}{} 14164 for k, v := range obj.(map[string]interface{}) { 14165 asMap[k] = v 14166 } 14167 14168 if _, present := asMap["falsyBoolean"]; !present { 14169 asMap["falsyBoolean"] = false 14170 } 14171 if _, present := asMap["truthyBoolean"]; !present { 14172 asMap["truthyBoolean"] = true 14173 } 14174 14175 fieldsInOrder := [...]string{"falsyBoolean", "truthyBoolean"} 14176 for _, k := range fieldsInOrder { 14177 v, ok := asMap[k] 14178 if !ok { 14179 continue 14180 } 14181 switch k { 14182 case "falsyBoolean": 14183 var err error 14184 14185 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("falsyBoolean")) 14186 it.FalsyBoolean, err = ec.unmarshalOBoolean2ᚖbool(ctx, v) 14187 if err != nil { 14188 return it, err 14189 } 14190 case "truthyBoolean": 14191 var err error 14192 14193 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("truthyBoolean")) 14194 it.TruthyBoolean, err = ec.unmarshalOBoolean2ᚖbool(ctx, v) 14195 if err != nil { 14196 return it, err 14197 } 14198 } 14199 } 14200 14201 return it, nil 14202 } 14203 14204 func (ec *executionContext) unmarshalInputFieldsOrderInput(ctx context.Context, obj interface{}) (FieldsOrderInput, error) { 14205 var it FieldsOrderInput 14206 asMap := map[string]interface{}{} 14207 for k, v := range obj.(map[string]interface{}) { 14208 asMap[k] = v 14209 } 14210 14211 fieldsInOrder := [...]string{"firstField", "overrideFirstField"} 14212 for _, k := range fieldsInOrder { 14213 v, ok := asMap[k] 14214 if !ok { 14215 continue 14216 } 14217 switch k { 14218 case "firstField": 14219 var err error 14220 14221 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("firstField")) 14222 it.FirstField, err = ec.unmarshalOString2ᚖstring(ctx, v) 14223 if err != nil { 14224 return it, err 14225 } 14226 case "overrideFirstField": 14227 var err error 14228 14229 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("overrideFirstField")) 14230 data, err := ec.unmarshalOString2ᚖstring(ctx, v) 14231 if err != nil { 14232 return it, err 14233 } 14234 if err = ec.resolvers.FieldsOrderInput().OverrideFirstField(ctx, &it, data); err != nil { 14235 return it, err 14236 } 14237 } 14238 } 14239 14240 return it, nil 14241 } 14242 14243 func (ec *executionContext) unmarshalInputInnerDirectives(ctx context.Context, obj interface{}) (InnerDirectives, error) { 14244 var it InnerDirectives 14245 asMap := map[string]interface{}{} 14246 for k, v := range obj.(map[string]interface{}) { 14247 asMap[k] = v 14248 } 14249 14250 fieldsInOrder := [...]string{"message"} 14251 for _, k := range fieldsInOrder { 14252 v, ok := asMap[k] 14253 if !ok { 14254 continue 14255 } 14256 switch k { 14257 case "message": 14258 var err error 14259 14260 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("message")) 14261 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalNString2string(ctx, v) } 14262 directive1 := func(ctx context.Context) (interface{}, error) { 14263 min, err := ec.unmarshalNInt2int(ctx, 1) 14264 if err != nil { 14265 return nil, err 14266 } 14267 message, err := ec.unmarshalOString2ᚖstring(ctx, "not valid") 14268 if err != nil { 14269 return nil, err 14270 } 14271 if ec.directives.Length == nil { 14272 return nil, errors.New("directive length is not implemented") 14273 } 14274 return ec.directives.Length(ctx, obj, directive0, min, nil, message) 14275 } 14276 14277 tmp, err := directive1(ctx) 14278 if err != nil { 14279 return it, graphql.ErrorOnPath(ctx, err) 14280 } 14281 if data, ok := tmp.(string); ok { 14282 it.Message = data 14283 } else { 14284 err := fmt.Errorf(`unexpected type %T from directive, should be string`, tmp) 14285 return it, graphql.ErrorOnPath(ctx, err) 14286 } 14287 } 14288 } 14289 14290 return it, nil 14291 } 14292 14293 func (ec *executionContext) unmarshalInputInnerInput(ctx context.Context, obj interface{}) (InnerInput, error) { 14294 var it InnerInput 14295 asMap := map[string]interface{}{} 14296 for k, v := range obj.(map[string]interface{}) { 14297 asMap[k] = v 14298 } 14299 14300 fieldsInOrder := [...]string{"id"} 14301 for _, k := range fieldsInOrder { 14302 v, ok := asMap[k] 14303 if !ok { 14304 continue 14305 } 14306 switch k { 14307 case "id": 14308 var err error 14309 14310 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) 14311 it.ID, err = ec.unmarshalNInt2int(ctx, v) 14312 if err != nil { 14313 return it, err 14314 } 14315 } 14316 } 14317 14318 return it, nil 14319 } 14320 14321 func (ec *executionContext) unmarshalInputInputDirectives(ctx context.Context, obj interface{}) (InputDirectives, error) { 14322 var it InputDirectives 14323 asMap := map[string]interface{}{} 14324 for k, v := range obj.(map[string]interface{}) { 14325 asMap[k] = v 14326 } 14327 14328 fieldsInOrder := [...]string{"text", "nullableText", "inner", "innerNullable", "thirdParty"} 14329 for _, k := range fieldsInOrder { 14330 v, ok := asMap[k] 14331 if !ok { 14332 continue 14333 } 14334 switch k { 14335 case "text": 14336 var err error 14337 14338 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text")) 14339 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalNString2string(ctx, v) } 14340 directive1 := func(ctx context.Context) (interface{}, error) { 14341 if ec.directives.Directive3 == nil { 14342 return nil, errors.New("directive directive3 is not implemented") 14343 } 14344 return ec.directives.Directive3(ctx, obj, directive0) 14345 } 14346 directive2 := func(ctx context.Context) (interface{}, error) { 14347 min, err := ec.unmarshalNInt2int(ctx, 0) 14348 if err != nil { 14349 return nil, err 14350 } 14351 max, err := ec.unmarshalOInt2ᚖint(ctx, 7) 14352 if err != nil { 14353 return nil, err 14354 } 14355 message, err := ec.unmarshalOString2ᚖstring(ctx, "not valid") 14356 if err != nil { 14357 return nil, err 14358 } 14359 if ec.directives.Length == nil { 14360 return nil, errors.New("directive length is not implemented") 14361 } 14362 return ec.directives.Length(ctx, obj, directive1, min, max, message) 14363 } 14364 14365 tmp, err := directive2(ctx) 14366 if err != nil { 14367 return it, graphql.ErrorOnPath(ctx, err) 14368 } 14369 if data, ok := tmp.(string); ok { 14370 it.Text = data 14371 } else { 14372 err := fmt.Errorf(`unexpected type %T from directive, should be string`, tmp) 14373 return it, graphql.ErrorOnPath(ctx, err) 14374 } 14375 case "nullableText": 14376 var err error 14377 14378 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nullableText")) 14379 directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOString2ᚖstring(ctx, v) } 14380 directive1 := func(ctx context.Context) (interface{}, error) { 14381 if ec.directives.Directive3 == nil { 14382 return nil, errors.New("directive directive3 is not implemented") 14383 } 14384 return ec.directives.Directive3(ctx, obj, directive0) 14385 } 14386 directive2 := func(ctx context.Context) (interface{}, error) { 14387 if ec.directives.ToNull == nil { 14388 return nil, errors.New("directive toNull is not implemented") 14389 } 14390 return ec.directives.ToNull(ctx, obj, directive1) 14391 } 14392 14393 tmp, err := directive2(ctx) 14394 if err != nil { 14395 return it, graphql.ErrorOnPath(ctx, err) 14396 } 14397 if data, ok := tmp.(*string); ok { 14398 it.NullableText = data 14399 } else if tmp == nil { 14400 it.NullableText = nil 14401 } else { 14402 err := fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp) 14403 return it, graphql.ErrorOnPath(ctx, err) 14404 } 14405 case "inner": 14406 var err error 14407 14408 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("inner")) 14409 directive0 := func(ctx context.Context) (interface{}, error) { 14410 return ec.unmarshalNInnerDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInnerDirectives(ctx, v) 14411 } 14412 directive1 := func(ctx context.Context) (interface{}, error) { 14413 if ec.directives.Directive3 == nil { 14414 return nil, errors.New("directive directive3 is not implemented") 14415 } 14416 return ec.directives.Directive3(ctx, obj, directive0) 14417 } 14418 14419 tmp, err := directive1(ctx) 14420 if err != nil { 14421 return it, graphql.ErrorOnPath(ctx, err) 14422 } 14423 if data, ok := tmp.(*InnerDirectives); ok { 14424 it.Inner = data 14425 } else if tmp == nil { 14426 it.Inner = nil 14427 } else { 14428 err := fmt.Errorf(`unexpected type %T from directive, should be *github.com/spread-ai/gqlgen/codegen/testserver/singlefile.InnerDirectives`, tmp) 14429 return it, graphql.ErrorOnPath(ctx, err) 14430 } 14431 case "innerNullable": 14432 var err error 14433 14434 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("innerNullable")) 14435 directive0 := func(ctx context.Context) (interface{}, error) { 14436 return ec.unmarshalOInnerDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInnerDirectives(ctx, v) 14437 } 14438 directive1 := func(ctx context.Context) (interface{}, error) { 14439 if ec.directives.Directive3 == nil { 14440 return nil, errors.New("directive directive3 is not implemented") 14441 } 14442 return ec.directives.Directive3(ctx, obj, directive0) 14443 } 14444 14445 tmp, err := directive1(ctx) 14446 if err != nil { 14447 return it, graphql.ErrorOnPath(ctx, err) 14448 } 14449 if data, ok := tmp.(*InnerDirectives); ok { 14450 it.InnerNullable = data 14451 } else if tmp == nil { 14452 it.InnerNullable = nil 14453 } else { 14454 err := fmt.Errorf(`unexpected type %T from directive, should be *github.com/spread-ai/gqlgen/codegen/testserver/singlefile.InnerDirectives`, tmp) 14455 return it, graphql.ErrorOnPath(ctx, err) 14456 } 14457 case "thirdParty": 14458 var err error 14459 14460 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("thirdParty")) 14461 directive0 := func(ctx context.Context) (interface{}, error) { 14462 return ec.unmarshalOThirdParty2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐThirdParty(ctx, v) 14463 } 14464 directive1 := func(ctx context.Context) (interface{}, error) { 14465 if ec.directives.Directive3 == nil { 14466 return nil, errors.New("directive directive3 is not implemented") 14467 } 14468 return ec.directives.Directive3(ctx, obj, directive0) 14469 } 14470 directive2 := func(ctx context.Context) (interface{}, error) { 14471 min, err := ec.unmarshalNInt2int(ctx, 0) 14472 if err != nil { 14473 return nil, err 14474 } 14475 max, err := ec.unmarshalOInt2ᚖint(ctx, 7) 14476 if err != nil { 14477 return nil, err 14478 } 14479 if ec.directives.Length == nil { 14480 return nil, errors.New("directive length is not implemented") 14481 } 14482 return ec.directives.Length(ctx, obj, directive1, min, max, nil) 14483 } 14484 14485 tmp, err := directive2(ctx) 14486 if err != nil { 14487 return it, graphql.ErrorOnPath(ctx, err) 14488 } 14489 if data, ok := tmp.(*ThirdParty); ok { 14490 it.ThirdParty = data 14491 } else if tmp == nil { 14492 it.ThirdParty = nil 14493 } else { 14494 err := fmt.Errorf(`unexpected type %T from directive, should be *github.com/spread-ai/gqlgen/codegen/testserver/singlefile.ThirdParty`, tmp) 14495 return it, graphql.ErrorOnPath(ctx, err) 14496 } 14497 } 14498 } 14499 14500 return it, nil 14501 } 14502 14503 func (ec *executionContext) unmarshalInputInputWithEnumValue(ctx context.Context, obj interface{}) (InputWithEnumValue, error) { 14504 var it InputWithEnumValue 14505 asMap := map[string]interface{}{} 14506 for k, v := range obj.(map[string]interface{}) { 14507 asMap[k] = v 14508 } 14509 14510 fieldsInOrder := [...]string{"enum"} 14511 for _, k := range fieldsInOrder { 14512 v, ok := asMap[k] 14513 if !ok { 14514 continue 14515 } 14516 switch k { 14517 case "enum": 14518 var err error 14519 14520 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("enum")) 14521 it.Enum, err = ec.unmarshalNEnumTest2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEnumTest(ctx, v) 14522 if err != nil { 14523 return it, err 14524 } 14525 } 14526 } 14527 14528 return it, nil 14529 } 14530 14531 func (ec *executionContext) unmarshalInputNestedInput(ctx context.Context, obj interface{}) (NestedInput, error) { 14532 var it NestedInput 14533 asMap := map[string]interface{}{} 14534 for k, v := range obj.(map[string]interface{}) { 14535 asMap[k] = v 14536 } 14537 14538 fieldsInOrder := [...]string{"field"} 14539 for _, k := range fieldsInOrder { 14540 v, ok := asMap[k] 14541 if !ok { 14542 continue 14543 } 14544 switch k { 14545 case "field": 14546 var err error 14547 14548 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) 14549 it.Field, err = ec.unmarshalNEmail2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEmail(ctx, v) 14550 if err != nil { 14551 return it, err 14552 } 14553 } 14554 } 14555 14556 return it, nil 14557 } 14558 14559 func (ec *executionContext) unmarshalInputNestedMapInput(ctx context.Context, obj interface{}) (NestedMapInput, error) { 14560 var it NestedMapInput 14561 asMap := map[string]interface{}{} 14562 for k, v := range obj.(map[string]interface{}) { 14563 asMap[k] = v 14564 } 14565 14566 fieldsInOrder := [...]string{"map"} 14567 for _, k := range fieldsInOrder { 14568 v, ok := asMap[k] 14569 if !ok { 14570 continue 14571 } 14572 switch k { 14573 case "map": 14574 var err error 14575 14576 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("map")) 14577 it.Map, err = ec.unmarshalOMapStringInterfaceInput2map(ctx, v) 14578 if err != nil { 14579 return it, err 14580 } 14581 } 14582 } 14583 14584 return it, nil 14585 } 14586 14587 func (ec *executionContext) unmarshalInputOuterInput(ctx context.Context, obj interface{}) (OuterInput, error) { 14588 var it OuterInput 14589 asMap := map[string]interface{}{} 14590 for k, v := range obj.(map[string]interface{}) { 14591 asMap[k] = v 14592 } 14593 14594 fieldsInOrder := [...]string{"inner"} 14595 for _, k := range fieldsInOrder { 14596 v, ok := asMap[k] 14597 if !ok { 14598 continue 14599 } 14600 switch k { 14601 case "inner": 14602 var err error 14603 14604 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("inner")) 14605 it.Inner, err = ec.unmarshalNInnerInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInnerInput(ctx, v) 14606 if err != nil { 14607 return it, err 14608 } 14609 } 14610 } 14611 14612 return it, nil 14613 } 14614 14615 func (ec *executionContext) unmarshalInputRecursiveInputSlice(ctx context.Context, obj interface{}) (RecursiveInputSlice, error) { 14616 var it RecursiveInputSlice 14617 asMap := map[string]interface{}{} 14618 for k, v := range obj.(map[string]interface{}) { 14619 asMap[k] = v 14620 } 14621 14622 fieldsInOrder := [...]string{"self"} 14623 for _, k := range fieldsInOrder { 14624 v, ok := asMap[k] 14625 if !ok { 14626 continue 14627 } 14628 switch k { 14629 case "self": 14630 var err error 14631 14632 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("self")) 14633 it.Self, err = ec.unmarshalORecursiveInputSlice2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐRecursiveInputSliceᚄ(ctx, v) 14634 if err != nil { 14635 return it, err 14636 } 14637 } 14638 } 14639 14640 return it, nil 14641 } 14642 14643 func (ec *executionContext) unmarshalInputSpecialInput(ctx context.Context, obj interface{}) (SpecialInput, error) { 14644 var it SpecialInput 14645 asMap := map[string]interface{}{} 14646 for k, v := range obj.(map[string]interface{}) { 14647 asMap[k] = v 14648 } 14649 14650 fieldsInOrder := [...]string{"nesting"} 14651 for _, k := range fieldsInOrder { 14652 v, ok := asMap[k] 14653 if !ok { 14654 continue 14655 } 14656 switch k { 14657 case "nesting": 14658 var err error 14659 14660 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nesting")) 14661 it.Nesting, err = ec.unmarshalNNestedInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐNestedInput(ctx, v) 14662 if err != nil { 14663 return it, err 14664 } 14665 } 14666 } 14667 14668 return it, nil 14669 } 14670 14671 func (ec *executionContext) unmarshalInputUpdatePtrToPtrInner(ctx context.Context, obj interface{}) (UpdatePtrToPtrInner, error) { 14672 var it UpdatePtrToPtrInner 14673 asMap := map[string]interface{}{} 14674 for k, v := range obj.(map[string]interface{}) { 14675 asMap[k] = v 14676 } 14677 14678 fieldsInOrder := [...]string{"key", "value"} 14679 for _, k := range fieldsInOrder { 14680 v, ok := asMap[k] 14681 if !ok { 14682 continue 14683 } 14684 switch k { 14685 case "key": 14686 var err error 14687 14688 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) 14689 it.Key, err = ec.unmarshalOString2ᚖstring(ctx, v) 14690 if err != nil { 14691 return it, err 14692 } 14693 case "value": 14694 var err error 14695 14696 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) 14697 it.Value, err = ec.unmarshalOString2ᚖstring(ctx, v) 14698 if err != nil { 14699 return it, err 14700 } 14701 } 14702 } 14703 14704 return it, nil 14705 } 14706 14707 func (ec *executionContext) unmarshalInputUpdatePtrToPtrOuter(ctx context.Context, obj interface{}) (UpdatePtrToPtrOuter, error) { 14708 var it UpdatePtrToPtrOuter 14709 asMap := map[string]interface{}{} 14710 for k, v := range obj.(map[string]interface{}) { 14711 asMap[k] = v 14712 } 14713 14714 fieldsInOrder := [...]string{"name", "inner", "stupidInner"} 14715 for _, k := range fieldsInOrder { 14716 v, ok := asMap[k] 14717 if !ok { 14718 continue 14719 } 14720 switch k { 14721 case "name": 14722 var err error 14723 14724 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) 14725 it.Name, err = ec.unmarshalOString2ᚖstring(ctx, v) 14726 if err != nil { 14727 return it, err 14728 } 14729 case "inner": 14730 var err error 14731 14732 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("inner")) 14733 it.Inner, err = ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 14734 if err != nil { 14735 return it, err 14736 } 14737 case "stupidInner": 14738 var err error 14739 14740 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("stupidInner")) 14741 it.StupidInner, err = ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 14742 if err != nil { 14743 return it, err 14744 } 14745 } 14746 } 14747 14748 return it, nil 14749 } 14750 14751 func (ec *executionContext) unmarshalInputValidInput(ctx context.Context, obj interface{}) (ValidInput, error) { 14752 var it ValidInput 14753 asMap := map[string]interface{}{} 14754 for k, v := range obj.(map[string]interface{}) { 14755 asMap[k] = v 14756 } 14757 14758 fieldsInOrder := [...]string{"break", "default", "func", "interface", "select", "case", "defer", "go", "map", "struct", "chan", "else", "goto", "package", "switch", "const", "fallthrough", "if", "range", "type", "continue", "for", "import", "return", "var", "_"} 14759 for _, k := range fieldsInOrder { 14760 v, ok := asMap[k] 14761 if !ok { 14762 continue 14763 } 14764 switch k { 14765 case "break": 14766 var err error 14767 14768 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("break")) 14769 it.Break, err = ec.unmarshalNString2string(ctx, v) 14770 if err != nil { 14771 return it, err 14772 } 14773 case "default": 14774 var err error 14775 14776 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("default")) 14777 it.Default, err = ec.unmarshalNString2string(ctx, v) 14778 if err != nil { 14779 return it, err 14780 } 14781 case "func": 14782 var err error 14783 14784 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("func")) 14785 it.Func, err = ec.unmarshalNString2string(ctx, v) 14786 if err != nil { 14787 return it, err 14788 } 14789 case "interface": 14790 var err error 14791 14792 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("interface")) 14793 it.Interface, err = ec.unmarshalNString2string(ctx, v) 14794 if err != nil { 14795 return it, err 14796 } 14797 case "select": 14798 var err error 14799 14800 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("select")) 14801 it.Select, err = ec.unmarshalNString2string(ctx, v) 14802 if err != nil { 14803 return it, err 14804 } 14805 case "case": 14806 var err error 14807 14808 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("case")) 14809 it.Case, err = ec.unmarshalNString2string(ctx, v) 14810 if err != nil { 14811 return it, err 14812 } 14813 case "defer": 14814 var err error 14815 14816 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("defer")) 14817 it.Defer, err = ec.unmarshalNString2string(ctx, v) 14818 if err != nil { 14819 return it, err 14820 } 14821 case "go": 14822 var err error 14823 14824 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("go")) 14825 it.Go, err = ec.unmarshalNString2string(ctx, v) 14826 if err != nil { 14827 return it, err 14828 } 14829 case "map": 14830 var err error 14831 14832 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("map")) 14833 it.Map, err = ec.unmarshalNString2string(ctx, v) 14834 if err != nil { 14835 return it, err 14836 } 14837 case "struct": 14838 var err error 14839 14840 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("struct")) 14841 it.Struct, err = ec.unmarshalNString2string(ctx, v) 14842 if err != nil { 14843 return it, err 14844 } 14845 case "chan": 14846 var err error 14847 14848 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("chan")) 14849 it.Chan, err = ec.unmarshalNString2string(ctx, v) 14850 if err != nil { 14851 return it, err 14852 } 14853 case "else": 14854 var err error 14855 14856 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("else")) 14857 it.Else, err = ec.unmarshalNString2string(ctx, v) 14858 if err != nil { 14859 return it, err 14860 } 14861 case "goto": 14862 var err error 14863 14864 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("goto")) 14865 it.Goto, err = ec.unmarshalNString2string(ctx, v) 14866 if err != nil { 14867 return it, err 14868 } 14869 case "package": 14870 var err error 14871 14872 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("package")) 14873 it.Package, err = ec.unmarshalNString2string(ctx, v) 14874 if err != nil { 14875 return it, err 14876 } 14877 case "switch": 14878 var err error 14879 14880 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("switch")) 14881 it.Switch, err = ec.unmarshalNString2string(ctx, v) 14882 if err != nil { 14883 return it, err 14884 } 14885 case "const": 14886 var err error 14887 14888 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("const")) 14889 it.Const, err = ec.unmarshalNString2string(ctx, v) 14890 if err != nil { 14891 return it, err 14892 } 14893 case "fallthrough": 14894 var err error 14895 14896 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fallthrough")) 14897 it.Fallthrough, err = ec.unmarshalNString2string(ctx, v) 14898 if err != nil { 14899 return it, err 14900 } 14901 case "if": 14902 var err error 14903 14904 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("if")) 14905 it.If, err = ec.unmarshalNString2string(ctx, v) 14906 if err != nil { 14907 return it, err 14908 } 14909 case "range": 14910 var err error 14911 14912 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("range")) 14913 it.Range, err = ec.unmarshalNString2string(ctx, v) 14914 if err != nil { 14915 return it, err 14916 } 14917 case "type": 14918 var err error 14919 14920 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type")) 14921 it.Type, err = ec.unmarshalNString2string(ctx, v) 14922 if err != nil { 14923 return it, err 14924 } 14925 case "continue": 14926 var err error 14927 14928 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("continue")) 14929 it.Continue, err = ec.unmarshalNString2string(ctx, v) 14930 if err != nil { 14931 return it, err 14932 } 14933 case "for": 14934 var err error 14935 14936 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("for")) 14937 it.For, err = ec.unmarshalNString2string(ctx, v) 14938 if err != nil { 14939 return it, err 14940 } 14941 case "import": 14942 var err error 14943 14944 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("import")) 14945 it.Import, err = ec.unmarshalNString2string(ctx, v) 14946 if err != nil { 14947 return it, err 14948 } 14949 case "return": 14950 var err error 14951 14952 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("return")) 14953 it.Return, err = ec.unmarshalNString2string(ctx, v) 14954 if err != nil { 14955 return it, err 14956 } 14957 case "var": 14958 var err error 14959 14960 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("var")) 14961 it.Var, err = ec.unmarshalNString2string(ctx, v) 14962 if err != nil { 14963 return it, err 14964 } 14965 case "_": 14966 var err error 14967 14968 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("_")) 14969 it.Underscore, err = ec.unmarshalNString2string(ctx, v) 14970 if err != nil { 14971 return it, err 14972 } 14973 } 14974 } 14975 14976 return it, nil 14977 } 14978 14979 // endregion **************************** input.gotpl ***************************** 14980 14981 // region ************************** interface.gotpl *************************** 14982 14983 func (ec *executionContext) _Animal(ctx context.Context, sel ast.SelectionSet, obj Animal) graphql.Marshaler { 14984 switch obj := (obj).(type) { 14985 case nil: 14986 return graphql.Null 14987 case Dog: 14988 return ec._Dog(ctx, sel, &obj) 14989 case *Dog: 14990 if obj == nil { 14991 return graphql.Null 14992 } 14993 return ec._Dog(ctx, sel, obj) 14994 case Cat: 14995 return ec._Cat(ctx, sel, &obj) 14996 case *Cat: 14997 if obj == nil { 14998 return graphql.Null 14999 } 15000 return ec._Cat(ctx, sel, obj) 15001 default: 15002 panic(fmt.Errorf("unexpected type %T", obj)) 15003 } 15004 } 15005 15006 func (ec *executionContext) _Content_Child(ctx context.Context, sel ast.SelectionSet, obj ContentChild) graphql.Marshaler { 15007 switch obj := (obj).(type) { 15008 case nil: 15009 return graphql.Null 15010 case ContentUser: 15011 return ec._Content_User(ctx, sel, &obj) 15012 case *ContentUser: 15013 if obj == nil { 15014 return graphql.Null 15015 } 15016 return ec._Content_User(ctx, sel, obj) 15017 case ContentPost: 15018 return ec._Content_Post(ctx, sel, &obj) 15019 case *ContentPost: 15020 if obj == nil { 15021 return graphql.Null 15022 } 15023 return ec._Content_Post(ctx, sel, obj) 15024 default: 15025 panic(fmt.Errorf("unexpected type %T", obj)) 15026 } 15027 } 15028 15029 func (ec *executionContext) _Node(ctx context.Context, sel ast.SelectionSet, obj Node) graphql.Marshaler { 15030 switch obj := (obj).(type) { 15031 case nil: 15032 return graphql.Null 15033 case *ConcreteNodeA: 15034 if obj == nil { 15035 return graphql.Null 15036 } 15037 return ec._ConcreteNodeA(ctx, sel, obj) 15038 case ConcreteNodeInterface: 15039 if obj == nil { 15040 return graphql.Null 15041 } 15042 return ec._ConcreteNodeInterface(ctx, sel, obj) 15043 default: 15044 panic(fmt.Errorf("unexpected type %T", obj)) 15045 } 15046 } 15047 15048 func (ec *executionContext) _Shape(ctx context.Context, sel ast.SelectionSet, obj Shape) graphql.Marshaler { 15049 switch obj := (obj).(type) { 15050 case nil: 15051 return graphql.Null 15052 case *Circle: 15053 if obj == nil { 15054 return graphql.Null 15055 } 15056 return ec._Circle(ctx, sel, obj) 15057 case *Rectangle: 15058 if obj == nil { 15059 return graphql.Null 15060 } 15061 return ec._Rectangle(ctx, sel, obj) 15062 default: 15063 panic(fmt.Errorf("unexpected type %T", obj)) 15064 } 15065 } 15066 15067 func (ec *executionContext) _ShapeUnion(ctx context.Context, sel ast.SelectionSet, obj ShapeUnion) graphql.Marshaler { 15068 switch obj := (obj).(type) { 15069 case nil: 15070 return graphql.Null 15071 case *Circle: 15072 if obj == nil { 15073 return graphql.Null 15074 } 15075 return ec._Circle(ctx, sel, obj) 15076 case *Rectangle: 15077 if obj == nil { 15078 return graphql.Null 15079 } 15080 return ec._Rectangle(ctx, sel, obj) 15081 default: 15082 panic(fmt.Errorf("unexpected type %T", obj)) 15083 } 15084 } 15085 15086 func (ec *executionContext) _TestUnion(ctx context.Context, sel ast.SelectionSet, obj TestUnion) graphql.Marshaler { 15087 switch obj := (obj).(type) { 15088 case nil: 15089 return graphql.Null 15090 case A: 15091 return ec._A(ctx, sel, &obj) 15092 case *A: 15093 if obj == nil { 15094 return graphql.Null 15095 } 15096 return ec._A(ctx, sel, obj) 15097 case B: 15098 return ec._B(ctx, sel, &obj) 15099 case *B: 15100 if obj == nil { 15101 return graphql.Null 15102 } 15103 return ec._B(ctx, sel, obj) 15104 default: 15105 panic(fmt.Errorf("unexpected type %T", obj)) 15106 } 15107 } 15108 15109 // endregion ************************** interface.gotpl *************************** 15110 15111 // region **************************** object.gotpl **************************** 15112 15113 var aImplementors = []string{"A", "TestUnion"} 15114 15115 func (ec *executionContext) _A(ctx context.Context, sel ast.SelectionSet, obj *A) graphql.Marshaler { 15116 fields := graphql.CollectFields(ec.OperationContext, sel, aImplementors) 15117 out := graphql.NewFieldSet(fields) 15118 var invalids uint32 15119 for i, field := range fields { 15120 switch field.Name { 15121 case "__typename": 15122 out.Values[i] = graphql.MarshalString("A") 15123 case "id": 15124 15125 out.Values[i] = ec._A_id(ctx, field, obj) 15126 15127 if out.Values[i] == graphql.Null { 15128 invalids++ 15129 } 15130 default: 15131 panic("unknown field " + strconv.Quote(field.Name)) 15132 } 15133 } 15134 out.Dispatch() 15135 if invalids > 0 { 15136 return graphql.Null 15137 } 15138 return out 15139 } 15140 15141 var aItImplementors = []string{"AIt"} 15142 15143 func (ec *executionContext) _AIt(ctx context.Context, sel ast.SelectionSet, obj *AIt) graphql.Marshaler { 15144 fields := graphql.CollectFields(ec.OperationContext, sel, aItImplementors) 15145 out := graphql.NewFieldSet(fields) 15146 var invalids uint32 15147 for i, field := range fields { 15148 switch field.Name { 15149 case "__typename": 15150 out.Values[i] = graphql.MarshalString("AIt") 15151 case "id": 15152 15153 out.Values[i] = ec._AIt_id(ctx, field, obj) 15154 15155 if out.Values[i] == graphql.Null { 15156 invalids++ 15157 } 15158 default: 15159 panic("unknown field " + strconv.Quote(field.Name)) 15160 } 15161 } 15162 out.Dispatch() 15163 if invalids > 0 { 15164 return graphql.Null 15165 } 15166 return out 15167 } 15168 15169 var abItImplementors = []string{"AbIt"} 15170 15171 func (ec *executionContext) _AbIt(ctx context.Context, sel ast.SelectionSet, obj *AbIt) graphql.Marshaler { 15172 fields := graphql.CollectFields(ec.OperationContext, sel, abItImplementors) 15173 out := graphql.NewFieldSet(fields) 15174 var invalids uint32 15175 for i, field := range fields { 15176 switch field.Name { 15177 case "__typename": 15178 out.Values[i] = graphql.MarshalString("AbIt") 15179 case "id": 15180 15181 out.Values[i] = ec._AbIt_id(ctx, field, obj) 15182 15183 if out.Values[i] == graphql.Null { 15184 invalids++ 15185 } 15186 default: 15187 panic("unknown field " + strconv.Quote(field.Name)) 15188 } 15189 } 15190 out.Dispatch() 15191 if invalids > 0 { 15192 return graphql.Null 15193 } 15194 return out 15195 } 15196 15197 var autobindImplementors = []string{"Autobind"} 15198 15199 func (ec *executionContext) _Autobind(ctx context.Context, sel ast.SelectionSet, obj *Autobind) graphql.Marshaler { 15200 fields := graphql.CollectFields(ec.OperationContext, sel, autobindImplementors) 15201 out := graphql.NewFieldSet(fields) 15202 var invalids uint32 15203 for i, field := range fields { 15204 switch field.Name { 15205 case "__typename": 15206 out.Values[i] = graphql.MarshalString("Autobind") 15207 case "int": 15208 15209 out.Values[i] = ec._Autobind_int(ctx, field, obj) 15210 15211 if out.Values[i] == graphql.Null { 15212 invalids++ 15213 } 15214 case "int32": 15215 15216 out.Values[i] = ec._Autobind_int32(ctx, field, obj) 15217 15218 if out.Values[i] == graphql.Null { 15219 invalids++ 15220 } 15221 case "int64": 15222 15223 out.Values[i] = ec._Autobind_int64(ctx, field, obj) 15224 15225 if out.Values[i] == graphql.Null { 15226 invalids++ 15227 } 15228 case "idStr": 15229 15230 out.Values[i] = ec._Autobind_idStr(ctx, field, obj) 15231 15232 if out.Values[i] == graphql.Null { 15233 invalids++ 15234 } 15235 case "idInt": 15236 15237 out.Values[i] = ec._Autobind_idInt(ctx, field, obj) 15238 15239 if out.Values[i] == graphql.Null { 15240 invalids++ 15241 } 15242 default: 15243 panic("unknown field " + strconv.Quote(field.Name)) 15244 } 15245 } 15246 out.Dispatch() 15247 if invalids > 0 { 15248 return graphql.Null 15249 } 15250 return out 15251 } 15252 15253 var bImplementors = []string{"B", "TestUnion"} 15254 15255 func (ec *executionContext) _B(ctx context.Context, sel ast.SelectionSet, obj *B) graphql.Marshaler { 15256 fields := graphql.CollectFields(ec.OperationContext, sel, bImplementors) 15257 out := graphql.NewFieldSet(fields) 15258 var invalids uint32 15259 for i, field := range fields { 15260 switch field.Name { 15261 case "__typename": 15262 out.Values[i] = graphql.MarshalString("B") 15263 case "id": 15264 15265 out.Values[i] = ec._B_id(ctx, field, obj) 15266 15267 if out.Values[i] == graphql.Null { 15268 invalids++ 15269 } 15270 default: 15271 panic("unknown field " + strconv.Quote(field.Name)) 15272 } 15273 } 15274 out.Dispatch() 15275 if invalids > 0 { 15276 return graphql.Null 15277 } 15278 return out 15279 } 15280 15281 var backedByInterfaceImplementors = []string{"BackedByInterface"} 15282 15283 func (ec *executionContext) _BackedByInterface(ctx context.Context, sel ast.SelectionSet, obj BackedByInterface) graphql.Marshaler { 15284 fields := graphql.CollectFields(ec.OperationContext, sel, backedByInterfaceImplementors) 15285 out := graphql.NewFieldSet(fields) 15286 var invalids uint32 15287 for i, field := range fields { 15288 switch field.Name { 15289 case "__typename": 15290 out.Values[i] = graphql.MarshalString("BackedByInterface") 15291 case "id": 15292 field := field 15293 15294 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15295 defer func() { 15296 if r := recover(); r != nil { 15297 ec.Error(ctx, ec.Recover(ctx, r)) 15298 } 15299 }() 15300 res = ec._BackedByInterface_id(ctx, field, obj) 15301 if res == graphql.Null { 15302 atomic.AddUint32(&invalids, 1) 15303 } 15304 return res 15305 } 15306 15307 out.Concurrently(i, func() graphql.Marshaler { 15308 return innerFunc(ctx) 15309 15310 }) 15311 case "thisShouldBind": 15312 15313 out.Values[i] = ec._BackedByInterface_thisShouldBind(ctx, field, obj) 15314 15315 if out.Values[i] == graphql.Null { 15316 atomic.AddUint32(&invalids, 1) 15317 } 15318 case "thisShouldBindWithError": 15319 15320 out.Values[i] = ec._BackedByInterface_thisShouldBindWithError(ctx, field, obj) 15321 15322 if out.Values[i] == graphql.Null { 15323 atomic.AddUint32(&invalids, 1) 15324 } 15325 default: 15326 panic("unknown field " + strconv.Quote(field.Name)) 15327 } 15328 } 15329 out.Dispatch() 15330 if invalids > 0 { 15331 return graphql.Null 15332 } 15333 return out 15334 } 15335 15336 var catImplementors = []string{"Cat", "Animal"} 15337 15338 func (ec *executionContext) _Cat(ctx context.Context, sel ast.SelectionSet, obj *Cat) graphql.Marshaler { 15339 fields := graphql.CollectFields(ec.OperationContext, sel, catImplementors) 15340 out := graphql.NewFieldSet(fields) 15341 var invalids uint32 15342 for i, field := range fields { 15343 switch field.Name { 15344 case "__typename": 15345 out.Values[i] = graphql.MarshalString("Cat") 15346 case "species": 15347 15348 out.Values[i] = ec._Cat_species(ctx, field, obj) 15349 15350 if out.Values[i] == graphql.Null { 15351 invalids++ 15352 } 15353 case "size": 15354 15355 out.Values[i] = ec._Cat_size(ctx, field, obj) 15356 15357 if out.Values[i] == graphql.Null { 15358 invalids++ 15359 } 15360 case "catBreed": 15361 15362 out.Values[i] = ec._Cat_catBreed(ctx, field, obj) 15363 15364 if out.Values[i] == graphql.Null { 15365 invalids++ 15366 } 15367 default: 15368 panic("unknown field " + strconv.Quote(field.Name)) 15369 } 15370 } 15371 out.Dispatch() 15372 if invalids > 0 { 15373 return graphql.Null 15374 } 15375 return out 15376 } 15377 15378 var checkIssue896Implementors = []string{"CheckIssue896"} 15379 15380 func (ec *executionContext) _CheckIssue896(ctx context.Context, sel ast.SelectionSet, obj *CheckIssue896) graphql.Marshaler { 15381 fields := graphql.CollectFields(ec.OperationContext, sel, checkIssue896Implementors) 15382 out := graphql.NewFieldSet(fields) 15383 var invalids uint32 15384 for i, field := range fields { 15385 switch field.Name { 15386 case "__typename": 15387 out.Values[i] = graphql.MarshalString("CheckIssue896") 15388 case "id": 15389 15390 out.Values[i] = ec._CheckIssue896_id(ctx, field, obj) 15391 15392 default: 15393 panic("unknown field " + strconv.Quote(field.Name)) 15394 } 15395 } 15396 out.Dispatch() 15397 if invalids > 0 { 15398 return graphql.Null 15399 } 15400 return out 15401 } 15402 15403 var circleImplementors = []string{"Circle", "Shape", "ShapeUnion"} 15404 15405 func (ec *executionContext) _Circle(ctx context.Context, sel ast.SelectionSet, obj *Circle) graphql.Marshaler { 15406 fields := graphql.CollectFields(ec.OperationContext, sel, circleImplementors) 15407 out := graphql.NewFieldSet(fields) 15408 var invalids uint32 15409 for i, field := range fields { 15410 switch field.Name { 15411 case "__typename": 15412 out.Values[i] = graphql.MarshalString("Circle") 15413 case "radius": 15414 15415 out.Values[i] = ec._Circle_radius(ctx, field, obj) 15416 15417 case "area": 15418 15419 out.Values[i] = ec._Circle_area(ctx, field, obj) 15420 15421 case "coordinates": 15422 15423 out.Values[i] = ec._Circle_coordinates(ctx, field, obj) 15424 15425 default: 15426 panic("unknown field " + strconv.Quote(field.Name)) 15427 } 15428 } 15429 out.Dispatch() 15430 if invalids > 0 { 15431 return graphql.Null 15432 } 15433 return out 15434 } 15435 15436 var concreteNodeAImplementors = []string{"ConcreteNodeA", "Node"} 15437 15438 func (ec *executionContext) _ConcreteNodeA(ctx context.Context, sel ast.SelectionSet, obj *ConcreteNodeA) graphql.Marshaler { 15439 fields := graphql.CollectFields(ec.OperationContext, sel, concreteNodeAImplementors) 15440 out := graphql.NewFieldSet(fields) 15441 var invalids uint32 15442 for i, field := range fields { 15443 switch field.Name { 15444 case "__typename": 15445 out.Values[i] = graphql.MarshalString("ConcreteNodeA") 15446 case "id": 15447 15448 out.Values[i] = ec._ConcreteNodeA_id(ctx, field, obj) 15449 15450 if out.Values[i] == graphql.Null { 15451 invalids++ 15452 } 15453 case "child": 15454 15455 out.Values[i] = ec._ConcreteNodeA_child(ctx, field, obj) 15456 15457 if out.Values[i] == graphql.Null { 15458 invalids++ 15459 } 15460 case "name": 15461 15462 out.Values[i] = ec._ConcreteNodeA_name(ctx, field, obj) 15463 15464 if out.Values[i] == graphql.Null { 15465 invalids++ 15466 } 15467 default: 15468 panic("unknown field " + strconv.Quote(field.Name)) 15469 } 15470 } 15471 out.Dispatch() 15472 if invalids > 0 { 15473 return graphql.Null 15474 } 15475 return out 15476 } 15477 15478 var concreteNodeInterfaceImplementors = []string{"ConcreteNodeInterface", "Node"} 15479 15480 func (ec *executionContext) _ConcreteNodeInterface(ctx context.Context, sel ast.SelectionSet, obj ConcreteNodeInterface) graphql.Marshaler { 15481 fields := graphql.CollectFields(ec.OperationContext, sel, concreteNodeInterfaceImplementors) 15482 out := graphql.NewFieldSet(fields) 15483 var invalids uint32 15484 for i, field := range fields { 15485 switch field.Name { 15486 case "__typename": 15487 out.Values[i] = graphql.MarshalString("ConcreteNodeInterface") 15488 case "id": 15489 15490 out.Values[i] = ec._ConcreteNodeInterface_id(ctx, field, obj) 15491 15492 if out.Values[i] == graphql.Null { 15493 invalids++ 15494 } 15495 case "child": 15496 15497 out.Values[i] = ec._ConcreteNodeInterface_child(ctx, field, obj) 15498 15499 if out.Values[i] == graphql.Null { 15500 invalids++ 15501 } 15502 default: 15503 panic("unknown field " + strconv.Quote(field.Name)) 15504 } 15505 } 15506 out.Dispatch() 15507 if invalids > 0 { 15508 return graphql.Null 15509 } 15510 return out 15511 } 15512 15513 var content_PostImplementors = []string{"Content_Post", "Content_Child"} 15514 15515 func (ec *executionContext) _Content_Post(ctx context.Context, sel ast.SelectionSet, obj *ContentPost) graphql.Marshaler { 15516 fields := graphql.CollectFields(ec.OperationContext, sel, content_PostImplementors) 15517 out := graphql.NewFieldSet(fields) 15518 var invalids uint32 15519 for i, field := range fields { 15520 switch field.Name { 15521 case "__typename": 15522 out.Values[i] = graphql.MarshalString("Content_Post") 15523 case "foo": 15524 15525 out.Values[i] = ec._Content_Post_foo(ctx, field, obj) 15526 15527 default: 15528 panic("unknown field " + strconv.Quote(field.Name)) 15529 } 15530 } 15531 out.Dispatch() 15532 if invalids > 0 { 15533 return graphql.Null 15534 } 15535 return out 15536 } 15537 15538 var content_UserImplementors = []string{"Content_User", "Content_Child"} 15539 15540 func (ec *executionContext) _Content_User(ctx context.Context, sel ast.SelectionSet, obj *ContentUser) graphql.Marshaler { 15541 fields := graphql.CollectFields(ec.OperationContext, sel, content_UserImplementors) 15542 out := graphql.NewFieldSet(fields) 15543 var invalids uint32 15544 for i, field := range fields { 15545 switch field.Name { 15546 case "__typename": 15547 out.Values[i] = graphql.MarshalString("Content_User") 15548 case "foo": 15549 15550 out.Values[i] = ec._Content_User_foo(ctx, field, obj) 15551 15552 default: 15553 panic("unknown field " + strconv.Quote(field.Name)) 15554 } 15555 } 15556 out.Dispatch() 15557 if invalids > 0 { 15558 return graphql.Null 15559 } 15560 return out 15561 } 15562 15563 var coordinatesImplementors = []string{"Coordinates"} 15564 15565 func (ec *executionContext) _Coordinates(ctx context.Context, sel ast.SelectionSet, obj *Coordinates) graphql.Marshaler { 15566 fields := graphql.CollectFields(ec.OperationContext, sel, coordinatesImplementors) 15567 out := graphql.NewFieldSet(fields) 15568 var invalids uint32 15569 for i, field := range fields { 15570 switch field.Name { 15571 case "__typename": 15572 out.Values[i] = graphql.MarshalString("Coordinates") 15573 case "x": 15574 15575 out.Values[i] = ec._Coordinates_x(ctx, field, obj) 15576 15577 if out.Values[i] == graphql.Null { 15578 invalids++ 15579 } 15580 case "y": 15581 15582 out.Values[i] = ec._Coordinates_y(ctx, field, obj) 15583 15584 if out.Values[i] == graphql.Null { 15585 invalids++ 15586 } 15587 default: 15588 panic("unknown field " + strconv.Quote(field.Name)) 15589 } 15590 } 15591 out.Dispatch() 15592 if invalids > 0 { 15593 return graphql.Null 15594 } 15595 return out 15596 } 15597 15598 var defaultParametersMirrorImplementors = []string{"DefaultParametersMirror"} 15599 15600 func (ec *executionContext) _DefaultParametersMirror(ctx context.Context, sel ast.SelectionSet, obj *DefaultParametersMirror) graphql.Marshaler { 15601 fields := graphql.CollectFields(ec.OperationContext, sel, defaultParametersMirrorImplementors) 15602 out := graphql.NewFieldSet(fields) 15603 var invalids uint32 15604 for i, field := range fields { 15605 switch field.Name { 15606 case "__typename": 15607 out.Values[i] = graphql.MarshalString("DefaultParametersMirror") 15608 case "falsyBoolean": 15609 15610 out.Values[i] = ec._DefaultParametersMirror_falsyBoolean(ctx, field, obj) 15611 15612 case "truthyBoolean": 15613 15614 out.Values[i] = ec._DefaultParametersMirror_truthyBoolean(ctx, field, obj) 15615 15616 default: 15617 panic("unknown field " + strconv.Quote(field.Name)) 15618 } 15619 } 15620 out.Dispatch() 15621 if invalids > 0 { 15622 return graphql.Null 15623 } 15624 return out 15625 } 15626 15627 var dogImplementors = []string{"Dog", "Animal"} 15628 15629 func (ec *executionContext) _Dog(ctx context.Context, sel ast.SelectionSet, obj *Dog) graphql.Marshaler { 15630 fields := graphql.CollectFields(ec.OperationContext, sel, dogImplementors) 15631 out := graphql.NewFieldSet(fields) 15632 var invalids uint32 15633 for i, field := range fields { 15634 switch field.Name { 15635 case "__typename": 15636 out.Values[i] = graphql.MarshalString("Dog") 15637 case "species": 15638 15639 out.Values[i] = ec._Dog_species(ctx, field, obj) 15640 15641 if out.Values[i] == graphql.Null { 15642 invalids++ 15643 } 15644 case "size": 15645 15646 out.Values[i] = ec._Dog_size(ctx, field, obj) 15647 15648 if out.Values[i] == graphql.Null { 15649 invalids++ 15650 } 15651 case "dogBreed": 15652 15653 out.Values[i] = ec._Dog_dogBreed(ctx, field, obj) 15654 15655 if out.Values[i] == graphql.Null { 15656 invalids++ 15657 } 15658 default: 15659 panic("unknown field " + strconv.Quote(field.Name)) 15660 } 15661 } 15662 out.Dispatch() 15663 if invalids > 0 { 15664 return graphql.Null 15665 } 15666 return out 15667 } 15668 15669 var embeddedCase1Implementors = []string{"EmbeddedCase1"} 15670 15671 func (ec *executionContext) _EmbeddedCase1(ctx context.Context, sel ast.SelectionSet, obj *EmbeddedCase1) graphql.Marshaler { 15672 fields := graphql.CollectFields(ec.OperationContext, sel, embeddedCase1Implementors) 15673 out := graphql.NewFieldSet(fields) 15674 var invalids uint32 15675 for i, field := range fields { 15676 switch field.Name { 15677 case "__typename": 15678 out.Values[i] = graphql.MarshalString("EmbeddedCase1") 15679 case "exportedEmbeddedPointerExportedMethod": 15680 15681 out.Values[i] = ec._EmbeddedCase1_exportedEmbeddedPointerExportedMethod(ctx, field, obj) 15682 15683 if out.Values[i] == graphql.Null { 15684 invalids++ 15685 } 15686 default: 15687 panic("unknown field " + strconv.Quote(field.Name)) 15688 } 15689 } 15690 out.Dispatch() 15691 if invalids > 0 { 15692 return graphql.Null 15693 } 15694 return out 15695 } 15696 15697 var embeddedCase2Implementors = []string{"EmbeddedCase2"} 15698 15699 func (ec *executionContext) _EmbeddedCase2(ctx context.Context, sel ast.SelectionSet, obj *EmbeddedCase2) graphql.Marshaler { 15700 fields := graphql.CollectFields(ec.OperationContext, sel, embeddedCase2Implementors) 15701 out := graphql.NewFieldSet(fields) 15702 var invalids uint32 15703 for i, field := range fields { 15704 switch field.Name { 15705 case "__typename": 15706 out.Values[i] = graphql.MarshalString("EmbeddedCase2") 15707 case "unexportedEmbeddedPointerExportedMethod": 15708 15709 out.Values[i] = ec._EmbeddedCase2_unexportedEmbeddedPointerExportedMethod(ctx, field, obj) 15710 15711 if out.Values[i] == graphql.Null { 15712 invalids++ 15713 } 15714 default: 15715 panic("unknown field " + strconv.Quote(field.Name)) 15716 } 15717 } 15718 out.Dispatch() 15719 if invalids > 0 { 15720 return graphql.Null 15721 } 15722 return out 15723 } 15724 15725 var embeddedCase3Implementors = []string{"EmbeddedCase3"} 15726 15727 func (ec *executionContext) _EmbeddedCase3(ctx context.Context, sel ast.SelectionSet, obj *EmbeddedCase3) graphql.Marshaler { 15728 fields := graphql.CollectFields(ec.OperationContext, sel, embeddedCase3Implementors) 15729 out := graphql.NewFieldSet(fields) 15730 var invalids uint32 15731 for i, field := range fields { 15732 switch field.Name { 15733 case "__typename": 15734 out.Values[i] = graphql.MarshalString("EmbeddedCase3") 15735 case "unexportedEmbeddedInterfaceExportedMethod": 15736 15737 out.Values[i] = ec._EmbeddedCase3_unexportedEmbeddedInterfaceExportedMethod(ctx, field, obj) 15738 15739 if out.Values[i] == graphql.Null { 15740 invalids++ 15741 } 15742 default: 15743 panic("unknown field " + strconv.Quote(field.Name)) 15744 } 15745 } 15746 out.Dispatch() 15747 if invalids > 0 { 15748 return graphql.Null 15749 } 15750 return out 15751 } 15752 15753 var embeddedDefaultScalarImplementors = []string{"EmbeddedDefaultScalar"} 15754 15755 func (ec *executionContext) _EmbeddedDefaultScalar(ctx context.Context, sel ast.SelectionSet, obj *EmbeddedDefaultScalar) graphql.Marshaler { 15756 fields := graphql.CollectFields(ec.OperationContext, sel, embeddedDefaultScalarImplementors) 15757 out := graphql.NewFieldSet(fields) 15758 var invalids uint32 15759 for i, field := range fields { 15760 switch field.Name { 15761 case "__typename": 15762 out.Values[i] = graphql.MarshalString("EmbeddedDefaultScalar") 15763 case "value": 15764 15765 out.Values[i] = ec._EmbeddedDefaultScalar_value(ctx, field, obj) 15766 15767 default: 15768 panic("unknown field " + strconv.Quote(field.Name)) 15769 } 15770 } 15771 out.Dispatch() 15772 if invalids > 0 { 15773 return graphql.Null 15774 } 15775 return out 15776 } 15777 15778 var embeddedPointerImplementors = []string{"EmbeddedPointer"} 15779 15780 func (ec *executionContext) _EmbeddedPointer(ctx context.Context, sel ast.SelectionSet, obj *EmbeddedPointerModel) graphql.Marshaler { 15781 fields := graphql.CollectFields(ec.OperationContext, sel, embeddedPointerImplementors) 15782 out := graphql.NewFieldSet(fields) 15783 var invalids uint32 15784 for i, field := range fields { 15785 switch field.Name { 15786 case "__typename": 15787 out.Values[i] = graphql.MarshalString("EmbeddedPointer") 15788 case "ID": 15789 15790 out.Values[i] = ec._EmbeddedPointer_ID(ctx, field, obj) 15791 15792 case "Title": 15793 15794 out.Values[i] = ec._EmbeddedPointer_Title(ctx, field, obj) 15795 15796 default: 15797 panic("unknown field " + strconv.Quote(field.Name)) 15798 } 15799 } 15800 out.Dispatch() 15801 if invalids > 0 { 15802 return graphql.Null 15803 } 15804 return out 15805 } 15806 15807 var errorImplementors = []string{"Error"} 15808 15809 func (ec *executionContext) _Error(ctx context.Context, sel ast.SelectionSet, obj *Error) graphql.Marshaler { 15810 fields := graphql.CollectFields(ec.OperationContext, sel, errorImplementors) 15811 out := graphql.NewFieldSet(fields) 15812 var invalids uint32 15813 for i, field := range fields { 15814 switch field.Name { 15815 case "__typename": 15816 out.Values[i] = graphql.MarshalString("Error") 15817 case "id": 15818 15819 out.Values[i] = ec._Error_id(ctx, field, obj) 15820 15821 if out.Values[i] == graphql.Null { 15822 invalids++ 15823 } 15824 case "errorOnNonRequiredField": 15825 15826 out.Values[i] = ec._Error_errorOnNonRequiredField(ctx, field, obj) 15827 15828 case "errorOnRequiredField": 15829 15830 out.Values[i] = ec._Error_errorOnRequiredField(ctx, field, obj) 15831 15832 if out.Values[i] == graphql.Null { 15833 invalids++ 15834 } 15835 case "nilOnRequiredField": 15836 15837 out.Values[i] = ec._Error_nilOnRequiredField(ctx, field, obj) 15838 15839 if out.Values[i] == graphql.Null { 15840 invalids++ 15841 } 15842 default: 15843 panic("unknown field " + strconv.Quote(field.Name)) 15844 } 15845 } 15846 out.Dispatch() 15847 if invalids > 0 { 15848 return graphql.Null 15849 } 15850 return out 15851 } 15852 15853 var errorsImplementors = []string{"Errors"} 15854 15855 func (ec *executionContext) _Errors(ctx context.Context, sel ast.SelectionSet, obj *Errors) graphql.Marshaler { 15856 fields := graphql.CollectFields(ec.OperationContext, sel, errorsImplementors) 15857 out := graphql.NewFieldSet(fields) 15858 var invalids uint32 15859 for i, field := range fields { 15860 switch field.Name { 15861 case "__typename": 15862 out.Values[i] = graphql.MarshalString("Errors") 15863 case "a": 15864 field := field 15865 15866 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15867 defer func() { 15868 if r := recover(); r != nil { 15869 ec.Error(ctx, ec.Recover(ctx, r)) 15870 } 15871 }() 15872 res = ec._Errors_a(ctx, field, obj) 15873 if res == graphql.Null { 15874 atomic.AddUint32(&invalids, 1) 15875 } 15876 return res 15877 } 15878 15879 out.Concurrently(i, func() graphql.Marshaler { 15880 return innerFunc(ctx) 15881 15882 }) 15883 case "b": 15884 field := field 15885 15886 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15887 defer func() { 15888 if r := recover(); r != nil { 15889 ec.Error(ctx, ec.Recover(ctx, r)) 15890 } 15891 }() 15892 res = ec._Errors_b(ctx, field, obj) 15893 if res == graphql.Null { 15894 atomic.AddUint32(&invalids, 1) 15895 } 15896 return res 15897 } 15898 15899 out.Concurrently(i, func() graphql.Marshaler { 15900 return innerFunc(ctx) 15901 15902 }) 15903 case "c": 15904 field := field 15905 15906 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15907 defer func() { 15908 if r := recover(); r != nil { 15909 ec.Error(ctx, ec.Recover(ctx, r)) 15910 } 15911 }() 15912 res = ec._Errors_c(ctx, field, obj) 15913 if res == graphql.Null { 15914 atomic.AddUint32(&invalids, 1) 15915 } 15916 return res 15917 } 15918 15919 out.Concurrently(i, func() graphql.Marshaler { 15920 return innerFunc(ctx) 15921 15922 }) 15923 case "d": 15924 field := field 15925 15926 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15927 defer func() { 15928 if r := recover(); r != nil { 15929 ec.Error(ctx, ec.Recover(ctx, r)) 15930 } 15931 }() 15932 res = ec._Errors_d(ctx, field, obj) 15933 if res == graphql.Null { 15934 atomic.AddUint32(&invalids, 1) 15935 } 15936 return res 15937 } 15938 15939 out.Concurrently(i, func() graphql.Marshaler { 15940 return innerFunc(ctx) 15941 15942 }) 15943 case "e": 15944 field := field 15945 15946 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 15947 defer func() { 15948 if r := recover(); r != nil { 15949 ec.Error(ctx, ec.Recover(ctx, r)) 15950 } 15951 }() 15952 res = ec._Errors_e(ctx, field, obj) 15953 if res == graphql.Null { 15954 atomic.AddUint32(&invalids, 1) 15955 } 15956 return res 15957 } 15958 15959 out.Concurrently(i, func() graphql.Marshaler { 15960 return innerFunc(ctx) 15961 15962 }) 15963 default: 15964 panic("unknown field " + strconv.Quote(field.Name)) 15965 } 15966 } 15967 out.Dispatch() 15968 if invalids > 0 { 15969 return graphql.Null 15970 } 15971 return out 15972 } 15973 15974 var fieldsOrderPayloadImplementors = []string{"FieldsOrderPayload"} 15975 15976 func (ec *executionContext) _FieldsOrderPayload(ctx context.Context, sel ast.SelectionSet, obj *FieldsOrderPayload) graphql.Marshaler { 15977 fields := graphql.CollectFields(ec.OperationContext, sel, fieldsOrderPayloadImplementors) 15978 out := graphql.NewFieldSet(fields) 15979 var invalids uint32 15980 for i, field := range fields { 15981 switch field.Name { 15982 case "__typename": 15983 out.Values[i] = graphql.MarshalString("FieldsOrderPayload") 15984 case "firstFieldValue": 15985 15986 out.Values[i] = ec._FieldsOrderPayload_firstFieldValue(ctx, field, obj) 15987 15988 default: 15989 panic("unknown field " + strconv.Quote(field.Name)) 15990 } 15991 } 15992 out.Dispatch() 15993 if invalids > 0 { 15994 return graphql.Null 15995 } 15996 return out 15997 } 15998 15999 var forcedResolverImplementors = []string{"ForcedResolver"} 16000 16001 func (ec *executionContext) _ForcedResolver(ctx context.Context, sel ast.SelectionSet, obj *ForcedResolver) graphql.Marshaler { 16002 fields := graphql.CollectFields(ec.OperationContext, sel, forcedResolverImplementors) 16003 out := graphql.NewFieldSet(fields) 16004 var invalids uint32 16005 for i, field := range fields { 16006 switch field.Name { 16007 case "__typename": 16008 out.Values[i] = graphql.MarshalString("ForcedResolver") 16009 case "field": 16010 field := field 16011 16012 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16013 defer func() { 16014 if r := recover(); r != nil { 16015 ec.Error(ctx, ec.Recover(ctx, r)) 16016 } 16017 }() 16018 res = ec._ForcedResolver_field(ctx, field, obj) 16019 return res 16020 } 16021 16022 out.Concurrently(i, func() graphql.Marshaler { 16023 return innerFunc(ctx) 16024 16025 }) 16026 default: 16027 panic("unknown field " + strconv.Quote(field.Name)) 16028 } 16029 } 16030 out.Dispatch() 16031 if invalids > 0 { 16032 return graphql.Null 16033 } 16034 return out 16035 } 16036 16037 var innerObjectImplementors = []string{"InnerObject"} 16038 16039 func (ec *executionContext) _InnerObject(ctx context.Context, sel ast.SelectionSet, obj *InnerObject) graphql.Marshaler { 16040 fields := graphql.CollectFields(ec.OperationContext, sel, innerObjectImplementors) 16041 out := graphql.NewFieldSet(fields) 16042 var invalids uint32 16043 for i, field := range fields { 16044 switch field.Name { 16045 case "__typename": 16046 out.Values[i] = graphql.MarshalString("InnerObject") 16047 case "id": 16048 16049 out.Values[i] = ec._InnerObject_id(ctx, field, obj) 16050 16051 if out.Values[i] == graphql.Null { 16052 invalids++ 16053 } 16054 default: 16055 panic("unknown field " + strconv.Quote(field.Name)) 16056 } 16057 } 16058 out.Dispatch() 16059 if invalids > 0 { 16060 return graphql.Null 16061 } 16062 return out 16063 } 16064 16065 var invalidIdentifierImplementors = []string{"InvalidIdentifier"} 16066 16067 func (ec *executionContext) _InvalidIdentifier(ctx context.Context, sel ast.SelectionSet, obj *invalid_packagename.InvalidIdentifier) graphql.Marshaler { 16068 fields := graphql.CollectFields(ec.OperationContext, sel, invalidIdentifierImplementors) 16069 out := graphql.NewFieldSet(fields) 16070 var invalids uint32 16071 for i, field := range fields { 16072 switch field.Name { 16073 case "__typename": 16074 out.Values[i] = graphql.MarshalString("InvalidIdentifier") 16075 case "id": 16076 16077 out.Values[i] = ec._InvalidIdentifier_id(ctx, field, obj) 16078 16079 if out.Values[i] == graphql.Null { 16080 invalids++ 16081 } 16082 default: 16083 panic("unknown field " + strconv.Quote(field.Name)) 16084 } 16085 } 16086 out.Dispatch() 16087 if invalids > 0 { 16088 return graphql.Null 16089 } 16090 return out 16091 } 16092 16093 var itImplementors = []string{"It"} 16094 16095 func (ec *executionContext) _It(ctx context.Context, sel ast.SelectionSet, obj *introspection1.It) graphql.Marshaler { 16096 fields := graphql.CollectFields(ec.OperationContext, sel, itImplementors) 16097 out := graphql.NewFieldSet(fields) 16098 var invalids uint32 16099 for i, field := range fields { 16100 switch field.Name { 16101 case "__typename": 16102 out.Values[i] = graphql.MarshalString("It") 16103 case "id": 16104 16105 out.Values[i] = ec._It_id(ctx, field, obj) 16106 16107 if out.Values[i] == graphql.Null { 16108 invalids++ 16109 } 16110 default: 16111 panic("unknown field " + strconv.Quote(field.Name)) 16112 } 16113 } 16114 out.Dispatch() 16115 if invalids > 0 { 16116 return graphql.Null 16117 } 16118 return out 16119 } 16120 16121 var loopAImplementors = []string{"LoopA"} 16122 16123 func (ec *executionContext) _LoopA(ctx context.Context, sel ast.SelectionSet, obj *LoopA) graphql.Marshaler { 16124 fields := graphql.CollectFields(ec.OperationContext, sel, loopAImplementors) 16125 out := graphql.NewFieldSet(fields) 16126 var invalids uint32 16127 for i, field := range fields { 16128 switch field.Name { 16129 case "__typename": 16130 out.Values[i] = graphql.MarshalString("LoopA") 16131 case "b": 16132 16133 out.Values[i] = ec._LoopA_b(ctx, field, obj) 16134 16135 if out.Values[i] == graphql.Null { 16136 invalids++ 16137 } 16138 default: 16139 panic("unknown field " + strconv.Quote(field.Name)) 16140 } 16141 } 16142 out.Dispatch() 16143 if invalids > 0 { 16144 return graphql.Null 16145 } 16146 return out 16147 } 16148 16149 var loopBImplementors = []string{"LoopB"} 16150 16151 func (ec *executionContext) _LoopB(ctx context.Context, sel ast.SelectionSet, obj *LoopB) graphql.Marshaler { 16152 fields := graphql.CollectFields(ec.OperationContext, sel, loopBImplementors) 16153 out := graphql.NewFieldSet(fields) 16154 var invalids uint32 16155 for i, field := range fields { 16156 switch field.Name { 16157 case "__typename": 16158 out.Values[i] = graphql.MarshalString("LoopB") 16159 case "a": 16160 16161 out.Values[i] = ec._LoopB_a(ctx, field, obj) 16162 16163 if out.Values[i] == graphql.Null { 16164 invalids++ 16165 } 16166 default: 16167 panic("unknown field " + strconv.Quote(field.Name)) 16168 } 16169 } 16170 out.Dispatch() 16171 if invalids > 0 { 16172 return graphql.Null 16173 } 16174 return out 16175 } 16176 16177 var mapImplementors = []string{"Map"} 16178 16179 func (ec *executionContext) _Map(ctx context.Context, sel ast.SelectionSet, obj *Map) graphql.Marshaler { 16180 fields := graphql.CollectFields(ec.OperationContext, sel, mapImplementors) 16181 out := graphql.NewFieldSet(fields) 16182 var invalids uint32 16183 for i, field := range fields { 16184 switch field.Name { 16185 case "__typename": 16186 out.Values[i] = graphql.MarshalString("Map") 16187 case "id": 16188 16189 out.Values[i] = ec._Map_id(ctx, field, obj) 16190 16191 if out.Values[i] == graphql.Null { 16192 invalids++ 16193 } 16194 default: 16195 panic("unknown field " + strconv.Quote(field.Name)) 16196 } 16197 } 16198 out.Dispatch() 16199 if invalids > 0 { 16200 return graphql.Null 16201 } 16202 return out 16203 } 16204 16205 var mapStringInterfaceTypeImplementors = []string{"MapStringInterfaceType"} 16206 16207 func (ec *executionContext) _MapStringInterfaceType(ctx context.Context, sel ast.SelectionSet, obj map[string]interface{}) graphql.Marshaler { 16208 fields := graphql.CollectFields(ec.OperationContext, sel, mapStringInterfaceTypeImplementors) 16209 out := graphql.NewFieldSet(fields) 16210 var invalids uint32 16211 for i, field := range fields { 16212 switch field.Name { 16213 case "__typename": 16214 out.Values[i] = graphql.MarshalString("MapStringInterfaceType") 16215 case "a": 16216 16217 out.Values[i] = ec._MapStringInterfaceType_a(ctx, field, obj) 16218 16219 case "b": 16220 16221 out.Values[i] = ec._MapStringInterfaceType_b(ctx, field, obj) 16222 16223 default: 16224 panic("unknown field " + strconv.Quote(field.Name)) 16225 } 16226 } 16227 out.Dispatch() 16228 if invalids > 0 { 16229 return graphql.Null 16230 } 16231 return out 16232 } 16233 16234 var modelMethodsImplementors = []string{"ModelMethods"} 16235 16236 func (ec *executionContext) _ModelMethods(ctx context.Context, sel ast.SelectionSet, obj *ModelMethods) graphql.Marshaler { 16237 fields := graphql.CollectFields(ec.OperationContext, sel, modelMethodsImplementors) 16238 out := graphql.NewFieldSet(fields) 16239 var invalids uint32 16240 for i, field := range fields { 16241 switch field.Name { 16242 case "__typename": 16243 out.Values[i] = graphql.MarshalString("ModelMethods") 16244 case "resolverField": 16245 field := field 16246 16247 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16248 defer func() { 16249 if r := recover(); r != nil { 16250 ec.Error(ctx, ec.Recover(ctx, r)) 16251 } 16252 }() 16253 res = ec._ModelMethods_resolverField(ctx, field, obj) 16254 if res == graphql.Null { 16255 atomic.AddUint32(&invalids, 1) 16256 } 16257 return res 16258 } 16259 16260 out.Concurrently(i, func() graphql.Marshaler { 16261 return innerFunc(ctx) 16262 16263 }) 16264 case "noContext": 16265 16266 out.Values[i] = ec._ModelMethods_noContext(ctx, field, obj) 16267 16268 if out.Values[i] == graphql.Null { 16269 atomic.AddUint32(&invalids, 1) 16270 } 16271 case "withContext": 16272 field := field 16273 16274 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16275 defer func() { 16276 if r := recover(); r != nil { 16277 ec.Error(ctx, ec.Recover(ctx, r)) 16278 } 16279 }() 16280 res = ec._ModelMethods_withContext(ctx, field, obj) 16281 if res == graphql.Null { 16282 atomic.AddUint32(&invalids, 1) 16283 } 16284 return res 16285 } 16286 16287 out.Concurrently(i, func() graphql.Marshaler { 16288 return innerFunc(ctx) 16289 16290 }) 16291 default: 16292 panic("unknown field " + strconv.Quote(field.Name)) 16293 } 16294 } 16295 out.Dispatch() 16296 if invalids > 0 { 16297 return graphql.Null 16298 } 16299 return out 16300 } 16301 16302 var mutationImplementors = []string{"Mutation"} 16303 16304 func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { 16305 fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors) 16306 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ 16307 Object: "Mutation", 16308 }) 16309 16310 out := graphql.NewFieldSet(fields) 16311 var invalids uint32 16312 for i, field := range fields { 16313 innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ 16314 Object: field.Name, 16315 Field: field, 16316 }) 16317 16318 switch field.Name { 16319 case "__typename": 16320 out.Values[i] = graphql.MarshalString("Mutation") 16321 case "defaultInput": 16322 16323 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 16324 return ec._Mutation_defaultInput(ctx, field) 16325 }) 16326 16327 if out.Values[i] == graphql.Null { 16328 invalids++ 16329 } 16330 case "overrideValueViaInput": 16331 16332 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 16333 return ec._Mutation_overrideValueViaInput(ctx, field) 16334 }) 16335 16336 if out.Values[i] == graphql.Null { 16337 invalids++ 16338 } 16339 case "updateSomething": 16340 16341 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 16342 return ec._Mutation_updateSomething(ctx, field) 16343 }) 16344 16345 if out.Values[i] == graphql.Null { 16346 invalids++ 16347 } 16348 case "updatePtrToPtr": 16349 16350 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 16351 return ec._Mutation_updatePtrToPtr(ctx, field) 16352 }) 16353 16354 if out.Values[i] == graphql.Null { 16355 invalids++ 16356 } 16357 default: 16358 panic("unknown field " + strconv.Quote(field.Name)) 16359 } 16360 } 16361 out.Dispatch() 16362 if invalids > 0 { 16363 return graphql.Null 16364 } 16365 return out 16366 } 16367 16368 var objectDirectivesImplementors = []string{"ObjectDirectives"} 16369 16370 func (ec *executionContext) _ObjectDirectives(ctx context.Context, sel ast.SelectionSet, obj *ObjectDirectives) graphql.Marshaler { 16371 fields := graphql.CollectFields(ec.OperationContext, sel, objectDirectivesImplementors) 16372 out := graphql.NewFieldSet(fields) 16373 var invalids uint32 16374 for i, field := range fields { 16375 switch field.Name { 16376 case "__typename": 16377 out.Values[i] = graphql.MarshalString("ObjectDirectives") 16378 case "text": 16379 16380 out.Values[i] = ec._ObjectDirectives_text(ctx, field, obj) 16381 16382 if out.Values[i] == graphql.Null { 16383 invalids++ 16384 } 16385 case "nullableText": 16386 16387 out.Values[i] = ec._ObjectDirectives_nullableText(ctx, field, obj) 16388 16389 case "order": 16390 16391 out.Values[i] = ec._ObjectDirectives_order(ctx, field, obj) 16392 16393 if out.Values[i] == graphql.Null { 16394 invalids++ 16395 } 16396 default: 16397 panic("unknown field " + strconv.Quote(field.Name)) 16398 } 16399 } 16400 out.Dispatch() 16401 if invalids > 0 { 16402 return graphql.Null 16403 } 16404 return out 16405 } 16406 16407 var objectDirectivesWithCustomGoModelImplementors = []string{"ObjectDirectivesWithCustomGoModel"} 16408 16409 func (ec *executionContext) _ObjectDirectivesWithCustomGoModel(ctx context.Context, sel ast.SelectionSet, obj *ObjectDirectivesWithCustomGoModel) graphql.Marshaler { 16410 fields := graphql.CollectFields(ec.OperationContext, sel, objectDirectivesWithCustomGoModelImplementors) 16411 out := graphql.NewFieldSet(fields) 16412 var invalids uint32 16413 for i, field := range fields { 16414 switch field.Name { 16415 case "__typename": 16416 out.Values[i] = graphql.MarshalString("ObjectDirectivesWithCustomGoModel") 16417 case "nullableText": 16418 16419 out.Values[i] = ec._ObjectDirectivesWithCustomGoModel_nullableText(ctx, field, obj) 16420 16421 default: 16422 panic("unknown field " + strconv.Quote(field.Name)) 16423 } 16424 } 16425 out.Dispatch() 16426 if invalids > 0 { 16427 return graphql.Null 16428 } 16429 return out 16430 } 16431 16432 var outerObjectImplementors = []string{"OuterObject"} 16433 16434 func (ec *executionContext) _OuterObject(ctx context.Context, sel ast.SelectionSet, obj *OuterObject) graphql.Marshaler { 16435 fields := graphql.CollectFields(ec.OperationContext, sel, outerObjectImplementors) 16436 out := graphql.NewFieldSet(fields) 16437 var invalids uint32 16438 for i, field := range fields { 16439 switch field.Name { 16440 case "__typename": 16441 out.Values[i] = graphql.MarshalString("OuterObject") 16442 case "inner": 16443 16444 out.Values[i] = ec._OuterObject_inner(ctx, field, obj) 16445 16446 if out.Values[i] == graphql.Null { 16447 invalids++ 16448 } 16449 default: 16450 panic("unknown field " + strconv.Quote(field.Name)) 16451 } 16452 } 16453 out.Dispatch() 16454 if invalids > 0 { 16455 return graphql.Null 16456 } 16457 return out 16458 } 16459 16460 var overlappingFieldsImplementors = []string{"OverlappingFields"} 16461 16462 func (ec *executionContext) _OverlappingFields(ctx context.Context, sel ast.SelectionSet, obj *OverlappingFields) graphql.Marshaler { 16463 fields := graphql.CollectFields(ec.OperationContext, sel, overlappingFieldsImplementors) 16464 out := graphql.NewFieldSet(fields) 16465 var invalids uint32 16466 for i, field := range fields { 16467 switch field.Name { 16468 case "__typename": 16469 out.Values[i] = graphql.MarshalString("OverlappingFields") 16470 case "oneFoo": 16471 16472 out.Values[i] = ec._OverlappingFields_oneFoo(ctx, field, obj) 16473 16474 if out.Values[i] == graphql.Null { 16475 atomic.AddUint32(&invalids, 1) 16476 } 16477 case "twoFoo": 16478 16479 out.Values[i] = ec._OverlappingFields_twoFoo(ctx, field, obj) 16480 16481 if out.Values[i] == graphql.Null { 16482 atomic.AddUint32(&invalids, 1) 16483 } 16484 case "oldFoo": 16485 field := field 16486 16487 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16488 defer func() { 16489 if r := recover(); r != nil { 16490 ec.Error(ctx, ec.Recover(ctx, r)) 16491 } 16492 }() 16493 res = ec._OverlappingFields_oldFoo(ctx, field, obj) 16494 if res == graphql.Null { 16495 atomic.AddUint32(&invalids, 1) 16496 } 16497 return res 16498 } 16499 16500 out.Concurrently(i, func() graphql.Marshaler { 16501 return innerFunc(ctx) 16502 16503 }) 16504 case "newFoo": 16505 16506 out.Values[i] = ec._OverlappingFields_newFoo(ctx, field, obj) 16507 16508 if out.Values[i] == graphql.Null { 16509 atomic.AddUint32(&invalids, 1) 16510 } 16511 case "new_foo": 16512 16513 out.Values[i] = ec._OverlappingFields_new_foo(ctx, field, obj) 16514 16515 if out.Values[i] == graphql.Null { 16516 atomic.AddUint32(&invalids, 1) 16517 } 16518 default: 16519 panic("unknown field " + strconv.Quote(field.Name)) 16520 } 16521 } 16522 out.Dispatch() 16523 if invalids > 0 { 16524 return graphql.Null 16525 } 16526 return out 16527 } 16528 16529 var panicsImplementors = []string{"Panics"} 16530 16531 func (ec *executionContext) _Panics(ctx context.Context, sel ast.SelectionSet, obj *Panics) graphql.Marshaler { 16532 fields := graphql.CollectFields(ec.OperationContext, sel, panicsImplementors) 16533 out := graphql.NewFieldSet(fields) 16534 var invalids uint32 16535 for i, field := range fields { 16536 switch field.Name { 16537 case "__typename": 16538 out.Values[i] = graphql.MarshalString("Panics") 16539 case "fieldScalarMarshal": 16540 field := field 16541 16542 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16543 defer func() { 16544 if r := recover(); r != nil { 16545 ec.Error(ctx, ec.Recover(ctx, r)) 16546 } 16547 }() 16548 res = ec._Panics_fieldScalarMarshal(ctx, field, obj) 16549 if res == graphql.Null { 16550 atomic.AddUint32(&invalids, 1) 16551 } 16552 return res 16553 } 16554 16555 out.Concurrently(i, func() graphql.Marshaler { 16556 return innerFunc(ctx) 16557 16558 }) 16559 case "fieldFuncMarshal": 16560 field := field 16561 16562 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16563 defer func() { 16564 if r := recover(); r != nil { 16565 ec.Error(ctx, ec.Recover(ctx, r)) 16566 } 16567 }() 16568 res = ec._Panics_fieldFuncMarshal(ctx, field, obj) 16569 if res == graphql.Null { 16570 atomic.AddUint32(&invalids, 1) 16571 } 16572 return res 16573 } 16574 16575 out.Concurrently(i, func() graphql.Marshaler { 16576 return innerFunc(ctx) 16577 16578 }) 16579 case "argUnmarshal": 16580 field := field 16581 16582 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16583 defer func() { 16584 if r := recover(); r != nil { 16585 ec.Error(ctx, ec.Recover(ctx, r)) 16586 } 16587 }() 16588 res = ec._Panics_argUnmarshal(ctx, field, obj) 16589 if res == graphql.Null { 16590 atomic.AddUint32(&invalids, 1) 16591 } 16592 return res 16593 } 16594 16595 out.Concurrently(i, func() graphql.Marshaler { 16596 return innerFunc(ctx) 16597 16598 }) 16599 default: 16600 panic("unknown field " + strconv.Quote(field.Name)) 16601 } 16602 } 16603 out.Dispatch() 16604 if invalids > 0 { 16605 return graphql.Null 16606 } 16607 return out 16608 } 16609 16610 var petImplementors = []string{"Pet"} 16611 16612 func (ec *executionContext) _Pet(ctx context.Context, sel ast.SelectionSet, obj *Pet) graphql.Marshaler { 16613 fields := graphql.CollectFields(ec.OperationContext, sel, petImplementors) 16614 out := graphql.NewFieldSet(fields) 16615 var invalids uint32 16616 for i, field := range fields { 16617 switch field.Name { 16618 case "__typename": 16619 out.Values[i] = graphql.MarshalString("Pet") 16620 case "id": 16621 16622 out.Values[i] = ec._Pet_id(ctx, field, obj) 16623 16624 if out.Values[i] == graphql.Null { 16625 atomic.AddUint32(&invalids, 1) 16626 } 16627 case "friends": 16628 field := field 16629 16630 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16631 defer func() { 16632 if r := recover(); r != nil { 16633 ec.Error(ctx, ec.Recover(ctx, r)) 16634 } 16635 }() 16636 res = ec._Pet_friends(ctx, field, obj) 16637 return res 16638 } 16639 16640 out.Concurrently(i, func() graphql.Marshaler { 16641 return innerFunc(ctx) 16642 16643 }) 16644 default: 16645 panic("unknown field " + strconv.Quote(field.Name)) 16646 } 16647 } 16648 out.Dispatch() 16649 if invalids > 0 { 16650 return graphql.Null 16651 } 16652 return out 16653 } 16654 16655 var primitiveImplementors = []string{"Primitive"} 16656 16657 func (ec *executionContext) _Primitive(ctx context.Context, sel ast.SelectionSet, obj *Primitive) graphql.Marshaler { 16658 fields := graphql.CollectFields(ec.OperationContext, sel, primitiveImplementors) 16659 out := graphql.NewFieldSet(fields) 16660 var invalids uint32 16661 for i, field := range fields { 16662 switch field.Name { 16663 case "__typename": 16664 out.Values[i] = graphql.MarshalString("Primitive") 16665 case "value": 16666 field := field 16667 16668 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16669 defer func() { 16670 if r := recover(); r != nil { 16671 ec.Error(ctx, ec.Recover(ctx, r)) 16672 } 16673 }() 16674 res = ec._Primitive_value(ctx, field, obj) 16675 if res == graphql.Null { 16676 atomic.AddUint32(&invalids, 1) 16677 } 16678 return res 16679 } 16680 16681 out.Concurrently(i, func() graphql.Marshaler { 16682 return innerFunc(ctx) 16683 16684 }) 16685 case "squared": 16686 16687 out.Values[i] = ec._Primitive_squared(ctx, field, obj) 16688 16689 if out.Values[i] == graphql.Null { 16690 atomic.AddUint32(&invalids, 1) 16691 } 16692 default: 16693 panic("unknown field " + strconv.Quote(field.Name)) 16694 } 16695 } 16696 out.Dispatch() 16697 if invalids > 0 { 16698 return graphql.Null 16699 } 16700 return out 16701 } 16702 16703 var primitiveStringImplementors = []string{"PrimitiveString"} 16704 16705 func (ec *executionContext) _PrimitiveString(ctx context.Context, sel ast.SelectionSet, obj *PrimitiveString) graphql.Marshaler { 16706 fields := graphql.CollectFields(ec.OperationContext, sel, primitiveStringImplementors) 16707 out := graphql.NewFieldSet(fields) 16708 var invalids uint32 16709 for i, field := range fields { 16710 switch field.Name { 16711 case "__typename": 16712 out.Values[i] = graphql.MarshalString("PrimitiveString") 16713 case "value": 16714 field := field 16715 16716 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16717 defer func() { 16718 if r := recover(); r != nil { 16719 ec.Error(ctx, ec.Recover(ctx, r)) 16720 } 16721 }() 16722 res = ec._PrimitiveString_value(ctx, field, obj) 16723 if res == graphql.Null { 16724 atomic.AddUint32(&invalids, 1) 16725 } 16726 return res 16727 } 16728 16729 out.Concurrently(i, func() graphql.Marshaler { 16730 return innerFunc(ctx) 16731 16732 }) 16733 case "doubled": 16734 16735 out.Values[i] = ec._PrimitiveString_doubled(ctx, field, obj) 16736 16737 if out.Values[i] == graphql.Null { 16738 atomic.AddUint32(&invalids, 1) 16739 } 16740 case "len": 16741 field := field 16742 16743 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16744 defer func() { 16745 if r := recover(); r != nil { 16746 ec.Error(ctx, ec.Recover(ctx, r)) 16747 } 16748 }() 16749 res = ec._PrimitiveString_len(ctx, field, obj) 16750 if res == graphql.Null { 16751 atomic.AddUint32(&invalids, 1) 16752 } 16753 return res 16754 } 16755 16756 out.Concurrently(i, func() graphql.Marshaler { 16757 return innerFunc(ctx) 16758 16759 }) 16760 default: 16761 panic("unknown field " + strconv.Quote(field.Name)) 16762 } 16763 } 16764 out.Dispatch() 16765 if invalids > 0 { 16766 return graphql.Null 16767 } 16768 return out 16769 } 16770 16771 var ptrToPtrInnerImplementors = []string{"PtrToPtrInner"} 16772 16773 func (ec *executionContext) _PtrToPtrInner(ctx context.Context, sel ast.SelectionSet, obj *PtrToPtrInner) graphql.Marshaler { 16774 fields := graphql.CollectFields(ec.OperationContext, sel, ptrToPtrInnerImplementors) 16775 out := graphql.NewFieldSet(fields) 16776 var invalids uint32 16777 for i, field := range fields { 16778 switch field.Name { 16779 case "__typename": 16780 out.Values[i] = graphql.MarshalString("PtrToPtrInner") 16781 case "key": 16782 16783 out.Values[i] = ec._PtrToPtrInner_key(ctx, field, obj) 16784 16785 if out.Values[i] == graphql.Null { 16786 invalids++ 16787 } 16788 case "value": 16789 16790 out.Values[i] = ec._PtrToPtrInner_value(ctx, field, obj) 16791 16792 if out.Values[i] == graphql.Null { 16793 invalids++ 16794 } 16795 default: 16796 panic("unknown field " + strconv.Quote(field.Name)) 16797 } 16798 } 16799 out.Dispatch() 16800 if invalids > 0 { 16801 return graphql.Null 16802 } 16803 return out 16804 } 16805 16806 var ptrToPtrOuterImplementors = []string{"PtrToPtrOuter"} 16807 16808 func (ec *executionContext) _PtrToPtrOuter(ctx context.Context, sel ast.SelectionSet, obj *PtrToPtrOuter) graphql.Marshaler { 16809 fields := graphql.CollectFields(ec.OperationContext, sel, ptrToPtrOuterImplementors) 16810 out := graphql.NewFieldSet(fields) 16811 var invalids uint32 16812 for i, field := range fields { 16813 switch field.Name { 16814 case "__typename": 16815 out.Values[i] = graphql.MarshalString("PtrToPtrOuter") 16816 case "name": 16817 16818 out.Values[i] = ec._PtrToPtrOuter_name(ctx, field, obj) 16819 16820 if out.Values[i] == graphql.Null { 16821 invalids++ 16822 } 16823 case "inner": 16824 16825 out.Values[i] = ec._PtrToPtrOuter_inner(ctx, field, obj) 16826 16827 case "stupidInner": 16828 16829 out.Values[i] = ec._PtrToPtrOuter_stupidInner(ctx, field, obj) 16830 16831 default: 16832 panic("unknown field " + strconv.Quote(field.Name)) 16833 } 16834 } 16835 out.Dispatch() 16836 if invalids > 0 { 16837 return graphql.Null 16838 } 16839 return out 16840 } 16841 16842 var ptrToSliceContainerImplementors = []string{"PtrToSliceContainer"} 16843 16844 func (ec *executionContext) _PtrToSliceContainer(ctx context.Context, sel ast.SelectionSet, obj *PtrToSliceContainer) graphql.Marshaler { 16845 fields := graphql.CollectFields(ec.OperationContext, sel, ptrToSliceContainerImplementors) 16846 out := graphql.NewFieldSet(fields) 16847 var invalids uint32 16848 for i, field := range fields { 16849 switch field.Name { 16850 case "__typename": 16851 out.Values[i] = graphql.MarshalString("PtrToSliceContainer") 16852 case "ptrToSlice": 16853 16854 out.Values[i] = ec._PtrToSliceContainer_ptrToSlice(ctx, field, obj) 16855 16856 default: 16857 panic("unknown field " + strconv.Quote(field.Name)) 16858 } 16859 } 16860 out.Dispatch() 16861 if invalids > 0 { 16862 return graphql.Null 16863 } 16864 return out 16865 } 16866 16867 var queryImplementors = []string{"Query"} 16868 16869 func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { 16870 fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) 16871 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ 16872 Object: "Query", 16873 }) 16874 16875 out := graphql.NewFieldSet(fields) 16876 var invalids uint32 16877 for i, field := range fields { 16878 innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ 16879 Object: field.Name, 16880 Field: field, 16881 }) 16882 16883 switch field.Name { 16884 case "__typename": 16885 out.Values[i] = graphql.MarshalString("Query") 16886 case "invalidIdentifier": 16887 field := field 16888 16889 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16890 defer func() { 16891 if r := recover(); r != nil { 16892 ec.Error(ctx, ec.Recover(ctx, r)) 16893 } 16894 }() 16895 res = ec._Query_invalidIdentifier(ctx, field) 16896 return res 16897 } 16898 16899 rrm := func(ctx context.Context) graphql.Marshaler { 16900 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 16901 } 16902 16903 out.Concurrently(i, func() graphql.Marshaler { 16904 return rrm(innerCtx) 16905 }) 16906 case "collision": 16907 field := field 16908 16909 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16910 defer func() { 16911 if r := recover(); r != nil { 16912 ec.Error(ctx, ec.Recover(ctx, r)) 16913 } 16914 }() 16915 res = ec._Query_collision(ctx, field) 16916 return res 16917 } 16918 16919 rrm := func(ctx context.Context) graphql.Marshaler { 16920 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 16921 } 16922 16923 out.Concurrently(i, func() graphql.Marshaler { 16924 return rrm(innerCtx) 16925 }) 16926 case "mapInput": 16927 field := field 16928 16929 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16930 defer func() { 16931 if r := recover(); r != nil { 16932 ec.Error(ctx, ec.Recover(ctx, r)) 16933 } 16934 }() 16935 res = ec._Query_mapInput(ctx, field) 16936 return res 16937 } 16938 16939 rrm := func(ctx context.Context) graphql.Marshaler { 16940 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 16941 } 16942 16943 out.Concurrently(i, func() graphql.Marshaler { 16944 return rrm(innerCtx) 16945 }) 16946 case "recursive": 16947 field := field 16948 16949 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16950 defer func() { 16951 if r := recover(); r != nil { 16952 ec.Error(ctx, ec.Recover(ctx, r)) 16953 } 16954 }() 16955 res = ec._Query_recursive(ctx, field) 16956 return res 16957 } 16958 16959 rrm := func(ctx context.Context) graphql.Marshaler { 16960 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 16961 } 16962 16963 out.Concurrently(i, func() graphql.Marshaler { 16964 return rrm(innerCtx) 16965 }) 16966 case "nestedInputs": 16967 field := field 16968 16969 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16970 defer func() { 16971 if r := recover(); r != nil { 16972 ec.Error(ctx, ec.Recover(ctx, r)) 16973 } 16974 }() 16975 res = ec._Query_nestedInputs(ctx, field) 16976 return res 16977 } 16978 16979 rrm := func(ctx context.Context) graphql.Marshaler { 16980 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 16981 } 16982 16983 out.Concurrently(i, func() graphql.Marshaler { 16984 return rrm(innerCtx) 16985 }) 16986 case "nestedOutputs": 16987 field := field 16988 16989 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16990 defer func() { 16991 if r := recover(); r != nil { 16992 ec.Error(ctx, ec.Recover(ctx, r)) 16993 } 16994 }() 16995 res = ec._Query_nestedOutputs(ctx, field) 16996 return res 16997 } 16998 16999 rrm := func(ctx context.Context) graphql.Marshaler { 17000 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17001 } 17002 17003 out.Concurrently(i, func() graphql.Marshaler { 17004 return rrm(innerCtx) 17005 }) 17006 case "modelMethods": 17007 field := field 17008 17009 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17010 defer func() { 17011 if r := recover(); r != nil { 17012 ec.Error(ctx, ec.Recover(ctx, r)) 17013 } 17014 }() 17015 res = ec._Query_modelMethods(ctx, field) 17016 return res 17017 } 17018 17019 rrm := func(ctx context.Context) graphql.Marshaler { 17020 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17021 } 17022 17023 out.Concurrently(i, func() graphql.Marshaler { 17024 return rrm(innerCtx) 17025 }) 17026 case "user": 17027 field := field 17028 17029 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17030 defer func() { 17031 if r := recover(); r != nil { 17032 ec.Error(ctx, ec.Recover(ctx, r)) 17033 } 17034 }() 17035 res = ec._Query_user(ctx, field) 17036 if res == graphql.Null { 17037 atomic.AddUint32(&invalids, 1) 17038 } 17039 return res 17040 } 17041 17042 rrm := func(ctx context.Context) graphql.Marshaler { 17043 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17044 } 17045 17046 out.Concurrently(i, func() graphql.Marshaler { 17047 return rrm(innerCtx) 17048 }) 17049 case "nullableArg": 17050 field := field 17051 17052 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17053 defer func() { 17054 if r := recover(); r != nil { 17055 ec.Error(ctx, ec.Recover(ctx, r)) 17056 } 17057 }() 17058 res = ec._Query_nullableArg(ctx, field) 17059 return res 17060 } 17061 17062 rrm := func(ctx context.Context) graphql.Marshaler { 17063 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17064 } 17065 17066 out.Concurrently(i, func() graphql.Marshaler { 17067 return rrm(innerCtx) 17068 }) 17069 case "inputSlice": 17070 field := field 17071 17072 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17073 defer func() { 17074 if r := recover(); r != nil { 17075 ec.Error(ctx, ec.Recover(ctx, r)) 17076 } 17077 }() 17078 res = ec._Query_inputSlice(ctx, field) 17079 if res == graphql.Null { 17080 atomic.AddUint32(&invalids, 1) 17081 } 17082 return res 17083 } 17084 17085 rrm := func(ctx context.Context) graphql.Marshaler { 17086 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17087 } 17088 17089 out.Concurrently(i, func() graphql.Marshaler { 17090 return rrm(innerCtx) 17091 }) 17092 case "inputNullableSlice": 17093 field := field 17094 17095 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17096 defer func() { 17097 if r := recover(); r != nil { 17098 ec.Error(ctx, ec.Recover(ctx, r)) 17099 } 17100 }() 17101 res = ec._Query_inputNullableSlice(ctx, field) 17102 if res == graphql.Null { 17103 atomic.AddUint32(&invalids, 1) 17104 } 17105 return res 17106 } 17107 17108 rrm := func(ctx context.Context) graphql.Marshaler { 17109 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17110 } 17111 17112 out.Concurrently(i, func() graphql.Marshaler { 17113 return rrm(innerCtx) 17114 }) 17115 case "shapeUnion": 17116 field := field 17117 17118 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17119 defer func() { 17120 if r := recover(); r != nil { 17121 ec.Error(ctx, ec.Recover(ctx, r)) 17122 } 17123 }() 17124 res = ec._Query_shapeUnion(ctx, field) 17125 if res == graphql.Null { 17126 atomic.AddUint32(&invalids, 1) 17127 } 17128 return res 17129 } 17130 17131 rrm := func(ctx context.Context) graphql.Marshaler { 17132 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17133 } 17134 17135 out.Concurrently(i, func() graphql.Marshaler { 17136 return rrm(innerCtx) 17137 }) 17138 case "autobind": 17139 field := field 17140 17141 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17142 defer func() { 17143 if r := recover(); r != nil { 17144 ec.Error(ctx, ec.Recover(ctx, r)) 17145 } 17146 }() 17147 res = ec._Query_autobind(ctx, field) 17148 return res 17149 } 17150 17151 rrm := func(ctx context.Context) graphql.Marshaler { 17152 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17153 } 17154 17155 out.Concurrently(i, func() graphql.Marshaler { 17156 return rrm(innerCtx) 17157 }) 17158 case "deprecatedField": 17159 field := field 17160 17161 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17162 defer func() { 17163 if r := recover(); r != nil { 17164 ec.Error(ctx, ec.Recover(ctx, r)) 17165 } 17166 }() 17167 res = ec._Query_deprecatedField(ctx, field) 17168 if res == graphql.Null { 17169 atomic.AddUint32(&invalids, 1) 17170 } 17171 return res 17172 } 17173 17174 rrm := func(ctx context.Context) graphql.Marshaler { 17175 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17176 } 17177 17178 out.Concurrently(i, func() graphql.Marshaler { 17179 return rrm(innerCtx) 17180 }) 17181 case "overlapping": 17182 field := field 17183 17184 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17185 defer func() { 17186 if r := recover(); r != nil { 17187 ec.Error(ctx, ec.Recover(ctx, r)) 17188 } 17189 }() 17190 res = ec._Query_overlapping(ctx, field) 17191 return res 17192 } 17193 17194 rrm := func(ctx context.Context) graphql.Marshaler { 17195 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17196 } 17197 17198 out.Concurrently(i, func() graphql.Marshaler { 17199 return rrm(innerCtx) 17200 }) 17201 case "defaultParameters": 17202 field := field 17203 17204 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17205 defer func() { 17206 if r := recover(); r != nil { 17207 ec.Error(ctx, ec.Recover(ctx, r)) 17208 } 17209 }() 17210 res = ec._Query_defaultParameters(ctx, field) 17211 if res == graphql.Null { 17212 atomic.AddUint32(&invalids, 1) 17213 } 17214 return res 17215 } 17216 17217 rrm := func(ctx context.Context) graphql.Marshaler { 17218 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17219 } 17220 17221 out.Concurrently(i, func() graphql.Marshaler { 17222 return rrm(innerCtx) 17223 }) 17224 case "directiveArg": 17225 field := field 17226 17227 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17228 defer func() { 17229 if r := recover(); r != nil { 17230 ec.Error(ctx, ec.Recover(ctx, r)) 17231 } 17232 }() 17233 res = ec._Query_directiveArg(ctx, field) 17234 return res 17235 } 17236 17237 rrm := func(ctx context.Context) graphql.Marshaler { 17238 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17239 } 17240 17241 out.Concurrently(i, func() graphql.Marshaler { 17242 return rrm(innerCtx) 17243 }) 17244 case "directiveNullableArg": 17245 field := field 17246 17247 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17248 defer func() { 17249 if r := recover(); r != nil { 17250 ec.Error(ctx, ec.Recover(ctx, r)) 17251 } 17252 }() 17253 res = ec._Query_directiveNullableArg(ctx, field) 17254 return res 17255 } 17256 17257 rrm := func(ctx context.Context) graphql.Marshaler { 17258 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17259 } 17260 17261 out.Concurrently(i, func() graphql.Marshaler { 17262 return rrm(innerCtx) 17263 }) 17264 case "directiveInputNullable": 17265 field := field 17266 17267 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17268 defer func() { 17269 if r := recover(); r != nil { 17270 ec.Error(ctx, ec.Recover(ctx, r)) 17271 } 17272 }() 17273 res = ec._Query_directiveInputNullable(ctx, field) 17274 return res 17275 } 17276 17277 rrm := func(ctx context.Context) graphql.Marshaler { 17278 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17279 } 17280 17281 out.Concurrently(i, func() graphql.Marshaler { 17282 return rrm(innerCtx) 17283 }) 17284 case "directiveInput": 17285 field := field 17286 17287 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17288 defer func() { 17289 if r := recover(); r != nil { 17290 ec.Error(ctx, ec.Recover(ctx, r)) 17291 } 17292 }() 17293 res = ec._Query_directiveInput(ctx, field) 17294 return res 17295 } 17296 17297 rrm := func(ctx context.Context) graphql.Marshaler { 17298 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17299 } 17300 17301 out.Concurrently(i, func() graphql.Marshaler { 17302 return rrm(innerCtx) 17303 }) 17304 case "directiveInputType": 17305 field := field 17306 17307 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17308 defer func() { 17309 if r := recover(); r != nil { 17310 ec.Error(ctx, ec.Recover(ctx, r)) 17311 } 17312 }() 17313 res = ec._Query_directiveInputType(ctx, field) 17314 return res 17315 } 17316 17317 rrm := func(ctx context.Context) graphql.Marshaler { 17318 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17319 } 17320 17321 out.Concurrently(i, func() graphql.Marshaler { 17322 return rrm(innerCtx) 17323 }) 17324 case "directiveObject": 17325 field := field 17326 17327 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17328 defer func() { 17329 if r := recover(); r != nil { 17330 ec.Error(ctx, ec.Recover(ctx, r)) 17331 } 17332 }() 17333 res = ec._Query_directiveObject(ctx, field) 17334 return res 17335 } 17336 17337 rrm := func(ctx context.Context) graphql.Marshaler { 17338 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17339 } 17340 17341 out.Concurrently(i, func() graphql.Marshaler { 17342 return rrm(innerCtx) 17343 }) 17344 case "directiveObjectWithCustomGoModel": 17345 field := field 17346 17347 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17348 defer func() { 17349 if r := recover(); r != nil { 17350 ec.Error(ctx, ec.Recover(ctx, r)) 17351 } 17352 }() 17353 res = ec._Query_directiveObjectWithCustomGoModel(ctx, field) 17354 return res 17355 } 17356 17357 rrm := func(ctx context.Context) graphql.Marshaler { 17358 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17359 } 17360 17361 out.Concurrently(i, func() graphql.Marshaler { 17362 return rrm(innerCtx) 17363 }) 17364 case "directiveFieldDef": 17365 field := field 17366 17367 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17368 defer func() { 17369 if r := recover(); r != nil { 17370 ec.Error(ctx, ec.Recover(ctx, r)) 17371 } 17372 }() 17373 res = ec._Query_directiveFieldDef(ctx, field) 17374 if res == graphql.Null { 17375 atomic.AddUint32(&invalids, 1) 17376 } 17377 return res 17378 } 17379 17380 rrm := func(ctx context.Context) graphql.Marshaler { 17381 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17382 } 17383 17384 out.Concurrently(i, func() graphql.Marshaler { 17385 return rrm(innerCtx) 17386 }) 17387 case "directiveField": 17388 field := field 17389 17390 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17391 defer func() { 17392 if r := recover(); r != nil { 17393 ec.Error(ctx, ec.Recover(ctx, r)) 17394 } 17395 }() 17396 res = ec._Query_directiveField(ctx, field) 17397 return res 17398 } 17399 17400 rrm := func(ctx context.Context) graphql.Marshaler { 17401 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17402 } 17403 17404 out.Concurrently(i, func() graphql.Marshaler { 17405 return rrm(innerCtx) 17406 }) 17407 case "directiveDouble": 17408 field := field 17409 17410 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17411 defer func() { 17412 if r := recover(); r != nil { 17413 ec.Error(ctx, ec.Recover(ctx, r)) 17414 } 17415 }() 17416 res = ec._Query_directiveDouble(ctx, field) 17417 return res 17418 } 17419 17420 rrm := func(ctx context.Context) graphql.Marshaler { 17421 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17422 } 17423 17424 out.Concurrently(i, func() graphql.Marshaler { 17425 return rrm(innerCtx) 17426 }) 17427 case "directiveUnimplemented": 17428 field := field 17429 17430 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17431 defer func() { 17432 if r := recover(); r != nil { 17433 ec.Error(ctx, ec.Recover(ctx, r)) 17434 } 17435 }() 17436 res = ec._Query_directiveUnimplemented(ctx, field) 17437 return res 17438 } 17439 17440 rrm := func(ctx context.Context) graphql.Marshaler { 17441 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17442 } 17443 17444 out.Concurrently(i, func() graphql.Marshaler { 17445 return rrm(innerCtx) 17446 }) 17447 case "embeddedCase1": 17448 field := field 17449 17450 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17451 defer func() { 17452 if r := recover(); r != nil { 17453 ec.Error(ctx, ec.Recover(ctx, r)) 17454 } 17455 }() 17456 res = ec._Query_embeddedCase1(ctx, field) 17457 return res 17458 } 17459 17460 rrm := func(ctx context.Context) graphql.Marshaler { 17461 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17462 } 17463 17464 out.Concurrently(i, func() graphql.Marshaler { 17465 return rrm(innerCtx) 17466 }) 17467 case "embeddedCase2": 17468 field := field 17469 17470 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17471 defer func() { 17472 if r := recover(); r != nil { 17473 ec.Error(ctx, ec.Recover(ctx, r)) 17474 } 17475 }() 17476 res = ec._Query_embeddedCase2(ctx, field) 17477 return res 17478 } 17479 17480 rrm := func(ctx context.Context) graphql.Marshaler { 17481 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17482 } 17483 17484 out.Concurrently(i, func() graphql.Marshaler { 17485 return rrm(innerCtx) 17486 }) 17487 case "embeddedCase3": 17488 field := field 17489 17490 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17491 defer func() { 17492 if r := recover(); r != nil { 17493 ec.Error(ctx, ec.Recover(ctx, r)) 17494 } 17495 }() 17496 res = ec._Query_embeddedCase3(ctx, field) 17497 return res 17498 } 17499 17500 rrm := func(ctx context.Context) graphql.Marshaler { 17501 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17502 } 17503 17504 out.Concurrently(i, func() graphql.Marshaler { 17505 return rrm(innerCtx) 17506 }) 17507 case "enumInInput": 17508 field := field 17509 17510 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17511 defer func() { 17512 if r := recover(); r != nil { 17513 ec.Error(ctx, ec.Recover(ctx, r)) 17514 } 17515 }() 17516 res = ec._Query_enumInInput(ctx, field) 17517 if res == graphql.Null { 17518 atomic.AddUint32(&invalids, 1) 17519 } 17520 return res 17521 } 17522 17523 rrm := func(ctx context.Context) graphql.Marshaler { 17524 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17525 } 17526 17527 out.Concurrently(i, func() graphql.Marshaler { 17528 return rrm(innerCtx) 17529 }) 17530 case "shapes": 17531 field := field 17532 17533 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17534 defer func() { 17535 if r := recover(); r != nil { 17536 ec.Error(ctx, ec.Recover(ctx, r)) 17537 } 17538 }() 17539 res = ec._Query_shapes(ctx, field) 17540 return res 17541 } 17542 17543 rrm := func(ctx context.Context) graphql.Marshaler { 17544 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17545 } 17546 17547 out.Concurrently(i, func() graphql.Marshaler { 17548 return rrm(innerCtx) 17549 }) 17550 case "noShape": 17551 field := field 17552 17553 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17554 defer func() { 17555 if r := recover(); r != nil { 17556 ec.Error(ctx, ec.Recover(ctx, r)) 17557 } 17558 }() 17559 res = ec._Query_noShape(ctx, field) 17560 return res 17561 } 17562 17563 rrm := func(ctx context.Context) graphql.Marshaler { 17564 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17565 } 17566 17567 out.Concurrently(i, func() graphql.Marshaler { 17568 return rrm(innerCtx) 17569 }) 17570 case "node": 17571 field := field 17572 17573 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17574 defer func() { 17575 if r := recover(); r != nil { 17576 ec.Error(ctx, ec.Recover(ctx, r)) 17577 } 17578 }() 17579 res = ec._Query_node(ctx, field) 17580 if res == graphql.Null { 17581 atomic.AddUint32(&invalids, 1) 17582 } 17583 return res 17584 } 17585 17586 rrm := func(ctx context.Context) graphql.Marshaler { 17587 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17588 } 17589 17590 out.Concurrently(i, func() graphql.Marshaler { 17591 return rrm(innerCtx) 17592 }) 17593 case "noShapeTypedNil": 17594 field := field 17595 17596 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17597 defer func() { 17598 if r := recover(); r != nil { 17599 ec.Error(ctx, ec.Recover(ctx, r)) 17600 } 17601 }() 17602 res = ec._Query_noShapeTypedNil(ctx, field) 17603 return res 17604 } 17605 17606 rrm := func(ctx context.Context) graphql.Marshaler { 17607 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17608 } 17609 17610 out.Concurrently(i, func() graphql.Marshaler { 17611 return rrm(innerCtx) 17612 }) 17613 case "animal": 17614 field := field 17615 17616 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17617 defer func() { 17618 if r := recover(); r != nil { 17619 ec.Error(ctx, ec.Recover(ctx, r)) 17620 } 17621 }() 17622 res = ec._Query_animal(ctx, field) 17623 return res 17624 } 17625 17626 rrm := func(ctx context.Context) graphql.Marshaler { 17627 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17628 } 17629 17630 out.Concurrently(i, func() graphql.Marshaler { 17631 return rrm(innerCtx) 17632 }) 17633 case "notAnInterface": 17634 field := field 17635 17636 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17637 defer func() { 17638 if r := recover(); r != nil { 17639 ec.Error(ctx, ec.Recover(ctx, r)) 17640 } 17641 }() 17642 res = ec._Query_notAnInterface(ctx, field) 17643 return res 17644 } 17645 17646 rrm := func(ctx context.Context) graphql.Marshaler { 17647 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17648 } 17649 17650 out.Concurrently(i, func() graphql.Marshaler { 17651 return rrm(innerCtx) 17652 }) 17653 case "dog": 17654 field := field 17655 17656 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17657 defer func() { 17658 if r := recover(); r != nil { 17659 ec.Error(ctx, ec.Recover(ctx, r)) 17660 } 17661 }() 17662 res = ec._Query_dog(ctx, field) 17663 return res 17664 } 17665 17666 rrm := func(ctx context.Context) graphql.Marshaler { 17667 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17668 } 17669 17670 out.Concurrently(i, func() graphql.Marshaler { 17671 return rrm(innerCtx) 17672 }) 17673 case "issue896a": 17674 field := field 17675 17676 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17677 defer func() { 17678 if r := recover(); r != nil { 17679 ec.Error(ctx, ec.Recover(ctx, r)) 17680 } 17681 }() 17682 res = ec._Query_issue896a(ctx, field) 17683 return res 17684 } 17685 17686 rrm := func(ctx context.Context) graphql.Marshaler { 17687 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17688 } 17689 17690 out.Concurrently(i, func() graphql.Marshaler { 17691 return rrm(innerCtx) 17692 }) 17693 case "mapStringInterface": 17694 field := field 17695 17696 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17697 defer func() { 17698 if r := recover(); r != nil { 17699 ec.Error(ctx, ec.Recover(ctx, r)) 17700 } 17701 }() 17702 res = ec._Query_mapStringInterface(ctx, field) 17703 return res 17704 } 17705 17706 rrm := func(ctx context.Context) graphql.Marshaler { 17707 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17708 } 17709 17710 out.Concurrently(i, func() graphql.Marshaler { 17711 return rrm(innerCtx) 17712 }) 17713 case "mapNestedStringInterface": 17714 field := field 17715 17716 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17717 defer func() { 17718 if r := recover(); r != nil { 17719 ec.Error(ctx, ec.Recover(ctx, r)) 17720 } 17721 }() 17722 res = ec._Query_mapNestedStringInterface(ctx, field) 17723 return res 17724 } 17725 17726 rrm := func(ctx context.Context) graphql.Marshaler { 17727 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17728 } 17729 17730 out.Concurrently(i, func() graphql.Marshaler { 17731 return rrm(innerCtx) 17732 }) 17733 case "errorBubble": 17734 field := field 17735 17736 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17737 defer func() { 17738 if r := recover(); r != nil { 17739 ec.Error(ctx, ec.Recover(ctx, r)) 17740 } 17741 }() 17742 res = ec._Query_errorBubble(ctx, field) 17743 return res 17744 } 17745 17746 rrm := func(ctx context.Context) graphql.Marshaler { 17747 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17748 } 17749 17750 out.Concurrently(i, func() graphql.Marshaler { 17751 return rrm(innerCtx) 17752 }) 17753 case "errorBubbleList": 17754 field := field 17755 17756 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17757 defer func() { 17758 if r := recover(); r != nil { 17759 ec.Error(ctx, ec.Recover(ctx, r)) 17760 } 17761 }() 17762 res = ec._Query_errorBubbleList(ctx, field) 17763 return res 17764 } 17765 17766 rrm := func(ctx context.Context) graphql.Marshaler { 17767 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17768 } 17769 17770 out.Concurrently(i, func() graphql.Marshaler { 17771 return rrm(innerCtx) 17772 }) 17773 case "errorList": 17774 field := field 17775 17776 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17777 defer func() { 17778 if r := recover(); r != nil { 17779 ec.Error(ctx, ec.Recover(ctx, r)) 17780 } 17781 }() 17782 res = ec._Query_errorList(ctx, field) 17783 return res 17784 } 17785 17786 rrm := func(ctx context.Context) graphql.Marshaler { 17787 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17788 } 17789 17790 out.Concurrently(i, func() graphql.Marshaler { 17791 return rrm(innerCtx) 17792 }) 17793 case "errors": 17794 field := field 17795 17796 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17797 defer func() { 17798 if r := recover(); r != nil { 17799 ec.Error(ctx, ec.Recover(ctx, r)) 17800 } 17801 }() 17802 res = ec._Query_errors(ctx, field) 17803 return res 17804 } 17805 17806 rrm := func(ctx context.Context) graphql.Marshaler { 17807 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17808 } 17809 17810 out.Concurrently(i, func() graphql.Marshaler { 17811 return rrm(innerCtx) 17812 }) 17813 case "valid": 17814 field := field 17815 17816 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17817 defer func() { 17818 if r := recover(); r != nil { 17819 ec.Error(ctx, ec.Recover(ctx, r)) 17820 } 17821 }() 17822 res = ec._Query_valid(ctx, field) 17823 if res == graphql.Null { 17824 atomic.AddUint32(&invalids, 1) 17825 } 17826 return res 17827 } 17828 17829 rrm := func(ctx context.Context) graphql.Marshaler { 17830 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17831 } 17832 17833 out.Concurrently(i, func() graphql.Marshaler { 17834 return rrm(innerCtx) 17835 }) 17836 case "panics": 17837 field := field 17838 17839 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17840 defer func() { 17841 if r := recover(); r != nil { 17842 ec.Error(ctx, ec.Recover(ctx, r)) 17843 } 17844 }() 17845 res = ec._Query_panics(ctx, field) 17846 return res 17847 } 17848 17849 rrm := func(ctx context.Context) graphql.Marshaler { 17850 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17851 } 17852 17853 out.Concurrently(i, func() graphql.Marshaler { 17854 return rrm(innerCtx) 17855 }) 17856 case "primitiveObject": 17857 field := field 17858 17859 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17860 defer func() { 17861 if r := recover(); r != nil { 17862 ec.Error(ctx, ec.Recover(ctx, r)) 17863 } 17864 }() 17865 res = ec._Query_primitiveObject(ctx, field) 17866 if res == graphql.Null { 17867 atomic.AddUint32(&invalids, 1) 17868 } 17869 return res 17870 } 17871 17872 rrm := func(ctx context.Context) graphql.Marshaler { 17873 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17874 } 17875 17876 out.Concurrently(i, func() graphql.Marshaler { 17877 return rrm(innerCtx) 17878 }) 17879 case "primitiveStringObject": 17880 field := field 17881 17882 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17883 defer func() { 17884 if r := recover(); r != nil { 17885 ec.Error(ctx, ec.Recover(ctx, r)) 17886 } 17887 }() 17888 res = ec._Query_primitiveStringObject(ctx, field) 17889 if res == graphql.Null { 17890 atomic.AddUint32(&invalids, 1) 17891 } 17892 return res 17893 } 17894 17895 rrm := func(ctx context.Context) graphql.Marshaler { 17896 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17897 } 17898 17899 out.Concurrently(i, func() graphql.Marshaler { 17900 return rrm(innerCtx) 17901 }) 17902 case "ptrToSliceContainer": 17903 field := field 17904 17905 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17906 defer func() { 17907 if r := recover(); r != nil { 17908 ec.Error(ctx, ec.Recover(ctx, r)) 17909 } 17910 }() 17911 res = ec._Query_ptrToSliceContainer(ctx, field) 17912 if res == graphql.Null { 17913 atomic.AddUint32(&invalids, 1) 17914 } 17915 return res 17916 } 17917 17918 rrm := func(ctx context.Context) graphql.Marshaler { 17919 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17920 } 17921 17922 out.Concurrently(i, func() graphql.Marshaler { 17923 return rrm(innerCtx) 17924 }) 17925 case "infinity": 17926 field := field 17927 17928 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17929 defer func() { 17930 if r := recover(); r != nil { 17931 ec.Error(ctx, ec.Recover(ctx, r)) 17932 } 17933 }() 17934 res = ec._Query_infinity(ctx, field) 17935 if res == graphql.Null { 17936 atomic.AddUint32(&invalids, 1) 17937 } 17938 return res 17939 } 17940 17941 rrm := func(ctx context.Context) graphql.Marshaler { 17942 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17943 } 17944 17945 out.Concurrently(i, func() graphql.Marshaler { 17946 return rrm(innerCtx) 17947 }) 17948 case "stringFromContextInterface": 17949 field := field 17950 17951 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17952 defer func() { 17953 if r := recover(); r != nil { 17954 ec.Error(ctx, ec.Recover(ctx, r)) 17955 } 17956 }() 17957 res = ec._Query_stringFromContextInterface(ctx, field) 17958 if res == graphql.Null { 17959 atomic.AddUint32(&invalids, 1) 17960 } 17961 return res 17962 } 17963 17964 rrm := func(ctx context.Context) graphql.Marshaler { 17965 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17966 } 17967 17968 out.Concurrently(i, func() graphql.Marshaler { 17969 return rrm(innerCtx) 17970 }) 17971 case "stringFromContextFunction": 17972 field := field 17973 17974 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17975 defer func() { 17976 if r := recover(); r != nil { 17977 ec.Error(ctx, ec.Recover(ctx, r)) 17978 } 17979 }() 17980 res = ec._Query_stringFromContextFunction(ctx, field) 17981 if res == graphql.Null { 17982 atomic.AddUint32(&invalids, 1) 17983 } 17984 return res 17985 } 17986 17987 rrm := func(ctx context.Context) graphql.Marshaler { 17988 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17989 } 17990 17991 out.Concurrently(i, func() graphql.Marshaler { 17992 return rrm(innerCtx) 17993 }) 17994 case "defaultScalar": 17995 field := field 17996 17997 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17998 defer func() { 17999 if r := recover(); r != nil { 18000 ec.Error(ctx, ec.Recover(ctx, r)) 18001 } 18002 }() 18003 res = ec._Query_defaultScalar(ctx, field) 18004 if res == graphql.Null { 18005 atomic.AddUint32(&invalids, 1) 18006 } 18007 return res 18008 } 18009 18010 rrm := func(ctx context.Context) graphql.Marshaler { 18011 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18012 } 18013 18014 out.Concurrently(i, func() graphql.Marshaler { 18015 return rrm(innerCtx) 18016 }) 18017 case "slices": 18018 field := field 18019 18020 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18021 defer func() { 18022 if r := recover(); r != nil { 18023 ec.Error(ctx, ec.Recover(ctx, r)) 18024 } 18025 }() 18026 res = ec._Query_slices(ctx, field) 18027 return res 18028 } 18029 18030 rrm := func(ctx context.Context) graphql.Marshaler { 18031 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18032 } 18033 18034 out.Concurrently(i, func() graphql.Marshaler { 18035 return rrm(innerCtx) 18036 }) 18037 case "scalarSlice": 18038 field := field 18039 18040 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18041 defer func() { 18042 if r := recover(); r != nil { 18043 ec.Error(ctx, ec.Recover(ctx, r)) 18044 } 18045 }() 18046 res = ec._Query_scalarSlice(ctx, field) 18047 if res == graphql.Null { 18048 atomic.AddUint32(&invalids, 1) 18049 } 18050 return res 18051 } 18052 18053 rrm := func(ctx context.Context) graphql.Marshaler { 18054 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18055 } 18056 18057 out.Concurrently(i, func() graphql.Marshaler { 18058 return rrm(innerCtx) 18059 }) 18060 case "fallback": 18061 field := field 18062 18063 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18064 defer func() { 18065 if r := recover(); r != nil { 18066 ec.Error(ctx, ec.Recover(ctx, r)) 18067 } 18068 }() 18069 res = ec._Query_fallback(ctx, field) 18070 if res == graphql.Null { 18071 atomic.AddUint32(&invalids, 1) 18072 } 18073 return res 18074 } 18075 18076 rrm := func(ctx context.Context) graphql.Marshaler { 18077 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18078 } 18079 18080 out.Concurrently(i, func() graphql.Marshaler { 18081 return rrm(innerCtx) 18082 }) 18083 case "optionalUnion": 18084 field := field 18085 18086 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18087 defer func() { 18088 if r := recover(); r != nil { 18089 ec.Error(ctx, ec.Recover(ctx, r)) 18090 } 18091 }() 18092 res = ec._Query_optionalUnion(ctx, field) 18093 return res 18094 } 18095 18096 rrm := func(ctx context.Context) graphql.Marshaler { 18097 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18098 } 18099 18100 out.Concurrently(i, func() graphql.Marshaler { 18101 return rrm(innerCtx) 18102 }) 18103 case "vOkCaseValue": 18104 field := field 18105 18106 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18107 defer func() { 18108 if r := recover(); r != nil { 18109 ec.Error(ctx, ec.Recover(ctx, r)) 18110 } 18111 }() 18112 res = ec._Query_vOkCaseValue(ctx, field) 18113 return res 18114 } 18115 18116 rrm := func(ctx context.Context) graphql.Marshaler { 18117 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18118 } 18119 18120 out.Concurrently(i, func() graphql.Marshaler { 18121 return rrm(innerCtx) 18122 }) 18123 case "vOkCaseNil": 18124 field := field 18125 18126 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18127 defer func() { 18128 if r := recover(); r != nil { 18129 ec.Error(ctx, ec.Recover(ctx, r)) 18130 } 18131 }() 18132 res = ec._Query_vOkCaseNil(ctx, field) 18133 return res 18134 } 18135 18136 rrm := func(ctx context.Context) graphql.Marshaler { 18137 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18138 } 18139 18140 out.Concurrently(i, func() graphql.Marshaler { 18141 return rrm(innerCtx) 18142 }) 18143 case "validType": 18144 field := field 18145 18146 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18147 defer func() { 18148 if r := recover(); r != nil { 18149 ec.Error(ctx, ec.Recover(ctx, r)) 18150 } 18151 }() 18152 res = ec._Query_validType(ctx, field) 18153 return res 18154 } 18155 18156 rrm := func(ctx context.Context) graphql.Marshaler { 18157 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18158 } 18159 18160 out.Concurrently(i, func() graphql.Marshaler { 18161 return rrm(innerCtx) 18162 }) 18163 case "variadicModel": 18164 field := field 18165 18166 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18167 defer func() { 18168 if r := recover(); r != nil { 18169 ec.Error(ctx, ec.Recover(ctx, r)) 18170 } 18171 }() 18172 res = ec._Query_variadicModel(ctx, field) 18173 return res 18174 } 18175 18176 rrm := func(ctx context.Context) graphql.Marshaler { 18177 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18178 } 18179 18180 out.Concurrently(i, func() graphql.Marshaler { 18181 return rrm(innerCtx) 18182 }) 18183 case "wrappedStruct": 18184 field := field 18185 18186 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18187 defer func() { 18188 if r := recover(); r != nil { 18189 ec.Error(ctx, ec.Recover(ctx, r)) 18190 } 18191 }() 18192 res = ec._Query_wrappedStruct(ctx, field) 18193 if res == graphql.Null { 18194 atomic.AddUint32(&invalids, 1) 18195 } 18196 return res 18197 } 18198 18199 rrm := func(ctx context.Context) graphql.Marshaler { 18200 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18201 } 18202 18203 out.Concurrently(i, func() graphql.Marshaler { 18204 return rrm(innerCtx) 18205 }) 18206 case "wrappedScalar": 18207 field := field 18208 18209 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18210 defer func() { 18211 if r := recover(); r != nil { 18212 ec.Error(ctx, ec.Recover(ctx, r)) 18213 } 18214 }() 18215 res = ec._Query_wrappedScalar(ctx, field) 18216 if res == graphql.Null { 18217 atomic.AddUint32(&invalids, 1) 18218 } 18219 return res 18220 } 18221 18222 rrm := func(ctx context.Context) graphql.Marshaler { 18223 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18224 } 18225 18226 out.Concurrently(i, func() graphql.Marshaler { 18227 return rrm(innerCtx) 18228 }) 18229 case "wrappedMap": 18230 field := field 18231 18232 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18233 defer func() { 18234 if r := recover(); r != nil { 18235 ec.Error(ctx, ec.Recover(ctx, r)) 18236 } 18237 }() 18238 res = ec._Query_wrappedMap(ctx, field) 18239 if res == graphql.Null { 18240 atomic.AddUint32(&invalids, 1) 18241 } 18242 return res 18243 } 18244 18245 rrm := func(ctx context.Context) graphql.Marshaler { 18246 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18247 } 18248 18249 out.Concurrently(i, func() graphql.Marshaler { 18250 return rrm(innerCtx) 18251 }) 18252 case "wrappedSlice": 18253 field := field 18254 18255 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18256 defer func() { 18257 if r := recover(); r != nil { 18258 ec.Error(ctx, ec.Recover(ctx, r)) 18259 } 18260 }() 18261 res = ec._Query_wrappedSlice(ctx, field) 18262 if res == graphql.Null { 18263 atomic.AddUint32(&invalids, 1) 18264 } 18265 return res 18266 } 18267 18268 rrm := func(ctx context.Context) graphql.Marshaler { 18269 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18270 } 18271 18272 out.Concurrently(i, func() graphql.Marshaler { 18273 return rrm(innerCtx) 18274 }) 18275 case "__type": 18276 18277 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 18278 return ec._Query___type(ctx, field) 18279 }) 18280 18281 case "__schema": 18282 18283 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 18284 return ec._Query___schema(ctx, field) 18285 }) 18286 18287 default: 18288 panic("unknown field " + strconv.Quote(field.Name)) 18289 } 18290 } 18291 out.Dispatch() 18292 if invalids > 0 { 18293 return graphql.Null 18294 } 18295 return out 18296 } 18297 18298 var rectangleImplementors = []string{"Rectangle", "Shape", "ShapeUnion"} 18299 18300 func (ec *executionContext) _Rectangle(ctx context.Context, sel ast.SelectionSet, obj *Rectangle) graphql.Marshaler { 18301 fields := graphql.CollectFields(ec.OperationContext, sel, rectangleImplementors) 18302 out := graphql.NewFieldSet(fields) 18303 var invalids uint32 18304 for i, field := range fields { 18305 switch field.Name { 18306 case "__typename": 18307 out.Values[i] = graphql.MarshalString("Rectangle") 18308 case "length": 18309 18310 out.Values[i] = ec._Rectangle_length(ctx, field, obj) 18311 18312 case "width": 18313 18314 out.Values[i] = ec._Rectangle_width(ctx, field, obj) 18315 18316 case "area": 18317 18318 out.Values[i] = ec._Rectangle_area(ctx, field, obj) 18319 18320 case "coordinates": 18321 18322 out.Values[i] = ec._Rectangle_coordinates(ctx, field, obj) 18323 18324 default: 18325 panic("unknown field " + strconv.Quote(field.Name)) 18326 } 18327 } 18328 out.Dispatch() 18329 if invalids > 0 { 18330 return graphql.Null 18331 } 18332 return out 18333 } 18334 18335 var sizeImplementors = []string{"Size"} 18336 18337 func (ec *executionContext) _Size(ctx context.Context, sel ast.SelectionSet, obj *Size) graphql.Marshaler { 18338 fields := graphql.CollectFields(ec.OperationContext, sel, sizeImplementors) 18339 out := graphql.NewFieldSet(fields) 18340 var invalids uint32 18341 for i, field := range fields { 18342 switch field.Name { 18343 case "__typename": 18344 out.Values[i] = graphql.MarshalString("Size") 18345 case "height": 18346 18347 out.Values[i] = ec._Size_height(ctx, field, obj) 18348 18349 if out.Values[i] == graphql.Null { 18350 invalids++ 18351 } 18352 case "weight": 18353 18354 out.Values[i] = ec._Size_weight(ctx, field, obj) 18355 18356 if out.Values[i] == graphql.Null { 18357 invalids++ 18358 } 18359 default: 18360 panic("unknown field " + strconv.Quote(field.Name)) 18361 } 18362 } 18363 out.Dispatch() 18364 if invalids > 0 { 18365 return graphql.Null 18366 } 18367 return out 18368 } 18369 18370 var slicesImplementors = []string{"Slices"} 18371 18372 func (ec *executionContext) _Slices(ctx context.Context, sel ast.SelectionSet, obj *Slices) graphql.Marshaler { 18373 fields := graphql.CollectFields(ec.OperationContext, sel, slicesImplementors) 18374 out := graphql.NewFieldSet(fields) 18375 var invalids uint32 18376 for i, field := range fields { 18377 switch field.Name { 18378 case "__typename": 18379 out.Values[i] = graphql.MarshalString("Slices") 18380 case "test1": 18381 18382 out.Values[i] = ec._Slices_test1(ctx, field, obj) 18383 18384 case "test2": 18385 18386 out.Values[i] = ec._Slices_test2(ctx, field, obj) 18387 18388 case "test3": 18389 18390 out.Values[i] = ec._Slices_test3(ctx, field, obj) 18391 18392 if out.Values[i] == graphql.Null { 18393 invalids++ 18394 } 18395 case "test4": 18396 18397 out.Values[i] = ec._Slices_test4(ctx, field, obj) 18398 18399 if out.Values[i] == graphql.Null { 18400 invalids++ 18401 } 18402 default: 18403 panic("unknown field " + strconv.Quote(field.Name)) 18404 } 18405 } 18406 out.Dispatch() 18407 if invalids > 0 { 18408 return graphql.Null 18409 } 18410 return out 18411 } 18412 18413 var subscriptionImplementors = []string{"Subscription"} 18414 18415 func (ec *executionContext) _Subscription(ctx context.Context, sel ast.SelectionSet) func(ctx context.Context) graphql.Marshaler { 18416 fields := graphql.CollectFields(ec.OperationContext, sel, subscriptionImplementors) 18417 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ 18418 Object: "Subscription", 18419 }) 18420 if len(fields) != 1 { 18421 ec.Errorf(ctx, "must subscribe to exactly one stream") 18422 return nil 18423 } 18424 18425 switch fields[0].Name { 18426 case "updated": 18427 return ec._Subscription_updated(ctx, fields[0]) 18428 case "initPayload": 18429 return ec._Subscription_initPayload(ctx, fields[0]) 18430 case "directiveArg": 18431 return ec._Subscription_directiveArg(ctx, fields[0]) 18432 case "directiveNullableArg": 18433 return ec._Subscription_directiveNullableArg(ctx, fields[0]) 18434 case "directiveDouble": 18435 return ec._Subscription_directiveDouble(ctx, fields[0]) 18436 case "directiveUnimplemented": 18437 return ec._Subscription_directiveUnimplemented(ctx, fields[0]) 18438 case "issue896b": 18439 return ec._Subscription_issue896b(ctx, fields[0]) 18440 case "errorRequired": 18441 return ec._Subscription_errorRequired(ctx, fields[0]) 18442 default: 18443 panic("unknown field " + strconv.Quote(fields[0].Name)) 18444 } 18445 } 18446 18447 var userImplementors = []string{"User"} 18448 18449 func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj *User) graphql.Marshaler { 18450 fields := graphql.CollectFields(ec.OperationContext, sel, userImplementors) 18451 out := graphql.NewFieldSet(fields) 18452 var invalids uint32 18453 for i, field := range fields { 18454 switch field.Name { 18455 case "__typename": 18456 out.Values[i] = graphql.MarshalString("User") 18457 case "id": 18458 18459 out.Values[i] = ec._User_id(ctx, field, obj) 18460 18461 if out.Values[i] == graphql.Null { 18462 atomic.AddUint32(&invalids, 1) 18463 } 18464 case "friends": 18465 field := field 18466 18467 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18468 defer func() { 18469 if r := recover(); r != nil { 18470 ec.Error(ctx, ec.Recover(ctx, r)) 18471 } 18472 }() 18473 res = ec._User_friends(ctx, field, obj) 18474 if res == graphql.Null { 18475 atomic.AddUint32(&invalids, 1) 18476 } 18477 return res 18478 } 18479 18480 out.Concurrently(i, func() graphql.Marshaler { 18481 return innerFunc(ctx) 18482 18483 }) 18484 case "created": 18485 18486 out.Values[i] = ec._User_created(ctx, field, obj) 18487 18488 if out.Values[i] == graphql.Null { 18489 atomic.AddUint32(&invalids, 1) 18490 } 18491 case "updated": 18492 18493 out.Values[i] = ec._User_updated(ctx, field, obj) 18494 18495 case "pets": 18496 field := field 18497 18498 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18499 defer func() { 18500 if r := recover(); r != nil { 18501 ec.Error(ctx, ec.Recover(ctx, r)) 18502 } 18503 }() 18504 res = ec._User_pets(ctx, field, obj) 18505 return res 18506 } 18507 18508 out.Concurrently(i, func() graphql.Marshaler { 18509 return innerFunc(ctx) 18510 18511 }) 18512 default: 18513 panic("unknown field " + strconv.Quote(field.Name)) 18514 } 18515 } 18516 out.Dispatch() 18517 if invalids > 0 { 18518 return graphql.Null 18519 } 18520 return out 18521 } 18522 18523 var vOkCaseNilImplementors = []string{"VOkCaseNil"} 18524 18525 func (ec *executionContext) _VOkCaseNil(ctx context.Context, sel ast.SelectionSet, obj *VOkCaseNil) graphql.Marshaler { 18526 fields := graphql.CollectFields(ec.OperationContext, sel, vOkCaseNilImplementors) 18527 out := graphql.NewFieldSet(fields) 18528 var invalids uint32 18529 for i, field := range fields { 18530 switch field.Name { 18531 case "__typename": 18532 out.Values[i] = graphql.MarshalString("VOkCaseNil") 18533 case "value": 18534 18535 out.Values[i] = ec._VOkCaseNil_value(ctx, field, obj) 18536 18537 default: 18538 panic("unknown field " + strconv.Quote(field.Name)) 18539 } 18540 } 18541 out.Dispatch() 18542 if invalids > 0 { 18543 return graphql.Null 18544 } 18545 return out 18546 } 18547 18548 var vOkCaseValueImplementors = []string{"VOkCaseValue"} 18549 18550 func (ec *executionContext) _VOkCaseValue(ctx context.Context, sel ast.SelectionSet, obj *VOkCaseValue) graphql.Marshaler { 18551 fields := graphql.CollectFields(ec.OperationContext, sel, vOkCaseValueImplementors) 18552 out := graphql.NewFieldSet(fields) 18553 var invalids uint32 18554 for i, field := range fields { 18555 switch field.Name { 18556 case "__typename": 18557 out.Values[i] = graphql.MarshalString("VOkCaseValue") 18558 case "value": 18559 18560 out.Values[i] = ec._VOkCaseValue_value(ctx, field, obj) 18561 18562 default: 18563 panic("unknown field " + strconv.Quote(field.Name)) 18564 } 18565 } 18566 out.Dispatch() 18567 if invalids > 0 { 18568 return graphql.Null 18569 } 18570 return out 18571 } 18572 18573 var validTypeImplementors = []string{"ValidType"} 18574 18575 func (ec *executionContext) _ValidType(ctx context.Context, sel ast.SelectionSet, obj *ValidType) graphql.Marshaler { 18576 fields := graphql.CollectFields(ec.OperationContext, sel, validTypeImplementors) 18577 out := graphql.NewFieldSet(fields) 18578 var invalids uint32 18579 for i, field := range fields { 18580 switch field.Name { 18581 case "__typename": 18582 out.Values[i] = graphql.MarshalString("ValidType") 18583 case "differentCase": 18584 18585 out.Values[i] = ec._ValidType_differentCase(ctx, field, obj) 18586 18587 if out.Values[i] == graphql.Null { 18588 invalids++ 18589 } 18590 case "different_case": 18591 18592 out.Values[i] = ec._ValidType_different_case(ctx, field, obj) 18593 18594 if out.Values[i] == graphql.Null { 18595 invalids++ 18596 } 18597 case "validInputKeywords": 18598 18599 out.Values[i] = ec._ValidType_validInputKeywords(ctx, field, obj) 18600 18601 if out.Values[i] == graphql.Null { 18602 invalids++ 18603 } 18604 case "validArgs": 18605 18606 out.Values[i] = ec._ValidType_validArgs(ctx, field, obj) 18607 18608 if out.Values[i] == graphql.Null { 18609 invalids++ 18610 } 18611 default: 18612 panic("unknown field " + strconv.Quote(field.Name)) 18613 } 18614 } 18615 out.Dispatch() 18616 if invalids > 0 { 18617 return graphql.Null 18618 } 18619 return out 18620 } 18621 18622 var variadicModelImplementors = []string{"VariadicModel"} 18623 18624 func (ec *executionContext) _VariadicModel(ctx context.Context, sel ast.SelectionSet, obj *VariadicModel) graphql.Marshaler { 18625 fields := graphql.CollectFields(ec.OperationContext, sel, variadicModelImplementors) 18626 out := graphql.NewFieldSet(fields) 18627 var invalids uint32 18628 for i, field := range fields { 18629 switch field.Name { 18630 case "__typename": 18631 out.Values[i] = graphql.MarshalString("VariadicModel") 18632 case "value": 18633 field := field 18634 18635 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18636 defer func() { 18637 if r := recover(); r != nil { 18638 ec.Error(ctx, ec.Recover(ctx, r)) 18639 } 18640 }() 18641 res = ec._VariadicModel_value(ctx, field, obj) 18642 return res 18643 } 18644 18645 out.Concurrently(i, func() graphql.Marshaler { 18646 return innerFunc(ctx) 18647 18648 }) 18649 default: 18650 panic("unknown field " + strconv.Quote(field.Name)) 18651 } 18652 } 18653 out.Dispatch() 18654 if invalids > 0 { 18655 return graphql.Null 18656 } 18657 return out 18658 } 18659 18660 var wrappedMapImplementors = []string{"WrappedMap"} 18661 18662 func (ec *executionContext) _WrappedMap(ctx context.Context, sel ast.SelectionSet, obj WrappedMap) graphql.Marshaler { 18663 fields := graphql.CollectFields(ec.OperationContext, sel, wrappedMapImplementors) 18664 out := graphql.NewFieldSet(fields) 18665 var invalids uint32 18666 for i, field := range fields { 18667 switch field.Name { 18668 case "__typename": 18669 out.Values[i] = graphql.MarshalString("WrappedMap") 18670 case "get": 18671 field := field 18672 18673 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18674 defer func() { 18675 if r := recover(); r != nil { 18676 ec.Error(ctx, ec.Recover(ctx, r)) 18677 } 18678 }() 18679 res = ec._WrappedMap_get(ctx, field, obj) 18680 if res == graphql.Null { 18681 atomic.AddUint32(&invalids, 1) 18682 } 18683 return res 18684 } 18685 18686 out.Concurrently(i, func() graphql.Marshaler { 18687 return innerFunc(ctx) 18688 18689 }) 18690 default: 18691 panic("unknown field " + strconv.Quote(field.Name)) 18692 } 18693 } 18694 out.Dispatch() 18695 if invalids > 0 { 18696 return graphql.Null 18697 } 18698 return out 18699 } 18700 18701 var wrappedSliceImplementors = []string{"WrappedSlice"} 18702 18703 func (ec *executionContext) _WrappedSlice(ctx context.Context, sel ast.SelectionSet, obj WrappedSlice) graphql.Marshaler { 18704 fields := graphql.CollectFields(ec.OperationContext, sel, wrappedSliceImplementors) 18705 out := graphql.NewFieldSet(fields) 18706 var invalids uint32 18707 for i, field := range fields { 18708 switch field.Name { 18709 case "__typename": 18710 out.Values[i] = graphql.MarshalString("WrappedSlice") 18711 case "get": 18712 field := field 18713 18714 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18715 defer func() { 18716 if r := recover(); r != nil { 18717 ec.Error(ctx, ec.Recover(ctx, r)) 18718 } 18719 }() 18720 res = ec._WrappedSlice_get(ctx, field, obj) 18721 if res == graphql.Null { 18722 atomic.AddUint32(&invalids, 1) 18723 } 18724 return res 18725 } 18726 18727 out.Concurrently(i, func() graphql.Marshaler { 18728 return innerFunc(ctx) 18729 18730 }) 18731 default: 18732 panic("unknown field " + strconv.Quote(field.Name)) 18733 } 18734 } 18735 out.Dispatch() 18736 if invalids > 0 { 18737 return graphql.Null 18738 } 18739 return out 18740 } 18741 18742 var wrappedStructImplementors = []string{"WrappedStruct"} 18743 18744 func (ec *executionContext) _WrappedStruct(ctx context.Context, sel ast.SelectionSet, obj *WrappedStruct) graphql.Marshaler { 18745 fields := graphql.CollectFields(ec.OperationContext, sel, wrappedStructImplementors) 18746 out := graphql.NewFieldSet(fields) 18747 var invalids uint32 18748 for i, field := range fields { 18749 switch field.Name { 18750 case "__typename": 18751 out.Values[i] = graphql.MarshalString("WrappedStruct") 18752 case "name": 18753 18754 out.Values[i] = ec._WrappedStruct_name(ctx, field, obj) 18755 18756 if out.Values[i] == graphql.Null { 18757 invalids++ 18758 } 18759 case "desc": 18760 18761 out.Values[i] = ec._WrappedStruct_desc(ctx, field, obj) 18762 18763 default: 18764 panic("unknown field " + strconv.Quote(field.Name)) 18765 } 18766 } 18767 out.Dispatch() 18768 if invalids > 0 { 18769 return graphql.Null 18770 } 18771 return out 18772 } 18773 18774 var xXItImplementors = []string{"XXIt"} 18775 18776 func (ec *executionContext) _XXIt(ctx context.Context, sel ast.SelectionSet, obj *XXIt) graphql.Marshaler { 18777 fields := graphql.CollectFields(ec.OperationContext, sel, xXItImplementors) 18778 out := graphql.NewFieldSet(fields) 18779 var invalids uint32 18780 for i, field := range fields { 18781 switch field.Name { 18782 case "__typename": 18783 out.Values[i] = graphql.MarshalString("XXIt") 18784 case "id": 18785 18786 out.Values[i] = ec._XXIt_id(ctx, field, obj) 18787 18788 if out.Values[i] == graphql.Null { 18789 invalids++ 18790 } 18791 default: 18792 panic("unknown field " + strconv.Quote(field.Name)) 18793 } 18794 } 18795 out.Dispatch() 18796 if invalids > 0 { 18797 return graphql.Null 18798 } 18799 return out 18800 } 18801 18802 var xxItImplementors = []string{"XxIt"} 18803 18804 func (ec *executionContext) _XxIt(ctx context.Context, sel ast.SelectionSet, obj *XxIt) graphql.Marshaler { 18805 fields := graphql.CollectFields(ec.OperationContext, sel, xxItImplementors) 18806 out := graphql.NewFieldSet(fields) 18807 var invalids uint32 18808 for i, field := range fields { 18809 switch field.Name { 18810 case "__typename": 18811 out.Values[i] = graphql.MarshalString("XxIt") 18812 case "id": 18813 18814 out.Values[i] = ec._XxIt_id(ctx, field, obj) 18815 18816 if out.Values[i] == graphql.Null { 18817 invalids++ 18818 } 18819 default: 18820 panic("unknown field " + strconv.Quote(field.Name)) 18821 } 18822 } 18823 out.Dispatch() 18824 if invalids > 0 { 18825 return graphql.Null 18826 } 18827 return out 18828 } 18829 18830 var __DirectiveImplementors = []string{"__Directive"} 18831 18832 func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { 18833 fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) 18834 out := graphql.NewFieldSet(fields) 18835 var invalids uint32 18836 for i, field := range fields { 18837 switch field.Name { 18838 case "__typename": 18839 out.Values[i] = graphql.MarshalString("__Directive") 18840 case "name": 18841 18842 out.Values[i] = ec.___Directive_name(ctx, field, obj) 18843 18844 if out.Values[i] == graphql.Null { 18845 invalids++ 18846 } 18847 case "description": 18848 18849 out.Values[i] = ec.___Directive_description(ctx, field, obj) 18850 18851 case "locations": 18852 18853 out.Values[i] = ec.___Directive_locations(ctx, field, obj) 18854 18855 if out.Values[i] == graphql.Null { 18856 invalids++ 18857 } 18858 case "args": 18859 18860 out.Values[i] = ec.___Directive_args(ctx, field, obj) 18861 18862 if out.Values[i] == graphql.Null { 18863 invalids++ 18864 } 18865 case "isRepeatable": 18866 18867 out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj) 18868 18869 if out.Values[i] == graphql.Null { 18870 invalids++ 18871 } 18872 default: 18873 panic("unknown field " + strconv.Quote(field.Name)) 18874 } 18875 } 18876 out.Dispatch() 18877 if invalids > 0 { 18878 return graphql.Null 18879 } 18880 return out 18881 } 18882 18883 var __EnumValueImplementors = []string{"__EnumValue"} 18884 18885 func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { 18886 fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) 18887 out := graphql.NewFieldSet(fields) 18888 var invalids uint32 18889 for i, field := range fields { 18890 switch field.Name { 18891 case "__typename": 18892 out.Values[i] = graphql.MarshalString("__EnumValue") 18893 case "name": 18894 18895 out.Values[i] = ec.___EnumValue_name(ctx, field, obj) 18896 18897 if out.Values[i] == graphql.Null { 18898 invalids++ 18899 } 18900 case "description": 18901 18902 out.Values[i] = ec.___EnumValue_description(ctx, field, obj) 18903 18904 case "isDeprecated": 18905 18906 out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj) 18907 18908 if out.Values[i] == graphql.Null { 18909 invalids++ 18910 } 18911 case "deprecationReason": 18912 18913 out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj) 18914 18915 default: 18916 panic("unknown field " + strconv.Quote(field.Name)) 18917 } 18918 } 18919 out.Dispatch() 18920 if invalids > 0 { 18921 return graphql.Null 18922 } 18923 return out 18924 } 18925 18926 var __FieldImplementors = []string{"__Field"} 18927 18928 func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { 18929 fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) 18930 out := graphql.NewFieldSet(fields) 18931 var invalids uint32 18932 for i, field := range fields { 18933 switch field.Name { 18934 case "__typename": 18935 out.Values[i] = graphql.MarshalString("__Field") 18936 case "name": 18937 18938 out.Values[i] = ec.___Field_name(ctx, field, obj) 18939 18940 if out.Values[i] == graphql.Null { 18941 invalids++ 18942 } 18943 case "description": 18944 18945 out.Values[i] = ec.___Field_description(ctx, field, obj) 18946 18947 case "args": 18948 18949 out.Values[i] = ec.___Field_args(ctx, field, obj) 18950 18951 if out.Values[i] == graphql.Null { 18952 invalids++ 18953 } 18954 case "type": 18955 18956 out.Values[i] = ec.___Field_type(ctx, field, obj) 18957 18958 if out.Values[i] == graphql.Null { 18959 invalids++ 18960 } 18961 case "isDeprecated": 18962 18963 out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj) 18964 18965 if out.Values[i] == graphql.Null { 18966 invalids++ 18967 } 18968 case "deprecationReason": 18969 18970 out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj) 18971 18972 default: 18973 panic("unknown field " + strconv.Quote(field.Name)) 18974 } 18975 } 18976 out.Dispatch() 18977 if invalids > 0 { 18978 return graphql.Null 18979 } 18980 return out 18981 } 18982 18983 var __InputValueImplementors = []string{"__InputValue"} 18984 18985 func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { 18986 fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) 18987 out := graphql.NewFieldSet(fields) 18988 var invalids uint32 18989 for i, field := range fields { 18990 switch field.Name { 18991 case "__typename": 18992 out.Values[i] = graphql.MarshalString("__InputValue") 18993 case "name": 18994 18995 out.Values[i] = ec.___InputValue_name(ctx, field, obj) 18996 18997 if out.Values[i] == graphql.Null { 18998 invalids++ 18999 } 19000 case "description": 19001 19002 out.Values[i] = ec.___InputValue_description(ctx, field, obj) 19003 19004 case "type": 19005 19006 out.Values[i] = ec.___InputValue_type(ctx, field, obj) 19007 19008 if out.Values[i] == graphql.Null { 19009 invalids++ 19010 } 19011 case "defaultValue": 19012 19013 out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj) 19014 19015 default: 19016 panic("unknown field " + strconv.Quote(field.Name)) 19017 } 19018 } 19019 out.Dispatch() 19020 if invalids > 0 { 19021 return graphql.Null 19022 } 19023 return out 19024 } 19025 19026 var __SchemaImplementors = []string{"__Schema"} 19027 19028 func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { 19029 fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) 19030 out := graphql.NewFieldSet(fields) 19031 var invalids uint32 19032 for i, field := range fields { 19033 switch field.Name { 19034 case "__typename": 19035 out.Values[i] = graphql.MarshalString("__Schema") 19036 case "description": 19037 19038 out.Values[i] = ec.___Schema_description(ctx, field, obj) 19039 19040 case "types": 19041 19042 out.Values[i] = ec.___Schema_types(ctx, field, obj) 19043 19044 if out.Values[i] == graphql.Null { 19045 invalids++ 19046 } 19047 case "queryType": 19048 19049 out.Values[i] = ec.___Schema_queryType(ctx, field, obj) 19050 19051 if out.Values[i] == graphql.Null { 19052 invalids++ 19053 } 19054 case "mutationType": 19055 19056 out.Values[i] = ec.___Schema_mutationType(ctx, field, obj) 19057 19058 case "subscriptionType": 19059 19060 out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj) 19061 19062 case "directives": 19063 19064 out.Values[i] = ec.___Schema_directives(ctx, field, obj) 19065 19066 if out.Values[i] == graphql.Null { 19067 invalids++ 19068 } 19069 default: 19070 panic("unknown field " + strconv.Quote(field.Name)) 19071 } 19072 } 19073 out.Dispatch() 19074 if invalids > 0 { 19075 return graphql.Null 19076 } 19077 return out 19078 } 19079 19080 var __TypeImplementors = []string{"__Type"} 19081 19082 func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { 19083 fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) 19084 out := graphql.NewFieldSet(fields) 19085 var invalids uint32 19086 for i, field := range fields { 19087 switch field.Name { 19088 case "__typename": 19089 out.Values[i] = graphql.MarshalString("__Type") 19090 case "kind": 19091 19092 out.Values[i] = ec.___Type_kind(ctx, field, obj) 19093 19094 if out.Values[i] == graphql.Null { 19095 invalids++ 19096 } 19097 case "name": 19098 19099 out.Values[i] = ec.___Type_name(ctx, field, obj) 19100 19101 case "description": 19102 19103 out.Values[i] = ec.___Type_description(ctx, field, obj) 19104 19105 case "fields": 19106 19107 out.Values[i] = ec.___Type_fields(ctx, field, obj) 19108 19109 case "interfaces": 19110 19111 out.Values[i] = ec.___Type_interfaces(ctx, field, obj) 19112 19113 case "possibleTypes": 19114 19115 out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj) 19116 19117 case "enumValues": 19118 19119 out.Values[i] = ec.___Type_enumValues(ctx, field, obj) 19120 19121 case "inputFields": 19122 19123 out.Values[i] = ec.___Type_inputFields(ctx, field, obj) 19124 19125 case "ofType": 19126 19127 out.Values[i] = ec.___Type_ofType(ctx, field, obj) 19128 19129 case "specifiedByURL": 19130 19131 out.Values[i] = ec.___Type_specifiedByURL(ctx, field, obj) 19132 19133 default: 19134 panic("unknown field " + strconv.Quote(field.Name)) 19135 } 19136 } 19137 out.Dispatch() 19138 if invalids > 0 { 19139 return graphql.Null 19140 } 19141 return out 19142 } 19143 19144 var asdfItImplementors = []string{"asdfIt"} 19145 19146 func (ec *executionContext) _asdfIt(ctx context.Context, sel ast.SelectionSet, obj *AsdfIt) graphql.Marshaler { 19147 fields := graphql.CollectFields(ec.OperationContext, sel, asdfItImplementors) 19148 out := graphql.NewFieldSet(fields) 19149 var invalids uint32 19150 for i, field := range fields { 19151 switch field.Name { 19152 case "__typename": 19153 out.Values[i] = graphql.MarshalString("asdfIt") 19154 case "id": 19155 19156 out.Values[i] = ec._asdfIt_id(ctx, field, obj) 19157 19158 if out.Values[i] == graphql.Null { 19159 invalids++ 19160 } 19161 default: 19162 panic("unknown field " + strconv.Quote(field.Name)) 19163 } 19164 } 19165 out.Dispatch() 19166 if invalids > 0 { 19167 return graphql.Null 19168 } 19169 return out 19170 } 19171 19172 var iItImplementors = []string{"iIt"} 19173 19174 func (ec *executionContext) _iIt(ctx context.Context, sel ast.SelectionSet, obj *IIt) graphql.Marshaler { 19175 fields := graphql.CollectFields(ec.OperationContext, sel, iItImplementors) 19176 out := graphql.NewFieldSet(fields) 19177 var invalids uint32 19178 for i, field := range fields { 19179 switch field.Name { 19180 case "__typename": 19181 out.Values[i] = graphql.MarshalString("iIt") 19182 case "id": 19183 19184 out.Values[i] = ec._iIt_id(ctx, field, obj) 19185 19186 if out.Values[i] == graphql.Null { 19187 invalids++ 19188 } 19189 default: 19190 panic("unknown field " + strconv.Quote(field.Name)) 19191 } 19192 } 19193 out.Dispatch() 19194 if invalids > 0 { 19195 return graphql.Null 19196 } 19197 return out 19198 } 19199 19200 // endregion **************************** object.gotpl **************************** 19201 19202 // region ***************************** type.gotpl ***************************** 19203 19204 func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) { 19205 res, err := graphql.UnmarshalBoolean(v) 19206 return res, graphql.ErrorOnPath(ctx, err) 19207 } 19208 19209 func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { 19210 res := graphql.MarshalBoolean(v) 19211 if res == graphql.Null { 19212 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19213 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19214 } 19215 } 19216 return res 19217 } 19218 19219 func (ec *executionContext) unmarshalNBytes2ᚕbyte(ctx context.Context, v interface{}) ([]byte, error) { 19220 res, err := UnmarshalBytes(v) 19221 return res, graphql.ErrorOnPath(ctx, err) 19222 } 19223 19224 func (ec *executionContext) marshalNBytes2ᚕbyte(ctx context.Context, sel ast.SelectionSet, v []byte) graphql.Marshaler { 19225 if v == nil { 19226 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19227 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19228 } 19229 return graphql.Null 19230 } 19231 res := MarshalBytes(v) 19232 if res == graphql.Null { 19233 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19234 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19235 } 19236 } 19237 return res 19238 } 19239 19240 func (ec *executionContext) marshalNCheckIssue8962ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896(ctx context.Context, sel ast.SelectionSet, v *CheckIssue896) graphql.Marshaler { 19241 if v == nil { 19242 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19243 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19244 } 19245 return graphql.Null 19246 } 19247 return ec._CheckIssue896(ctx, sel, v) 19248 } 19249 19250 func (ec *executionContext) unmarshalNDefaultInput2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐDefaultInput(ctx context.Context, v interface{}) (DefaultInput, error) { 19251 res, err := ec.unmarshalInputDefaultInput(ctx, v) 19252 return res, graphql.ErrorOnPath(ctx, err) 19253 } 19254 19255 func (ec *executionContext) marshalNDefaultParametersMirror2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐDefaultParametersMirror(ctx context.Context, sel ast.SelectionSet, v DefaultParametersMirror) graphql.Marshaler { 19256 return ec._DefaultParametersMirror(ctx, sel, &v) 19257 } 19258 19259 func (ec *executionContext) marshalNDefaultParametersMirror2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐDefaultParametersMirror(ctx context.Context, sel ast.SelectionSet, v *DefaultParametersMirror) graphql.Marshaler { 19260 if v == nil { 19261 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19262 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19263 } 19264 return graphql.Null 19265 } 19266 return ec._DefaultParametersMirror(ctx, sel, v) 19267 } 19268 19269 func (ec *executionContext) unmarshalNDefaultScalarImplementation2string(ctx context.Context, v interface{}) (string, error) { 19270 res, err := graphql.UnmarshalString(v) 19271 return res, graphql.ErrorOnPath(ctx, err) 19272 } 19273 19274 func (ec *executionContext) marshalNDefaultScalarImplementation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 19275 res := graphql.MarshalString(v) 19276 if res == graphql.Null { 19277 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19278 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19279 } 19280 } 19281 return res 19282 } 19283 19284 func (ec *executionContext) unmarshalNEmail2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEmail(ctx context.Context, v interface{}) (Email, error) { 19285 var res Email 19286 err := res.UnmarshalGQL(v) 19287 return res, graphql.ErrorOnPath(ctx, err) 19288 } 19289 19290 func (ec *executionContext) marshalNEmail2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEmail(ctx context.Context, sel ast.SelectionSet, v Email) graphql.Marshaler { 19291 return v 19292 } 19293 19294 func (ec *executionContext) unmarshalNEnumTest2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEnumTest(ctx context.Context, v interface{}) (EnumTest, error) { 19295 var res EnumTest 19296 err := res.UnmarshalGQL(v) 19297 return res, graphql.ErrorOnPath(ctx, err) 19298 } 19299 19300 func (ec *executionContext) marshalNEnumTest2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEnumTest(ctx context.Context, sel ast.SelectionSet, v EnumTest) graphql.Marshaler { 19301 return v 19302 } 19303 19304 func (ec *executionContext) marshalNError2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx context.Context, sel ast.SelectionSet, v Error) graphql.Marshaler { 19305 return ec._Error(ctx, sel, &v) 19306 } 19307 19308 func (ec *executionContext) marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx context.Context, sel ast.SelectionSet, v *Error) graphql.Marshaler { 19309 if v == nil { 19310 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19311 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19312 } 19313 return graphql.Null 19314 } 19315 return ec._Error(ctx, sel, v) 19316 } 19317 19318 func (ec *executionContext) unmarshalNFallbackToStringEncoding2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐFallbackToStringEncoding(ctx context.Context, v interface{}) (FallbackToStringEncoding, error) { 19319 tmp, err := graphql.UnmarshalString(v) 19320 res := FallbackToStringEncoding(tmp) 19321 return res, graphql.ErrorOnPath(ctx, err) 19322 } 19323 19324 func (ec *executionContext) marshalNFallbackToStringEncoding2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐFallbackToStringEncoding(ctx context.Context, sel ast.SelectionSet, v FallbackToStringEncoding) graphql.Marshaler { 19325 res := graphql.MarshalString(string(v)) 19326 if res == graphql.Null { 19327 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19328 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19329 } 19330 } 19331 return res 19332 } 19333 19334 func (ec *executionContext) unmarshalNFieldsOrderInput2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐFieldsOrderInput(ctx context.Context, v interface{}) (FieldsOrderInput, error) { 19335 res, err := ec.unmarshalInputFieldsOrderInput(ctx, v) 19336 return res, graphql.ErrorOnPath(ctx, err) 19337 } 19338 19339 func (ec *executionContext) marshalNFieldsOrderPayload2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐFieldsOrderPayload(ctx context.Context, sel ast.SelectionSet, v FieldsOrderPayload) graphql.Marshaler { 19340 return ec._FieldsOrderPayload(ctx, sel, &v) 19341 } 19342 19343 func (ec *executionContext) marshalNFieldsOrderPayload2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐFieldsOrderPayload(ctx context.Context, sel ast.SelectionSet, v *FieldsOrderPayload) graphql.Marshaler { 19344 if v == nil { 19345 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19346 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19347 } 19348 return graphql.Null 19349 } 19350 return ec._FieldsOrderPayload(ctx, sel, v) 19351 } 19352 19353 func (ec *executionContext) unmarshalNFloat2float64(ctx context.Context, v interface{}) (float64, error) { 19354 res, err := graphql.UnmarshalFloatContext(ctx, v) 19355 return res, graphql.ErrorOnPath(ctx, err) 19356 } 19357 19358 func (ec *executionContext) marshalNFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler { 19359 res := graphql.MarshalFloatContext(v) 19360 if res == graphql.Null { 19361 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19362 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19363 } 19364 } 19365 return graphql.WrapContextMarshaler(ctx, res) 19366 } 19367 19368 func (ec *executionContext) unmarshalNID2int(ctx context.Context, v interface{}) (int, error) { 19369 res, err := graphql.UnmarshalIntID(v) 19370 return res, graphql.ErrorOnPath(ctx, err) 19371 } 19372 19373 func (ec *executionContext) marshalNID2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { 19374 res := graphql.MarshalIntID(v) 19375 if res == graphql.Null { 19376 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19377 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19378 } 19379 } 19380 return res 19381 } 19382 19383 func (ec *executionContext) unmarshalNID2string(ctx context.Context, v interface{}) (string, error) { 19384 res, err := graphql.UnmarshalID(v) 19385 return res, graphql.ErrorOnPath(ctx, err) 19386 } 19387 19388 func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 19389 res := graphql.MarshalID(v) 19390 if res == graphql.Null { 19391 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19392 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19393 } 19394 } 19395 return res 19396 } 19397 19398 func (ec *executionContext) unmarshalNInnerDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInnerDirectives(ctx context.Context, v interface{}) (*InnerDirectives, error) { 19399 res, err := ec.unmarshalInputInnerDirectives(ctx, v) 19400 return &res, graphql.ErrorOnPath(ctx, err) 19401 } 19402 19403 func (ec *executionContext) unmarshalNInnerInput2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInnerInput(ctx context.Context, v interface{}) (InnerInput, error) { 19404 res, err := ec.unmarshalInputInnerInput(ctx, v) 19405 return res, graphql.ErrorOnPath(ctx, err) 19406 } 19407 19408 func (ec *executionContext) unmarshalNInnerInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInnerInput(ctx context.Context, v interface{}) (*InnerInput, error) { 19409 res, err := ec.unmarshalInputInnerInput(ctx, v) 19410 return &res, graphql.ErrorOnPath(ctx, err) 19411 } 19412 19413 func (ec *executionContext) marshalNInnerObject2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInnerObject(ctx context.Context, sel ast.SelectionSet, v *InnerObject) graphql.Marshaler { 19414 if v == nil { 19415 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19416 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19417 } 19418 return graphql.Null 19419 } 19420 return ec._InnerObject(ctx, sel, v) 19421 } 19422 19423 func (ec *executionContext) unmarshalNInputDirectives2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInputDirectives(ctx context.Context, v interface{}) (InputDirectives, error) { 19424 res, err := ec.unmarshalInputInputDirectives(ctx, v) 19425 return res, graphql.ErrorOnPath(ctx, err) 19426 } 19427 19428 func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) { 19429 res, err := graphql.UnmarshalInt(v) 19430 return res, graphql.ErrorOnPath(ctx, err) 19431 } 19432 19433 func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { 19434 res := graphql.MarshalInt(v) 19435 if res == graphql.Null { 19436 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19437 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19438 } 19439 } 19440 return res 19441 } 19442 19443 func (ec *executionContext) unmarshalNInt2int32(ctx context.Context, v interface{}) (int32, error) { 19444 res, err := graphql.UnmarshalInt32(v) 19445 return res, graphql.ErrorOnPath(ctx, err) 19446 } 19447 19448 func (ec *executionContext) marshalNInt2int32(ctx context.Context, sel ast.SelectionSet, v int32) graphql.Marshaler { 19449 res := graphql.MarshalInt32(v) 19450 if res == graphql.Null { 19451 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19452 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19453 } 19454 } 19455 return res 19456 } 19457 19458 func (ec *executionContext) unmarshalNInt2int64(ctx context.Context, v interface{}) (int64, error) { 19459 res, err := graphql.UnmarshalInt64(v) 19460 return res, graphql.ErrorOnPath(ctx, err) 19461 } 19462 19463 func (ec *executionContext) marshalNInt2int64(ctx context.Context, sel ast.SelectionSet, v int64) graphql.Marshaler { 19464 res := graphql.MarshalInt64(v) 19465 if res == graphql.Null { 19466 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19467 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19468 } 19469 } 19470 return res 19471 } 19472 19473 func (ec *executionContext) marshalNLoopA2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐLoopA(ctx context.Context, sel ast.SelectionSet, v *LoopA) graphql.Marshaler { 19474 if v == nil { 19475 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19476 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19477 } 19478 return graphql.Null 19479 } 19480 return ec._LoopA(ctx, sel, v) 19481 } 19482 19483 func (ec *executionContext) marshalNLoopB2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐLoopB(ctx context.Context, sel ast.SelectionSet, v *LoopB) graphql.Marshaler { 19484 if v == nil { 19485 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19486 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19487 } 19488 return graphql.Null 19489 } 19490 return ec._LoopB(ctx, sel, v) 19491 } 19492 19493 func (ec *executionContext) unmarshalNMarshalPanic2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanic(ctx context.Context, v interface{}) (MarshalPanic, error) { 19494 var res MarshalPanic 19495 err := res.UnmarshalGQL(v) 19496 return res, graphql.ErrorOnPath(ctx, err) 19497 } 19498 19499 func (ec *executionContext) marshalNMarshalPanic2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanic(ctx context.Context, sel ast.SelectionSet, v MarshalPanic) graphql.Marshaler { 19500 return v 19501 } 19502 19503 func (ec *executionContext) unmarshalNMarshalPanic2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanicᚄ(ctx context.Context, v interface{}) ([]MarshalPanic, error) { 19504 var vSlice []interface{} 19505 if v != nil { 19506 vSlice = graphql.CoerceList(v) 19507 } 19508 var err error 19509 res := make([]MarshalPanic, len(vSlice)) 19510 for i := range vSlice { 19511 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 19512 res[i], err = ec.unmarshalNMarshalPanic2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanic(ctx, vSlice[i]) 19513 if err != nil { 19514 return nil, err 19515 } 19516 } 19517 return res, nil 19518 } 19519 19520 func (ec *executionContext) marshalNMarshalPanic2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanicᚄ(ctx context.Context, sel ast.SelectionSet, v []MarshalPanic) graphql.Marshaler { 19521 ret := make(graphql.Array, len(v)) 19522 for i := range v { 19523 ret[i] = ec.marshalNMarshalPanic2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanic(ctx, sel, v[i]) 19524 } 19525 19526 for _, e := range ret { 19527 if e == graphql.Null { 19528 return graphql.Null 19529 } 19530 } 19531 19532 return ret 19533 } 19534 19535 func (ec *executionContext) unmarshalNNestedInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐNestedInput(ctx context.Context, v interface{}) (*NestedInput, error) { 19536 res, err := ec.unmarshalInputNestedInput(ctx, v) 19537 return &res, graphql.ErrorOnPath(ctx, err) 19538 } 19539 19540 func (ec *executionContext) marshalNNode2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐNode(ctx context.Context, sel ast.SelectionSet, v Node) graphql.Marshaler { 19541 if v == nil { 19542 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19543 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19544 } 19545 return graphql.Null 19546 } 19547 return ec._Node(ctx, sel, v) 19548 } 19549 19550 func (ec *executionContext) marshalNPet2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPet(ctx context.Context, sel ast.SelectionSet, v *Pet) graphql.Marshaler { 19551 if v == nil { 19552 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19553 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19554 } 19555 return graphql.Null 19556 } 19557 return ec._Pet(ctx, sel, v) 19558 } 19559 19560 func (ec *executionContext) marshalNPrimitive2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitive(ctx context.Context, sel ast.SelectionSet, v Primitive) graphql.Marshaler { 19561 return ec._Primitive(ctx, sel, &v) 19562 } 19563 19564 func (ec *executionContext) marshalNPrimitive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitiveᚄ(ctx context.Context, sel ast.SelectionSet, v []Primitive) graphql.Marshaler { 19565 ret := make(graphql.Array, len(v)) 19566 var wg sync.WaitGroup 19567 isLen1 := len(v) == 1 19568 if !isLen1 { 19569 wg.Add(len(v)) 19570 } 19571 for i := range v { 19572 i := i 19573 fc := &graphql.FieldContext{ 19574 Index: &i, 19575 Result: &v[i], 19576 } 19577 ctx := graphql.WithFieldContext(ctx, fc) 19578 f := func(i int) { 19579 defer func() { 19580 if r := recover(); r != nil { 19581 ec.Error(ctx, ec.Recover(ctx, r)) 19582 ret = nil 19583 } 19584 }() 19585 if !isLen1 { 19586 defer wg.Done() 19587 } 19588 ret[i] = ec.marshalNPrimitive2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitive(ctx, sel, v[i]) 19589 } 19590 if isLen1 { 19591 f(i) 19592 } else { 19593 go f(i) 19594 } 19595 19596 } 19597 wg.Wait() 19598 19599 for _, e := range ret { 19600 if e == graphql.Null { 19601 return graphql.Null 19602 } 19603 } 19604 19605 return ret 19606 } 19607 19608 func (ec *executionContext) marshalNPrimitiveString2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitiveString(ctx context.Context, sel ast.SelectionSet, v PrimitiveString) graphql.Marshaler { 19609 return ec._PrimitiveString(ctx, sel, &v) 19610 } 19611 19612 func (ec *executionContext) marshalNPrimitiveString2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitiveStringᚄ(ctx context.Context, sel ast.SelectionSet, v []PrimitiveString) graphql.Marshaler { 19613 ret := make(graphql.Array, len(v)) 19614 var wg sync.WaitGroup 19615 isLen1 := len(v) == 1 19616 if !isLen1 { 19617 wg.Add(len(v)) 19618 } 19619 for i := range v { 19620 i := i 19621 fc := &graphql.FieldContext{ 19622 Index: &i, 19623 Result: &v[i], 19624 } 19625 ctx := graphql.WithFieldContext(ctx, fc) 19626 f := func(i int) { 19627 defer func() { 19628 if r := recover(); r != nil { 19629 ec.Error(ctx, ec.Recover(ctx, r)) 19630 ret = nil 19631 } 19632 }() 19633 if !isLen1 { 19634 defer wg.Done() 19635 } 19636 ret[i] = ec.marshalNPrimitiveString2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitiveString(ctx, sel, v[i]) 19637 } 19638 if isLen1 { 19639 f(i) 19640 } else { 19641 go f(i) 19642 } 19643 19644 } 19645 wg.Wait() 19646 19647 for _, e := range ret { 19648 if e == graphql.Null { 19649 return graphql.Null 19650 } 19651 } 19652 19653 return ret 19654 } 19655 19656 func (ec *executionContext) marshalNPtrToPtrOuter2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrOuter(ctx context.Context, sel ast.SelectionSet, v PtrToPtrOuter) graphql.Marshaler { 19657 return ec._PtrToPtrOuter(ctx, sel, &v) 19658 } 19659 19660 func (ec *executionContext) marshalNPtrToPtrOuter2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrOuter(ctx context.Context, sel ast.SelectionSet, v *PtrToPtrOuter) graphql.Marshaler { 19661 if v == nil { 19662 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19663 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19664 } 19665 return graphql.Null 19666 } 19667 return ec._PtrToPtrOuter(ctx, sel, v) 19668 } 19669 19670 func (ec *executionContext) marshalNPtrToSliceContainer2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToSliceContainer(ctx context.Context, sel ast.SelectionSet, v PtrToSliceContainer) graphql.Marshaler { 19671 return ec._PtrToSliceContainer(ctx, sel, &v) 19672 } 19673 19674 func (ec *executionContext) marshalNPtrToSliceContainer2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToSliceContainer(ctx context.Context, sel ast.SelectionSet, v *PtrToSliceContainer) graphql.Marshaler { 19675 if v == nil { 19676 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19677 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19678 } 19679 return graphql.Null 19680 } 19681 return ec._PtrToSliceContainer(ctx, sel, v) 19682 } 19683 19684 func (ec *executionContext) unmarshalNRecursiveInputSlice2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐRecursiveInputSlice(ctx context.Context, v interface{}) (RecursiveInputSlice, error) { 19685 res, err := ec.unmarshalInputRecursiveInputSlice(ctx, v) 19686 return res, graphql.ErrorOnPath(ctx, err) 19687 } 19688 19689 func (ec *executionContext) marshalNShapeUnion2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐShapeUnion(ctx context.Context, sel ast.SelectionSet, v ShapeUnion) graphql.Marshaler { 19690 if v == nil { 19691 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19692 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19693 } 19694 return graphql.Null 19695 } 19696 return ec._ShapeUnion(ctx, sel, v) 19697 } 19698 19699 func (ec *executionContext) marshalNSize2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐSize(ctx context.Context, sel ast.SelectionSet, v *Size) graphql.Marshaler { 19700 if v == nil { 19701 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19702 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19703 } 19704 return graphql.Null 19705 } 19706 return ec._Size(ctx, sel, v) 19707 } 19708 19709 func (ec *executionContext) unmarshalNSpecialInput2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐSpecialInput(ctx context.Context, v interface{}) (SpecialInput, error) { 19710 res, err := ec.unmarshalInputSpecialInput(ctx, v) 19711 return res, graphql.ErrorOnPath(ctx, err) 19712 } 19713 19714 func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) { 19715 res, err := graphql.UnmarshalString(v) 19716 return res, graphql.ErrorOnPath(ctx, err) 19717 } 19718 19719 func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 19720 res := graphql.MarshalString(v) 19721 if res == graphql.Null { 19722 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19723 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19724 } 19725 } 19726 return res 19727 } 19728 19729 func (ec *executionContext) unmarshalNString2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { 19730 var vSlice []interface{} 19731 if v != nil { 19732 vSlice = graphql.CoerceList(v) 19733 } 19734 var err error 19735 res := make([]string, len(vSlice)) 19736 for i := range vSlice { 19737 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 19738 res[i], err = ec.unmarshalNString2string(ctx, vSlice[i]) 19739 if err != nil { 19740 return nil, err 19741 } 19742 } 19743 return res, nil 19744 } 19745 19746 func (ec *executionContext) marshalNString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { 19747 ret := make(graphql.Array, len(v)) 19748 for i := range v { 19749 ret[i] = ec.marshalNString2string(ctx, sel, v[i]) 19750 } 19751 19752 for _, e := range ret { 19753 if e == graphql.Null { 19754 return graphql.Null 19755 } 19756 } 19757 19758 return ret 19759 } 19760 19761 func (ec *executionContext) unmarshalNString2ᚕᚖstring(ctx context.Context, v interface{}) ([]*string, error) { 19762 var vSlice []interface{} 19763 if v != nil { 19764 vSlice = graphql.CoerceList(v) 19765 } 19766 var err error 19767 res := make([]*string, len(vSlice)) 19768 for i := range vSlice { 19769 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 19770 res[i], err = ec.unmarshalOString2ᚖstring(ctx, vSlice[i]) 19771 if err != nil { 19772 return nil, err 19773 } 19774 } 19775 return res, nil 19776 } 19777 19778 func (ec *executionContext) marshalNString2ᚕᚖstring(ctx context.Context, sel ast.SelectionSet, v []*string) graphql.Marshaler { 19779 ret := make(graphql.Array, len(v)) 19780 for i := range v { 19781 ret[i] = ec.marshalOString2ᚖstring(ctx, sel, v[i]) 19782 } 19783 19784 return ret 19785 } 19786 19787 func (ec *executionContext) unmarshalNString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { 19788 res, err := graphql.UnmarshalString(v) 19789 return &res, graphql.ErrorOnPath(ctx, err) 19790 } 19791 19792 func (ec *executionContext) marshalNString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { 19793 if v == nil { 19794 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19795 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19796 } 19797 return graphql.Null 19798 } 19799 res := graphql.MarshalString(*v) 19800 if res == graphql.Null { 19801 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19802 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19803 } 19804 } 19805 return res 19806 } 19807 19808 func (ec *executionContext) unmarshalNStringFromContextFunction2string(ctx context.Context, v interface{}) (string, error) { 19809 res, err := UnmarshalStringFromContextFunction(ctx, v) 19810 return res, graphql.ErrorOnPath(ctx, err) 19811 } 19812 19813 func (ec *executionContext) marshalNStringFromContextFunction2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 19814 res := MarshalStringFromContextFunction(v) 19815 if res == graphql.Null { 19816 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19817 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19818 } 19819 } 19820 return graphql.WrapContextMarshaler(ctx, res) 19821 } 19822 19823 func (ec *executionContext) unmarshalNStringFromContextInterface2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐStringFromContextInterface(ctx context.Context, v interface{}) (StringFromContextInterface, error) { 19824 var res StringFromContextInterface 19825 err := res.UnmarshalGQLContext(ctx, v) 19826 return res, graphql.ErrorOnPath(ctx, err) 19827 } 19828 19829 func (ec *executionContext) marshalNStringFromContextInterface2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐStringFromContextInterface(ctx context.Context, sel ast.SelectionSet, v StringFromContextInterface) graphql.Marshaler { 19830 return graphql.WrapContextMarshaler(ctx, v) 19831 } 19832 19833 func (ec *executionContext) unmarshalNStringFromContextInterface2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐStringFromContextInterface(ctx context.Context, v interface{}) (*StringFromContextInterface, error) { 19834 var res = new(StringFromContextInterface) 19835 err := res.UnmarshalGQLContext(ctx, v) 19836 return res, graphql.ErrorOnPath(ctx, err) 19837 } 19838 19839 func (ec *executionContext) marshalNStringFromContextInterface2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐStringFromContextInterface(ctx context.Context, sel ast.SelectionSet, v *StringFromContextInterface) graphql.Marshaler { 19840 if v == nil { 19841 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19842 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19843 } 19844 return graphql.Null 19845 } 19846 return graphql.WrapContextMarshaler(ctx, v) 19847 } 19848 19849 func (ec *executionContext) unmarshalNTime2timeᚐTime(ctx context.Context, v interface{}) (time.Time, error) { 19850 res, err := graphql.UnmarshalTime(v) 19851 return res, graphql.ErrorOnPath(ctx, err) 19852 } 19853 19854 func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler { 19855 res := graphql.MarshalTime(v) 19856 if res == graphql.Null { 19857 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19858 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19859 } 19860 } 19861 return res 19862 } 19863 19864 func (ec *executionContext) unmarshalNUUID2string(ctx context.Context, v interface{}) (string, error) { 19865 res, err := graphql.UnmarshalString(v) 19866 return res, graphql.ErrorOnPath(ctx, err) 19867 } 19868 19869 func (ec *executionContext) marshalNUUID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 19870 res := graphql.MarshalString(v) 19871 if res == graphql.Null { 19872 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19873 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19874 } 19875 } 19876 return res 19877 } 19878 19879 func (ec *executionContext) unmarshalNUpdatePtrToPtrOuter2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrOuter(ctx context.Context, v interface{}) (UpdatePtrToPtrOuter, error) { 19880 res, err := ec.unmarshalInputUpdatePtrToPtrOuter(ctx, v) 19881 return res, graphql.ErrorOnPath(ctx, err) 19882 } 19883 19884 func (ec *executionContext) marshalNUser2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUser(ctx context.Context, sel ast.SelectionSet, v User) graphql.Marshaler { 19885 return ec._User(ctx, sel, &v) 19886 } 19887 19888 func (ec *executionContext) marshalNUser2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUserᚄ(ctx context.Context, sel ast.SelectionSet, v []*User) graphql.Marshaler { 19889 ret := make(graphql.Array, len(v)) 19890 var wg sync.WaitGroup 19891 isLen1 := len(v) == 1 19892 if !isLen1 { 19893 wg.Add(len(v)) 19894 } 19895 for i := range v { 19896 i := i 19897 fc := &graphql.FieldContext{ 19898 Index: &i, 19899 Result: &v[i], 19900 } 19901 ctx := graphql.WithFieldContext(ctx, fc) 19902 f := func(i int) { 19903 defer func() { 19904 if r := recover(); r != nil { 19905 ec.Error(ctx, ec.Recover(ctx, r)) 19906 ret = nil 19907 } 19908 }() 19909 if !isLen1 { 19910 defer wg.Done() 19911 } 19912 ret[i] = ec.marshalNUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUser(ctx, sel, v[i]) 19913 } 19914 if isLen1 { 19915 f(i) 19916 } else { 19917 go f(i) 19918 } 19919 19920 } 19921 wg.Wait() 19922 19923 for _, e := range ret { 19924 if e == graphql.Null { 19925 return graphql.Null 19926 } 19927 } 19928 19929 return ret 19930 } 19931 19932 func (ec *executionContext) marshalNUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUser(ctx context.Context, sel ast.SelectionSet, v *User) graphql.Marshaler { 19933 if v == nil { 19934 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19935 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19936 } 19937 return graphql.Null 19938 } 19939 return ec._User(ctx, sel, v) 19940 } 19941 19942 func (ec *executionContext) marshalNWrappedMap2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐWrappedMap(ctx context.Context, sel ast.SelectionSet, v WrappedMap) graphql.Marshaler { 19943 if v == nil { 19944 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19945 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19946 } 19947 return graphql.Null 19948 } 19949 return ec._WrappedMap(ctx, sel, v) 19950 } 19951 19952 func (ec *executionContext) unmarshalNWrappedScalar2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚋotherpkgᚐScalar(ctx context.Context, v interface{}) (otherpkg.Scalar, error) { 19953 tmp, err := graphql.UnmarshalString(v) 19954 res := otherpkg.Scalar(tmp) 19955 return res, graphql.ErrorOnPath(ctx, err) 19956 } 19957 19958 func (ec *executionContext) marshalNWrappedScalar2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚋotherpkgᚐScalar(ctx context.Context, sel ast.SelectionSet, v otherpkg.Scalar) graphql.Marshaler { 19959 res := graphql.MarshalString(string(v)) 19960 if res == graphql.Null { 19961 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19962 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19963 } 19964 } 19965 return res 19966 } 19967 19968 func (ec *executionContext) marshalNWrappedSlice2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐWrappedSlice(ctx context.Context, sel ast.SelectionSet, v WrappedSlice) graphql.Marshaler { 19969 if v == nil { 19970 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19971 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19972 } 19973 return graphql.Null 19974 } 19975 return ec._WrappedSlice(ctx, sel, v) 19976 } 19977 19978 func (ec *executionContext) marshalNWrappedStruct2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐWrappedStruct(ctx context.Context, sel ast.SelectionSet, v WrappedStruct) graphql.Marshaler { 19979 return ec._WrappedStruct(ctx, sel, &v) 19980 } 19981 19982 func (ec *executionContext) marshalNWrappedStruct2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐWrappedStruct(ctx context.Context, sel ast.SelectionSet, v *WrappedStruct) graphql.Marshaler { 19983 if v == nil { 19984 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19985 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19986 } 19987 return graphql.Null 19988 } 19989 return ec._WrappedStruct(ctx, sel, v) 19990 } 19991 19992 func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler { 19993 return ec.___Directive(ctx, sel, &v) 19994 } 19995 19996 func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler { 19997 ret := make(graphql.Array, len(v)) 19998 var wg sync.WaitGroup 19999 isLen1 := len(v) == 1 20000 if !isLen1 { 20001 wg.Add(len(v)) 20002 } 20003 for i := range v { 20004 i := i 20005 fc := &graphql.FieldContext{ 20006 Index: &i, 20007 Result: &v[i], 20008 } 20009 ctx := graphql.WithFieldContext(ctx, fc) 20010 f := func(i int) { 20011 defer func() { 20012 if r := recover(); r != nil { 20013 ec.Error(ctx, ec.Recover(ctx, r)) 20014 ret = nil 20015 } 20016 }() 20017 if !isLen1 { 20018 defer wg.Done() 20019 } 20020 ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i]) 20021 } 20022 if isLen1 { 20023 f(i) 20024 } else { 20025 go f(i) 20026 } 20027 20028 } 20029 wg.Wait() 20030 20031 for _, e := range ret { 20032 if e == graphql.Null { 20033 return graphql.Null 20034 } 20035 } 20036 20037 return ret 20038 } 20039 20040 func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) { 20041 res, err := graphql.UnmarshalString(v) 20042 return res, graphql.ErrorOnPath(ctx, err) 20043 } 20044 20045 func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 20046 res := graphql.MarshalString(v) 20047 if res == graphql.Null { 20048 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 20049 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 20050 } 20051 } 20052 return res 20053 } 20054 20055 func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { 20056 var vSlice []interface{} 20057 if v != nil { 20058 vSlice = graphql.CoerceList(v) 20059 } 20060 var err error 20061 res := make([]string, len(vSlice)) 20062 for i := range vSlice { 20063 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 20064 res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i]) 20065 if err != nil { 20066 return nil, err 20067 } 20068 } 20069 return res, nil 20070 } 20071 20072 func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { 20073 ret := make(graphql.Array, len(v)) 20074 var wg sync.WaitGroup 20075 isLen1 := len(v) == 1 20076 if !isLen1 { 20077 wg.Add(len(v)) 20078 } 20079 for i := range v { 20080 i := i 20081 fc := &graphql.FieldContext{ 20082 Index: &i, 20083 Result: &v[i], 20084 } 20085 ctx := graphql.WithFieldContext(ctx, fc) 20086 f := func(i int) { 20087 defer func() { 20088 if r := recover(); r != nil { 20089 ec.Error(ctx, ec.Recover(ctx, r)) 20090 ret = nil 20091 } 20092 }() 20093 if !isLen1 { 20094 defer wg.Done() 20095 } 20096 ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i]) 20097 } 20098 if isLen1 { 20099 f(i) 20100 } else { 20101 go f(i) 20102 } 20103 20104 } 20105 wg.Wait() 20106 20107 for _, e := range ret { 20108 if e == graphql.Null { 20109 return graphql.Null 20110 } 20111 } 20112 20113 return ret 20114 } 20115 20116 func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler { 20117 return ec.___EnumValue(ctx, sel, &v) 20118 } 20119 20120 func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler { 20121 return ec.___Field(ctx, sel, &v) 20122 } 20123 20124 func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler { 20125 return ec.___InputValue(ctx, sel, &v) 20126 } 20127 20128 func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { 20129 ret := make(graphql.Array, len(v)) 20130 var wg sync.WaitGroup 20131 isLen1 := len(v) == 1 20132 if !isLen1 { 20133 wg.Add(len(v)) 20134 } 20135 for i := range v { 20136 i := i 20137 fc := &graphql.FieldContext{ 20138 Index: &i, 20139 Result: &v[i], 20140 } 20141 ctx := graphql.WithFieldContext(ctx, fc) 20142 f := func(i int) { 20143 defer func() { 20144 if r := recover(); r != nil { 20145 ec.Error(ctx, ec.Recover(ctx, r)) 20146 ret = nil 20147 } 20148 }() 20149 if !isLen1 { 20150 defer wg.Done() 20151 } 20152 ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) 20153 } 20154 if isLen1 { 20155 f(i) 20156 } else { 20157 go f(i) 20158 } 20159 20160 } 20161 wg.Wait() 20162 20163 for _, e := range ret { 20164 if e == graphql.Null { 20165 return graphql.Null 20166 } 20167 } 20168 20169 return ret 20170 } 20171 20172 func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { 20173 return ec.___Type(ctx, sel, &v) 20174 } 20175 20176 func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { 20177 ret := make(graphql.Array, len(v)) 20178 var wg sync.WaitGroup 20179 isLen1 := len(v) == 1 20180 if !isLen1 { 20181 wg.Add(len(v)) 20182 } 20183 for i := range v { 20184 i := i 20185 fc := &graphql.FieldContext{ 20186 Index: &i, 20187 Result: &v[i], 20188 } 20189 ctx := graphql.WithFieldContext(ctx, fc) 20190 f := func(i int) { 20191 defer func() { 20192 if r := recover(); r != nil { 20193 ec.Error(ctx, ec.Recover(ctx, r)) 20194 ret = nil 20195 } 20196 }() 20197 if !isLen1 { 20198 defer wg.Done() 20199 } 20200 ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) 20201 } 20202 if isLen1 { 20203 f(i) 20204 } else { 20205 go f(i) 20206 } 20207 20208 } 20209 wg.Wait() 20210 20211 for _, e := range ret { 20212 if e == graphql.Null { 20213 return graphql.Null 20214 } 20215 } 20216 20217 return ret 20218 } 20219 20220 func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { 20221 if v == nil { 20222 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 20223 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 20224 } 20225 return graphql.Null 20226 } 20227 return ec.___Type(ctx, sel, v) 20228 } 20229 20230 func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) { 20231 res, err := graphql.UnmarshalString(v) 20232 return res, graphql.ErrorOnPath(ctx, err) 20233 } 20234 20235 func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 20236 res := graphql.MarshalString(v) 20237 if res == graphql.Null { 20238 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 20239 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 20240 } 20241 } 20242 return res 20243 } 20244 20245 func (ec *executionContext) marshalOAnimal2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐAnimal(ctx context.Context, sel ast.SelectionSet, v Animal) graphql.Marshaler { 20246 if v == nil { 20247 return graphql.Null 20248 } 20249 return ec._Animal(ctx, sel, v) 20250 } 20251 20252 func (ec *executionContext) marshalOAutobind2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐAutobind(ctx context.Context, sel ast.SelectionSet, v *Autobind) graphql.Marshaler { 20253 if v == nil { 20254 return graphql.Null 20255 } 20256 return ec._Autobind(ctx, sel, v) 20257 } 20258 20259 func (ec *executionContext) marshalOBackedByInterface2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐBackedByInterface(ctx context.Context, sel ast.SelectionSet, v BackedByInterface) graphql.Marshaler { 20260 if v == nil { 20261 return graphql.Null 20262 } 20263 return ec._BackedByInterface(ctx, sel, v) 20264 } 20265 20266 func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) { 20267 res, err := graphql.UnmarshalBoolean(v) 20268 return res, graphql.ErrorOnPath(ctx, err) 20269 } 20270 20271 func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { 20272 res := graphql.MarshalBoolean(v) 20273 return res 20274 } 20275 20276 func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) { 20277 if v == nil { 20278 return nil, nil 20279 } 20280 res, err := graphql.UnmarshalBoolean(v) 20281 return &res, graphql.ErrorOnPath(ctx, err) 20282 } 20283 20284 func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler { 20285 if v == nil { 20286 return graphql.Null 20287 } 20288 res := graphql.MarshalBoolean(*v) 20289 return res 20290 } 20291 20292 func (ec *executionContext) unmarshalOChanges2map(ctx context.Context, v interface{}) (map[string]interface{}, error) { 20293 if v == nil { 20294 return nil, nil 20295 } 20296 return v.(map[string]interface{}), nil 20297 } 20298 20299 func (ec *executionContext) marshalOCheckIssue8962ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896(ctx context.Context, sel ast.SelectionSet, v []*CheckIssue896) graphql.Marshaler { 20300 if v == nil { 20301 return graphql.Null 20302 } 20303 ret := make(graphql.Array, len(v)) 20304 var wg sync.WaitGroup 20305 isLen1 := len(v) == 1 20306 if !isLen1 { 20307 wg.Add(len(v)) 20308 } 20309 for i := range v { 20310 i := i 20311 fc := &graphql.FieldContext{ 20312 Index: &i, 20313 Result: &v[i], 20314 } 20315 ctx := graphql.WithFieldContext(ctx, fc) 20316 f := func(i int) { 20317 defer func() { 20318 if r := recover(); r != nil { 20319 ec.Error(ctx, ec.Recover(ctx, r)) 20320 ret = nil 20321 } 20322 }() 20323 if !isLen1 { 20324 defer wg.Done() 20325 } 20326 ret[i] = ec.marshalOCheckIssue8962ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896(ctx, sel, v[i]) 20327 } 20328 if isLen1 { 20329 f(i) 20330 } else { 20331 go f(i) 20332 } 20333 20334 } 20335 wg.Wait() 20336 20337 return ret 20338 } 20339 20340 func (ec *executionContext) marshalOCheckIssue8962ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896ᚄ(ctx context.Context, sel ast.SelectionSet, v []*CheckIssue896) graphql.Marshaler { 20341 if v == nil { 20342 return graphql.Null 20343 } 20344 ret := make(graphql.Array, len(v)) 20345 var wg sync.WaitGroup 20346 isLen1 := len(v) == 1 20347 if !isLen1 { 20348 wg.Add(len(v)) 20349 } 20350 for i := range v { 20351 i := i 20352 fc := &graphql.FieldContext{ 20353 Index: &i, 20354 Result: &v[i], 20355 } 20356 ctx := graphql.WithFieldContext(ctx, fc) 20357 f := func(i int) { 20358 defer func() { 20359 if r := recover(); r != nil { 20360 ec.Error(ctx, ec.Recover(ctx, r)) 20361 ret = nil 20362 } 20363 }() 20364 if !isLen1 { 20365 defer wg.Done() 20366 } 20367 ret[i] = ec.marshalNCheckIssue8962ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896(ctx, sel, v[i]) 20368 } 20369 if isLen1 { 20370 f(i) 20371 } else { 20372 go f(i) 20373 } 20374 20375 } 20376 wg.Wait() 20377 20378 for _, e := range ret { 20379 if e == graphql.Null { 20380 return graphql.Null 20381 } 20382 } 20383 20384 return ret 20385 } 20386 20387 func (ec *executionContext) marshalOCheckIssue8962ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896(ctx context.Context, sel ast.SelectionSet, v *CheckIssue896) graphql.Marshaler { 20388 if v == nil { 20389 return graphql.Null 20390 } 20391 return ec._CheckIssue896(ctx, sel, v) 20392 } 20393 20394 func (ec *executionContext) marshalOCircle2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCircle(ctx context.Context, sel ast.SelectionSet, v *Circle) graphql.Marshaler { 20395 if v == nil { 20396 return graphql.Null 20397 } 20398 return ec._Circle(ctx, sel, v) 20399 } 20400 20401 func (ec *executionContext) marshalOCoordinates2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐCoordinates(ctx context.Context, sel ast.SelectionSet, v Coordinates) graphql.Marshaler { 20402 return ec._Coordinates(ctx, sel, &v) 20403 } 20404 20405 func (ec *executionContext) unmarshalODefaultScalarImplementation2ᚖstring(ctx context.Context, v interface{}) (*string, error) { 20406 if v == nil { 20407 return nil, nil 20408 } 20409 res, err := graphql.UnmarshalString(v) 20410 return &res, graphql.ErrorOnPath(ctx, err) 20411 } 20412 20413 func (ec *executionContext) marshalODefaultScalarImplementation2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { 20414 if v == nil { 20415 return graphql.Null 20416 } 20417 res := graphql.MarshalString(*v) 20418 return res 20419 } 20420 20421 func (ec *executionContext) marshalODog2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐDog(ctx context.Context, sel ast.SelectionSet, v *Dog) graphql.Marshaler { 20422 if v == nil { 20423 return graphql.Null 20424 } 20425 return ec._Dog(ctx, sel, v) 20426 } 20427 20428 func (ec *executionContext) marshalOEmbeddedCase12ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEmbeddedCase1(ctx context.Context, sel ast.SelectionSet, v *EmbeddedCase1) graphql.Marshaler { 20429 if v == nil { 20430 return graphql.Null 20431 } 20432 return ec._EmbeddedCase1(ctx, sel, v) 20433 } 20434 20435 func (ec *executionContext) marshalOEmbeddedCase22ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEmbeddedCase2(ctx context.Context, sel ast.SelectionSet, v *EmbeddedCase2) graphql.Marshaler { 20436 if v == nil { 20437 return graphql.Null 20438 } 20439 return ec._EmbeddedCase2(ctx, sel, v) 20440 } 20441 20442 func (ec *executionContext) marshalOEmbeddedCase32ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐEmbeddedCase3(ctx context.Context, sel ast.SelectionSet, v *EmbeddedCase3) graphql.Marshaler { 20443 if v == nil { 20444 return graphql.Null 20445 } 20446 return ec._EmbeddedCase3(ctx, sel, v) 20447 } 20448 20449 func (ec *executionContext) marshalOError2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx context.Context, sel ast.SelectionSet, v []*Error) graphql.Marshaler { 20450 if v == nil { 20451 return graphql.Null 20452 } 20453 ret := make(graphql.Array, len(v)) 20454 var wg sync.WaitGroup 20455 isLen1 := len(v) == 1 20456 if !isLen1 { 20457 wg.Add(len(v)) 20458 } 20459 for i := range v { 20460 i := i 20461 fc := &graphql.FieldContext{ 20462 Index: &i, 20463 Result: &v[i], 20464 } 20465 ctx := graphql.WithFieldContext(ctx, fc) 20466 f := func(i int) { 20467 defer func() { 20468 if r := recover(); r != nil { 20469 ec.Error(ctx, ec.Recover(ctx, r)) 20470 ret = nil 20471 } 20472 }() 20473 if !isLen1 { 20474 defer wg.Done() 20475 } 20476 ret[i] = ec.marshalOError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx, sel, v[i]) 20477 } 20478 if isLen1 { 20479 f(i) 20480 } else { 20481 go f(i) 20482 } 20483 20484 } 20485 wg.Wait() 20486 20487 return ret 20488 } 20489 20490 func (ec *executionContext) marshalOError2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐErrorᚄ(ctx context.Context, sel ast.SelectionSet, v []*Error) graphql.Marshaler { 20491 if v == nil { 20492 return graphql.Null 20493 } 20494 ret := make(graphql.Array, len(v)) 20495 var wg sync.WaitGroup 20496 isLen1 := len(v) == 1 20497 if !isLen1 { 20498 wg.Add(len(v)) 20499 } 20500 for i := range v { 20501 i := i 20502 fc := &graphql.FieldContext{ 20503 Index: &i, 20504 Result: &v[i], 20505 } 20506 ctx := graphql.WithFieldContext(ctx, fc) 20507 f := func(i int) { 20508 defer func() { 20509 if r := recover(); r != nil { 20510 ec.Error(ctx, ec.Recover(ctx, r)) 20511 ret = nil 20512 } 20513 }() 20514 if !isLen1 { 20515 defer wg.Done() 20516 } 20517 ret[i] = ec.marshalNError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx, sel, v[i]) 20518 } 20519 if isLen1 { 20520 f(i) 20521 } else { 20522 go f(i) 20523 } 20524 20525 } 20526 wg.Wait() 20527 20528 for _, e := range ret { 20529 if e == graphql.Null { 20530 return graphql.Null 20531 } 20532 } 20533 20534 return ret 20535 } 20536 20537 func (ec *executionContext) marshalOError2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx context.Context, sel ast.SelectionSet, v *Error) graphql.Marshaler { 20538 if v == nil { 20539 return graphql.Null 20540 } 20541 return ec._Error(ctx, sel, v) 20542 } 20543 20544 func (ec *executionContext) marshalOErrors2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐErrors(ctx context.Context, sel ast.SelectionSet, v *Errors) graphql.Marshaler { 20545 if v == nil { 20546 return graphql.Null 20547 } 20548 return ec._Errors(ctx, sel, v) 20549 } 20550 20551 func (ec *executionContext) unmarshalOFloat2float64(ctx context.Context, v interface{}) (float64, error) { 20552 res, err := graphql.UnmarshalFloatContext(ctx, v) 20553 return res, graphql.ErrorOnPath(ctx, err) 20554 } 20555 20556 func (ec *executionContext) marshalOFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler { 20557 res := graphql.MarshalFloatContext(v) 20558 return graphql.WrapContextMarshaler(ctx, res) 20559 } 20560 20561 func (ec *executionContext) unmarshalOInnerDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInnerDirectives(ctx context.Context, v interface{}) (*InnerDirectives, error) { 20562 if v == nil { 20563 return nil, nil 20564 } 20565 res, err := ec.unmarshalInputInnerDirectives(ctx, v) 20566 return &res, graphql.ErrorOnPath(ctx, err) 20567 } 20568 20569 func (ec *executionContext) unmarshalOInputDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInputDirectives(ctx context.Context, v interface{}) (*InputDirectives, error) { 20570 if v == nil { 20571 return nil, nil 20572 } 20573 res, err := ec.unmarshalInputInputDirectives(ctx, v) 20574 return &res, graphql.ErrorOnPath(ctx, err) 20575 } 20576 20577 func (ec *executionContext) unmarshalOInputWithEnumValue2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐInputWithEnumValue(ctx context.Context, v interface{}) (*InputWithEnumValue, error) { 20578 if v == nil { 20579 return nil, nil 20580 } 20581 res, err := ec.unmarshalInputInputWithEnumValue(ctx, v) 20582 return &res, graphql.ErrorOnPath(ctx, err) 20583 } 20584 20585 func (ec *executionContext) unmarshalOInt2ᚖint(ctx context.Context, v interface{}) (*int, error) { 20586 if v == nil { 20587 return nil, nil 20588 } 20589 res, err := graphql.UnmarshalInt(v) 20590 return &res, graphql.ErrorOnPath(ctx, err) 20591 } 20592 20593 func (ec *executionContext) marshalOInt2ᚖint(ctx context.Context, sel ast.SelectionSet, v *int) graphql.Marshaler { 20594 if v == nil { 20595 return graphql.Null 20596 } 20597 res := graphql.MarshalInt(*v) 20598 return res 20599 } 20600 20601 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 { 20602 if v == nil { 20603 return graphql.Null 20604 } 20605 return ec._InvalidIdentifier(ctx, sel, v) 20606 } 20607 20608 func (ec *executionContext) marshalOIt2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚋintrospectionᚐIt(ctx context.Context, sel ast.SelectionSet, v *introspection1.It) graphql.Marshaler { 20609 if v == nil { 20610 return graphql.Null 20611 } 20612 return ec._It(ctx, sel, v) 20613 } 20614 20615 func (ec *executionContext) unmarshalOMapStringInterfaceInput2map(ctx context.Context, v interface{}) (map[string]interface{}, error) { 20616 if v == nil { 20617 return nil, nil 20618 } 20619 return v.(map[string]interface{}), nil 20620 } 20621 20622 func (ec *executionContext) marshalOMapStringInterfaceType2map(ctx context.Context, sel ast.SelectionSet, v map[string]interface{}) graphql.Marshaler { 20623 if v == nil { 20624 return graphql.Null 20625 } 20626 return ec._MapStringInterfaceType(ctx, sel, v) 20627 } 20628 20629 func (ec *executionContext) marshalOModelMethods2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐModelMethods(ctx context.Context, sel ast.SelectionSet, v *ModelMethods) graphql.Marshaler { 20630 if v == nil { 20631 return graphql.Null 20632 } 20633 return ec._ModelMethods(ctx, sel, v) 20634 } 20635 20636 func (ec *executionContext) unmarshalONestedMapInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐNestedMapInput(ctx context.Context, v interface{}) (*NestedMapInput, error) { 20637 if v == nil { 20638 return nil, nil 20639 } 20640 res, err := ec.unmarshalInputNestedMapInput(ctx, v) 20641 return &res, graphql.ErrorOnPath(ctx, err) 20642 } 20643 20644 func (ec *executionContext) marshalOObjectDirectives2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐObjectDirectives(ctx context.Context, sel ast.SelectionSet, v *ObjectDirectives) graphql.Marshaler { 20645 if v == nil { 20646 return graphql.Null 20647 } 20648 return ec._ObjectDirectives(ctx, sel, v) 20649 } 20650 20651 func (ec *executionContext) marshalOObjectDirectivesWithCustomGoModel2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐObjectDirectivesWithCustomGoModel(ctx context.Context, sel ast.SelectionSet, v *ObjectDirectivesWithCustomGoModel) graphql.Marshaler { 20652 if v == nil { 20653 return graphql.Null 20654 } 20655 return ec._ObjectDirectivesWithCustomGoModel(ctx, sel, v) 20656 } 20657 20658 func (ec *executionContext) unmarshalOOuterInput2ᚕᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterInput(ctx context.Context, v interface{}) ([][]*OuterInput, error) { 20659 if v == nil { 20660 return nil, nil 20661 } 20662 var vSlice []interface{} 20663 if v != nil { 20664 vSlice = graphql.CoerceList(v) 20665 } 20666 var err error 20667 res := make([][]*OuterInput, len(vSlice)) 20668 for i := range vSlice { 20669 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 20670 res[i], err = ec.unmarshalOOuterInput2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterInput(ctx, vSlice[i]) 20671 if err != nil { 20672 return nil, err 20673 } 20674 } 20675 return res, nil 20676 } 20677 20678 func (ec *executionContext) unmarshalOOuterInput2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterInput(ctx context.Context, v interface{}) ([]*OuterInput, error) { 20679 if v == nil { 20680 return nil, nil 20681 } 20682 var vSlice []interface{} 20683 if v != nil { 20684 vSlice = graphql.CoerceList(v) 20685 } 20686 var err error 20687 res := make([]*OuterInput, len(vSlice)) 20688 for i := range vSlice { 20689 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 20690 res[i], err = ec.unmarshalOOuterInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterInput(ctx, vSlice[i]) 20691 if err != nil { 20692 return nil, err 20693 } 20694 } 20695 return res, nil 20696 } 20697 20698 func (ec *executionContext) unmarshalOOuterInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterInput(ctx context.Context, v interface{}) (*OuterInput, error) { 20699 if v == nil { 20700 return nil, nil 20701 } 20702 res, err := ec.unmarshalInputOuterInput(ctx, v) 20703 return &res, graphql.ErrorOnPath(ctx, err) 20704 } 20705 20706 func (ec *executionContext) marshalOOuterObject2ᚕᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterObject(ctx context.Context, sel ast.SelectionSet, v [][]*OuterObject) graphql.Marshaler { 20707 if v == nil { 20708 return graphql.Null 20709 } 20710 ret := make(graphql.Array, len(v)) 20711 var wg sync.WaitGroup 20712 isLen1 := len(v) == 1 20713 if !isLen1 { 20714 wg.Add(len(v)) 20715 } 20716 for i := range v { 20717 i := i 20718 fc := &graphql.FieldContext{ 20719 Index: &i, 20720 Result: &v[i], 20721 } 20722 ctx := graphql.WithFieldContext(ctx, fc) 20723 f := func(i int) { 20724 defer func() { 20725 if r := recover(); r != nil { 20726 ec.Error(ctx, ec.Recover(ctx, r)) 20727 ret = nil 20728 } 20729 }() 20730 if !isLen1 { 20731 defer wg.Done() 20732 } 20733 ret[i] = ec.marshalOOuterObject2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterObject(ctx, sel, v[i]) 20734 } 20735 if isLen1 { 20736 f(i) 20737 } else { 20738 go f(i) 20739 } 20740 20741 } 20742 wg.Wait() 20743 20744 return ret 20745 } 20746 20747 func (ec *executionContext) marshalOOuterObject2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterObject(ctx context.Context, sel ast.SelectionSet, v []*OuterObject) graphql.Marshaler { 20748 if v == nil { 20749 return graphql.Null 20750 } 20751 ret := make(graphql.Array, len(v)) 20752 var wg sync.WaitGroup 20753 isLen1 := len(v) == 1 20754 if !isLen1 { 20755 wg.Add(len(v)) 20756 } 20757 for i := range v { 20758 i := i 20759 fc := &graphql.FieldContext{ 20760 Index: &i, 20761 Result: &v[i], 20762 } 20763 ctx := graphql.WithFieldContext(ctx, fc) 20764 f := func(i int) { 20765 defer func() { 20766 if r := recover(); r != nil { 20767 ec.Error(ctx, ec.Recover(ctx, r)) 20768 ret = nil 20769 } 20770 }() 20771 if !isLen1 { 20772 defer wg.Done() 20773 } 20774 ret[i] = ec.marshalOOuterObject2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterObject(ctx, sel, v[i]) 20775 } 20776 if isLen1 { 20777 f(i) 20778 } else { 20779 go f(i) 20780 } 20781 20782 } 20783 wg.Wait() 20784 20785 return ret 20786 } 20787 20788 func (ec *executionContext) marshalOOuterObject2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOuterObject(ctx context.Context, sel ast.SelectionSet, v *OuterObject) graphql.Marshaler { 20789 if v == nil { 20790 return graphql.Null 20791 } 20792 return ec._OuterObject(ctx, sel, v) 20793 } 20794 20795 func (ec *executionContext) marshalOOverlappingFields2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐOverlappingFields(ctx context.Context, sel ast.SelectionSet, v *OverlappingFields) graphql.Marshaler { 20796 if v == nil { 20797 return graphql.Null 20798 } 20799 return ec._OverlappingFields(ctx, sel, v) 20800 } 20801 20802 func (ec *executionContext) marshalOPanics2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPanics(ctx context.Context, sel ast.SelectionSet, v *Panics) graphql.Marshaler { 20803 if v == nil { 20804 return graphql.Null 20805 } 20806 return ec._Panics(ctx, sel, v) 20807 } 20808 20809 func (ec *executionContext) marshalOPet2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPetᚄ(ctx context.Context, sel ast.SelectionSet, v []*Pet) graphql.Marshaler { 20810 if v == nil { 20811 return graphql.Null 20812 } 20813 ret := make(graphql.Array, len(v)) 20814 var wg sync.WaitGroup 20815 isLen1 := len(v) == 1 20816 if !isLen1 { 20817 wg.Add(len(v)) 20818 } 20819 for i := range v { 20820 i := i 20821 fc := &graphql.FieldContext{ 20822 Index: &i, 20823 Result: &v[i], 20824 } 20825 ctx := graphql.WithFieldContext(ctx, fc) 20826 f := func(i int) { 20827 defer func() { 20828 if r := recover(); r != nil { 20829 ec.Error(ctx, ec.Recover(ctx, r)) 20830 ret = nil 20831 } 20832 }() 20833 if !isLen1 { 20834 defer wg.Done() 20835 } 20836 ret[i] = ec.marshalNPet2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPet(ctx, sel, v[i]) 20837 } 20838 if isLen1 { 20839 f(i) 20840 } else { 20841 go f(i) 20842 } 20843 20844 } 20845 wg.Wait() 20846 20847 for _, e := range ret { 20848 if e == graphql.Null { 20849 return graphql.Null 20850 } 20851 } 20852 20853 return ret 20854 } 20855 20856 func (ec *executionContext) marshalOPtrToPtrInner2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx context.Context, sel ast.SelectionSet, v *PtrToPtrInner) graphql.Marshaler { 20857 if v == nil { 20858 return graphql.Null 20859 } 20860 return ec._PtrToPtrInner(ctx, sel, v) 20861 } 20862 20863 func (ec *executionContext) marshalOPtrToPtrInner2ᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx context.Context, sel ast.SelectionSet, v **PtrToPtrInner) graphql.Marshaler { 20864 if v == nil { 20865 return graphql.Null 20866 } 20867 return ec.marshalOPtrToPtrInner2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, sel, *v) 20868 } 20869 20870 func (ec *executionContext) marshalOPtrToPtrInner2ᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx context.Context, sel ast.SelectionSet, v ***PtrToPtrInner) graphql.Marshaler { 20871 if v == nil { 20872 return graphql.Null 20873 } 20874 return ec.marshalOPtrToPtrInner2ᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, sel, *v) 20875 } 20876 20877 func (ec *executionContext) marshalOPtrToPtrInner2ᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx context.Context, sel ast.SelectionSet, v ****PtrToPtrInner) graphql.Marshaler { 20878 if v == nil { 20879 return graphql.Null 20880 } 20881 return ec.marshalOPtrToPtrInner2ᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, sel, *v) 20882 } 20883 20884 func (ec *executionContext) marshalOPtrToPtrInner2ᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx context.Context, sel ast.SelectionSet, v *****PtrToPtrInner) graphql.Marshaler { 20885 if v == nil { 20886 return graphql.Null 20887 } 20888 return ec.marshalOPtrToPtrInner2ᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, sel, *v) 20889 } 20890 20891 func (ec *executionContext) marshalOPtrToPtrInner2ᚖᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx context.Context, sel ast.SelectionSet, v ******PtrToPtrInner) graphql.Marshaler { 20892 if v == nil { 20893 return graphql.Null 20894 } 20895 return ec.marshalOPtrToPtrInner2ᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, sel, *v) 20896 } 20897 20898 func (ec *executionContext) marshalOPtrToPtrInner2ᚖᚖᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx context.Context, sel ast.SelectionSet, v *******PtrToPtrInner) graphql.Marshaler { 20899 if v == nil { 20900 return graphql.Null 20901 } 20902 return ec.marshalOPtrToPtrInner2ᚖᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, sel, *v) 20903 } 20904 20905 func (ec *executionContext) unmarshalORecursiveInputSlice2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐRecursiveInputSliceᚄ(ctx context.Context, v interface{}) ([]RecursiveInputSlice, error) { 20906 if v == nil { 20907 return nil, nil 20908 } 20909 var vSlice []interface{} 20910 if v != nil { 20911 vSlice = graphql.CoerceList(v) 20912 } 20913 var err error 20914 res := make([]RecursiveInputSlice, len(vSlice)) 20915 for i := range vSlice { 20916 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 20917 res[i], err = ec.unmarshalNRecursiveInputSlice2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐRecursiveInputSlice(ctx, vSlice[i]) 20918 if err != nil { 20919 return nil, err 20920 } 20921 } 20922 return res, nil 20923 } 20924 20925 func (ec *executionContext) unmarshalORecursiveInputSlice2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐRecursiveInputSlice(ctx context.Context, v interface{}) (*RecursiveInputSlice, error) { 20926 if v == nil { 20927 return nil, nil 20928 } 20929 res, err := ec.unmarshalInputRecursiveInputSlice(ctx, v) 20930 return &res, graphql.ErrorOnPath(ctx, err) 20931 } 20932 20933 func (ec *executionContext) marshalOShape2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐShape(ctx context.Context, sel ast.SelectionSet, v Shape) graphql.Marshaler { 20934 if v == nil { 20935 return graphql.Null 20936 } 20937 return ec._Shape(ctx, sel, v) 20938 } 20939 20940 func (ec *executionContext) marshalOShape2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐShape(ctx context.Context, sel ast.SelectionSet, v []Shape) graphql.Marshaler { 20941 if v == nil { 20942 return graphql.Null 20943 } 20944 ret := make(graphql.Array, len(v)) 20945 var wg sync.WaitGroup 20946 isLen1 := len(v) == 1 20947 if !isLen1 { 20948 wg.Add(len(v)) 20949 } 20950 for i := range v { 20951 i := i 20952 fc := &graphql.FieldContext{ 20953 Index: &i, 20954 Result: &v[i], 20955 } 20956 ctx := graphql.WithFieldContext(ctx, fc) 20957 f := func(i int) { 20958 defer func() { 20959 if r := recover(); r != nil { 20960 ec.Error(ctx, ec.Recover(ctx, r)) 20961 ret = nil 20962 } 20963 }() 20964 if !isLen1 { 20965 defer wg.Done() 20966 } 20967 ret[i] = ec.marshalOShape2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐShape(ctx, sel, v[i]) 20968 } 20969 if isLen1 { 20970 f(i) 20971 } else { 20972 go f(i) 20973 } 20974 20975 } 20976 wg.Wait() 20977 20978 return ret 20979 } 20980 20981 func (ec *executionContext) marshalOSlices2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐSlices(ctx context.Context, sel ast.SelectionSet, v *Slices) graphql.Marshaler { 20982 if v == nil { 20983 return graphql.Null 20984 } 20985 return ec._Slices(ctx, sel, v) 20986 } 20987 20988 func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) { 20989 res, err := graphql.UnmarshalString(v) 20990 return res, graphql.ErrorOnPath(ctx, err) 20991 } 20992 20993 func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 20994 res := graphql.MarshalString(v) 20995 return res 20996 } 20997 20998 func (ec *executionContext) unmarshalOString2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { 20999 if v == nil { 21000 return nil, nil 21001 } 21002 var vSlice []interface{} 21003 if v != nil { 21004 vSlice = graphql.CoerceList(v) 21005 } 21006 var err error 21007 res := make([]string, len(vSlice)) 21008 for i := range vSlice { 21009 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 21010 res[i], err = ec.unmarshalNString2string(ctx, vSlice[i]) 21011 if err != nil { 21012 return nil, err 21013 } 21014 } 21015 return res, nil 21016 } 21017 21018 func (ec *executionContext) marshalOString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { 21019 if v == nil { 21020 return graphql.Null 21021 } 21022 ret := make(graphql.Array, len(v)) 21023 for i := range v { 21024 ret[i] = ec.marshalNString2string(ctx, sel, v[i]) 21025 } 21026 21027 for _, e := range ret { 21028 if e == graphql.Null { 21029 return graphql.Null 21030 } 21031 } 21032 21033 return ret 21034 } 21035 21036 func (ec *executionContext) unmarshalOString2ᚕᚖstring(ctx context.Context, v interface{}) ([]*string, error) { 21037 if v == nil { 21038 return nil, nil 21039 } 21040 var vSlice []interface{} 21041 if v != nil { 21042 vSlice = graphql.CoerceList(v) 21043 } 21044 var err error 21045 res := make([]*string, len(vSlice)) 21046 for i := range vSlice { 21047 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 21048 res[i], err = ec.unmarshalOString2ᚖstring(ctx, vSlice[i]) 21049 if err != nil { 21050 return nil, err 21051 } 21052 } 21053 return res, nil 21054 } 21055 21056 func (ec *executionContext) marshalOString2ᚕᚖstring(ctx context.Context, sel ast.SelectionSet, v []*string) graphql.Marshaler { 21057 if v == nil { 21058 return graphql.Null 21059 } 21060 ret := make(graphql.Array, len(v)) 21061 for i := range v { 21062 ret[i] = ec.marshalOString2ᚖstring(ctx, sel, v[i]) 21063 } 21064 21065 return ret 21066 } 21067 21068 func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { 21069 if v == nil { 21070 return nil, nil 21071 } 21072 res, err := graphql.UnmarshalString(v) 21073 return &res, graphql.ErrorOnPath(ctx, err) 21074 } 21075 21076 func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { 21077 if v == nil { 21078 return graphql.Null 21079 } 21080 res := graphql.MarshalString(*v) 21081 return res 21082 } 21083 21084 func (ec *executionContext) unmarshalOString2ᚖᚕstringᚄ(ctx context.Context, v interface{}) (*[]string, error) { 21085 if v == nil { 21086 return nil, nil 21087 } 21088 res, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) 21089 return &res, graphql.ErrorOnPath(ctx, err) 21090 } 21091 21092 func (ec *executionContext) marshalOString2ᚖᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v *[]string) graphql.Marshaler { 21093 return ec.marshalOString2ᚕstringᚄ(ctx, sel, *v) 21094 } 21095 21096 func (ec *executionContext) marshalOTestUnion2githubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐTestUnion(ctx context.Context, sel ast.SelectionSet, v TestUnion) graphql.Marshaler { 21097 if v == nil { 21098 return graphql.Null 21099 } 21100 return ec._TestUnion(ctx, sel, v) 21101 } 21102 21103 func (ec *executionContext) unmarshalOThirdParty2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐThirdParty(ctx context.Context, v interface{}) (*ThirdParty, error) { 21104 if v == nil { 21105 return nil, nil 21106 } 21107 res, err := UnmarshalThirdParty(v) 21108 return &res, graphql.ErrorOnPath(ctx, err) 21109 } 21110 21111 func (ec *executionContext) marshalOThirdParty2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐThirdParty(ctx context.Context, sel ast.SelectionSet, v *ThirdParty) graphql.Marshaler { 21112 if v == nil { 21113 return graphql.Null 21114 } 21115 res := MarshalThirdParty(*v) 21116 return res 21117 } 21118 21119 func (ec *executionContext) unmarshalOTime2ᚖtimeᚐTime(ctx context.Context, v interface{}) (*time.Time, error) { 21120 if v == nil { 21121 return nil, nil 21122 } 21123 res, err := graphql.UnmarshalTime(v) 21124 return &res, graphql.ErrorOnPath(ctx, err) 21125 } 21126 21127 func (ec *executionContext) marshalOTime2ᚖtimeᚐTime(ctx context.Context, sel ast.SelectionSet, v *time.Time) graphql.Marshaler { 21128 if v == nil { 21129 return graphql.Null 21130 } 21131 res := graphql.MarshalTime(*v) 21132 return res 21133 } 21134 21135 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (*UpdatePtrToPtrInner, error) { 21136 if v == nil { 21137 return nil, nil 21138 } 21139 res, err := ec.unmarshalInputUpdatePtrToPtrInner(ctx, v) 21140 return &res, graphql.ErrorOnPath(ctx, err) 21141 } 21142 21143 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (**UpdatePtrToPtrInner, error) { 21144 var pres *UpdatePtrToPtrInner 21145 if v != nil { 21146 res, err := ec.unmarshalOUpdatePtrToPtrInner2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 21147 if err != nil { 21148 return nil, graphql.ErrorOnPath(ctx, err) 21149 } 21150 pres = res 21151 } 21152 return &pres, nil 21153 } 21154 21155 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (***UpdatePtrToPtrInner, error) { 21156 var pres **UpdatePtrToPtrInner 21157 if v != nil { 21158 res, err := ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 21159 if err != nil { 21160 return nil, graphql.ErrorOnPath(ctx, err) 21161 } 21162 pres = res 21163 } 21164 return &pres, nil 21165 } 21166 21167 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (****UpdatePtrToPtrInner, error) { 21168 var pres ***UpdatePtrToPtrInner 21169 if v != nil { 21170 res, err := ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 21171 if err != nil { 21172 return nil, graphql.ErrorOnPath(ctx, err) 21173 } 21174 pres = res 21175 } 21176 return &pres, nil 21177 } 21178 21179 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (*****UpdatePtrToPtrInner, error) { 21180 var pres ****UpdatePtrToPtrInner 21181 if v != nil { 21182 res, err := ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 21183 if err != nil { 21184 return nil, graphql.ErrorOnPath(ctx, err) 21185 } 21186 pres = res 21187 } 21188 return &pres, nil 21189 } 21190 21191 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (******UpdatePtrToPtrInner, error) { 21192 var pres *****UpdatePtrToPtrInner 21193 if v != nil { 21194 res, err := ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 21195 if err != nil { 21196 return nil, graphql.ErrorOnPath(ctx, err) 21197 } 21198 pres = res 21199 } 21200 return &pres, nil 21201 } 21202 21203 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (*******UpdatePtrToPtrInner, error) { 21204 var pres ******UpdatePtrToPtrInner 21205 if v != nil { 21206 res, err := ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 21207 if err != nil { 21208 return nil, graphql.ErrorOnPath(ctx, err) 21209 } 21210 pres = res 21211 } 21212 return &pres, nil 21213 } 21214 21215 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (********UpdatePtrToPtrInner, error) { 21216 var pres *******UpdatePtrToPtrInner 21217 if v != nil { 21218 res, err := ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖᚖᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 21219 if err != nil { 21220 return nil, graphql.ErrorOnPath(ctx, err) 21221 } 21222 pres = res 21223 } 21224 return &pres, nil 21225 } 21226 21227 func (ec *executionContext) marshalOVOkCaseNil2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐVOkCaseNil(ctx context.Context, sel ast.SelectionSet, v *VOkCaseNil) graphql.Marshaler { 21228 if v == nil { 21229 return graphql.Null 21230 } 21231 return ec._VOkCaseNil(ctx, sel, v) 21232 } 21233 21234 func (ec *executionContext) marshalOVOkCaseValue2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐVOkCaseValue(ctx context.Context, sel ast.SelectionSet, v *VOkCaseValue) graphql.Marshaler { 21235 if v == nil { 21236 return graphql.Null 21237 } 21238 return ec._VOkCaseValue(ctx, sel, v) 21239 } 21240 21241 func (ec *executionContext) unmarshalOValidInput2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐValidInput(ctx context.Context, v interface{}) (*ValidInput, error) { 21242 if v == nil { 21243 return nil, nil 21244 } 21245 res, err := ec.unmarshalInputValidInput(ctx, v) 21246 return &res, graphql.ErrorOnPath(ctx, err) 21247 } 21248 21249 func (ec *executionContext) marshalOValidType2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐValidType(ctx context.Context, sel ast.SelectionSet, v *ValidType) graphql.Marshaler { 21250 if v == nil { 21251 return graphql.Null 21252 } 21253 return ec._ValidType(ctx, sel, v) 21254 } 21255 21256 func (ec *executionContext) marshalOVariadicModel2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚐVariadicModel(ctx context.Context, sel ast.SelectionSet, v *VariadicModel) graphql.Marshaler { 21257 if v == nil { 21258 return graphql.Null 21259 } 21260 return ec._VariadicModel(ctx, sel, v) 21261 } 21262 21263 func (ec *executionContext) unmarshalOWrappedScalar2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚋotherpkgᚐScalar(ctx context.Context, v interface{}) (*otherpkg.Scalar, error) { 21264 if v == nil { 21265 return nil, nil 21266 } 21267 tmp, err := graphql.UnmarshalString(v) 21268 res := otherpkg.Scalar(tmp) 21269 return &res, graphql.ErrorOnPath(ctx, err) 21270 } 21271 21272 func (ec *executionContext) marshalOWrappedScalar2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋcodegenᚋtestserverᚋsinglefileᚋotherpkgᚐScalar(ctx context.Context, sel ast.SelectionSet, v *otherpkg.Scalar) graphql.Marshaler { 21273 if v == nil { 21274 return graphql.Null 21275 } 21276 res := graphql.MarshalString(string(*v)) 21277 return res 21278 } 21279 21280 func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler { 21281 if v == nil { 21282 return graphql.Null 21283 } 21284 ret := make(graphql.Array, len(v)) 21285 var wg sync.WaitGroup 21286 isLen1 := len(v) == 1 21287 if !isLen1 { 21288 wg.Add(len(v)) 21289 } 21290 for i := range v { 21291 i := i 21292 fc := &graphql.FieldContext{ 21293 Index: &i, 21294 Result: &v[i], 21295 } 21296 ctx := graphql.WithFieldContext(ctx, fc) 21297 f := func(i int) { 21298 defer func() { 21299 if r := recover(); r != nil { 21300 ec.Error(ctx, ec.Recover(ctx, r)) 21301 ret = nil 21302 } 21303 }() 21304 if !isLen1 { 21305 defer wg.Done() 21306 } 21307 ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i]) 21308 } 21309 if isLen1 { 21310 f(i) 21311 } else { 21312 go f(i) 21313 } 21314 21315 } 21316 wg.Wait() 21317 21318 for _, e := range ret { 21319 if e == graphql.Null { 21320 return graphql.Null 21321 } 21322 } 21323 21324 return ret 21325 } 21326 21327 func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler { 21328 if v == nil { 21329 return graphql.Null 21330 } 21331 ret := make(graphql.Array, len(v)) 21332 var wg sync.WaitGroup 21333 isLen1 := len(v) == 1 21334 if !isLen1 { 21335 wg.Add(len(v)) 21336 } 21337 for i := range v { 21338 i := i 21339 fc := &graphql.FieldContext{ 21340 Index: &i, 21341 Result: &v[i], 21342 } 21343 ctx := graphql.WithFieldContext(ctx, fc) 21344 f := func(i int) { 21345 defer func() { 21346 if r := recover(); r != nil { 21347 ec.Error(ctx, ec.Recover(ctx, r)) 21348 ret = nil 21349 } 21350 }() 21351 if !isLen1 { 21352 defer wg.Done() 21353 } 21354 ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i]) 21355 } 21356 if isLen1 { 21357 f(i) 21358 } else { 21359 go f(i) 21360 } 21361 21362 } 21363 wg.Wait() 21364 21365 for _, e := range ret { 21366 if e == graphql.Null { 21367 return graphql.Null 21368 } 21369 } 21370 21371 return ret 21372 } 21373 21374 func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { 21375 if v == nil { 21376 return graphql.Null 21377 } 21378 ret := make(graphql.Array, len(v)) 21379 var wg sync.WaitGroup 21380 isLen1 := len(v) == 1 21381 if !isLen1 { 21382 wg.Add(len(v)) 21383 } 21384 for i := range v { 21385 i := i 21386 fc := &graphql.FieldContext{ 21387 Index: &i, 21388 Result: &v[i], 21389 } 21390 ctx := graphql.WithFieldContext(ctx, fc) 21391 f := func(i int) { 21392 defer func() { 21393 if r := recover(); r != nil { 21394 ec.Error(ctx, ec.Recover(ctx, r)) 21395 ret = nil 21396 } 21397 }() 21398 if !isLen1 { 21399 defer wg.Done() 21400 } 21401 ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) 21402 } 21403 if isLen1 { 21404 f(i) 21405 } else { 21406 go f(i) 21407 } 21408 21409 } 21410 wg.Wait() 21411 21412 for _, e := range ret { 21413 if e == graphql.Null { 21414 return graphql.Null 21415 } 21416 } 21417 21418 return ret 21419 } 21420 21421 func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler { 21422 if v == nil { 21423 return graphql.Null 21424 } 21425 return ec.___Schema(ctx, sel, v) 21426 } 21427 21428 func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { 21429 if v == nil { 21430 return graphql.Null 21431 } 21432 ret := make(graphql.Array, len(v)) 21433 var wg sync.WaitGroup 21434 isLen1 := len(v) == 1 21435 if !isLen1 { 21436 wg.Add(len(v)) 21437 } 21438 for i := range v { 21439 i := i 21440 fc := &graphql.FieldContext{ 21441 Index: &i, 21442 Result: &v[i], 21443 } 21444 ctx := graphql.WithFieldContext(ctx, fc) 21445 f := func(i int) { 21446 defer func() { 21447 if r := recover(); r != nil { 21448 ec.Error(ctx, ec.Recover(ctx, r)) 21449 ret = nil 21450 } 21451 }() 21452 if !isLen1 { 21453 defer wg.Done() 21454 } 21455 ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) 21456 } 21457 if isLen1 { 21458 f(i) 21459 } else { 21460 go f(i) 21461 } 21462 21463 } 21464 wg.Wait() 21465 21466 for _, e := range ret { 21467 if e == graphql.Null { 21468 return graphql.Null 21469 } 21470 } 21471 21472 return ret 21473 } 21474 21475 func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { 21476 if v == nil { 21477 return graphql.Null 21478 } 21479 return ec.___Type(ctx, sel, v) 21480 } 21481 21482 // endregion ***************************** type.gotpl *****************************