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