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