github.com/mstephano/gqlgen-schemagen@v0.0.0-20230113041936-dd2cd4ea46aa/codegen/testserver/singlefile/generated.go (about) 1 // Code generated by github.com/mstephano/gqlgen-schemagen, 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/mstephano/gqlgen-schemagen/codegen/testserver/singlefile/introspection" 18 invalid_packagename "github.com/mstephano/gqlgen-schemagen/codegen/testserver/singlefile/invalid-packagename" 19 "github.com/mstephano/gqlgen-schemagen/codegen/testserver/singlefile/otherpkg" 20 "github.com/mstephano/gqlgen-schemagen/graphql" 21 "github.com/mstephano/gqlgen-schemagen/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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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/mstephano/gqlgen-schemagen/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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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/mstephano/gqlgen-schemagen/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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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/mstephano/gqlgen-schemagen/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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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/mstephano/gqlgen-schemagen/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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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/mstephano/gqlgen-schemagen/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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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/mstephano/gqlgen-schemagen/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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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/mstephano/gqlgen-schemagen/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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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/mstephano/gqlgen-schemagen/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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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ᚋmstephanoᚋgqlgenᚑschemagenᚋ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 for i, field := range fields { 16312 innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ 16313 Object: field.Name, 16314 Field: field, 16315 }) 16316 16317 switch field.Name { 16318 case "__typename": 16319 out.Values[i] = graphql.MarshalString("Mutation") 16320 case "defaultInput": 16321 16322 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 16323 return ec._Mutation_defaultInput(ctx, field) 16324 }) 16325 16326 case "overrideValueViaInput": 16327 16328 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 16329 return ec._Mutation_overrideValueViaInput(ctx, field) 16330 }) 16331 16332 case "updateSomething": 16333 16334 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 16335 return ec._Mutation_updateSomething(ctx, field) 16336 }) 16337 16338 case "updatePtrToPtr": 16339 16340 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 16341 return ec._Mutation_updatePtrToPtr(ctx, field) 16342 }) 16343 16344 default: 16345 panic("unknown field " + strconv.Quote(field.Name)) 16346 } 16347 } 16348 out.Dispatch() 16349 return out 16350 } 16351 16352 var objectDirectivesImplementors = []string{"ObjectDirectives"} 16353 16354 func (ec *executionContext) _ObjectDirectives(ctx context.Context, sel ast.SelectionSet, obj *ObjectDirectives) graphql.Marshaler { 16355 fields := graphql.CollectFields(ec.OperationContext, sel, objectDirectivesImplementors) 16356 out := graphql.NewFieldSet(fields) 16357 var invalids uint32 16358 for i, field := range fields { 16359 switch field.Name { 16360 case "__typename": 16361 out.Values[i] = graphql.MarshalString("ObjectDirectives") 16362 case "text": 16363 16364 out.Values[i] = ec._ObjectDirectives_text(ctx, field, obj) 16365 16366 if out.Values[i] == graphql.Null { 16367 invalids++ 16368 } 16369 case "nullableText": 16370 16371 out.Values[i] = ec._ObjectDirectives_nullableText(ctx, field, obj) 16372 16373 case "order": 16374 16375 out.Values[i] = ec._ObjectDirectives_order(ctx, field, obj) 16376 16377 if out.Values[i] == graphql.Null { 16378 invalids++ 16379 } 16380 default: 16381 panic("unknown field " + strconv.Quote(field.Name)) 16382 } 16383 } 16384 out.Dispatch() 16385 if invalids > 0 { 16386 return graphql.Null 16387 } 16388 return out 16389 } 16390 16391 var objectDirectivesWithCustomGoModelImplementors = []string{"ObjectDirectivesWithCustomGoModel"} 16392 16393 func (ec *executionContext) _ObjectDirectivesWithCustomGoModel(ctx context.Context, sel ast.SelectionSet, obj *ObjectDirectivesWithCustomGoModel) graphql.Marshaler { 16394 fields := graphql.CollectFields(ec.OperationContext, sel, objectDirectivesWithCustomGoModelImplementors) 16395 out := graphql.NewFieldSet(fields) 16396 var invalids uint32 16397 for i, field := range fields { 16398 switch field.Name { 16399 case "__typename": 16400 out.Values[i] = graphql.MarshalString("ObjectDirectivesWithCustomGoModel") 16401 case "nullableText": 16402 16403 out.Values[i] = ec._ObjectDirectivesWithCustomGoModel_nullableText(ctx, field, obj) 16404 16405 default: 16406 panic("unknown field " + strconv.Quote(field.Name)) 16407 } 16408 } 16409 out.Dispatch() 16410 if invalids > 0 { 16411 return graphql.Null 16412 } 16413 return out 16414 } 16415 16416 var outerObjectImplementors = []string{"OuterObject"} 16417 16418 func (ec *executionContext) _OuterObject(ctx context.Context, sel ast.SelectionSet, obj *OuterObject) graphql.Marshaler { 16419 fields := graphql.CollectFields(ec.OperationContext, sel, outerObjectImplementors) 16420 out := graphql.NewFieldSet(fields) 16421 var invalids uint32 16422 for i, field := range fields { 16423 switch field.Name { 16424 case "__typename": 16425 out.Values[i] = graphql.MarshalString("OuterObject") 16426 case "inner": 16427 16428 out.Values[i] = ec._OuterObject_inner(ctx, field, obj) 16429 16430 if out.Values[i] == graphql.Null { 16431 invalids++ 16432 } 16433 default: 16434 panic("unknown field " + strconv.Quote(field.Name)) 16435 } 16436 } 16437 out.Dispatch() 16438 if invalids > 0 { 16439 return graphql.Null 16440 } 16441 return out 16442 } 16443 16444 var overlappingFieldsImplementors = []string{"OverlappingFields"} 16445 16446 func (ec *executionContext) _OverlappingFields(ctx context.Context, sel ast.SelectionSet, obj *OverlappingFields) graphql.Marshaler { 16447 fields := graphql.CollectFields(ec.OperationContext, sel, overlappingFieldsImplementors) 16448 out := graphql.NewFieldSet(fields) 16449 var invalids uint32 16450 for i, field := range fields { 16451 switch field.Name { 16452 case "__typename": 16453 out.Values[i] = graphql.MarshalString("OverlappingFields") 16454 case "oneFoo": 16455 16456 out.Values[i] = ec._OverlappingFields_oneFoo(ctx, field, obj) 16457 16458 if out.Values[i] == graphql.Null { 16459 atomic.AddUint32(&invalids, 1) 16460 } 16461 case "twoFoo": 16462 16463 out.Values[i] = ec._OverlappingFields_twoFoo(ctx, field, obj) 16464 16465 if out.Values[i] == graphql.Null { 16466 atomic.AddUint32(&invalids, 1) 16467 } 16468 case "oldFoo": 16469 field := field 16470 16471 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16472 defer func() { 16473 if r := recover(); r != nil { 16474 ec.Error(ctx, ec.Recover(ctx, r)) 16475 } 16476 }() 16477 res = ec._OverlappingFields_oldFoo(ctx, field, obj) 16478 if res == graphql.Null { 16479 atomic.AddUint32(&invalids, 1) 16480 } 16481 return res 16482 } 16483 16484 out.Concurrently(i, func() graphql.Marshaler { 16485 return innerFunc(ctx) 16486 16487 }) 16488 case "newFoo": 16489 16490 out.Values[i] = ec._OverlappingFields_newFoo(ctx, field, obj) 16491 16492 if out.Values[i] == graphql.Null { 16493 atomic.AddUint32(&invalids, 1) 16494 } 16495 case "new_foo": 16496 16497 out.Values[i] = ec._OverlappingFields_new_foo(ctx, field, obj) 16498 16499 if out.Values[i] == graphql.Null { 16500 atomic.AddUint32(&invalids, 1) 16501 } 16502 default: 16503 panic("unknown field " + strconv.Quote(field.Name)) 16504 } 16505 } 16506 out.Dispatch() 16507 if invalids > 0 { 16508 return graphql.Null 16509 } 16510 return out 16511 } 16512 16513 var panicsImplementors = []string{"Panics"} 16514 16515 func (ec *executionContext) _Panics(ctx context.Context, sel ast.SelectionSet, obj *Panics) graphql.Marshaler { 16516 fields := graphql.CollectFields(ec.OperationContext, sel, panicsImplementors) 16517 out := graphql.NewFieldSet(fields) 16518 var invalids uint32 16519 for i, field := range fields { 16520 switch field.Name { 16521 case "__typename": 16522 out.Values[i] = graphql.MarshalString("Panics") 16523 case "fieldScalarMarshal": 16524 field := field 16525 16526 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16527 defer func() { 16528 if r := recover(); r != nil { 16529 ec.Error(ctx, ec.Recover(ctx, r)) 16530 } 16531 }() 16532 res = ec._Panics_fieldScalarMarshal(ctx, field, obj) 16533 if res == graphql.Null { 16534 atomic.AddUint32(&invalids, 1) 16535 } 16536 return res 16537 } 16538 16539 out.Concurrently(i, func() graphql.Marshaler { 16540 return innerFunc(ctx) 16541 16542 }) 16543 case "fieldFuncMarshal": 16544 field := field 16545 16546 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16547 defer func() { 16548 if r := recover(); r != nil { 16549 ec.Error(ctx, ec.Recover(ctx, r)) 16550 } 16551 }() 16552 res = ec._Panics_fieldFuncMarshal(ctx, field, obj) 16553 if res == graphql.Null { 16554 atomic.AddUint32(&invalids, 1) 16555 } 16556 return res 16557 } 16558 16559 out.Concurrently(i, func() graphql.Marshaler { 16560 return innerFunc(ctx) 16561 16562 }) 16563 case "argUnmarshal": 16564 field := field 16565 16566 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16567 defer func() { 16568 if r := recover(); r != nil { 16569 ec.Error(ctx, ec.Recover(ctx, r)) 16570 } 16571 }() 16572 res = ec._Panics_argUnmarshal(ctx, field, obj) 16573 if res == graphql.Null { 16574 atomic.AddUint32(&invalids, 1) 16575 } 16576 return res 16577 } 16578 16579 out.Concurrently(i, func() graphql.Marshaler { 16580 return innerFunc(ctx) 16581 16582 }) 16583 default: 16584 panic("unknown field " + strconv.Quote(field.Name)) 16585 } 16586 } 16587 out.Dispatch() 16588 if invalids > 0 { 16589 return graphql.Null 16590 } 16591 return out 16592 } 16593 16594 var petImplementors = []string{"Pet"} 16595 16596 func (ec *executionContext) _Pet(ctx context.Context, sel ast.SelectionSet, obj *Pet) graphql.Marshaler { 16597 fields := graphql.CollectFields(ec.OperationContext, sel, petImplementors) 16598 out := graphql.NewFieldSet(fields) 16599 var invalids uint32 16600 for i, field := range fields { 16601 switch field.Name { 16602 case "__typename": 16603 out.Values[i] = graphql.MarshalString("Pet") 16604 case "id": 16605 16606 out.Values[i] = ec._Pet_id(ctx, field, obj) 16607 16608 if out.Values[i] == graphql.Null { 16609 atomic.AddUint32(&invalids, 1) 16610 } 16611 case "friends": 16612 field := field 16613 16614 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16615 defer func() { 16616 if r := recover(); r != nil { 16617 ec.Error(ctx, ec.Recover(ctx, r)) 16618 } 16619 }() 16620 res = ec._Pet_friends(ctx, field, obj) 16621 return res 16622 } 16623 16624 out.Concurrently(i, func() graphql.Marshaler { 16625 return innerFunc(ctx) 16626 16627 }) 16628 default: 16629 panic("unknown field " + strconv.Quote(field.Name)) 16630 } 16631 } 16632 out.Dispatch() 16633 if invalids > 0 { 16634 return graphql.Null 16635 } 16636 return out 16637 } 16638 16639 var primitiveImplementors = []string{"Primitive"} 16640 16641 func (ec *executionContext) _Primitive(ctx context.Context, sel ast.SelectionSet, obj *Primitive) graphql.Marshaler { 16642 fields := graphql.CollectFields(ec.OperationContext, sel, primitiveImplementors) 16643 out := graphql.NewFieldSet(fields) 16644 var invalids uint32 16645 for i, field := range fields { 16646 switch field.Name { 16647 case "__typename": 16648 out.Values[i] = graphql.MarshalString("Primitive") 16649 case "value": 16650 field := field 16651 16652 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16653 defer func() { 16654 if r := recover(); r != nil { 16655 ec.Error(ctx, ec.Recover(ctx, r)) 16656 } 16657 }() 16658 res = ec._Primitive_value(ctx, field, obj) 16659 if res == graphql.Null { 16660 atomic.AddUint32(&invalids, 1) 16661 } 16662 return res 16663 } 16664 16665 out.Concurrently(i, func() graphql.Marshaler { 16666 return innerFunc(ctx) 16667 16668 }) 16669 case "squared": 16670 16671 out.Values[i] = ec._Primitive_squared(ctx, field, obj) 16672 16673 if out.Values[i] == graphql.Null { 16674 atomic.AddUint32(&invalids, 1) 16675 } 16676 default: 16677 panic("unknown field " + strconv.Quote(field.Name)) 16678 } 16679 } 16680 out.Dispatch() 16681 if invalids > 0 { 16682 return graphql.Null 16683 } 16684 return out 16685 } 16686 16687 var primitiveStringImplementors = []string{"PrimitiveString"} 16688 16689 func (ec *executionContext) _PrimitiveString(ctx context.Context, sel ast.SelectionSet, obj *PrimitiveString) graphql.Marshaler { 16690 fields := graphql.CollectFields(ec.OperationContext, sel, primitiveStringImplementors) 16691 out := graphql.NewFieldSet(fields) 16692 var invalids uint32 16693 for i, field := range fields { 16694 switch field.Name { 16695 case "__typename": 16696 out.Values[i] = graphql.MarshalString("PrimitiveString") 16697 case "value": 16698 field := field 16699 16700 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16701 defer func() { 16702 if r := recover(); r != nil { 16703 ec.Error(ctx, ec.Recover(ctx, r)) 16704 } 16705 }() 16706 res = ec._PrimitiveString_value(ctx, field, obj) 16707 if res == graphql.Null { 16708 atomic.AddUint32(&invalids, 1) 16709 } 16710 return res 16711 } 16712 16713 out.Concurrently(i, func() graphql.Marshaler { 16714 return innerFunc(ctx) 16715 16716 }) 16717 case "doubled": 16718 16719 out.Values[i] = ec._PrimitiveString_doubled(ctx, field, obj) 16720 16721 if out.Values[i] == graphql.Null { 16722 atomic.AddUint32(&invalids, 1) 16723 } 16724 case "len": 16725 field := field 16726 16727 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16728 defer func() { 16729 if r := recover(); r != nil { 16730 ec.Error(ctx, ec.Recover(ctx, r)) 16731 } 16732 }() 16733 res = ec._PrimitiveString_len(ctx, field, obj) 16734 if res == graphql.Null { 16735 atomic.AddUint32(&invalids, 1) 16736 } 16737 return res 16738 } 16739 16740 out.Concurrently(i, func() graphql.Marshaler { 16741 return innerFunc(ctx) 16742 16743 }) 16744 default: 16745 panic("unknown field " + strconv.Quote(field.Name)) 16746 } 16747 } 16748 out.Dispatch() 16749 if invalids > 0 { 16750 return graphql.Null 16751 } 16752 return out 16753 } 16754 16755 var ptrToPtrInnerImplementors = []string{"PtrToPtrInner"} 16756 16757 func (ec *executionContext) _PtrToPtrInner(ctx context.Context, sel ast.SelectionSet, obj *PtrToPtrInner) graphql.Marshaler { 16758 fields := graphql.CollectFields(ec.OperationContext, sel, ptrToPtrInnerImplementors) 16759 out := graphql.NewFieldSet(fields) 16760 var invalids uint32 16761 for i, field := range fields { 16762 switch field.Name { 16763 case "__typename": 16764 out.Values[i] = graphql.MarshalString("PtrToPtrInner") 16765 case "key": 16766 16767 out.Values[i] = ec._PtrToPtrInner_key(ctx, field, obj) 16768 16769 if out.Values[i] == graphql.Null { 16770 invalids++ 16771 } 16772 case "value": 16773 16774 out.Values[i] = ec._PtrToPtrInner_value(ctx, field, obj) 16775 16776 if out.Values[i] == graphql.Null { 16777 invalids++ 16778 } 16779 default: 16780 panic("unknown field " + strconv.Quote(field.Name)) 16781 } 16782 } 16783 out.Dispatch() 16784 if invalids > 0 { 16785 return graphql.Null 16786 } 16787 return out 16788 } 16789 16790 var ptrToPtrOuterImplementors = []string{"PtrToPtrOuter"} 16791 16792 func (ec *executionContext) _PtrToPtrOuter(ctx context.Context, sel ast.SelectionSet, obj *PtrToPtrOuter) graphql.Marshaler { 16793 fields := graphql.CollectFields(ec.OperationContext, sel, ptrToPtrOuterImplementors) 16794 out := graphql.NewFieldSet(fields) 16795 var invalids uint32 16796 for i, field := range fields { 16797 switch field.Name { 16798 case "__typename": 16799 out.Values[i] = graphql.MarshalString("PtrToPtrOuter") 16800 case "name": 16801 16802 out.Values[i] = ec._PtrToPtrOuter_name(ctx, field, obj) 16803 16804 if out.Values[i] == graphql.Null { 16805 invalids++ 16806 } 16807 case "inner": 16808 16809 out.Values[i] = ec._PtrToPtrOuter_inner(ctx, field, obj) 16810 16811 case "stupidInner": 16812 16813 out.Values[i] = ec._PtrToPtrOuter_stupidInner(ctx, field, obj) 16814 16815 default: 16816 panic("unknown field " + strconv.Quote(field.Name)) 16817 } 16818 } 16819 out.Dispatch() 16820 if invalids > 0 { 16821 return graphql.Null 16822 } 16823 return out 16824 } 16825 16826 var ptrToSliceContainerImplementors = []string{"PtrToSliceContainer"} 16827 16828 func (ec *executionContext) _PtrToSliceContainer(ctx context.Context, sel ast.SelectionSet, obj *PtrToSliceContainer) graphql.Marshaler { 16829 fields := graphql.CollectFields(ec.OperationContext, sel, ptrToSliceContainerImplementors) 16830 out := graphql.NewFieldSet(fields) 16831 var invalids uint32 16832 for i, field := range fields { 16833 switch field.Name { 16834 case "__typename": 16835 out.Values[i] = graphql.MarshalString("PtrToSliceContainer") 16836 case "ptrToSlice": 16837 16838 out.Values[i] = ec._PtrToSliceContainer_ptrToSlice(ctx, field, obj) 16839 16840 default: 16841 panic("unknown field " + strconv.Quote(field.Name)) 16842 } 16843 } 16844 out.Dispatch() 16845 if invalids > 0 { 16846 return graphql.Null 16847 } 16848 return out 16849 } 16850 16851 var queryImplementors = []string{"Query"} 16852 16853 func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { 16854 fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) 16855 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ 16856 Object: "Query", 16857 }) 16858 16859 out := graphql.NewFieldSet(fields) 16860 for i, field := range fields { 16861 innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ 16862 Object: field.Name, 16863 Field: field, 16864 }) 16865 16866 switch field.Name { 16867 case "__typename": 16868 out.Values[i] = graphql.MarshalString("Query") 16869 case "invalidIdentifier": 16870 field := field 16871 16872 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16873 defer func() { 16874 if r := recover(); r != nil { 16875 ec.Error(ctx, ec.Recover(ctx, r)) 16876 } 16877 }() 16878 res = ec._Query_invalidIdentifier(ctx, field) 16879 return res 16880 } 16881 16882 rrm := func(ctx context.Context) graphql.Marshaler { 16883 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 16884 } 16885 16886 out.Concurrently(i, func() graphql.Marshaler { 16887 return rrm(innerCtx) 16888 }) 16889 case "collision": 16890 field := field 16891 16892 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16893 defer func() { 16894 if r := recover(); r != nil { 16895 ec.Error(ctx, ec.Recover(ctx, r)) 16896 } 16897 }() 16898 res = ec._Query_collision(ctx, field) 16899 return res 16900 } 16901 16902 rrm := func(ctx context.Context) graphql.Marshaler { 16903 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 16904 } 16905 16906 out.Concurrently(i, func() graphql.Marshaler { 16907 return rrm(innerCtx) 16908 }) 16909 case "mapInput": 16910 field := field 16911 16912 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16913 defer func() { 16914 if r := recover(); r != nil { 16915 ec.Error(ctx, ec.Recover(ctx, r)) 16916 } 16917 }() 16918 res = ec._Query_mapInput(ctx, field) 16919 return res 16920 } 16921 16922 rrm := func(ctx context.Context) graphql.Marshaler { 16923 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 16924 } 16925 16926 out.Concurrently(i, func() graphql.Marshaler { 16927 return rrm(innerCtx) 16928 }) 16929 case "recursive": 16930 field := field 16931 16932 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16933 defer func() { 16934 if r := recover(); r != nil { 16935 ec.Error(ctx, ec.Recover(ctx, r)) 16936 } 16937 }() 16938 res = ec._Query_recursive(ctx, field) 16939 return res 16940 } 16941 16942 rrm := func(ctx context.Context) graphql.Marshaler { 16943 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 16944 } 16945 16946 out.Concurrently(i, func() graphql.Marshaler { 16947 return rrm(innerCtx) 16948 }) 16949 case "nestedInputs": 16950 field := field 16951 16952 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16953 defer func() { 16954 if r := recover(); r != nil { 16955 ec.Error(ctx, ec.Recover(ctx, r)) 16956 } 16957 }() 16958 res = ec._Query_nestedInputs(ctx, field) 16959 return res 16960 } 16961 16962 rrm := func(ctx context.Context) graphql.Marshaler { 16963 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 16964 } 16965 16966 out.Concurrently(i, func() graphql.Marshaler { 16967 return rrm(innerCtx) 16968 }) 16969 case "nestedOutputs": 16970 field := field 16971 16972 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16973 defer func() { 16974 if r := recover(); r != nil { 16975 ec.Error(ctx, ec.Recover(ctx, r)) 16976 } 16977 }() 16978 res = ec._Query_nestedOutputs(ctx, field) 16979 return res 16980 } 16981 16982 rrm := func(ctx context.Context) graphql.Marshaler { 16983 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 16984 } 16985 16986 out.Concurrently(i, func() graphql.Marshaler { 16987 return rrm(innerCtx) 16988 }) 16989 case "modelMethods": 16990 field := field 16991 16992 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 16993 defer func() { 16994 if r := recover(); r != nil { 16995 ec.Error(ctx, ec.Recover(ctx, r)) 16996 } 16997 }() 16998 res = ec._Query_modelMethods(ctx, field) 16999 return res 17000 } 17001 17002 rrm := func(ctx context.Context) graphql.Marshaler { 17003 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17004 } 17005 17006 out.Concurrently(i, func() graphql.Marshaler { 17007 return rrm(innerCtx) 17008 }) 17009 case "user": 17010 field := field 17011 17012 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17013 defer func() { 17014 if r := recover(); r != nil { 17015 ec.Error(ctx, ec.Recover(ctx, r)) 17016 } 17017 }() 17018 res = ec._Query_user(ctx, field) 17019 return res 17020 } 17021 17022 rrm := func(ctx context.Context) graphql.Marshaler { 17023 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17024 } 17025 17026 out.Concurrently(i, func() graphql.Marshaler { 17027 return rrm(innerCtx) 17028 }) 17029 case "nullableArg": 17030 field := field 17031 17032 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17033 defer func() { 17034 if r := recover(); r != nil { 17035 ec.Error(ctx, ec.Recover(ctx, r)) 17036 } 17037 }() 17038 res = ec._Query_nullableArg(ctx, field) 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 "inputSlice": 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_inputSlice(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 "inputNullableSlice": 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_inputNullableSlice(ctx, field) 17079 return res 17080 } 17081 17082 rrm := func(ctx context.Context) graphql.Marshaler { 17083 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17084 } 17085 17086 out.Concurrently(i, func() graphql.Marshaler { 17087 return rrm(innerCtx) 17088 }) 17089 case "shapeUnion": 17090 field := field 17091 17092 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17093 defer func() { 17094 if r := recover(); r != nil { 17095 ec.Error(ctx, ec.Recover(ctx, r)) 17096 } 17097 }() 17098 res = ec._Query_shapeUnion(ctx, field) 17099 return res 17100 } 17101 17102 rrm := func(ctx context.Context) graphql.Marshaler { 17103 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17104 } 17105 17106 out.Concurrently(i, func() graphql.Marshaler { 17107 return rrm(innerCtx) 17108 }) 17109 case "autobind": 17110 field := field 17111 17112 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17113 defer func() { 17114 if r := recover(); r != nil { 17115 ec.Error(ctx, ec.Recover(ctx, r)) 17116 } 17117 }() 17118 res = ec._Query_autobind(ctx, field) 17119 return res 17120 } 17121 17122 rrm := func(ctx context.Context) graphql.Marshaler { 17123 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17124 } 17125 17126 out.Concurrently(i, func() graphql.Marshaler { 17127 return rrm(innerCtx) 17128 }) 17129 case "deprecatedField": 17130 field := field 17131 17132 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17133 defer func() { 17134 if r := recover(); r != nil { 17135 ec.Error(ctx, ec.Recover(ctx, r)) 17136 } 17137 }() 17138 res = ec._Query_deprecatedField(ctx, field) 17139 return res 17140 } 17141 17142 rrm := func(ctx context.Context) graphql.Marshaler { 17143 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17144 } 17145 17146 out.Concurrently(i, func() graphql.Marshaler { 17147 return rrm(innerCtx) 17148 }) 17149 case "overlapping": 17150 field := field 17151 17152 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17153 defer func() { 17154 if r := recover(); r != nil { 17155 ec.Error(ctx, ec.Recover(ctx, r)) 17156 } 17157 }() 17158 res = ec._Query_overlapping(ctx, field) 17159 return res 17160 } 17161 17162 rrm := func(ctx context.Context) graphql.Marshaler { 17163 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17164 } 17165 17166 out.Concurrently(i, func() graphql.Marshaler { 17167 return rrm(innerCtx) 17168 }) 17169 case "defaultParameters": 17170 field := field 17171 17172 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17173 defer func() { 17174 if r := recover(); r != nil { 17175 ec.Error(ctx, ec.Recover(ctx, r)) 17176 } 17177 }() 17178 res = ec._Query_defaultParameters(ctx, field) 17179 return res 17180 } 17181 17182 rrm := func(ctx context.Context) graphql.Marshaler { 17183 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17184 } 17185 17186 out.Concurrently(i, func() graphql.Marshaler { 17187 return rrm(innerCtx) 17188 }) 17189 case "directiveArg": 17190 field := field 17191 17192 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17193 defer func() { 17194 if r := recover(); r != nil { 17195 ec.Error(ctx, ec.Recover(ctx, r)) 17196 } 17197 }() 17198 res = ec._Query_directiveArg(ctx, field) 17199 return res 17200 } 17201 17202 rrm := func(ctx context.Context) graphql.Marshaler { 17203 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17204 } 17205 17206 out.Concurrently(i, func() graphql.Marshaler { 17207 return rrm(innerCtx) 17208 }) 17209 case "directiveNullableArg": 17210 field := field 17211 17212 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17213 defer func() { 17214 if r := recover(); r != nil { 17215 ec.Error(ctx, ec.Recover(ctx, r)) 17216 } 17217 }() 17218 res = ec._Query_directiveNullableArg(ctx, field) 17219 return res 17220 } 17221 17222 rrm := func(ctx context.Context) graphql.Marshaler { 17223 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17224 } 17225 17226 out.Concurrently(i, func() graphql.Marshaler { 17227 return rrm(innerCtx) 17228 }) 17229 case "directiveInputNullable": 17230 field := field 17231 17232 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17233 defer func() { 17234 if r := recover(); r != nil { 17235 ec.Error(ctx, ec.Recover(ctx, r)) 17236 } 17237 }() 17238 res = ec._Query_directiveInputNullable(ctx, field) 17239 return res 17240 } 17241 17242 rrm := func(ctx context.Context) graphql.Marshaler { 17243 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17244 } 17245 17246 out.Concurrently(i, func() graphql.Marshaler { 17247 return rrm(innerCtx) 17248 }) 17249 case "directiveInput": 17250 field := field 17251 17252 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17253 defer func() { 17254 if r := recover(); r != nil { 17255 ec.Error(ctx, ec.Recover(ctx, r)) 17256 } 17257 }() 17258 res = ec._Query_directiveInput(ctx, field) 17259 return res 17260 } 17261 17262 rrm := func(ctx context.Context) graphql.Marshaler { 17263 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17264 } 17265 17266 out.Concurrently(i, func() graphql.Marshaler { 17267 return rrm(innerCtx) 17268 }) 17269 case "directiveInputType": 17270 field := field 17271 17272 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17273 defer func() { 17274 if r := recover(); r != nil { 17275 ec.Error(ctx, ec.Recover(ctx, r)) 17276 } 17277 }() 17278 res = ec._Query_directiveInputType(ctx, field) 17279 return res 17280 } 17281 17282 rrm := func(ctx context.Context) graphql.Marshaler { 17283 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17284 } 17285 17286 out.Concurrently(i, func() graphql.Marshaler { 17287 return rrm(innerCtx) 17288 }) 17289 case "directiveObject": 17290 field := field 17291 17292 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17293 defer func() { 17294 if r := recover(); r != nil { 17295 ec.Error(ctx, ec.Recover(ctx, r)) 17296 } 17297 }() 17298 res = ec._Query_directiveObject(ctx, field) 17299 return res 17300 } 17301 17302 rrm := func(ctx context.Context) graphql.Marshaler { 17303 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17304 } 17305 17306 out.Concurrently(i, func() graphql.Marshaler { 17307 return rrm(innerCtx) 17308 }) 17309 case "directiveObjectWithCustomGoModel": 17310 field := field 17311 17312 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17313 defer func() { 17314 if r := recover(); r != nil { 17315 ec.Error(ctx, ec.Recover(ctx, r)) 17316 } 17317 }() 17318 res = ec._Query_directiveObjectWithCustomGoModel(ctx, field) 17319 return res 17320 } 17321 17322 rrm := func(ctx context.Context) graphql.Marshaler { 17323 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17324 } 17325 17326 out.Concurrently(i, func() graphql.Marshaler { 17327 return rrm(innerCtx) 17328 }) 17329 case "directiveFieldDef": 17330 field := field 17331 17332 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17333 defer func() { 17334 if r := recover(); r != nil { 17335 ec.Error(ctx, ec.Recover(ctx, r)) 17336 } 17337 }() 17338 res = ec._Query_directiveFieldDef(ctx, field) 17339 return res 17340 } 17341 17342 rrm := func(ctx context.Context) graphql.Marshaler { 17343 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17344 } 17345 17346 out.Concurrently(i, func() graphql.Marshaler { 17347 return rrm(innerCtx) 17348 }) 17349 case "directiveField": 17350 field := field 17351 17352 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17353 defer func() { 17354 if r := recover(); r != nil { 17355 ec.Error(ctx, ec.Recover(ctx, r)) 17356 } 17357 }() 17358 res = ec._Query_directiveField(ctx, field) 17359 return res 17360 } 17361 17362 rrm := func(ctx context.Context) graphql.Marshaler { 17363 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17364 } 17365 17366 out.Concurrently(i, func() graphql.Marshaler { 17367 return rrm(innerCtx) 17368 }) 17369 case "directiveDouble": 17370 field := field 17371 17372 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17373 defer func() { 17374 if r := recover(); r != nil { 17375 ec.Error(ctx, ec.Recover(ctx, r)) 17376 } 17377 }() 17378 res = ec._Query_directiveDouble(ctx, field) 17379 return res 17380 } 17381 17382 rrm := func(ctx context.Context) graphql.Marshaler { 17383 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17384 } 17385 17386 out.Concurrently(i, func() graphql.Marshaler { 17387 return rrm(innerCtx) 17388 }) 17389 case "directiveUnimplemented": 17390 field := field 17391 17392 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17393 defer func() { 17394 if r := recover(); r != nil { 17395 ec.Error(ctx, ec.Recover(ctx, r)) 17396 } 17397 }() 17398 res = ec._Query_directiveUnimplemented(ctx, field) 17399 return res 17400 } 17401 17402 rrm := func(ctx context.Context) graphql.Marshaler { 17403 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17404 } 17405 17406 out.Concurrently(i, func() graphql.Marshaler { 17407 return rrm(innerCtx) 17408 }) 17409 case "embeddedCase1": 17410 field := field 17411 17412 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17413 defer func() { 17414 if r := recover(); r != nil { 17415 ec.Error(ctx, ec.Recover(ctx, r)) 17416 } 17417 }() 17418 res = ec._Query_embeddedCase1(ctx, field) 17419 return res 17420 } 17421 17422 rrm := func(ctx context.Context) graphql.Marshaler { 17423 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17424 } 17425 17426 out.Concurrently(i, func() graphql.Marshaler { 17427 return rrm(innerCtx) 17428 }) 17429 case "embeddedCase2": 17430 field := field 17431 17432 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17433 defer func() { 17434 if r := recover(); r != nil { 17435 ec.Error(ctx, ec.Recover(ctx, r)) 17436 } 17437 }() 17438 res = ec._Query_embeddedCase2(ctx, field) 17439 return res 17440 } 17441 17442 rrm := func(ctx context.Context) graphql.Marshaler { 17443 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17444 } 17445 17446 out.Concurrently(i, func() graphql.Marshaler { 17447 return rrm(innerCtx) 17448 }) 17449 case "embeddedCase3": 17450 field := field 17451 17452 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17453 defer func() { 17454 if r := recover(); r != nil { 17455 ec.Error(ctx, ec.Recover(ctx, r)) 17456 } 17457 }() 17458 res = ec._Query_embeddedCase3(ctx, field) 17459 return res 17460 } 17461 17462 rrm := func(ctx context.Context) graphql.Marshaler { 17463 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17464 } 17465 17466 out.Concurrently(i, func() graphql.Marshaler { 17467 return rrm(innerCtx) 17468 }) 17469 case "enumInInput": 17470 field := field 17471 17472 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17473 defer func() { 17474 if r := recover(); r != nil { 17475 ec.Error(ctx, ec.Recover(ctx, r)) 17476 } 17477 }() 17478 res = ec._Query_enumInInput(ctx, field) 17479 return res 17480 } 17481 17482 rrm := func(ctx context.Context) graphql.Marshaler { 17483 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17484 } 17485 17486 out.Concurrently(i, func() graphql.Marshaler { 17487 return rrm(innerCtx) 17488 }) 17489 case "shapes": 17490 field := field 17491 17492 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17493 defer func() { 17494 if r := recover(); r != nil { 17495 ec.Error(ctx, ec.Recover(ctx, r)) 17496 } 17497 }() 17498 res = ec._Query_shapes(ctx, field) 17499 return res 17500 } 17501 17502 rrm := func(ctx context.Context) graphql.Marshaler { 17503 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17504 } 17505 17506 out.Concurrently(i, func() graphql.Marshaler { 17507 return rrm(innerCtx) 17508 }) 17509 case "noShape": 17510 field := field 17511 17512 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17513 defer func() { 17514 if r := recover(); r != nil { 17515 ec.Error(ctx, ec.Recover(ctx, r)) 17516 } 17517 }() 17518 res = ec._Query_noShape(ctx, field) 17519 return res 17520 } 17521 17522 rrm := func(ctx context.Context) graphql.Marshaler { 17523 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17524 } 17525 17526 out.Concurrently(i, func() graphql.Marshaler { 17527 return rrm(innerCtx) 17528 }) 17529 case "node": 17530 field := field 17531 17532 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17533 defer func() { 17534 if r := recover(); r != nil { 17535 ec.Error(ctx, ec.Recover(ctx, r)) 17536 } 17537 }() 17538 res = ec._Query_node(ctx, field) 17539 return res 17540 } 17541 17542 rrm := func(ctx context.Context) graphql.Marshaler { 17543 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17544 } 17545 17546 out.Concurrently(i, func() graphql.Marshaler { 17547 return rrm(innerCtx) 17548 }) 17549 case "noShapeTypedNil": 17550 field := field 17551 17552 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17553 defer func() { 17554 if r := recover(); r != nil { 17555 ec.Error(ctx, ec.Recover(ctx, r)) 17556 } 17557 }() 17558 res = ec._Query_noShapeTypedNil(ctx, field) 17559 return res 17560 } 17561 17562 rrm := func(ctx context.Context) graphql.Marshaler { 17563 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17564 } 17565 17566 out.Concurrently(i, func() graphql.Marshaler { 17567 return rrm(innerCtx) 17568 }) 17569 case "animal": 17570 field := field 17571 17572 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17573 defer func() { 17574 if r := recover(); r != nil { 17575 ec.Error(ctx, ec.Recover(ctx, r)) 17576 } 17577 }() 17578 res = ec._Query_animal(ctx, field) 17579 return res 17580 } 17581 17582 rrm := func(ctx context.Context) graphql.Marshaler { 17583 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17584 } 17585 17586 out.Concurrently(i, func() graphql.Marshaler { 17587 return rrm(innerCtx) 17588 }) 17589 case "notAnInterface": 17590 field := field 17591 17592 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17593 defer func() { 17594 if r := recover(); r != nil { 17595 ec.Error(ctx, ec.Recover(ctx, r)) 17596 } 17597 }() 17598 res = ec._Query_notAnInterface(ctx, field) 17599 return res 17600 } 17601 17602 rrm := func(ctx context.Context) graphql.Marshaler { 17603 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17604 } 17605 17606 out.Concurrently(i, func() graphql.Marshaler { 17607 return rrm(innerCtx) 17608 }) 17609 case "dog": 17610 field := field 17611 17612 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17613 defer func() { 17614 if r := recover(); r != nil { 17615 ec.Error(ctx, ec.Recover(ctx, r)) 17616 } 17617 }() 17618 res = ec._Query_dog(ctx, field) 17619 return res 17620 } 17621 17622 rrm := func(ctx context.Context) graphql.Marshaler { 17623 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17624 } 17625 17626 out.Concurrently(i, func() graphql.Marshaler { 17627 return rrm(innerCtx) 17628 }) 17629 case "issue896a": 17630 field := field 17631 17632 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17633 defer func() { 17634 if r := recover(); r != nil { 17635 ec.Error(ctx, ec.Recover(ctx, r)) 17636 } 17637 }() 17638 res = ec._Query_issue896a(ctx, field) 17639 return res 17640 } 17641 17642 rrm := func(ctx context.Context) graphql.Marshaler { 17643 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17644 } 17645 17646 out.Concurrently(i, func() graphql.Marshaler { 17647 return rrm(innerCtx) 17648 }) 17649 case "mapStringInterface": 17650 field := field 17651 17652 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17653 defer func() { 17654 if r := recover(); r != nil { 17655 ec.Error(ctx, ec.Recover(ctx, r)) 17656 } 17657 }() 17658 res = ec._Query_mapStringInterface(ctx, field) 17659 return res 17660 } 17661 17662 rrm := func(ctx context.Context) graphql.Marshaler { 17663 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17664 } 17665 17666 out.Concurrently(i, func() graphql.Marshaler { 17667 return rrm(innerCtx) 17668 }) 17669 case "mapNestedStringInterface": 17670 field := field 17671 17672 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17673 defer func() { 17674 if r := recover(); r != nil { 17675 ec.Error(ctx, ec.Recover(ctx, r)) 17676 } 17677 }() 17678 res = ec._Query_mapNestedStringInterface(ctx, field) 17679 return res 17680 } 17681 17682 rrm := func(ctx context.Context) graphql.Marshaler { 17683 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17684 } 17685 17686 out.Concurrently(i, func() graphql.Marshaler { 17687 return rrm(innerCtx) 17688 }) 17689 case "errorBubble": 17690 field := field 17691 17692 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17693 defer func() { 17694 if r := recover(); r != nil { 17695 ec.Error(ctx, ec.Recover(ctx, r)) 17696 } 17697 }() 17698 res = ec._Query_errorBubble(ctx, field) 17699 return res 17700 } 17701 17702 rrm := func(ctx context.Context) graphql.Marshaler { 17703 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17704 } 17705 17706 out.Concurrently(i, func() graphql.Marshaler { 17707 return rrm(innerCtx) 17708 }) 17709 case "errorBubbleList": 17710 field := field 17711 17712 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17713 defer func() { 17714 if r := recover(); r != nil { 17715 ec.Error(ctx, ec.Recover(ctx, r)) 17716 } 17717 }() 17718 res = ec._Query_errorBubbleList(ctx, field) 17719 return res 17720 } 17721 17722 rrm := func(ctx context.Context) graphql.Marshaler { 17723 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17724 } 17725 17726 out.Concurrently(i, func() graphql.Marshaler { 17727 return rrm(innerCtx) 17728 }) 17729 case "errorList": 17730 field := field 17731 17732 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17733 defer func() { 17734 if r := recover(); r != nil { 17735 ec.Error(ctx, ec.Recover(ctx, r)) 17736 } 17737 }() 17738 res = ec._Query_errorList(ctx, field) 17739 return res 17740 } 17741 17742 rrm := func(ctx context.Context) graphql.Marshaler { 17743 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17744 } 17745 17746 out.Concurrently(i, func() graphql.Marshaler { 17747 return rrm(innerCtx) 17748 }) 17749 case "errors": 17750 field := field 17751 17752 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17753 defer func() { 17754 if r := recover(); r != nil { 17755 ec.Error(ctx, ec.Recover(ctx, r)) 17756 } 17757 }() 17758 res = ec._Query_errors(ctx, field) 17759 return res 17760 } 17761 17762 rrm := func(ctx context.Context) graphql.Marshaler { 17763 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17764 } 17765 17766 out.Concurrently(i, func() graphql.Marshaler { 17767 return rrm(innerCtx) 17768 }) 17769 case "valid": 17770 field := field 17771 17772 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17773 defer func() { 17774 if r := recover(); r != nil { 17775 ec.Error(ctx, ec.Recover(ctx, r)) 17776 } 17777 }() 17778 res = ec._Query_valid(ctx, field) 17779 return res 17780 } 17781 17782 rrm := func(ctx context.Context) graphql.Marshaler { 17783 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17784 } 17785 17786 out.Concurrently(i, func() graphql.Marshaler { 17787 return rrm(innerCtx) 17788 }) 17789 case "panics": 17790 field := field 17791 17792 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17793 defer func() { 17794 if r := recover(); r != nil { 17795 ec.Error(ctx, ec.Recover(ctx, r)) 17796 } 17797 }() 17798 res = ec._Query_panics(ctx, field) 17799 return res 17800 } 17801 17802 rrm := func(ctx context.Context) graphql.Marshaler { 17803 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17804 } 17805 17806 out.Concurrently(i, func() graphql.Marshaler { 17807 return rrm(innerCtx) 17808 }) 17809 case "primitiveObject": 17810 field := field 17811 17812 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17813 defer func() { 17814 if r := recover(); r != nil { 17815 ec.Error(ctx, ec.Recover(ctx, r)) 17816 } 17817 }() 17818 res = ec._Query_primitiveObject(ctx, field) 17819 return res 17820 } 17821 17822 rrm := func(ctx context.Context) graphql.Marshaler { 17823 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17824 } 17825 17826 out.Concurrently(i, func() graphql.Marshaler { 17827 return rrm(innerCtx) 17828 }) 17829 case "primitiveStringObject": 17830 field := field 17831 17832 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17833 defer func() { 17834 if r := recover(); r != nil { 17835 ec.Error(ctx, ec.Recover(ctx, r)) 17836 } 17837 }() 17838 res = ec._Query_primitiveStringObject(ctx, field) 17839 return res 17840 } 17841 17842 rrm := func(ctx context.Context) graphql.Marshaler { 17843 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17844 } 17845 17846 out.Concurrently(i, func() graphql.Marshaler { 17847 return rrm(innerCtx) 17848 }) 17849 case "ptrToSliceContainer": 17850 field := field 17851 17852 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17853 defer func() { 17854 if r := recover(); r != nil { 17855 ec.Error(ctx, ec.Recover(ctx, r)) 17856 } 17857 }() 17858 res = ec._Query_ptrToSliceContainer(ctx, field) 17859 return res 17860 } 17861 17862 rrm := func(ctx context.Context) graphql.Marshaler { 17863 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17864 } 17865 17866 out.Concurrently(i, func() graphql.Marshaler { 17867 return rrm(innerCtx) 17868 }) 17869 case "infinity": 17870 field := field 17871 17872 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17873 defer func() { 17874 if r := recover(); r != nil { 17875 ec.Error(ctx, ec.Recover(ctx, r)) 17876 } 17877 }() 17878 res = ec._Query_infinity(ctx, field) 17879 return res 17880 } 17881 17882 rrm := func(ctx context.Context) graphql.Marshaler { 17883 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17884 } 17885 17886 out.Concurrently(i, func() graphql.Marshaler { 17887 return rrm(innerCtx) 17888 }) 17889 case "stringFromContextInterface": 17890 field := field 17891 17892 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17893 defer func() { 17894 if r := recover(); r != nil { 17895 ec.Error(ctx, ec.Recover(ctx, r)) 17896 } 17897 }() 17898 res = ec._Query_stringFromContextInterface(ctx, field) 17899 return res 17900 } 17901 17902 rrm := func(ctx context.Context) graphql.Marshaler { 17903 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17904 } 17905 17906 out.Concurrently(i, func() graphql.Marshaler { 17907 return rrm(innerCtx) 17908 }) 17909 case "stringFromContextFunction": 17910 field := field 17911 17912 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17913 defer func() { 17914 if r := recover(); r != nil { 17915 ec.Error(ctx, ec.Recover(ctx, r)) 17916 } 17917 }() 17918 res = ec._Query_stringFromContextFunction(ctx, field) 17919 return res 17920 } 17921 17922 rrm := func(ctx context.Context) graphql.Marshaler { 17923 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17924 } 17925 17926 out.Concurrently(i, func() graphql.Marshaler { 17927 return rrm(innerCtx) 17928 }) 17929 case "defaultScalar": 17930 field := field 17931 17932 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17933 defer func() { 17934 if r := recover(); r != nil { 17935 ec.Error(ctx, ec.Recover(ctx, r)) 17936 } 17937 }() 17938 res = ec._Query_defaultScalar(ctx, field) 17939 return res 17940 } 17941 17942 rrm := func(ctx context.Context) graphql.Marshaler { 17943 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17944 } 17945 17946 out.Concurrently(i, func() graphql.Marshaler { 17947 return rrm(innerCtx) 17948 }) 17949 case "slices": 17950 field := field 17951 17952 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17953 defer func() { 17954 if r := recover(); r != nil { 17955 ec.Error(ctx, ec.Recover(ctx, r)) 17956 } 17957 }() 17958 res = ec._Query_slices(ctx, field) 17959 return res 17960 } 17961 17962 rrm := func(ctx context.Context) graphql.Marshaler { 17963 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17964 } 17965 17966 out.Concurrently(i, func() graphql.Marshaler { 17967 return rrm(innerCtx) 17968 }) 17969 case "scalarSlice": 17970 field := field 17971 17972 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17973 defer func() { 17974 if r := recover(); r != nil { 17975 ec.Error(ctx, ec.Recover(ctx, r)) 17976 } 17977 }() 17978 res = ec._Query_scalarSlice(ctx, field) 17979 return res 17980 } 17981 17982 rrm := func(ctx context.Context) graphql.Marshaler { 17983 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 17984 } 17985 17986 out.Concurrently(i, func() graphql.Marshaler { 17987 return rrm(innerCtx) 17988 }) 17989 case "fallback": 17990 field := field 17991 17992 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 17993 defer func() { 17994 if r := recover(); r != nil { 17995 ec.Error(ctx, ec.Recover(ctx, r)) 17996 } 17997 }() 17998 res = ec._Query_fallback(ctx, field) 17999 return res 18000 } 18001 18002 rrm := func(ctx context.Context) graphql.Marshaler { 18003 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18004 } 18005 18006 out.Concurrently(i, func() graphql.Marshaler { 18007 return rrm(innerCtx) 18008 }) 18009 case "optionalUnion": 18010 field := field 18011 18012 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18013 defer func() { 18014 if r := recover(); r != nil { 18015 ec.Error(ctx, ec.Recover(ctx, r)) 18016 } 18017 }() 18018 res = ec._Query_optionalUnion(ctx, field) 18019 return res 18020 } 18021 18022 rrm := func(ctx context.Context) graphql.Marshaler { 18023 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18024 } 18025 18026 out.Concurrently(i, func() graphql.Marshaler { 18027 return rrm(innerCtx) 18028 }) 18029 case "vOkCaseValue": 18030 field := field 18031 18032 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18033 defer func() { 18034 if r := recover(); r != nil { 18035 ec.Error(ctx, ec.Recover(ctx, r)) 18036 } 18037 }() 18038 res = ec._Query_vOkCaseValue(ctx, field) 18039 return res 18040 } 18041 18042 rrm := func(ctx context.Context) graphql.Marshaler { 18043 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18044 } 18045 18046 out.Concurrently(i, func() graphql.Marshaler { 18047 return rrm(innerCtx) 18048 }) 18049 case "vOkCaseNil": 18050 field := field 18051 18052 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18053 defer func() { 18054 if r := recover(); r != nil { 18055 ec.Error(ctx, ec.Recover(ctx, r)) 18056 } 18057 }() 18058 res = ec._Query_vOkCaseNil(ctx, field) 18059 return res 18060 } 18061 18062 rrm := func(ctx context.Context) graphql.Marshaler { 18063 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18064 } 18065 18066 out.Concurrently(i, func() graphql.Marshaler { 18067 return rrm(innerCtx) 18068 }) 18069 case "validType": 18070 field := field 18071 18072 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18073 defer func() { 18074 if r := recover(); r != nil { 18075 ec.Error(ctx, ec.Recover(ctx, r)) 18076 } 18077 }() 18078 res = ec._Query_validType(ctx, field) 18079 return res 18080 } 18081 18082 rrm := func(ctx context.Context) graphql.Marshaler { 18083 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18084 } 18085 18086 out.Concurrently(i, func() graphql.Marshaler { 18087 return rrm(innerCtx) 18088 }) 18089 case "variadicModel": 18090 field := field 18091 18092 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18093 defer func() { 18094 if r := recover(); r != nil { 18095 ec.Error(ctx, ec.Recover(ctx, r)) 18096 } 18097 }() 18098 res = ec._Query_variadicModel(ctx, field) 18099 return res 18100 } 18101 18102 rrm := func(ctx context.Context) graphql.Marshaler { 18103 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18104 } 18105 18106 out.Concurrently(i, func() graphql.Marshaler { 18107 return rrm(innerCtx) 18108 }) 18109 case "wrappedStruct": 18110 field := field 18111 18112 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18113 defer func() { 18114 if r := recover(); r != nil { 18115 ec.Error(ctx, ec.Recover(ctx, r)) 18116 } 18117 }() 18118 res = ec._Query_wrappedStruct(ctx, field) 18119 return res 18120 } 18121 18122 rrm := func(ctx context.Context) graphql.Marshaler { 18123 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18124 } 18125 18126 out.Concurrently(i, func() graphql.Marshaler { 18127 return rrm(innerCtx) 18128 }) 18129 case "wrappedScalar": 18130 field := field 18131 18132 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18133 defer func() { 18134 if r := recover(); r != nil { 18135 ec.Error(ctx, ec.Recover(ctx, r)) 18136 } 18137 }() 18138 res = ec._Query_wrappedScalar(ctx, field) 18139 return res 18140 } 18141 18142 rrm := func(ctx context.Context) graphql.Marshaler { 18143 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18144 } 18145 18146 out.Concurrently(i, func() graphql.Marshaler { 18147 return rrm(innerCtx) 18148 }) 18149 case "wrappedMap": 18150 field := field 18151 18152 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18153 defer func() { 18154 if r := recover(); r != nil { 18155 ec.Error(ctx, ec.Recover(ctx, r)) 18156 } 18157 }() 18158 res = ec._Query_wrappedMap(ctx, field) 18159 return res 18160 } 18161 18162 rrm := func(ctx context.Context) graphql.Marshaler { 18163 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18164 } 18165 18166 out.Concurrently(i, func() graphql.Marshaler { 18167 return rrm(innerCtx) 18168 }) 18169 case "wrappedSlice": 18170 field := field 18171 18172 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18173 defer func() { 18174 if r := recover(); r != nil { 18175 ec.Error(ctx, ec.Recover(ctx, r)) 18176 } 18177 }() 18178 res = ec._Query_wrappedSlice(ctx, field) 18179 return res 18180 } 18181 18182 rrm := func(ctx context.Context) graphql.Marshaler { 18183 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 18184 } 18185 18186 out.Concurrently(i, func() graphql.Marshaler { 18187 return rrm(innerCtx) 18188 }) 18189 case "__type": 18190 18191 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 18192 return ec._Query___type(ctx, field) 18193 }) 18194 18195 case "__schema": 18196 18197 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 18198 return ec._Query___schema(ctx, field) 18199 }) 18200 18201 default: 18202 panic("unknown field " + strconv.Quote(field.Name)) 18203 } 18204 } 18205 out.Dispatch() 18206 return out 18207 } 18208 18209 var rectangleImplementors = []string{"Rectangle", "Shape", "ShapeUnion"} 18210 18211 func (ec *executionContext) _Rectangle(ctx context.Context, sel ast.SelectionSet, obj *Rectangle) graphql.Marshaler { 18212 fields := graphql.CollectFields(ec.OperationContext, sel, rectangleImplementors) 18213 out := graphql.NewFieldSet(fields) 18214 var invalids uint32 18215 for i, field := range fields { 18216 switch field.Name { 18217 case "__typename": 18218 out.Values[i] = graphql.MarshalString("Rectangle") 18219 case "length": 18220 18221 out.Values[i] = ec._Rectangle_length(ctx, field, obj) 18222 18223 case "width": 18224 18225 out.Values[i] = ec._Rectangle_width(ctx, field, obj) 18226 18227 case "area": 18228 18229 out.Values[i] = ec._Rectangle_area(ctx, field, obj) 18230 18231 case "coordinates": 18232 18233 out.Values[i] = ec._Rectangle_coordinates(ctx, field, obj) 18234 18235 default: 18236 panic("unknown field " + strconv.Quote(field.Name)) 18237 } 18238 } 18239 out.Dispatch() 18240 if invalids > 0 { 18241 return graphql.Null 18242 } 18243 return out 18244 } 18245 18246 var sizeImplementors = []string{"Size"} 18247 18248 func (ec *executionContext) _Size(ctx context.Context, sel ast.SelectionSet, obj *Size) graphql.Marshaler { 18249 fields := graphql.CollectFields(ec.OperationContext, sel, sizeImplementors) 18250 out := graphql.NewFieldSet(fields) 18251 var invalids uint32 18252 for i, field := range fields { 18253 switch field.Name { 18254 case "__typename": 18255 out.Values[i] = graphql.MarshalString("Size") 18256 case "height": 18257 18258 out.Values[i] = ec._Size_height(ctx, field, obj) 18259 18260 if out.Values[i] == graphql.Null { 18261 invalids++ 18262 } 18263 case "weight": 18264 18265 out.Values[i] = ec._Size_weight(ctx, field, obj) 18266 18267 if out.Values[i] == graphql.Null { 18268 invalids++ 18269 } 18270 default: 18271 panic("unknown field " + strconv.Quote(field.Name)) 18272 } 18273 } 18274 out.Dispatch() 18275 if invalids > 0 { 18276 return graphql.Null 18277 } 18278 return out 18279 } 18280 18281 var slicesImplementors = []string{"Slices"} 18282 18283 func (ec *executionContext) _Slices(ctx context.Context, sel ast.SelectionSet, obj *Slices) graphql.Marshaler { 18284 fields := graphql.CollectFields(ec.OperationContext, sel, slicesImplementors) 18285 out := graphql.NewFieldSet(fields) 18286 var invalids uint32 18287 for i, field := range fields { 18288 switch field.Name { 18289 case "__typename": 18290 out.Values[i] = graphql.MarshalString("Slices") 18291 case "test1": 18292 18293 out.Values[i] = ec._Slices_test1(ctx, field, obj) 18294 18295 case "test2": 18296 18297 out.Values[i] = ec._Slices_test2(ctx, field, obj) 18298 18299 case "test3": 18300 18301 out.Values[i] = ec._Slices_test3(ctx, field, obj) 18302 18303 if out.Values[i] == graphql.Null { 18304 invalids++ 18305 } 18306 case "test4": 18307 18308 out.Values[i] = ec._Slices_test4(ctx, field, obj) 18309 18310 if out.Values[i] == graphql.Null { 18311 invalids++ 18312 } 18313 default: 18314 panic("unknown field " + strconv.Quote(field.Name)) 18315 } 18316 } 18317 out.Dispatch() 18318 if invalids > 0 { 18319 return graphql.Null 18320 } 18321 return out 18322 } 18323 18324 var subscriptionImplementors = []string{"Subscription"} 18325 18326 func (ec *executionContext) _Subscription(ctx context.Context, sel ast.SelectionSet) func(ctx context.Context) graphql.Marshaler { 18327 fields := graphql.CollectFields(ec.OperationContext, sel, subscriptionImplementors) 18328 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ 18329 Object: "Subscription", 18330 }) 18331 if len(fields) != 1 { 18332 ec.Errorf(ctx, "must subscribe to exactly one stream") 18333 return nil 18334 } 18335 18336 switch fields[0].Name { 18337 case "updated": 18338 return ec._Subscription_updated(ctx, fields[0]) 18339 case "initPayload": 18340 return ec._Subscription_initPayload(ctx, fields[0]) 18341 case "directiveArg": 18342 return ec._Subscription_directiveArg(ctx, fields[0]) 18343 case "directiveNullableArg": 18344 return ec._Subscription_directiveNullableArg(ctx, fields[0]) 18345 case "directiveDouble": 18346 return ec._Subscription_directiveDouble(ctx, fields[0]) 18347 case "directiveUnimplemented": 18348 return ec._Subscription_directiveUnimplemented(ctx, fields[0]) 18349 case "issue896b": 18350 return ec._Subscription_issue896b(ctx, fields[0]) 18351 case "errorRequired": 18352 return ec._Subscription_errorRequired(ctx, fields[0]) 18353 default: 18354 panic("unknown field " + strconv.Quote(fields[0].Name)) 18355 } 18356 } 18357 18358 var userImplementors = []string{"User"} 18359 18360 func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj *User) graphql.Marshaler { 18361 fields := graphql.CollectFields(ec.OperationContext, sel, userImplementors) 18362 out := graphql.NewFieldSet(fields) 18363 var invalids uint32 18364 for i, field := range fields { 18365 switch field.Name { 18366 case "__typename": 18367 out.Values[i] = graphql.MarshalString("User") 18368 case "id": 18369 18370 out.Values[i] = ec._User_id(ctx, field, obj) 18371 18372 if out.Values[i] == graphql.Null { 18373 atomic.AddUint32(&invalids, 1) 18374 } 18375 case "friends": 18376 field := field 18377 18378 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18379 defer func() { 18380 if r := recover(); r != nil { 18381 ec.Error(ctx, ec.Recover(ctx, r)) 18382 } 18383 }() 18384 res = ec._User_friends(ctx, field, obj) 18385 if res == graphql.Null { 18386 atomic.AddUint32(&invalids, 1) 18387 } 18388 return res 18389 } 18390 18391 out.Concurrently(i, func() graphql.Marshaler { 18392 return innerFunc(ctx) 18393 18394 }) 18395 case "created": 18396 18397 out.Values[i] = ec._User_created(ctx, field, obj) 18398 18399 if out.Values[i] == graphql.Null { 18400 atomic.AddUint32(&invalids, 1) 18401 } 18402 case "updated": 18403 18404 out.Values[i] = ec._User_updated(ctx, field, obj) 18405 18406 case "pets": 18407 field := field 18408 18409 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18410 defer func() { 18411 if r := recover(); r != nil { 18412 ec.Error(ctx, ec.Recover(ctx, r)) 18413 } 18414 }() 18415 res = ec._User_pets(ctx, field, obj) 18416 return res 18417 } 18418 18419 out.Concurrently(i, func() graphql.Marshaler { 18420 return innerFunc(ctx) 18421 18422 }) 18423 default: 18424 panic("unknown field " + strconv.Quote(field.Name)) 18425 } 18426 } 18427 out.Dispatch() 18428 if invalids > 0 { 18429 return graphql.Null 18430 } 18431 return out 18432 } 18433 18434 var vOkCaseNilImplementors = []string{"VOkCaseNil"} 18435 18436 func (ec *executionContext) _VOkCaseNil(ctx context.Context, sel ast.SelectionSet, obj *VOkCaseNil) graphql.Marshaler { 18437 fields := graphql.CollectFields(ec.OperationContext, sel, vOkCaseNilImplementors) 18438 out := graphql.NewFieldSet(fields) 18439 var invalids uint32 18440 for i, field := range fields { 18441 switch field.Name { 18442 case "__typename": 18443 out.Values[i] = graphql.MarshalString("VOkCaseNil") 18444 case "value": 18445 18446 out.Values[i] = ec._VOkCaseNil_value(ctx, field, obj) 18447 18448 default: 18449 panic("unknown field " + strconv.Quote(field.Name)) 18450 } 18451 } 18452 out.Dispatch() 18453 if invalids > 0 { 18454 return graphql.Null 18455 } 18456 return out 18457 } 18458 18459 var vOkCaseValueImplementors = []string{"VOkCaseValue"} 18460 18461 func (ec *executionContext) _VOkCaseValue(ctx context.Context, sel ast.SelectionSet, obj *VOkCaseValue) graphql.Marshaler { 18462 fields := graphql.CollectFields(ec.OperationContext, sel, vOkCaseValueImplementors) 18463 out := graphql.NewFieldSet(fields) 18464 var invalids uint32 18465 for i, field := range fields { 18466 switch field.Name { 18467 case "__typename": 18468 out.Values[i] = graphql.MarshalString("VOkCaseValue") 18469 case "value": 18470 18471 out.Values[i] = ec._VOkCaseValue_value(ctx, field, obj) 18472 18473 default: 18474 panic("unknown field " + strconv.Quote(field.Name)) 18475 } 18476 } 18477 out.Dispatch() 18478 if invalids > 0 { 18479 return graphql.Null 18480 } 18481 return out 18482 } 18483 18484 var validTypeImplementors = []string{"ValidType"} 18485 18486 func (ec *executionContext) _ValidType(ctx context.Context, sel ast.SelectionSet, obj *ValidType) graphql.Marshaler { 18487 fields := graphql.CollectFields(ec.OperationContext, sel, validTypeImplementors) 18488 out := graphql.NewFieldSet(fields) 18489 var invalids uint32 18490 for i, field := range fields { 18491 switch field.Name { 18492 case "__typename": 18493 out.Values[i] = graphql.MarshalString("ValidType") 18494 case "differentCase": 18495 18496 out.Values[i] = ec._ValidType_differentCase(ctx, field, obj) 18497 18498 if out.Values[i] == graphql.Null { 18499 invalids++ 18500 } 18501 case "different_case": 18502 18503 out.Values[i] = ec._ValidType_different_case(ctx, field, obj) 18504 18505 if out.Values[i] == graphql.Null { 18506 invalids++ 18507 } 18508 case "validInputKeywords": 18509 18510 out.Values[i] = ec._ValidType_validInputKeywords(ctx, field, obj) 18511 18512 if out.Values[i] == graphql.Null { 18513 invalids++ 18514 } 18515 case "validArgs": 18516 18517 out.Values[i] = ec._ValidType_validArgs(ctx, field, obj) 18518 18519 if out.Values[i] == graphql.Null { 18520 invalids++ 18521 } 18522 default: 18523 panic("unknown field " + strconv.Quote(field.Name)) 18524 } 18525 } 18526 out.Dispatch() 18527 if invalids > 0 { 18528 return graphql.Null 18529 } 18530 return out 18531 } 18532 18533 var variadicModelImplementors = []string{"VariadicModel"} 18534 18535 func (ec *executionContext) _VariadicModel(ctx context.Context, sel ast.SelectionSet, obj *VariadicModel) graphql.Marshaler { 18536 fields := graphql.CollectFields(ec.OperationContext, sel, variadicModelImplementors) 18537 out := graphql.NewFieldSet(fields) 18538 var invalids uint32 18539 for i, field := range fields { 18540 switch field.Name { 18541 case "__typename": 18542 out.Values[i] = graphql.MarshalString("VariadicModel") 18543 case "value": 18544 field := field 18545 18546 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18547 defer func() { 18548 if r := recover(); r != nil { 18549 ec.Error(ctx, ec.Recover(ctx, r)) 18550 } 18551 }() 18552 res = ec._VariadicModel_value(ctx, field, obj) 18553 return res 18554 } 18555 18556 out.Concurrently(i, func() graphql.Marshaler { 18557 return innerFunc(ctx) 18558 18559 }) 18560 default: 18561 panic("unknown field " + strconv.Quote(field.Name)) 18562 } 18563 } 18564 out.Dispatch() 18565 if invalids > 0 { 18566 return graphql.Null 18567 } 18568 return out 18569 } 18570 18571 var wrappedMapImplementors = []string{"WrappedMap"} 18572 18573 func (ec *executionContext) _WrappedMap(ctx context.Context, sel ast.SelectionSet, obj WrappedMap) graphql.Marshaler { 18574 fields := graphql.CollectFields(ec.OperationContext, sel, wrappedMapImplementors) 18575 out := graphql.NewFieldSet(fields) 18576 var invalids uint32 18577 for i, field := range fields { 18578 switch field.Name { 18579 case "__typename": 18580 out.Values[i] = graphql.MarshalString("WrappedMap") 18581 case "get": 18582 field := field 18583 18584 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18585 defer func() { 18586 if r := recover(); r != nil { 18587 ec.Error(ctx, ec.Recover(ctx, r)) 18588 } 18589 }() 18590 res = ec._WrappedMap_get(ctx, field, obj) 18591 if res == graphql.Null { 18592 atomic.AddUint32(&invalids, 1) 18593 } 18594 return res 18595 } 18596 18597 out.Concurrently(i, func() graphql.Marshaler { 18598 return innerFunc(ctx) 18599 18600 }) 18601 default: 18602 panic("unknown field " + strconv.Quote(field.Name)) 18603 } 18604 } 18605 out.Dispatch() 18606 if invalids > 0 { 18607 return graphql.Null 18608 } 18609 return out 18610 } 18611 18612 var wrappedSliceImplementors = []string{"WrappedSlice"} 18613 18614 func (ec *executionContext) _WrappedSlice(ctx context.Context, sel ast.SelectionSet, obj WrappedSlice) graphql.Marshaler { 18615 fields := graphql.CollectFields(ec.OperationContext, sel, wrappedSliceImplementors) 18616 out := graphql.NewFieldSet(fields) 18617 var invalids uint32 18618 for i, field := range fields { 18619 switch field.Name { 18620 case "__typename": 18621 out.Values[i] = graphql.MarshalString("WrappedSlice") 18622 case "get": 18623 field := field 18624 18625 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 18626 defer func() { 18627 if r := recover(); r != nil { 18628 ec.Error(ctx, ec.Recover(ctx, r)) 18629 } 18630 }() 18631 res = ec._WrappedSlice_get(ctx, field, obj) 18632 if res == graphql.Null { 18633 atomic.AddUint32(&invalids, 1) 18634 } 18635 return res 18636 } 18637 18638 out.Concurrently(i, func() graphql.Marshaler { 18639 return innerFunc(ctx) 18640 18641 }) 18642 default: 18643 panic("unknown field " + strconv.Quote(field.Name)) 18644 } 18645 } 18646 out.Dispatch() 18647 if invalids > 0 { 18648 return graphql.Null 18649 } 18650 return out 18651 } 18652 18653 var wrappedStructImplementors = []string{"WrappedStruct"} 18654 18655 func (ec *executionContext) _WrappedStruct(ctx context.Context, sel ast.SelectionSet, obj *WrappedStruct) graphql.Marshaler { 18656 fields := graphql.CollectFields(ec.OperationContext, sel, wrappedStructImplementors) 18657 out := graphql.NewFieldSet(fields) 18658 var invalids uint32 18659 for i, field := range fields { 18660 switch field.Name { 18661 case "__typename": 18662 out.Values[i] = graphql.MarshalString("WrappedStruct") 18663 case "name": 18664 18665 out.Values[i] = ec._WrappedStruct_name(ctx, field, obj) 18666 18667 if out.Values[i] == graphql.Null { 18668 invalids++ 18669 } 18670 case "desc": 18671 18672 out.Values[i] = ec._WrappedStruct_desc(ctx, field, obj) 18673 18674 default: 18675 panic("unknown field " + strconv.Quote(field.Name)) 18676 } 18677 } 18678 out.Dispatch() 18679 if invalids > 0 { 18680 return graphql.Null 18681 } 18682 return out 18683 } 18684 18685 var xXItImplementors = []string{"XXIt"} 18686 18687 func (ec *executionContext) _XXIt(ctx context.Context, sel ast.SelectionSet, obj *XXIt) graphql.Marshaler { 18688 fields := graphql.CollectFields(ec.OperationContext, sel, xXItImplementors) 18689 out := graphql.NewFieldSet(fields) 18690 var invalids uint32 18691 for i, field := range fields { 18692 switch field.Name { 18693 case "__typename": 18694 out.Values[i] = graphql.MarshalString("XXIt") 18695 case "id": 18696 18697 out.Values[i] = ec._XXIt_id(ctx, field, obj) 18698 18699 if out.Values[i] == graphql.Null { 18700 invalids++ 18701 } 18702 default: 18703 panic("unknown field " + strconv.Quote(field.Name)) 18704 } 18705 } 18706 out.Dispatch() 18707 if invalids > 0 { 18708 return graphql.Null 18709 } 18710 return out 18711 } 18712 18713 var xxItImplementors = []string{"XxIt"} 18714 18715 func (ec *executionContext) _XxIt(ctx context.Context, sel ast.SelectionSet, obj *XxIt) graphql.Marshaler { 18716 fields := graphql.CollectFields(ec.OperationContext, sel, xxItImplementors) 18717 out := graphql.NewFieldSet(fields) 18718 var invalids uint32 18719 for i, field := range fields { 18720 switch field.Name { 18721 case "__typename": 18722 out.Values[i] = graphql.MarshalString("XxIt") 18723 case "id": 18724 18725 out.Values[i] = ec._XxIt_id(ctx, field, obj) 18726 18727 if out.Values[i] == graphql.Null { 18728 invalids++ 18729 } 18730 default: 18731 panic("unknown field " + strconv.Quote(field.Name)) 18732 } 18733 } 18734 out.Dispatch() 18735 if invalids > 0 { 18736 return graphql.Null 18737 } 18738 return out 18739 } 18740 18741 var __DirectiveImplementors = []string{"__Directive"} 18742 18743 func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { 18744 fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) 18745 out := graphql.NewFieldSet(fields) 18746 var invalids uint32 18747 for i, field := range fields { 18748 switch field.Name { 18749 case "__typename": 18750 out.Values[i] = graphql.MarshalString("__Directive") 18751 case "name": 18752 18753 out.Values[i] = ec.___Directive_name(ctx, field, obj) 18754 18755 if out.Values[i] == graphql.Null { 18756 invalids++ 18757 } 18758 case "description": 18759 18760 out.Values[i] = ec.___Directive_description(ctx, field, obj) 18761 18762 case "locations": 18763 18764 out.Values[i] = ec.___Directive_locations(ctx, field, obj) 18765 18766 if out.Values[i] == graphql.Null { 18767 invalids++ 18768 } 18769 case "args": 18770 18771 out.Values[i] = ec.___Directive_args(ctx, field, obj) 18772 18773 if out.Values[i] == graphql.Null { 18774 invalids++ 18775 } 18776 case "isRepeatable": 18777 18778 out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj) 18779 18780 if out.Values[i] == graphql.Null { 18781 invalids++ 18782 } 18783 default: 18784 panic("unknown field " + strconv.Quote(field.Name)) 18785 } 18786 } 18787 out.Dispatch() 18788 if invalids > 0 { 18789 return graphql.Null 18790 } 18791 return out 18792 } 18793 18794 var __EnumValueImplementors = []string{"__EnumValue"} 18795 18796 func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { 18797 fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) 18798 out := graphql.NewFieldSet(fields) 18799 var invalids uint32 18800 for i, field := range fields { 18801 switch field.Name { 18802 case "__typename": 18803 out.Values[i] = graphql.MarshalString("__EnumValue") 18804 case "name": 18805 18806 out.Values[i] = ec.___EnumValue_name(ctx, field, obj) 18807 18808 if out.Values[i] == graphql.Null { 18809 invalids++ 18810 } 18811 case "description": 18812 18813 out.Values[i] = ec.___EnumValue_description(ctx, field, obj) 18814 18815 case "isDeprecated": 18816 18817 out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj) 18818 18819 if out.Values[i] == graphql.Null { 18820 invalids++ 18821 } 18822 case "deprecationReason": 18823 18824 out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj) 18825 18826 default: 18827 panic("unknown field " + strconv.Quote(field.Name)) 18828 } 18829 } 18830 out.Dispatch() 18831 if invalids > 0 { 18832 return graphql.Null 18833 } 18834 return out 18835 } 18836 18837 var __FieldImplementors = []string{"__Field"} 18838 18839 func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { 18840 fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) 18841 out := graphql.NewFieldSet(fields) 18842 var invalids uint32 18843 for i, field := range fields { 18844 switch field.Name { 18845 case "__typename": 18846 out.Values[i] = graphql.MarshalString("__Field") 18847 case "name": 18848 18849 out.Values[i] = ec.___Field_name(ctx, field, obj) 18850 18851 if out.Values[i] == graphql.Null { 18852 invalids++ 18853 } 18854 case "description": 18855 18856 out.Values[i] = ec.___Field_description(ctx, field, obj) 18857 18858 case "args": 18859 18860 out.Values[i] = ec.___Field_args(ctx, field, obj) 18861 18862 if out.Values[i] == graphql.Null { 18863 invalids++ 18864 } 18865 case "type": 18866 18867 out.Values[i] = ec.___Field_type(ctx, field, obj) 18868 18869 if out.Values[i] == graphql.Null { 18870 invalids++ 18871 } 18872 case "isDeprecated": 18873 18874 out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj) 18875 18876 if out.Values[i] == graphql.Null { 18877 invalids++ 18878 } 18879 case "deprecationReason": 18880 18881 out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj) 18882 18883 default: 18884 panic("unknown field " + strconv.Quote(field.Name)) 18885 } 18886 } 18887 out.Dispatch() 18888 if invalids > 0 { 18889 return graphql.Null 18890 } 18891 return out 18892 } 18893 18894 var __InputValueImplementors = []string{"__InputValue"} 18895 18896 func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { 18897 fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) 18898 out := graphql.NewFieldSet(fields) 18899 var invalids uint32 18900 for i, field := range fields { 18901 switch field.Name { 18902 case "__typename": 18903 out.Values[i] = graphql.MarshalString("__InputValue") 18904 case "name": 18905 18906 out.Values[i] = ec.___InputValue_name(ctx, field, obj) 18907 18908 if out.Values[i] == graphql.Null { 18909 invalids++ 18910 } 18911 case "description": 18912 18913 out.Values[i] = ec.___InputValue_description(ctx, field, obj) 18914 18915 case "type": 18916 18917 out.Values[i] = ec.___InputValue_type(ctx, field, obj) 18918 18919 if out.Values[i] == graphql.Null { 18920 invalids++ 18921 } 18922 case "defaultValue": 18923 18924 out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj) 18925 18926 default: 18927 panic("unknown field " + strconv.Quote(field.Name)) 18928 } 18929 } 18930 out.Dispatch() 18931 if invalids > 0 { 18932 return graphql.Null 18933 } 18934 return out 18935 } 18936 18937 var __SchemaImplementors = []string{"__Schema"} 18938 18939 func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { 18940 fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) 18941 out := graphql.NewFieldSet(fields) 18942 var invalids uint32 18943 for i, field := range fields { 18944 switch field.Name { 18945 case "__typename": 18946 out.Values[i] = graphql.MarshalString("__Schema") 18947 case "description": 18948 18949 out.Values[i] = ec.___Schema_description(ctx, field, obj) 18950 18951 case "types": 18952 18953 out.Values[i] = ec.___Schema_types(ctx, field, obj) 18954 18955 if out.Values[i] == graphql.Null { 18956 invalids++ 18957 } 18958 case "queryType": 18959 18960 out.Values[i] = ec.___Schema_queryType(ctx, field, obj) 18961 18962 if out.Values[i] == graphql.Null { 18963 invalids++ 18964 } 18965 case "mutationType": 18966 18967 out.Values[i] = ec.___Schema_mutationType(ctx, field, obj) 18968 18969 case "subscriptionType": 18970 18971 out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj) 18972 18973 case "directives": 18974 18975 out.Values[i] = ec.___Schema_directives(ctx, field, obj) 18976 18977 if out.Values[i] == graphql.Null { 18978 invalids++ 18979 } 18980 default: 18981 panic("unknown field " + strconv.Quote(field.Name)) 18982 } 18983 } 18984 out.Dispatch() 18985 if invalids > 0 { 18986 return graphql.Null 18987 } 18988 return out 18989 } 18990 18991 var __TypeImplementors = []string{"__Type"} 18992 18993 func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { 18994 fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) 18995 out := graphql.NewFieldSet(fields) 18996 var invalids uint32 18997 for i, field := range fields { 18998 switch field.Name { 18999 case "__typename": 19000 out.Values[i] = graphql.MarshalString("__Type") 19001 case "kind": 19002 19003 out.Values[i] = ec.___Type_kind(ctx, field, obj) 19004 19005 if out.Values[i] == graphql.Null { 19006 invalids++ 19007 } 19008 case "name": 19009 19010 out.Values[i] = ec.___Type_name(ctx, field, obj) 19011 19012 case "description": 19013 19014 out.Values[i] = ec.___Type_description(ctx, field, obj) 19015 19016 case "fields": 19017 19018 out.Values[i] = ec.___Type_fields(ctx, field, obj) 19019 19020 case "interfaces": 19021 19022 out.Values[i] = ec.___Type_interfaces(ctx, field, obj) 19023 19024 case "possibleTypes": 19025 19026 out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj) 19027 19028 case "enumValues": 19029 19030 out.Values[i] = ec.___Type_enumValues(ctx, field, obj) 19031 19032 case "inputFields": 19033 19034 out.Values[i] = ec.___Type_inputFields(ctx, field, obj) 19035 19036 case "ofType": 19037 19038 out.Values[i] = ec.___Type_ofType(ctx, field, obj) 19039 19040 case "specifiedByURL": 19041 19042 out.Values[i] = ec.___Type_specifiedByURL(ctx, field, obj) 19043 19044 default: 19045 panic("unknown field " + strconv.Quote(field.Name)) 19046 } 19047 } 19048 out.Dispatch() 19049 if invalids > 0 { 19050 return graphql.Null 19051 } 19052 return out 19053 } 19054 19055 var asdfItImplementors = []string{"asdfIt"} 19056 19057 func (ec *executionContext) _asdfIt(ctx context.Context, sel ast.SelectionSet, obj *AsdfIt) graphql.Marshaler { 19058 fields := graphql.CollectFields(ec.OperationContext, sel, asdfItImplementors) 19059 out := graphql.NewFieldSet(fields) 19060 var invalids uint32 19061 for i, field := range fields { 19062 switch field.Name { 19063 case "__typename": 19064 out.Values[i] = graphql.MarshalString("asdfIt") 19065 case "id": 19066 19067 out.Values[i] = ec._asdfIt_id(ctx, field, obj) 19068 19069 if out.Values[i] == graphql.Null { 19070 invalids++ 19071 } 19072 default: 19073 panic("unknown field " + strconv.Quote(field.Name)) 19074 } 19075 } 19076 out.Dispatch() 19077 if invalids > 0 { 19078 return graphql.Null 19079 } 19080 return out 19081 } 19082 19083 var iItImplementors = []string{"iIt"} 19084 19085 func (ec *executionContext) _iIt(ctx context.Context, sel ast.SelectionSet, obj *IIt) graphql.Marshaler { 19086 fields := graphql.CollectFields(ec.OperationContext, sel, iItImplementors) 19087 out := graphql.NewFieldSet(fields) 19088 var invalids uint32 19089 for i, field := range fields { 19090 switch field.Name { 19091 case "__typename": 19092 out.Values[i] = graphql.MarshalString("iIt") 19093 case "id": 19094 19095 out.Values[i] = ec._iIt_id(ctx, field, obj) 19096 19097 if out.Values[i] == graphql.Null { 19098 invalids++ 19099 } 19100 default: 19101 panic("unknown field " + strconv.Quote(field.Name)) 19102 } 19103 } 19104 out.Dispatch() 19105 if invalids > 0 { 19106 return graphql.Null 19107 } 19108 return out 19109 } 19110 19111 // endregion **************************** object.gotpl **************************** 19112 19113 // region ***************************** type.gotpl ***************************** 19114 19115 func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) { 19116 res, err := graphql.UnmarshalBoolean(v) 19117 return res, graphql.ErrorOnPath(ctx, err) 19118 } 19119 19120 func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { 19121 res := graphql.MarshalBoolean(v) 19122 if res == graphql.Null { 19123 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19124 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19125 } 19126 } 19127 return res 19128 } 19129 19130 func (ec *executionContext) unmarshalNBytes2ᚕbyte(ctx context.Context, v interface{}) ([]byte, error) { 19131 res, err := UnmarshalBytes(v) 19132 return res, graphql.ErrorOnPath(ctx, err) 19133 } 19134 19135 func (ec *executionContext) marshalNBytes2ᚕbyte(ctx context.Context, sel ast.SelectionSet, v []byte) graphql.Marshaler { 19136 if v == nil { 19137 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19138 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19139 } 19140 return graphql.Null 19141 } 19142 res := MarshalBytes(v) 19143 if res == graphql.Null { 19144 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19145 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19146 } 19147 } 19148 return res 19149 } 19150 19151 func (ec *executionContext) marshalNCheckIssue8962ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896(ctx context.Context, sel ast.SelectionSet, v *CheckIssue896) graphql.Marshaler { 19152 if v == nil { 19153 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19154 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19155 } 19156 return graphql.Null 19157 } 19158 return ec._CheckIssue896(ctx, sel, v) 19159 } 19160 19161 func (ec *executionContext) unmarshalNDefaultInput2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐDefaultInput(ctx context.Context, v interface{}) (DefaultInput, error) { 19162 res, err := ec.unmarshalInputDefaultInput(ctx, v) 19163 return res, graphql.ErrorOnPath(ctx, err) 19164 } 19165 19166 func (ec *executionContext) marshalNDefaultParametersMirror2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐDefaultParametersMirror(ctx context.Context, sel ast.SelectionSet, v DefaultParametersMirror) graphql.Marshaler { 19167 return ec._DefaultParametersMirror(ctx, sel, &v) 19168 } 19169 19170 func (ec *executionContext) marshalNDefaultParametersMirror2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐDefaultParametersMirror(ctx context.Context, sel ast.SelectionSet, v *DefaultParametersMirror) graphql.Marshaler { 19171 if v == nil { 19172 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19173 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19174 } 19175 return graphql.Null 19176 } 19177 return ec._DefaultParametersMirror(ctx, sel, v) 19178 } 19179 19180 func (ec *executionContext) unmarshalNDefaultScalarImplementation2string(ctx context.Context, v interface{}) (string, error) { 19181 res, err := graphql.UnmarshalString(v) 19182 return res, graphql.ErrorOnPath(ctx, err) 19183 } 19184 19185 func (ec *executionContext) marshalNDefaultScalarImplementation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 19186 res := graphql.MarshalString(v) 19187 if res == graphql.Null { 19188 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19189 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19190 } 19191 } 19192 return res 19193 } 19194 19195 func (ec *executionContext) unmarshalNEmail2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐEmail(ctx context.Context, v interface{}) (Email, error) { 19196 var res Email 19197 err := res.UnmarshalGQL(v) 19198 return res, graphql.ErrorOnPath(ctx, err) 19199 } 19200 19201 func (ec *executionContext) marshalNEmail2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐEmail(ctx context.Context, sel ast.SelectionSet, v Email) graphql.Marshaler { 19202 return v 19203 } 19204 19205 func (ec *executionContext) unmarshalNEnumTest2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐEnumTest(ctx context.Context, v interface{}) (EnumTest, error) { 19206 var res EnumTest 19207 err := res.UnmarshalGQL(v) 19208 return res, graphql.ErrorOnPath(ctx, err) 19209 } 19210 19211 func (ec *executionContext) marshalNEnumTest2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐEnumTest(ctx context.Context, sel ast.SelectionSet, v EnumTest) graphql.Marshaler { 19212 return v 19213 } 19214 19215 func (ec *executionContext) marshalNError2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx context.Context, sel ast.SelectionSet, v Error) graphql.Marshaler { 19216 return ec._Error(ctx, sel, &v) 19217 } 19218 19219 func (ec *executionContext) marshalNError2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx context.Context, sel ast.SelectionSet, v *Error) graphql.Marshaler { 19220 if v == nil { 19221 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19222 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19223 } 19224 return graphql.Null 19225 } 19226 return ec._Error(ctx, sel, v) 19227 } 19228 19229 func (ec *executionContext) unmarshalNFallbackToStringEncoding2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐFallbackToStringEncoding(ctx context.Context, v interface{}) (FallbackToStringEncoding, error) { 19230 tmp, err := graphql.UnmarshalString(v) 19231 res := FallbackToStringEncoding(tmp) 19232 return res, graphql.ErrorOnPath(ctx, err) 19233 } 19234 19235 func (ec *executionContext) marshalNFallbackToStringEncoding2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐFallbackToStringEncoding(ctx context.Context, sel ast.SelectionSet, v FallbackToStringEncoding) graphql.Marshaler { 19236 res := graphql.MarshalString(string(v)) 19237 if res == graphql.Null { 19238 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19239 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19240 } 19241 } 19242 return res 19243 } 19244 19245 func (ec *executionContext) unmarshalNFieldsOrderInput2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐFieldsOrderInput(ctx context.Context, v interface{}) (FieldsOrderInput, error) { 19246 res, err := ec.unmarshalInputFieldsOrderInput(ctx, v) 19247 return res, graphql.ErrorOnPath(ctx, err) 19248 } 19249 19250 func (ec *executionContext) marshalNFieldsOrderPayload2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐFieldsOrderPayload(ctx context.Context, sel ast.SelectionSet, v FieldsOrderPayload) graphql.Marshaler { 19251 return ec._FieldsOrderPayload(ctx, sel, &v) 19252 } 19253 19254 func (ec *executionContext) marshalNFieldsOrderPayload2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐFieldsOrderPayload(ctx context.Context, sel ast.SelectionSet, v *FieldsOrderPayload) graphql.Marshaler { 19255 if v == nil { 19256 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19257 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19258 } 19259 return graphql.Null 19260 } 19261 return ec._FieldsOrderPayload(ctx, sel, v) 19262 } 19263 19264 func (ec *executionContext) unmarshalNFloat2float64(ctx context.Context, v interface{}) (float64, error) { 19265 res, err := graphql.UnmarshalFloatContext(ctx, v) 19266 return res, graphql.ErrorOnPath(ctx, err) 19267 } 19268 19269 func (ec *executionContext) marshalNFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler { 19270 res := graphql.MarshalFloatContext(v) 19271 if res == graphql.Null { 19272 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19273 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19274 } 19275 } 19276 return graphql.WrapContextMarshaler(ctx, res) 19277 } 19278 19279 func (ec *executionContext) unmarshalNID2int(ctx context.Context, v interface{}) (int, error) { 19280 res, err := graphql.UnmarshalIntID(v) 19281 return res, graphql.ErrorOnPath(ctx, err) 19282 } 19283 19284 func (ec *executionContext) marshalNID2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { 19285 res := graphql.MarshalIntID(v) 19286 if res == graphql.Null { 19287 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19288 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19289 } 19290 } 19291 return res 19292 } 19293 19294 func (ec *executionContext) unmarshalNID2string(ctx context.Context, v interface{}) (string, error) { 19295 res, err := graphql.UnmarshalID(v) 19296 return res, graphql.ErrorOnPath(ctx, err) 19297 } 19298 19299 func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 19300 res := graphql.MarshalID(v) 19301 if res == graphql.Null { 19302 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19303 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19304 } 19305 } 19306 return res 19307 } 19308 19309 func (ec *executionContext) unmarshalNInnerDirectives2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐInnerDirectives(ctx context.Context, v interface{}) (*InnerDirectives, error) { 19310 res, err := ec.unmarshalInputInnerDirectives(ctx, v) 19311 return &res, graphql.ErrorOnPath(ctx, err) 19312 } 19313 19314 func (ec *executionContext) unmarshalNInnerInput2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐInnerInput(ctx context.Context, v interface{}) (InnerInput, error) { 19315 res, err := ec.unmarshalInputInnerInput(ctx, v) 19316 return res, graphql.ErrorOnPath(ctx, err) 19317 } 19318 19319 func (ec *executionContext) unmarshalNInnerInput2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐInnerInput(ctx context.Context, v interface{}) (*InnerInput, error) { 19320 res, err := ec.unmarshalInputInnerInput(ctx, v) 19321 return &res, graphql.ErrorOnPath(ctx, err) 19322 } 19323 19324 func (ec *executionContext) marshalNInnerObject2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐInnerObject(ctx context.Context, sel ast.SelectionSet, v *InnerObject) graphql.Marshaler { 19325 if v == nil { 19326 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19327 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19328 } 19329 return graphql.Null 19330 } 19331 return ec._InnerObject(ctx, sel, v) 19332 } 19333 19334 func (ec *executionContext) unmarshalNInputDirectives2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐInputDirectives(ctx context.Context, v interface{}) (InputDirectives, error) { 19335 res, err := ec.unmarshalInputInputDirectives(ctx, v) 19336 return res, graphql.ErrorOnPath(ctx, err) 19337 } 19338 19339 func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) { 19340 res, err := graphql.UnmarshalInt(v) 19341 return res, graphql.ErrorOnPath(ctx, err) 19342 } 19343 19344 func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { 19345 res := graphql.MarshalInt(v) 19346 if res == graphql.Null { 19347 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19348 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19349 } 19350 } 19351 return res 19352 } 19353 19354 func (ec *executionContext) unmarshalNInt2int32(ctx context.Context, v interface{}) (int32, error) { 19355 res, err := graphql.UnmarshalInt32(v) 19356 return res, graphql.ErrorOnPath(ctx, err) 19357 } 19358 19359 func (ec *executionContext) marshalNInt2int32(ctx context.Context, sel ast.SelectionSet, v int32) graphql.Marshaler { 19360 res := graphql.MarshalInt32(v) 19361 if res == graphql.Null { 19362 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19363 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19364 } 19365 } 19366 return res 19367 } 19368 19369 func (ec *executionContext) unmarshalNInt2int64(ctx context.Context, v interface{}) (int64, error) { 19370 res, err := graphql.UnmarshalInt64(v) 19371 return res, graphql.ErrorOnPath(ctx, err) 19372 } 19373 19374 func (ec *executionContext) marshalNInt2int64(ctx context.Context, sel ast.SelectionSet, v int64) graphql.Marshaler { 19375 res := graphql.MarshalInt64(v) 19376 if res == graphql.Null { 19377 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19378 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19379 } 19380 } 19381 return res 19382 } 19383 19384 func (ec *executionContext) marshalNLoopA2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐLoopA(ctx context.Context, sel ast.SelectionSet, v *LoopA) graphql.Marshaler { 19385 if v == nil { 19386 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19387 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19388 } 19389 return graphql.Null 19390 } 19391 return ec._LoopA(ctx, sel, v) 19392 } 19393 19394 func (ec *executionContext) marshalNLoopB2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐLoopB(ctx context.Context, sel ast.SelectionSet, v *LoopB) graphql.Marshaler { 19395 if v == nil { 19396 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19397 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19398 } 19399 return graphql.Null 19400 } 19401 return ec._LoopB(ctx, sel, v) 19402 } 19403 19404 func (ec *executionContext) unmarshalNMarshalPanic2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanic(ctx context.Context, v interface{}) (MarshalPanic, error) { 19405 var res MarshalPanic 19406 err := res.UnmarshalGQL(v) 19407 return res, graphql.ErrorOnPath(ctx, err) 19408 } 19409 19410 func (ec *executionContext) marshalNMarshalPanic2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanic(ctx context.Context, sel ast.SelectionSet, v MarshalPanic) graphql.Marshaler { 19411 return v 19412 } 19413 19414 func (ec *executionContext) unmarshalNMarshalPanic2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanicᚄ(ctx context.Context, v interface{}) ([]MarshalPanic, error) { 19415 var vSlice []interface{} 19416 if v != nil { 19417 vSlice = graphql.CoerceList(v) 19418 } 19419 var err error 19420 res := make([]MarshalPanic, len(vSlice)) 19421 for i := range vSlice { 19422 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 19423 res[i], err = ec.unmarshalNMarshalPanic2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanic(ctx, vSlice[i]) 19424 if err != nil { 19425 return nil, err 19426 } 19427 } 19428 return res, nil 19429 } 19430 19431 func (ec *executionContext) marshalNMarshalPanic2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanicᚄ(ctx context.Context, sel ast.SelectionSet, v []MarshalPanic) graphql.Marshaler { 19432 ret := make(graphql.Array, len(v)) 19433 for i := range v { 19434 ret[i] = ec.marshalNMarshalPanic2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐMarshalPanic(ctx, sel, v[i]) 19435 } 19436 19437 for _, e := range ret { 19438 if e == graphql.Null { 19439 return graphql.Null 19440 } 19441 } 19442 19443 return ret 19444 } 19445 19446 func (ec *executionContext) unmarshalNNestedInput2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐNestedInput(ctx context.Context, v interface{}) (*NestedInput, error) { 19447 res, err := ec.unmarshalInputNestedInput(ctx, v) 19448 return &res, graphql.ErrorOnPath(ctx, err) 19449 } 19450 19451 func (ec *executionContext) marshalNNode2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐNode(ctx context.Context, sel ast.SelectionSet, v Node) graphql.Marshaler { 19452 if v == nil { 19453 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19454 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19455 } 19456 return graphql.Null 19457 } 19458 return ec._Node(ctx, sel, v) 19459 } 19460 19461 func (ec *executionContext) marshalNPet2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPet(ctx context.Context, sel ast.SelectionSet, v *Pet) graphql.Marshaler { 19462 if v == nil { 19463 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19464 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19465 } 19466 return graphql.Null 19467 } 19468 return ec._Pet(ctx, sel, v) 19469 } 19470 19471 func (ec *executionContext) marshalNPrimitive2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitive(ctx context.Context, sel ast.SelectionSet, v Primitive) graphql.Marshaler { 19472 return ec._Primitive(ctx, sel, &v) 19473 } 19474 19475 func (ec *executionContext) marshalNPrimitive2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitiveᚄ(ctx context.Context, sel ast.SelectionSet, v []Primitive) graphql.Marshaler { 19476 ret := make(graphql.Array, len(v)) 19477 var wg sync.WaitGroup 19478 isLen1 := len(v) == 1 19479 if !isLen1 { 19480 wg.Add(len(v)) 19481 } 19482 for i := range v { 19483 i := i 19484 fc := &graphql.FieldContext{ 19485 Index: &i, 19486 Result: &v[i], 19487 } 19488 ctx := graphql.WithFieldContext(ctx, fc) 19489 f := func(i int) { 19490 defer func() { 19491 if r := recover(); r != nil { 19492 ec.Error(ctx, ec.Recover(ctx, r)) 19493 ret = nil 19494 } 19495 }() 19496 if !isLen1 { 19497 defer wg.Done() 19498 } 19499 ret[i] = ec.marshalNPrimitive2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitive(ctx, sel, v[i]) 19500 } 19501 if isLen1 { 19502 f(i) 19503 } else { 19504 go f(i) 19505 } 19506 19507 } 19508 wg.Wait() 19509 19510 for _, e := range ret { 19511 if e == graphql.Null { 19512 return graphql.Null 19513 } 19514 } 19515 19516 return ret 19517 } 19518 19519 func (ec *executionContext) marshalNPrimitiveString2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitiveString(ctx context.Context, sel ast.SelectionSet, v PrimitiveString) graphql.Marshaler { 19520 return ec._PrimitiveString(ctx, sel, &v) 19521 } 19522 19523 func (ec *executionContext) marshalNPrimitiveString2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitiveStringᚄ(ctx context.Context, sel ast.SelectionSet, v []PrimitiveString) graphql.Marshaler { 19524 ret := make(graphql.Array, len(v)) 19525 var wg sync.WaitGroup 19526 isLen1 := len(v) == 1 19527 if !isLen1 { 19528 wg.Add(len(v)) 19529 } 19530 for i := range v { 19531 i := i 19532 fc := &graphql.FieldContext{ 19533 Index: &i, 19534 Result: &v[i], 19535 } 19536 ctx := graphql.WithFieldContext(ctx, fc) 19537 f := func(i int) { 19538 defer func() { 19539 if r := recover(); r != nil { 19540 ec.Error(ctx, ec.Recover(ctx, r)) 19541 ret = nil 19542 } 19543 }() 19544 if !isLen1 { 19545 defer wg.Done() 19546 } 19547 ret[i] = ec.marshalNPrimitiveString2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPrimitiveString(ctx, sel, v[i]) 19548 } 19549 if isLen1 { 19550 f(i) 19551 } else { 19552 go f(i) 19553 } 19554 19555 } 19556 wg.Wait() 19557 19558 for _, e := range ret { 19559 if e == graphql.Null { 19560 return graphql.Null 19561 } 19562 } 19563 19564 return ret 19565 } 19566 19567 func (ec *executionContext) marshalNPtrToPtrOuter2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrOuter(ctx context.Context, sel ast.SelectionSet, v PtrToPtrOuter) graphql.Marshaler { 19568 return ec._PtrToPtrOuter(ctx, sel, &v) 19569 } 19570 19571 func (ec *executionContext) marshalNPtrToPtrOuter2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrOuter(ctx context.Context, sel ast.SelectionSet, v *PtrToPtrOuter) graphql.Marshaler { 19572 if v == nil { 19573 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19574 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19575 } 19576 return graphql.Null 19577 } 19578 return ec._PtrToPtrOuter(ctx, sel, v) 19579 } 19580 19581 func (ec *executionContext) marshalNPtrToSliceContainer2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToSliceContainer(ctx context.Context, sel ast.SelectionSet, v PtrToSliceContainer) graphql.Marshaler { 19582 return ec._PtrToSliceContainer(ctx, sel, &v) 19583 } 19584 19585 func (ec *executionContext) marshalNPtrToSliceContainer2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToSliceContainer(ctx context.Context, sel ast.SelectionSet, v *PtrToSliceContainer) graphql.Marshaler { 19586 if v == nil { 19587 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19588 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19589 } 19590 return graphql.Null 19591 } 19592 return ec._PtrToSliceContainer(ctx, sel, v) 19593 } 19594 19595 func (ec *executionContext) unmarshalNRecursiveInputSlice2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐRecursiveInputSlice(ctx context.Context, v interface{}) (RecursiveInputSlice, error) { 19596 res, err := ec.unmarshalInputRecursiveInputSlice(ctx, v) 19597 return res, graphql.ErrorOnPath(ctx, err) 19598 } 19599 19600 func (ec *executionContext) marshalNShapeUnion2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐShapeUnion(ctx context.Context, sel ast.SelectionSet, v ShapeUnion) graphql.Marshaler { 19601 if v == nil { 19602 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19603 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19604 } 19605 return graphql.Null 19606 } 19607 return ec._ShapeUnion(ctx, sel, v) 19608 } 19609 19610 func (ec *executionContext) marshalNSize2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐSize(ctx context.Context, sel ast.SelectionSet, v *Size) graphql.Marshaler { 19611 if v == nil { 19612 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19613 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19614 } 19615 return graphql.Null 19616 } 19617 return ec._Size(ctx, sel, v) 19618 } 19619 19620 func (ec *executionContext) unmarshalNSpecialInput2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐSpecialInput(ctx context.Context, v interface{}) (SpecialInput, error) { 19621 res, err := ec.unmarshalInputSpecialInput(ctx, v) 19622 return res, graphql.ErrorOnPath(ctx, err) 19623 } 19624 19625 func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) { 19626 res, err := graphql.UnmarshalString(v) 19627 return res, graphql.ErrorOnPath(ctx, err) 19628 } 19629 19630 func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 19631 res := graphql.MarshalString(v) 19632 if res == graphql.Null { 19633 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19634 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19635 } 19636 } 19637 return res 19638 } 19639 19640 func (ec *executionContext) unmarshalNString2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { 19641 var vSlice []interface{} 19642 if v != nil { 19643 vSlice = graphql.CoerceList(v) 19644 } 19645 var err error 19646 res := make([]string, len(vSlice)) 19647 for i := range vSlice { 19648 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 19649 res[i], err = ec.unmarshalNString2string(ctx, vSlice[i]) 19650 if err != nil { 19651 return nil, err 19652 } 19653 } 19654 return res, nil 19655 } 19656 19657 func (ec *executionContext) marshalNString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { 19658 ret := make(graphql.Array, len(v)) 19659 for i := range v { 19660 ret[i] = ec.marshalNString2string(ctx, sel, v[i]) 19661 } 19662 19663 for _, e := range ret { 19664 if e == graphql.Null { 19665 return graphql.Null 19666 } 19667 } 19668 19669 return ret 19670 } 19671 19672 func (ec *executionContext) unmarshalNString2ᚕᚖstring(ctx context.Context, v interface{}) ([]*string, error) { 19673 var vSlice []interface{} 19674 if v != nil { 19675 vSlice = graphql.CoerceList(v) 19676 } 19677 var err error 19678 res := make([]*string, len(vSlice)) 19679 for i := range vSlice { 19680 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 19681 res[i], err = ec.unmarshalOString2ᚖstring(ctx, vSlice[i]) 19682 if err != nil { 19683 return nil, err 19684 } 19685 } 19686 return res, nil 19687 } 19688 19689 func (ec *executionContext) marshalNString2ᚕᚖstring(ctx context.Context, sel ast.SelectionSet, v []*string) graphql.Marshaler { 19690 ret := make(graphql.Array, len(v)) 19691 for i := range v { 19692 ret[i] = ec.marshalOString2ᚖstring(ctx, sel, v[i]) 19693 } 19694 19695 return ret 19696 } 19697 19698 func (ec *executionContext) unmarshalNString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { 19699 res, err := graphql.UnmarshalString(v) 19700 return &res, graphql.ErrorOnPath(ctx, err) 19701 } 19702 19703 func (ec *executionContext) marshalNString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { 19704 if v == nil { 19705 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19706 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19707 } 19708 return graphql.Null 19709 } 19710 res := graphql.MarshalString(*v) 19711 if res == graphql.Null { 19712 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19713 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19714 } 19715 } 19716 return res 19717 } 19718 19719 func (ec *executionContext) unmarshalNStringFromContextFunction2string(ctx context.Context, v interface{}) (string, error) { 19720 res, err := UnmarshalStringFromContextFunction(ctx, v) 19721 return res, graphql.ErrorOnPath(ctx, err) 19722 } 19723 19724 func (ec *executionContext) marshalNStringFromContextFunction2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 19725 res := MarshalStringFromContextFunction(v) 19726 if res == graphql.Null { 19727 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19728 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19729 } 19730 } 19731 return graphql.WrapContextMarshaler(ctx, res) 19732 } 19733 19734 func (ec *executionContext) unmarshalNStringFromContextInterface2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐStringFromContextInterface(ctx context.Context, v interface{}) (StringFromContextInterface, error) { 19735 var res StringFromContextInterface 19736 err := res.UnmarshalGQLContext(ctx, v) 19737 return res, graphql.ErrorOnPath(ctx, err) 19738 } 19739 19740 func (ec *executionContext) marshalNStringFromContextInterface2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐStringFromContextInterface(ctx context.Context, sel ast.SelectionSet, v StringFromContextInterface) graphql.Marshaler { 19741 return graphql.WrapContextMarshaler(ctx, v) 19742 } 19743 19744 func (ec *executionContext) unmarshalNStringFromContextInterface2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐStringFromContextInterface(ctx context.Context, v interface{}) (*StringFromContextInterface, error) { 19745 var res = new(StringFromContextInterface) 19746 err := res.UnmarshalGQLContext(ctx, v) 19747 return res, graphql.ErrorOnPath(ctx, err) 19748 } 19749 19750 func (ec *executionContext) marshalNStringFromContextInterface2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐStringFromContextInterface(ctx context.Context, sel ast.SelectionSet, v *StringFromContextInterface) graphql.Marshaler { 19751 if v == nil { 19752 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19753 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19754 } 19755 return graphql.Null 19756 } 19757 return graphql.WrapContextMarshaler(ctx, v) 19758 } 19759 19760 func (ec *executionContext) unmarshalNTime2timeᚐTime(ctx context.Context, v interface{}) (time.Time, error) { 19761 res, err := graphql.UnmarshalTime(v) 19762 return res, graphql.ErrorOnPath(ctx, err) 19763 } 19764 19765 func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler { 19766 res := graphql.MarshalTime(v) 19767 if res == graphql.Null { 19768 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19769 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19770 } 19771 } 19772 return res 19773 } 19774 19775 func (ec *executionContext) unmarshalNUUID2string(ctx context.Context, v interface{}) (string, error) { 19776 res, err := graphql.UnmarshalString(v) 19777 return res, graphql.ErrorOnPath(ctx, err) 19778 } 19779 19780 func (ec *executionContext) marshalNUUID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 19781 res := graphql.MarshalString(v) 19782 if res == graphql.Null { 19783 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19784 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19785 } 19786 } 19787 return res 19788 } 19789 19790 func (ec *executionContext) unmarshalNUpdatePtrToPtrOuter2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrOuter(ctx context.Context, v interface{}) (UpdatePtrToPtrOuter, error) { 19791 res, err := ec.unmarshalInputUpdatePtrToPtrOuter(ctx, v) 19792 return res, graphql.ErrorOnPath(ctx, err) 19793 } 19794 19795 func (ec *executionContext) marshalNUser2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐUser(ctx context.Context, sel ast.SelectionSet, v User) graphql.Marshaler { 19796 return ec._User(ctx, sel, &v) 19797 } 19798 19799 func (ec *executionContext) marshalNUser2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐUserᚄ(ctx context.Context, sel ast.SelectionSet, v []*User) graphql.Marshaler { 19800 ret := make(graphql.Array, len(v)) 19801 var wg sync.WaitGroup 19802 isLen1 := len(v) == 1 19803 if !isLen1 { 19804 wg.Add(len(v)) 19805 } 19806 for i := range v { 19807 i := i 19808 fc := &graphql.FieldContext{ 19809 Index: &i, 19810 Result: &v[i], 19811 } 19812 ctx := graphql.WithFieldContext(ctx, fc) 19813 f := func(i int) { 19814 defer func() { 19815 if r := recover(); r != nil { 19816 ec.Error(ctx, ec.Recover(ctx, r)) 19817 ret = nil 19818 } 19819 }() 19820 if !isLen1 { 19821 defer wg.Done() 19822 } 19823 ret[i] = ec.marshalNUser2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐUser(ctx, sel, v[i]) 19824 } 19825 if isLen1 { 19826 f(i) 19827 } else { 19828 go f(i) 19829 } 19830 19831 } 19832 wg.Wait() 19833 19834 for _, e := range ret { 19835 if e == graphql.Null { 19836 return graphql.Null 19837 } 19838 } 19839 19840 return ret 19841 } 19842 19843 func (ec *executionContext) marshalNUser2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐUser(ctx context.Context, sel ast.SelectionSet, v *User) graphql.Marshaler { 19844 if v == nil { 19845 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19846 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19847 } 19848 return graphql.Null 19849 } 19850 return ec._User(ctx, sel, v) 19851 } 19852 19853 func (ec *executionContext) marshalNWrappedMap2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐWrappedMap(ctx context.Context, sel ast.SelectionSet, v WrappedMap) graphql.Marshaler { 19854 if v == nil { 19855 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19856 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19857 } 19858 return graphql.Null 19859 } 19860 return ec._WrappedMap(ctx, sel, v) 19861 } 19862 19863 func (ec *executionContext) unmarshalNWrappedScalar2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚋotherpkgᚐScalar(ctx context.Context, v interface{}) (otherpkg.Scalar, error) { 19864 tmp, err := graphql.UnmarshalString(v) 19865 res := otherpkg.Scalar(tmp) 19866 return res, graphql.ErrorOnPath(ctx, err) 19867 } 19868 19869 func (ec *executionContext) marshalNWrappedScalar2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚋotherpkgᚐScalar(ctx context.Context, sel ast.SelectionSet, v otherpkg.Scalar) graphql.Marshaler { 19870 res := graphql.MarshalString(string(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) marshalNWrappedSlice2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐWrappedSlice(ctx context.Context, sel ast.SelectionSet, v WrappedSlice) graphql.Marshaler { 19880 if v == nil { 19881 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19882 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19883 } 19884 return graphql.Null 19885 } 19886 return ec._WrappedSlice(ctx, sel, v) 19887 } 19888 19889 func (ec *executionContext) marshalNWrappedStruct2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐWrappedStruct(ctx context.Context, sel ast.SelectionSet, v WrappedStruct) graphql.Marshaler { 19890 return ec._WrappedStruct(ctx, sel, &v) 19891 } 19892 19893 func (ec *executionContext) marshalNWrappedStruct2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐWrappedStruct(ctx context.Context, sel ast.SelectionSet, v *WrappedStruct) graphql.Marshaler { 19894 if v == nil { 19895 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19896 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19897 } 19898 return graphql.Null 19899 } 19900 return ec._WrappedStruct(ctx, sel, v) 19901 } 19902 19903 func (ec *executionContext) marshalN__Directive2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler { 19904 return ec.___Directive(ctx, sel, &v) 19905 } 19906 19907 func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler { 19908 ret := make(graphql.Array, len(v)) 19909 var wg sync.WaitGroup 19910 isLen1 := len(v) == 1 19911 if !isLen1 { 19912 wg.Add(len(v)) 19913 } 19914 for i := range v { 19915 i := i 19916 fc := &graphql.FieldContext{ 19917 Index: &i, 19918 Result: &v[i], 19919 } 19920 ctx := graphql.WithFieldContext(ctx, fc) 19921 f := func(i int) { 19922 defer func() { 19923 if r := recover(); r != nil { 19924 ec.Error(ctx, ec.Recover(ctx, r)) 19925 ret = nil 19926 } 19927 }() 19928 if !isLen1 { 19929 defer wg.Done() 19930 } 19931 ret[i] = ec.marshalN__Directive2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i]) 19932 } 19933 if isLen1 { 19934 f(i) 19935 } else { 19936 go f(i) 19937 } 19938 19939 } 19940 wg.Wait() 19941 19942 for _, e := range ret { 19943 if e == graphql.Null { 19944 return graphql.Null 19945 } 19946 } 19947 19948 return ret 19949 } 19950 19951 func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) { 19952 res, err := graphql.UnmarshalString(v) 19953 return res, graphql.ErrorOnPath(ctx, err) 19954 } 19955 19956 func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 19957 res := graphql.MarshalString(v) 19958 if res == graphql.Null { 19959 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 19960 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 19961 } 19962 } 19963 return res 19964 } 19965 19966 func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { 19967 var vSlice []interface{} 19968 if v != nil { 19969 vSlice = graphql.CoerceList(v) 19970 } 19971 var err error 19972 res := make([]string, len(vSlice)) 19973 for i := range vSlice { 19974 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 19975 res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i]) 19976 if err != nil { 19977 return nil, err 19978 } 19979 } 19980 return res, nil 19981 } 19982 19983 func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { 19984 ret := make(graphql.Array, len(v)) 19985 var wg sync.WaitGroup 19986 isLen1 := len(v) == 1 19987 if !isLen1 { 19988 wg.Add(len(v)) 19989 } 19990 for i := range v { 19991 i := i 19992 fc := &graphql.FieldContext{ 19993 Index: &i, 19994 Result: &v[i], 19995 } 19996 ctx := graphql.WithFieldContext(ctx, fc) 19997 f := func(i int) { 19998 defer func() { 19999 if r := recover(); r != nil { 20000 ec.Error(ctx, ec.Recover(ctx, r)) 20001 ret = nil 20002 } 20003 }() 20004 if !isLen1 { 20005 defer wg.Done() 20006 } 20007 ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i]) 20008 } 20009 if isLen1 { 20010 f(i) 20011 } else { 20012 go f(i) 20013 } 20014 20015 } 20016 wg.Wait() 20017 20018 for _, e := range ret { 20019 if e == graphql.Null { 20020 return graphql.Null 20021 } 20022 } 20023 20024 return ret 20025 } 20026 20027 func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler { 20028 return ec.___EnumValue(ctx, sel, &v) 20029 } 20030 20031 func (ec *executionContext) marshalN__Field2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler { 20032 return ec.___Field(ctx, sel, &v) 20033 } 20034 20035 func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler { 20036 return ec.___InputValue(ctx, sel, &v) 20037 } 20038 20039 func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { 20040 ret := make(graphql.Array, len(v)) 20041 var wg sync.WaitGroup 20042 isLen1 := len(v) == 1 20043 if !isLen1 { 20044 wg.Add(len(v)) 20045 } 20046 for i := range v { 20047 i := i 20048 fc := &graphql.FieldContext{ 20049 Index: &i, 20050 Result: &v[i], 20051 } 20052 ctx := graphql.WithFieldContext(ctx, fc) 20053 f := func(i int) { 20054 defer func() { 20055 if r := recover(); r != nil { 20056 ec.Error(ctx, ec.Recover(ctx, r)) 20057 ret = nil 20058 } 20059 }() 20060 if !isLen1 { 20061 defer wg.Done() 20062 } 20063 ret[i] = ec.marshalN__InputValue2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) 20064 } 20065 if isLen1 { 20066 f(i) 20067 } else { 20068 go f(i) 20069 } 20070 20071 } 20072 wg.Wait() 20073 20074 for _, e := range ret { 20075 if e == graphql.Null { 20076 return graphql.Null 20077 } 20078 } 20079 20080 return ret 20081 } 20082 20083 func (ec *executionContext) marshalN__Type2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { 20084 return ec.___Type(ctx, sel, &v) 20085 } 20086 20087 func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { 20088 ret := make(graphql.Array, len(v)) 20089 var wg sync.WaitGroup 20090 isLen1 := len(v) == 1 20091 if !isLen1 { 20092 wg.Add(len(v)) 20093 } 20094 for i := range v { 20095 i := i 20096 fc := &graphql.FieldContext{ 20097 Index: &i, 20098 Result: &v[i], 20099 } 20100 ctx := graphql.WithFieldContext(ctx, fc) 20101 f := func(i int) { 20102 defer func() { 20103 if r := recover(); r != nil { 20104 ec.Error(ctx, ec.Recover(ctx, r)) 20105 ret = nil 20106 } 20107 }() 20108 if !isLen1 { 20109 defer wg.Done() 20110 } 20111 ret[i] = ec.marshalN__Type2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) 20112 } 20113 if isLen1 { 20114 f(i) 20115 } else { 20116 go f(i) 20117 } 20118 20119 } 20120 wg.Wait() 20121 20122 for _, e := range ret { 20123 if e == graphql.Null { 20124 return graphql.Null 20125 } 20126 } 20127 20128 return ret 20129 } 20130 20131 func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { 20132 if v == nil { 20133 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 20134 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 20135 } 20136 return graphql.Null 20137 } 20138 return ec.___Type(ctx, sel, v) 20139 } 20140 20141 func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) { 20142 res, err := graphql.UnmarshalString(v) 20143 return res, graphql.ErrorOnPath(ctx, err) 20144 } 20145 20146 func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 20147 res := graphql.MarshalString(v) 20148 if res == graphql.Null { 20149 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 20150 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 20151 } 20152 } 20153 return res 20154 } 20155 20156 func (ec *executionContext) marshalOAnimal2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐAnimal(ctx context.Context, sel ast.SelectionSet, v Animal) graphql.Marshaler { 20157 if v == nil { 20158 return graphql.Null 20159 } 20160 return ec._Animal(ctx, sel, v) 20161 } 20162 20163 func (ec *executionContext) marshalOAutobind2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐAutobind(ctx context.Context, sel ast.SelectionSet, v *Autobind) graphql.Marshaler { 20164 if v == nil { 20165 return graphql.Null 20166 } 20167 return ec._Autobind(ctx, sel, v) 20168 } 20169 20170 func (ec *executionContext) marshalOBackedByInterface2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐBackedByInterface(ctx context.Context, sel ast.SelectionSet, v BackedByInterface) graphql.Marshaler { 20171 if v == nil { 20172 return graphql.Null 20173 } 20174 return ec._BackedByInterface(ctx, sel, v) 20175 } 20176 20177 func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) { 20178 res, err := graphql.UnmarshalBoolean(v) 20179 return res, graphql.ErrorOnPath(ctx, err) 20180 } 20181 20182 func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { 20183 res := graphql.MarshalBoolean(v) 20184 return res 20185 } 20186 20187 func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) { 20188 if v == nil { 20189 return nil, nil 20190 } 20191 res, err := graphql.UnmarshalBoolean(v) 20192 return &res, graphql.ErrorOnPath(ctx, err) 20193 } 20194 20195 func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler { 20196 if v == nil { 20197 return graphql.Null 20198 } 20199 res := graphql.MarshalBoolean(*v) 20200 return res 20201 } 20202 20203 func (ec *executionContext) unmarshalOChanges2map(ctx context.Context, v interface{}) (map[string]interface{}, error) { 20204 if v == nil { 20205 return nil, nil 20206 } 20207 return v.(map[string]interface{}), nil 20208 } 20209 20210 func (ec *executionContext) marshalOCheckIssue8962ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896(ctx context.Context, sel ast.SelectionSet, v []*CheckIssue896) graphql.Marshaler { 20211 if v == nil { 20212 return graphql.Null 20213 } 20214 ret := make(graphql.Array, len(v)) 20215 var wg sync.WaitGroup 20216 isLen1 := len(v) == 1 20217 if !isLen1 { 20218 wg.Add(len(v)) 20219 } 20220 for i := range v { 20221 i := i 20222 fc := &graphql.FieldContext{ 20223 Index: &i, 20224 Result: &v[i], 20225 } 20226 ctx := graphql.WithFieldContext(ctx, fc) 20227 f := func(i int) { 20228 defer func() { 20229 if r := recover(); r != nil { 20230 ec.Error(ctx, ec.Recover(ctx, r)) 20231 ret = nil 20232 } 20233 }() 20234 if !isLen1 { 20235 defer wg.Done() 20236 } 20237 ret[i] = ec.marshalOCheckIssue8962ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896(ctx, sel, v[i]) 20238 } 20239 if isLen1 { 20240 f(i) 20241 } else { 20242 go f(i) 20243 } 20244 20245 } 20246 wg.Wait() 20247 20248 return ret 20249 } 20250 20251 func (ec *executionContext) marshalOCheckIssue8962ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896ᚄ(ctx context.Context, sel ast.SelectionSet, v []*CheckIssue896) graphql.Marshaler { 20252 if v == nil { 20253 return graphql.Null 20254 } 20255 ret := make(graphql.Array, len(v)) 20256 var wg sync.WaitGroup 20257 isLen1 := len(v) == 1 20258 if !isLen1 { 20259 wg.Add(len(v)) 20260 } 20261 for i := range v { 20262 i := i 20263 fc := &graphql.FieldContext{ 20264 Index: &i, 20265 Result: &v[i], 20266 } 20267 ctx := graphql.WithFieldContext(ctx, fc) 20268 f := func(i int) { 20269 defer func() { 20270 if r := recover(); r != nil { 20271 ec.Error(ctx, ec.Recover(ctx, r)) 20272 ret = nil 20273 } 20274 }() 20275 if !isLen1 { 20276 defer wg.Done() 20277 } 20278 ret[i] = ec.marshalNCheckIssue8962ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896(ctx, sel, v[i]) 20279 } 20280 if isLen1 { 20281 f(i) 20282 } else { 20283 go f(i) 20284 } 20285 20286 } 20287 wg.Wait() 20288 20289 for _, e := range ret { 20290 if e == graphql.Null { 20291 return graphql.Null 20292 } 20293 } 20294 20295 return ret 20296 } 20297 20298 func (ec *executionContext) marshalOCheckIssue8962ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐCheckIssue896(ctx context.Context, sel ast.SelectionSet, v *CheckIssue896) graphql.Marshaler { 20299 if v == nil { 20300 return graphql.Null 20301 } 20302 return ec._CheckIssue896(ctx, sel, v) 20303 } 20304 20305 func (ec *executionContext) marshalOCircle2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐCircle(ctx context.Context, sel ast.SelectionSet, v *Circle) graphql.Marshaler { 20306 if v == nil { 20307 return graphql.Null 20308 } 20309 return ec._Circle(ctx, sel, v) 20310 } 20311 20312 func (ec *executionContext) marshalOCoordinates2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐCoordinates(ctx context.Context, sel ast.SelectionSet, v Coordinates) graphql.Marshaler { 20313 return ec._Coordinates(ctx, sel, &v) 20314 } 20315 20316 func (ec *executionContext) unmarshalODefaultScalarImplementation2ᚖstring(ctx context.Context, v interface{}) (*string, error) { 20317 if v == nil { 20318 return nil, nil 20319 } 20320 res, err := graphql.UnmarshalString(v) 20321 return &res, graphql.ErrorOnPath(ctx, err) 20322 } 20323 20324 func (ec *executionContext) marshalODefaultScalarImplementation2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { 20325 if v == nil { 20326 return graphql.Null 20327 } 20328 res := graphql.MarshalString(*v) 20329 return res 20330 } 20331 20332 func (ec *executionContext) marshalODog2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐDog(ctx context.Context, sel ast.SelectionSet, v *Dog) graphql.Marshaler { 20333 if v == nil { 20334 return graphql.Null 20335 } 20336 return ec._Dog(ctx, sel, v) 20337 } 20338 20339 func (ec *executionContext) marshalOEmbeddedCase12ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐEmbeddedCase1(ctx context.Context, sel ast.SelectionSet, v *EmbeddedCase1) graphql.Marshaler { 20340 if v == nil { 20341 return graphql.Null 20342 } 20343 return ec._EmbeddedCase1(ctx, sel, v) 20344 } 20345 20346 func (ec *executionContext) marshalOEmbeddedCase22ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐEmbeddedCase2(ctx context.Context, sel ast.SelectionSet, v *EmbeddedCase2) graphql.Marshaler { 20347 if v == nil { 20348 return graphql.Null 20349 } 20350 return ec._EmbeddedCase2(ctx, sel, v) 20351 } 20352 20353 func (ec *executionContext) marshalOEmbeddedCase32ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐEmbeddedCase3(ctx context.Context, sel ast.SelectionSet, v *EmbeddedCase3) graphql.Marshaler { 20354 if v == nil { 20355 return graphql.Null 20356 } 20357 return ec._EmbeddedCase3(ctx, sel, v) 20358 } 20359 20360 func (ec *executionContext) marshalOError2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx context.Context, sel ast.SelectionSet, v []*Error) graphql.Marshaler { 20361 if v == nil { 20362 return graphql.Null 20363 } 20364 ret := make(graphql.Array, len(v)) 20365 var wg sync.WaitGroup 20366 isLen1 := len(v) == 1 20367 if !isLen1 { 20368 wg.Add(len(v)) 20369 } 20370 for i := range v { 20371 i := i 20372 fc := &graphql.FieldContext{ 20373 Index: &i, 20374 Result: &v[i], 20375 } 20376 ctx := graphql.WithFieldContext(ctx, fc) 20377 f := func(i int) { 20378 defer func() { 20379 if r := recover(); r != nil { 20380 ec.Error(ctx, ec.Recover(ctx, r)) 20381 ret = nil 20382 } 20383 }() 20384 if !isLen1 { 20385 defer wg.Done() 20386 } 20387 ret[i] = ec.marshalOError2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx, sel, v[i]) 20388 } 20389 if isLen1 { 20390 f(i) 20391 } else { 20392 go f(i) 20393 } 20394 20395 } 20396 wg.Wait() 20397 20398 return ret 20399 } 20400 20401 func (ec *executionContext) marshalOError2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐErrorᚄ(ctx context.Context, sel ast.SelectionSet, v []*Error) graphql.Marshaler { 20402 if v == nil { 20403 return graphql.Null 20404 } 20405 ret := make(graphql.Array, len(v)) 20406 var wg sync.WaitGroup 20407 isLen1 := len(v) == 1 20408 if !isLen1 { 20409 wg.Add(len(v)) 20410 } 20411 for i := range v { 20412 i := i 20413 fc := &graphql.FieldContext{ 20414 Index: &i, 20415 Result: &v[i], 20416 } 20417 ctx := graphql.WithFieldContext(ctx, fc) 20418 f := func(i int) { 20419 defer func() { 20420 if r := recover(); r != nil { 20421 ec.Error(ctx, ec.Recover(ctx, r)) 20422 ret = nil 20423 } 20424 }() 20425 if !isLen1 { 20426 defer wg.Done() 20427 } 20428 ret[i] = ec.marshalNError2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx, sel, v[i]) 20429 } 20430 if isLen1 { 20431 f(i) 20432 } else { 20433 go f(i) 20434 } 20435 20436 } 20437 wg.Wait() 20438 20439 for _, e := range ret { 20440 if e == graphql.Null { 20441 return graphql.Null 20442 } 20443 } 20444 20445 return ret 20446 } 20447 20448 func (ec *executionContext) marshalOError2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐError(ctx context.Context, sel ast.SelectionSet, v *Error) graphql.Marshaler { 20449 if v == nil { 20450 return graphql.Null 20451 } 20452 return ec._Error(ctx, sel, v) 20453 } 20454 20455 func (ec *executionContext) marshalOErrors2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐErrors(ctx context.Context, sel ast.SelectionSet, v *Errors) graphql.Marshaler { 20456 if v == nil { 20457 return graphql.Null 20458 } 20459 return ec._Errors(ctx, sel, v) 20460 } 20461 20462 func (ec *executionContext) unmarshalOFloat2float64(ctx context.Context, v interface{}) (float64, error) { 20463 res, err := graphql.UnmarshalFloatContext(ctx, v) 20464 return res, graphql.ErrorOnPath(ctx, err) 20465 } 20466 20467 func (ec *executionContext) marshalOFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler { 20468 res := graphql.MarshalFloatContext(v) 20469 return graphql.WrapContextMarshaler(ctx, res) 20470 } 20471 20472 func (ec *executionContext) unmarshalOInnerDirectives2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐInnerDirectives(ctx context.Context, v interface{}) (*InnerDirectives, error) { 20473 if v == nil { 20474 return nil, nil 20475 } 20476 res, err := ec.unmarshalInputInnerDirectives(ctx, v) 20477 return &res, graphql.ErrorOnPath(ctx, err) 20478 } 20479 20480 func (ec *executionContext) unmarshalOInputDirectives2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐInputDirectives(ctx context.Context, v interface{}) (*InputDirectives, error) { 20481 if v == nil { 20482 return nil, nil 20483 } 20484 res, err := ec.unmarshalInputInputDirectives(ctx, v) 20485 return &res, graphql.ErrorOnPath(ctx, err) 20486 } 20487 20488 func (ec *executionContext) unmarshalOInputWithEnumValue2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐInputWithEnumValue(ctx context.Context, v interface{}) (*InputWithEnumValue, error) { 20489 if v == nil { 20490 return nil, nil 20491 } 20492 res, err := ec.unmarshalInputInputWithEnumValue(ctx, v) 20493 return &res, graphql.ErrorOnPath(ctx, err) 20494 } 20495 20496 func (ec *executionContext) unmarshalOInt2ᚖint(ctx context.Context, v interface{}) (*int, error) { 20497 if v == nil { 20498 return nil, nil 20499 } 20500 res, err := graphql.UnmarshalInt(v) 20501 return &res, graphql.ErrorOnPath(ctx, err) 20502 } 20503 20504 func (ec *executionContext) marshalOInt2ᚖint(ctx context.Context, sel ast.SelectionSet, v *int) graphql.Marshaler { 20505 if v == nil { 20506 return graphql.Null 20507 } 20508 res := graphql.MarshalInt(*v) 20509 return res 20510 } 20511 20512 func (ec *executionContext) marshalOInvalidIdentifier2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚋinvalidᚑpackagenameᚐInvalidIdentifier(ctx context.Context, sel ast.SelectionSet, v *invalid_packagename.InvalidIdentifier) graphql.Marshaler { 20513 if v == nil { 20514 return graphql.Null 20515 } 20516 return ec._InvalidIdentifier(ctx, sel, v) 20517 } 20518 20519 func (ec *executionContext) marshalOIt2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚋintrospectionᚐIt(ctx context.Context, sel ast.SelectionSet, v *introspection1.It) graphql.Marshaler { 20520 if v == nil { 20521 return graphql.Null 20522 } 20523 return ec._It(ctx, sel, v) 20524 } 20525 20526 func (ec *executionContext) unmarshalOMapStringInterfaceInput2map(ctx context.Context, v interface{}) (map[string]interface{}, error) { 20527 if v == nil { 20528 return nil, nil 20529 } 20530 return v.(map[string]interface{}), nil 20531 } 20532 20533 func (ec *executionContext) marshalOMapStringInterfaceType2map(ctx context.Context, sel ast.SelectionSet, v map[string]interface{}) graphql.Marshaler { 20534 if v == nil { 20535 return graphql.Null 20536 } 20537 return ec._MapStringInterfaceType(ctx, sel, v) 20538 } 20539 20540 func (ec *executionContext) marshalOModelMethods2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐModelMethods(ctx context.Context, sel ast.SelectionSet, v *ModelMethods) graphql.Marshaler { 20541 if v == nil { 20542 return graphql.Null 20543 } 20544 return ec._ModelMethods(ctx, sel, v) 20545 } 20546 20547 func (ec *executionContext) unmarshalONestedMapInput2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐNestedMapInput(ctx context.Context, v interface{}) (*NestedMapInput, error) { 20548 if v == nil { 20549 return nil, nil 20550 } 20551 res, err := ec.unmarshalInputNestedMapInput(ctx, v) 20552 return &res, graphql.ErrorOnPath(ctx, err) 20553 } 20554 20555 func (ec *executionContext) marshalOObjectDirectives2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐObjectDirectives(ctx context.Context, sel ast.SelectionSet, v *ObjectDirectives) graphql.Marshaler { 20556 if v == nil { 20557 return graphql.Null 20558 } 20559 return ec._ObjectDirectives(ctx, sel, v) 20560 } 20561 20562 func (ec *executionContext) marshalOObjectDirectivesWithCustomGoModel2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐObjectDirectivesWithCustomGoModel(ctx context.Context, sel ast.SelectionSet, v *ObjectDirectivesWithCustomGoModel) graphql.Marshaler { 20563 if v == nil { 20564 return graphql.Null 20565 } 20566 return ec._ObjectDirectivesWithCustomGoModel(ctx, sel, v) 20567 } 20568 20569 func (ec *executionContext) unmarshalOOuterInput2ᚕᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐOuterInput(ctx context.Context, v interface{}) ([][]*OuterInput, error) { 20570 if v == nil { 20571 return nil, nil 20572 } 20573 var vSlice []interface{} 20574 if v != nil { 20575 vSlice = graphql.CoerceList(v) 20576 } 20577 var err error 20578 res := make([][]*OuterInput, len(vSlice)) 20579 for i := range vSlice { 20580 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 20581 res[i], err = ec.unmarshalOOuterInput2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐOuterInput(ctx, vSlice[i]) 20582 if err != nil { 20583 return nil, err 20584 } 20585 } 20586 return res, nil 20587 } 20588 20589 func (ec *executionContext) unmarshalOOuterInput2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐOuterInput(ctx context.Context, v interface{}) ([]*OuterInput, error) { 20590 if v == nil { 20591 return nil, nil 20592 } 20593 var vSlice []interface{} 20594 if v != nil { 20595 vSlice = graphql.CoerceList(v) 20596 } 20597 var err error 20598 res := make([]*OuterInput, len(vSlice)) 20599 for i := range vSlice { 20600 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 20601 res[i], err = ec.unmarshalOOuterInput2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐOuterInput(ctx, vSlice[i]) 20602 if err != nil { 20603 return nil, err 20604 } 20605 } 20606 return res, nil 20607 } 20608 20609 func (ec *executionContext) unmarshalOOuterInput2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐOuterInput(ctx context.Context, v interface{}) (*OuterInput, error) { 20610 if v == nil { 20611 return nil, nil 20612 } 20613 res, err := ec.unmarshalInputOuterInput(ctx, v) 20614 return &res, graphql.ErrorOnPath(ctx, err) 20615 } 20616 20617 func (ec *executionContext) marshalOOuterObject2ᚕᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐOuterObject(ctx context.Context, sel ast.SelectionSet, v [][]*OuterObject) graphql.Marshaler { 20618 if v == nil { 20619 return graphql.Null 20620 } 20621 ret := make(graphql.Array, len(v)) 20622 var wg sync.WaitGroup 20623 isLen1 := len(v) == 1 20624 if !isLen1 { 20625 wg.Add(len(v)) 20626 } 20627 for i := range v { 20628 i := i 20629 fc := &graphql.FieldContext{ 20630 Index: &i, 20631 Result: &v[i], 20632 } 20633 ctx := graphql.WithFieldContext(ctx, fc) 20634 f := func(i int) { 20635 defer func() { 20636 if r := recover(); r != nil { 20637 ec.Error(ctx, ec.Recover(ctx, r)) 20638 ret = nil 20639 } 20640 }() 20641 if !isLen1 { 20642 defer wg.Done() 20643 } 20644 ret[i] = ec.marshalOOuterObject2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐOuterObject(ctx, sel, v[i]) 20645 } 20646 if isLen1 { 20647 f(i) 20648 } else { 20649 go f(i) 20650 } 20651 20652 } 20653 wg.Wait() 20654 20655 return ret 20656 } 20657 20658 func (ec *executionContext) marshalOOuterObject2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐOuterObject(ctx context.Context, sel ast.SelectionSet, v []*OuterObject) graphql.Marshaler { 20659 if v == nil { 20660 return graphql.Null 20661 } 20662 ret := make(graphql.Array, len(v)) 20663 var wg sync.WaitGroup 20664 isLen1 := len(v) == 1 20665 if !isLen1 { 20666 wg.Add(len(v)) 20667 } 20668 for i := range v { 20669 i := i 20670 fc := &graphql.FieldContext{ 20671 Index: &i, 20672 Result: &v[i], 20673 } 20674 ctx := graphql.WithFieldContext(ctx, fc) 20675 f := func(i int) { 20676 defer func() { 20677 if r := recover(); r != nil { 20678 ec.Error(ctx, ec.Recover(ctx, r)) 20679 ret = nil 20680 } 20681 }() 20682 if !isLen1 { 20683 defer wg.Done() 20684 } 20685 ret[i] = ec.marshalOOuterObject2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐOuterObject(ctx, sel, v[i]) 20686 } 20687 if isLen1 { 20688 f(i) 20689 } else { 20690 go f(i) 20691 } 20692 20693 } 20694 wg.Wait() 20695 20696 return ret 20697 } 20698 20699 func (ec *executionContext) marshalOOuterObject2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐOuterObject(ctx context.Context, sel ast.SelectionSet, v *OuterObject) graphql.Marshaler { 20700 if v == nil { 20701 return graphql.Null 20702 } 20703 return ec._OuterObject(ctx, sel, v) 20704 } 20705 20706 func (ec *executionContext) marshalOOverlappingFields2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐOverlappingFields(ctx context.Context, sel ast.SelectionSet, v *OverlappingFields) graphql.Marshaler { 20707 if v == nil { 20708 return graphql.Null 20709 } 20710 return ec._OverlappingFields(ctx, sel, v) 20711 } 20712 20713 func (ec *executionContext) marshalOPanics2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPanics(ctx context.Context, sel ast.SelectionSet, v *Panics) graphql.Marshaler { 20714 if v == nil { 20715 return graphql.Null 20716 } 20717 return ec._Panics(ctx, sel, v) 20718 } 20719 20720 func (ec *executionContext) marshalOPet2ᚕᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPetᚄ(ctx context.Context, sel ast.SelectionSet, v []*Pet) graphql.Marshaler { 20721 if v == nil { 20722 return graphql.Null 20723 } 20724 ret := make(graphql.Array, len(v)) 20725 var wg sync.WaitGroup 20726 isLen1 := len(v) == 1 20727 if !isLen1 { 20728 wg.Add(len(v)) 20729 } 20730 for i := range v { 20731 i := i 20732 fc := &graphql.FieldContext{ 20733 Index: &i, 20734 Result: &v[i], 20735 } 20736 ctx := graphql.WithFieldContext(ctx, fc) 20737 f := func(i int) { 20738 defer func() { 20739 if r := recover(); r != nil { 20740 ec.Error(ctx, ec.Recover(ctx, r)) 20741 ret = nil 20742 } 20743 }() 20744 if !isLen1 { 20745 defer wg.Done() 20746 } 20747 ret[i] = ec.marshalNPet2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPet(ctx, sel, v[i]) 20748 } 20749 if isLen1 { 20750 f(i) 20751 } else { 20752 go f(i) 20753 } 20754 20755 } 20756 wg.Wait() 20757 20758 for _, e := range ret { 20759 if e == graphql.Null { 20760 return graphql.Null 20761 } 20762 } 20763 20764 return ret 20765 } 20766 20767 func (ec *executionContext) marshalOPtrToPtrInner2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx context.Context, sel ast.SelectionSet, v *PtrToPtrInner) graphql.Marshaler { 20768 if v == nil { 20769 return graphql.Null 20770 } 20771 return ec._PtrToPtrInner(ctx, sel, v) 20772 } 20773 20774 func (ec *executionContext) marshalOPtrToPtrInner2ᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx context.Context, sel ast.SelectionSet, v **PtrToPtrInner) graphql.Marshaler { 20775 if v == nil { 20776 return graphql.Null 20777 } 20778 return ec.marshalOPtrToPtrInner2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, sel, *v) 20779 } 20780 20781 func (ec *executionContext) marshalOPtrToPtrInner2ᚖᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx context.Context, sel ast.SelectionSet, v ***PtrToPtrInner) graphql.Marshaler { 20782 if v == nil { 20783 return graphql.Null 20784 } 20785 return ec.marshalOPtrToPtrInner2ᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, sel, *v) 20786 } 20787 20788 func (ec *executionContext) marshalOPtrToPtrInner2ᚖᚖᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx context.Context, sel ast.SelectionSet, v ****PtrToPtrInner) graphql.Marshaler { 20789 if v == nil { 20790 return graphql.Null 20791 } 20792 return ec.marshalOPtrToPtrInner2ᚖᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, sel, *v) 20793 } 20794 20795 func (ec *executionContext) marshalOPtrToPtrInner2ᚖᚖᚖᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx context.Context, sel ast.SelectionSet, v *****PtrToPtrInner) graphql.Marshaler { 20796 if v == nil { 20797 return graphql.Null 20798 } 20799 return ec.marshalOPtrToPtrInner2ᚖᚖᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, sel, *v) 20800 } 20801 20802 func (ec *executionContext) marshalOPtrToPtrInner2ᚖᚖᚖᚖᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx context.Context, sel ast.SelectionSet, v ******PtrToPtrInner) graphql.Marshaler { 20803 if v == nil { 20804 return graphql.Null 20805 } 20806 return ec.marshalOPtrToPtrInner2ᚖᚖᚖᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, sel, *v) 20807 } 20808 20809 func (ec *executionContext) marshalOPtrToPtrInner2ᚖᚖᚖᚖᚖᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx context.Context, sel ast.SelectionSet, v *******PtrToPtrInner) graphql.Marshaler { 20810 if v == nil { 20811 return graphql.Null 20812 } 20813 return ec.marshalOPtrToPtrInner2ᚖᚖᚖᚖᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐPtrToPtrInner(ctx, sel, *v) 20814 } 20815 20816 func (ec *executionContext) unmarshalORecursiveInputSlice2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐRecursiveInputSliceᚄ(ctx context.Context, v interface{}) ([]RecursiveInputSlice, error) { 20817 if v == nil { 20818 return nil, nil 20819 } 20820 var vSlice []interface{} 20821 if v != nil { 20822 vSlice = graphql.CoerceList(v) 20823 } 20824 var err error 20825 res := make([]RecursiveInputSlice, len(vSlice)) 20826 for i := range vSlice { 20827 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 20828 res[i], err = ec.unmarshalNRecursiveInputSlice2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐRecursiveInputSlice(ctx, vSlice[i]) 20829 if err != nil { 20830 return nil, err 20831 } 20832 } 20833 return res, nil 20834 } 20835 20836 func (ec *executionContext) unmarshalORecursiveInputSlice2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐRecursiveInputSlice(ctx context.Context, v interface{}) (*RecursiveInputSlice, error) { 20837 if v == nil { 20838 return nil, nil 20839 } 20840 res, err := ec.unmarshalInputRecursiveInputSlice(ctx, v) 20841 return &res, graphql.ErrorOnPath(ctx, err) 20842 } 20843 20844 func (ec *executionContext) marshalOShape2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐShape(ctx context.Context, sel ast.SelectionSet, v Shape) graphql.Marshaler { 20845 if v == nil { 20846 return graphql.Null 20847 } 20848 return ec._Shape(ctx, sel, v) 20849 } 20850 20851 func (ec *executionContext) marshalOShape2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐShape(ctx context.Context, sel ast.SelectionSet, v []Shape) graphql.Marshaler { 20852 if v == nil { 20853 return graphql.Null 20854 } 20855 ret := make(graphql.Array, len(v)) 20856 var wg sync.WaitGroup 20857 isLen1 := len(v) == 1 20858 if !isLen1 { 20859 wg.Add(len(v)) 20860 } 20861 for i := range v { 20862 i := i 20863 fc := &graphql.FieldContext{ 20864 Index: &i, 20865 Result: &v[i], 20866 } 20867 ctx := graphql.WithFieldContext(ctx, fc) 20868 f := func(i int) { 20869 defer func() { 20870 if r := recover(); r != nil { 20871 ec.Error(ctx, ec.Recover(ctx, r)) 20872 ret = nil 20873 } 20874 }() 20875 if !isLen1 { 20876 defer wg.Done() 20877 } 20878 ret[i] = ec.marshalOShape2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐShape(ctx, sel, v[i]) 20879 } 20880 if isLen1 { 20881 f(i) 20882 } else { 20883 go f(i) 20884 } 20885 20886 } 20887 wg.Wait() 20888 20889 return ret 20890 } 20891 20892 func (ec *executionContext) marshalOSlices2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐSlices(ctx context.Context, sel ast.SelectionSet, v *Slices) graphql.Marshaler { 20893 if v == nil { 20894 return graphql.Null 20895 } 20896 return ec._Slices(ctx, sel, v) 20897 } 20898 20899 func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) { 20900 res, err := graphql.UnmarshalString(v) 20901 return res, graphql.ErrorOnPath(ctx, err) 20902 } 20903 20904 func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 20905 res := graphql.MarshalString(v) 20906 return res 20907 } 20908 20909 func (ec *executionContext) unmarshalOString2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { 20910 if v == nil { 20911 return nil, nil 20912 } 20913 var vSlice []interface{} 20914 if v != nil { 20915 vSlice = graphql.CoerceList(v) 20916 } 20917 var err error 20918 res := make([]string, len(vSlice)) 20919 for i := range vSlice { 20920 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 20921 res[i], err = ec.unmarshalNString2string(ctx, vSlice[i]) 20922 if err != nil { 20923 return nil, err 20924 } 20925 } 20926 return res, nil 20927 } 20928 20929 func (ec *executionContext) marshalOString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { 20930 if v == nil { 20931 return graphql.Null 20932 } 20933 ret := make(graphql.Array, len(v)) 20934 for i := range v { 20935 ret[i] = ec.marshalNString2string(ctx, sel, v[i]) 20936 } 20937 20938 for _, e := range ret { 20939 if e == graphql.Null { 20940 return graphql.Null 20941 } 20942 } 20943 20944 return ret 20945 } 20946 20947 func (ec *executionContext) unmarshalOString2ᚕᚖstring(ctx context.Context, v interface{}) ([]*string, error) { 20948 if v == nil { 20949 return nil, nil 20950 } 20951 var vSlice []interface{} 20952 if v != nil { 20953 vSlice = graphql.CoerceList(v) 20954 } 20955 var err error 20956 res := make([]*string, len(vSlice)) 20957 for i := range vSlice { 20958 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 20959 res[i], err = ec.unmarshalOString2ᚖstring(ctx, vSlice[i]) 20960 if err != nil { 20961 return nil, err 20962 } 20963 } 20964 return res, nil 20965 } 20966 20967 func (ec *executionContext) marshalOString2ᚕᚖstring(ctx context.Context, sel ast.SelectionSet, v []*string) graphql.Marshaler { 20968 if v == nil { 20969 return graphql.Null 20970 } 20971 ret := make(graphql.Array, len(v)) 20972 for i := range v { 20973 ret[i] = ec.marshalOString2ᚖstring(ctx, sel, v[i]) 20974 } 20975 20976 return ret 20977 } 20978 20979 func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { 20980 if v == nil { 20981 return nil, nil 20982 } 20983 res, err := graphql.UnmarshalString(v) 20984 return &res, graphql.ErrorOnPath(ctx, err) 20985 } 20986 20987 func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { 20988 if v == nil { 20989 return graphql.Null 20990 } 20991 res := graphql.MarshalString(*v) 20992 return res 20993 } 20994 20995 func (ec *executionContext) unmarshalOString2ᚖᚕstringᚄ(ctx context.Context, v interface{}) (*[]string, error) { 20996 if v == nil { 20997 return nil, nil 20998 } 20999 res, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) 21000 return &res, graphql.ErrorOnPath(ctx, err) 21001 } 21002 21003 func (ec *executionContext) marshalOString2ᚖᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v *[]string) graphql.Marshaler { 21004 return ec.marshalOString2ᚕstringᚄ(ctx, sel, *v) 21005 } 21006 21007 func (ec *executionContext) marshalOTestUnion2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐTestUnion(ctx context.Context, sel ast.SelectionSet, v TestUnion) graphql.Marshaler { 21008 if v == nil { 21009 return graphql.Null 21010 } 21011 return ec._TestUnion(ctx, sel, v) 21012 } 21013 21014 func (ec *executionContext) unmarshalOThirdParty2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐThirdParty(ctx context.Context, v interface{}) (*ThirdParty, error) { 21015 if v == nil { 21016 return nil, nil 21017 } 21018 res, err := UnmarshalThirdParty(v) 21019 return &res, graphql.ErrorOnPath(ctx, err) 21020 } 21021 21022 func (ec *executionContext) marshalOThirdParty2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐThirdParty(ctx context.Context, sel ast.SelectionSet, v *ThirdParty) graphql.Marshaler { 21023 if v == nil { 21024 return graphql.Null 21025 } 21026 res := MarshalThirdParty(*v) 21027 return res 21028 } 21029 21030 func (ec *executionContext) unmarshalOTime2ᚖtimeᚐTime(ctx context.Context, v interface{}) (*time.Time, error) { 21031 if v == nil { 21032 return nil, nil 21033 } 21034 res, err := graphql.UnmarshalTime(v) 21035 return &res, graphql.ErrorOnPath(ctx, err) 21036 } 21037 21038 func (ec *executionContext) marshalOTime2ᚖtimeᚐTime(ctx context.Context, sel ast.SelectionSet, v *time.Time) graphql.Marshaler { 21039 if v == nil { 21040 return graphql.Null 21041 } 21042 res := graphql.MarshalTime(*v) 21043 return res 21044 } 21045 21046 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (*UpdatePtrToPtrInner, error) { 21047 if v == nil { 21048 return nil, nil 21049 } 21050 res, err := ec.unmarshalInputUpdatePtrToPtrInner(ctx, v) 21051 return &res, graphql.ErrorOnPath(ctx, err) 21052 } 21053 21054 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (**UpdatePtrToPtrInner, error) { 21055 var pres *UpdatePtrToPtrInner 21056 if v != nil { 21057 res, err := ec.unmarshalOUpdatePtrToPtrInner2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 21058 if err != nil { 21059 return nil, graphql.ErrorOnPath(ctx, err) 21060 } 21061 pres = res 21062 } 21063 return &pres, nil 21064 } 21065 21066 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (***UpdatePtrToPtrInner, error) { 21067 var pres **UpdatePtrToPtrInner 21068 if v != nil { 21069 res, err := ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 21070 if err != nil { 21071 return nil, graphql.ErrorOnPath(ctx, err) 21072 } 21073 pres = res 21074 } 21075 return &pres, nil 21076 } 21077 21078 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (****UpdatePtrToPtrInner, error) { 21079 var pres ***UpdatePtrToPtrInner 21080 if v != nil { 21081 res, err := ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 21082 if err != nil { 21083 return nil, graphql.ErrorOnPath(ctx, err) 21084 } 21085 pres = res 21086 } 21087 return &pres, nil 21088 } 21089 21090 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (*****UpdatePtrToPtrInner, error) { 21091 var pres ****UpdatePtrToPtrInner 21092 if v != nil { 21093 res, err := ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 21094 if err != nil { 21095 return nil, graphql.ErrorOnPath(ctx, err) 21096 } 21097 pres = res 21098 } 21099 return &pres, nil 21100 } 21101 21102 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (******UpdatePtrToPtrInner, error) { 21103 var pres *****UpdatePtrToPtrInner 21104 if v != nil { 21105 res, err := ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 21106 if err != nil { 21107 return nil, graphql.ErrorOnPath(ctx, err) 21108 } 21109 pres = res 21110 } 21111 return &pres, nil 21112 } 21113 21114 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (*******UpdatePtrToPtrInner, error) { 21115 var pres ******UpdatePtrToPtrInner 21116 if v != nil { 21117 res, err := ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 21118 if err != nil { 21119 return nil, graphql.ErrorOnPath(ctx, err) 21120 } 21121 pres = res 21122 } 21123 return &pres, nil 21124 } 21125 21126 func (ec *executionContext) unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖᚖᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx context.Context, v interface{}) (********UpdatePtrToPtrInner, error) { 21127 var pres *******UpdatePtrToPtrInner 21128 if v != nil { 21129 res, err := ec.unmarshalOUpdatePtrToPtrInner2ᚖᚖᚖᚖᚖᚖᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐUpdatePtrToPtrInner(ctx, v) 21130 if err != nil { 21131 return nil, graphql.ErrorOnPath(ctx, err) 21132 } 21133 pres = res 21134 } 21135 return &pres, nil 21136 } 21137 21138 func (ec *executionContext) marshalOVOkCaseNil2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐVOkCaseNil(ctx context.Context, sel ast.SelectionSet, v *VOkCaseNil) graphql.Marshaler { 21139 if v == nil { 21140 return graphql.Null 21141 } 21142 return ec._VOkCaseNil(ctx, sel, v) 21143 } 21144 21145 func (ec *executionContext) marshalOVOkCaseValue2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐVOkCaseValue(ctx context.Context, sel ast.SelectionSet, v *VOkCaseValue) graphql.Marshaler { 21146 if v == nil { 21147 return graphql.Null 21148 } 21149 return ec._VOkCaseValue(ctx, sel, v) 21150 } 21151 21152 func (ec *executionContext) unmarshalOValidInput2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐValidInput(ctx context.Context, v interface{}) (*ValidInput, error) { 21153 if v == nil { 21154 return nil, nil 21155 } 21156 res, err := ec.unmarshalInputValidInput(ctx, v) 21157 return &res, graphql.ErrorOnPath(ctx, err) 21158 } 21159 21160 func (ec *executionContext) marshalOValidType2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐValidType(ctx context.Context, sel ast.SelectionSet, v *ValidType) graphql.Marshaler { 21161 if v == nil { 21162 return graphql.Null 21163 } 21164 return ec._ValidType(ctx, sel, v) 21165 } 21166 21167 func (ec *executionContext) marshalOVariadicModel2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚐVariadicModel(ctx context.Context, sel ast.SelectionSet, v *VariadicModel) graphql.Marshaler { 21168 if v == nil { 21169 return graphql.Null 21170 } 21171 return ec._VariadicModel(ctx, sel, v) 21172 } 21173 21174 func (ec *executionContext) unmarshalOWrappedScalar2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚋotherpkgᚐScalar(ctx context.Context, v interface{}) (*otherpkg.Scalar, error) { 21175 if v == nil { 21176 return nil, nil 21177 } 21178 tmp, err := graphql.UnmarshalString(v) 21179 res := otherpkg.Scalar(tmp) 21180 return &res, graphql.ErrorOnPath(ctx, err) 21181 } 21182 21183 func (ec *executionContext) marshalOWrappedScalar2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋcodegenᚋtestserverᚋsinglefileᚋotherpkgᚐScalar(ctx context.Context, sel ast.SelectionSet, v *otherpkg.Scalar) graphql.Marshaler { 21184 if v == nil { 21185 return graphql.Null 21186 } 21187 res := graphql.MarshalString(string(*v)) 21188 return res 21189 } 21190 21191 func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler { 21192 if v == nil { 21193 return graphql.Null 21194 } 21195 ret := make(graphql.Array, len(v)) 21196 var wg sync.WaitGroup 21197 isLen1 := len(v) == 1 21198 if !isLen1 { 21199 wg.Add(len(v)) 21200 } 21201 for i := range v { 21202 i := i 21203 fc := &graphql.FieldContext{ 21204 Index: &i, 21205 Result: &v[i], 21206 } 21207 ctx := graphql.WithFieldContext(ctx, fc) 21208 f := func(i int) { 21209 defer func() { 21210 if r := recover(); r != nil { 21211 ec.Error(ctx, ec.Recover(ctx, r)) 21212 ret = nil 21213 } 21214 }() 21215 if !isLen1 { 21216 defer wg.Done() 21217 } 21218 ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i]) 21219 } 21220 if isLen1 { 21221 f(i) 21222 } else { 21223 go f(i) 21224 } 21225 21226 } 21227 wg.Wait() 21228 21229 for _, e := range ret { 21230 if e == graphql.Null { 21231 return graphql.Null 21232 } 21233 } 21234 21235 return ret 21236 } 21237 21238 func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler { 21239 if v == nil { 21240 return graphql.Null 21241 } 21242 ret := make(graphql.Array, len(v)) 21243 var wg sync.WaitGroup 21244 isLen1 := len(v) == 1 21245 if !isLen1 { 21246 wg.Add(len(v)) 21247 } 21248 for i := range v { 21249 i := i 21250 fc := &graphql.FieldContext{ 21251 Index: &i, 21252 Result: &v[i], 21253 } 21254 ctx := graphql.WithFieldContext(ctx, fc) 21255 f := func(i int) { 21256 defer func() { 21257 if r := recover(); r != nil { 21258 ec.Error(ctx, ec.Recover(ctx, r)) 21259 ret = nil 21260 } 21261 }() 21262 if !isLen1 { 21263 defer wg.Done() 21264 } 21265 ret[i] = ec.marshalN__Field2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i]) 21266 } 21267 if isLen1 { 21268 f(i) 21269 } else { 21270 go f(i) 21271 } 21272 21273 } 21274 wg.Wait() 21275 21276 for _, e := range ret { 21277 if e == graphql.Null { 21278 return graphql.Null 21279 } 21280 } 21281 21282 return ret 21283 } 21284 21285 func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { 21286 if v == nil { 21287 return graphql.Null 21288 } 21289 ret := make(graphql.Array, len(v)) 21290 var wg sync.WaitGroup 21291 isLen1 := len(v) == 1 21292 if !isLen1 { 21293 wg.Add(len(v)) 21294 } 21295 for i := range v { 21296 i := i 21297 fc := &graphql.FieldContext{ 21298 Index: &i, 21299 Result: &v[i], 21300 } 21301 ctx := graphql.WithFieldContext(ctx, fc) 21302 f := func(i int) { 21303 defer func() { 21304 if r := recover(); r != nil { 21305 ec.Error(ctx, ec.Recover(ctx, r)) 21306 ret = nil 21307 } 21308 }() 21309 if !isLen1 { 21310 defer wg.Done() 21311 } 21312 ret[i] = ec.marshalN__InputValue2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) 21313 } 21314 if isLen1 { 21315 f(i) 21316 } else { 21317 go f(i) 21318 } 21319 21320 } 21321 wg.Wait() 21322 21323 for _, e := range ret { 21324 if e == graphql.Null { 21325 return graphql.Null 21326 } 21327 } 21328 21329 return ret 21330 } 21331 21332 func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler { 21333 if v == nil { 21334 return graphql.Null 21335 } 21336 return ec.___Schema(ctx, sel, v) 21337 } 21338 21339 func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { 21340 if v == nil { 21341 return graphql.Null 21342 } 21343 ret := make(graphql.Array, len(v)) 21344 var wg sync.WaitGroup 21345 isLen1 := len(v) == 1 21346 if !isLen1 { 21347 wg.Add(len(v)) 21348 } 21349 for i := range v { 21350 i := i 21351 fc := &graphql.FieldContext{ 21352 Index: &i, 21353 Result: &v[i], 21354 } 21355 ctx := graphql.WithFieldContext(ctx, fc) 21356 f := func(i int) { 21357 defer func() { 21358 if r := recover(); r != nil { 21359 ec.Error(ctx, ec.Recover(ctx, r)) 21360 ret = nil 21361 } 21362 }() 21363 if !isLen1 { 21364 defer wg.Done() 21365 } 21366 ret[i] = ec.marshalN__Type2githubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) 21367 } 21368 if isLen1 { 21369 f(i) 21370 } else { 21371 go f(i) 21372 } 21373 21374 } 21375 wg.Wait() 21376 21377 for _, e := range ret { 21378 if e == graphql.Null { 21379 return graphql.Null 21380 } 21381 } 21382 21383 return ret 21384 } 21385 21386 func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋmstephanoᚋgqlgenᚑschemagenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { 21387 if v == nil { 21388 return graphql.Null 21389 } 21390 return ec.___Type(ctx, sel, v) 21391 } 21392 21393 // endregion ***************************** type.gotpl *****************************