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