github.com/animeshon/gqlgen@v0.13.1-0.20210304133704-3a770431bb6d/example/scalars/generated.go (about) 1 // Code generated by github.com/99designs/gqlgen, DO NOT EDIT. 2 3 package scalars 4 5 import ( 6 "bytes" 7 "context" 8 "errors" 9 "strconv" 10 "sync" 11 "sync/atomic" 12 "time" 13 14 "github.com/animeshon/gqlgen/example/scalars/external" 15 "github.com/animeshon/gqlgen/example/scalars/model" 16 "github.com/animeshon/gqlgen/graphql" 17 "github.com/animeshon/gqlgen/graphql/introspection" 18 gqlparser "github.com/vektah/gqlparser/v2" 19 "github.com/vektah/gqlparser/v2/ast" 20 ) 21 22 // region ************************** generated!.gotpl ************************** 23 24 // NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface. 25 func NewExecutableSchema(cfg Config) graphql.ExecutableSchema { 26 return &executableSchema{ 27 resolvers: cfg.Resolvers, 28 directives: cfg.Directives, 29 complexity: cfg.Complexity, 30 } 31 } 32 33 type Config struct { 34 Resolvers ResolverRoot 35 Directives DirectiveRoot 36 Complexity ComplexityRoot 37 } 38 39 type ResolverRoot interface { 40 Query() QueryResolver 41 User() UserResolver 42 } 43 44 type DirectiveRoot struct { 45 } 46 47 type ComplexityRoot struct { 48 Address struct { 49 ID func(childComplexity int) int 50 Location func(childComplexity int) int 51 } 52 53 Query struct { 54 Search func(childComplexity int, input *model.SearchArgs) int 55 User func(childComplexity int, id external.ObjectID) int 56 UserByTier func(childComplexity int, tier model.Tier, darkMode *model.Prefs) int 57 } 58 59 User struct { 60 Address func(childComplexity int) int 61 Created func(childComplexity int) int 62 CustomResolver func(childComplexity int) int 63 ID func(childComplexity int) int 64 IsBanned func(childComplexity int) int 65 Modified func(childComplexity int) int 66 Name func(childComplexity int) int 67 PrimitiveResolver func(childComplexity int) int 68 PtrPrefs func(childComplexity int) int 69 Tier func(childComplexity int) int 70 ValPrefs func(childComplexity int) int 71 } 72 } 73 74 type QueryResolver interface { 75 User(ctx context.Context, id external.ObjectID) (*model.User, error) 76 Search(ctx context.Context, input *model.SearchArgs) ([]*model.User, error) 77 UserByTier(ctx context.Context, tier model.Tier, darkMode *model.Prefs) ([]*model.User, error) 78 } 79 type UserResolver interface { 80 PrimitiveResolver(ctx context.Context, obj *model.User) (string, error) 81 CustomResolver(ctx context.Context, obj *model.User) (*model.Point, error) 82 } 83 84 type executableSchema struct { 85 resolvers ResolverRoot 86 directives DirectiveRoot 87 complexity ComplexityRoot 88 } 89 90 func (e *executableSchema) Schema() *ast.Schema { 91 return parsedSchema 92 } 93 94 func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) { 95 ec := executionContext{nil, e} 96 _ = ec 97 switch typeName + "." + field { 98 99 case "Address.id": 100 if e.complexity.Address.ID == nil { 101 break 102 } 103 104 return e.complexity.Address.ID(childComplexity), true 105 106 case "Address.location": 107 if e.complexity.Address.Location == nil { 108 break 109 } 110 111 return e.complexity.Address.Location(childComplexity), true 112 113 case "Query.search": 114 if e.complexity.Query.Search == nil { 115 break 116 } 117 118 args, err := ec.field_Query_search_args(context.TODO(), rawArgs) 119 if err != nil { 120 return 0, false 121 } 122 123 return e.complexity.Query.Search(childComplexity, args["input"].(*model.SearchArgs)), true 124 125 case "Query.user": 126 if e.complexity.Query.User == nil { 127 break 128 } 129 130 args, err := ec.field_Query_user_args(context.TODO(), rawArgs) 131 if err != nil { 132 return 0, false 133 } 134 135 return e.complexity.Query.User(childComplexity, args["id"].(external.ObjectID)), true 136 137 case "Query.userByTier": 138 if e.complexity.Query.UserByTier == nil { 139 break 140 } 141 142 args, err := ec.field_Query_userByTier_args(context.TODO(), rawArgs) 143 if err != nil { 144 return 0, false 145 } 146 147 return e.complexity.Query.UserByTier(childComplexity, args["tier"].(model.Tier), args["darkMode"].(*model.Prefs)), true 148 149 case "User.address": 150 if e.complexity.User.Address == nil { 151 break 152 } 153 154 return e.complexity.User.Address(childComplexity), true 155 156 case "User.created": 157 if e.complexity.User.Created == nil { 158 break 159 } 160 161 return e.complexity.User.Created(childComplexity), true 162 163 case "User.customResolver": 164 if e.complexity.User.CustomResolver == nil { 165 break 166 } 167 168 return e.complexity.User.CustomResolver(childComplexity), true 169 170 case "User.id": 171 if e.complexity.User.ID == nil { 172 break 173 } 174 175 return e.complexity.User.ID(childComplexity), true 176 177 case "User.isBanned": 178 if e.complexity.User.IsBanned == nil { 179 break 180 } 181 182 return e.complexity.User.IsBanned(childComplexity), true 183 184 case "User.modified": 185 if e.complexity.User.Modified == nil { 186 break 187 } 188 189 return e.complexity.User.Modified(childComplexity), true 190 191 case "User.name": 192 if e.complexity.User.Name == nil { 193 break 194 } 195 196 return e.complexity.User.Name(childComplexity), true 197 198 case "User.primitiveResolver": 199 if e.complexity.User.PrimitiveResolver == nil { 200 break 201 } 202 203 return e.complexity.User.PrimitiveResolver(childComplexity), true 204 205 case "User.ptrPrefs": 206 if e.complexity.User.PtrPrefs == nil { 207 break 208 } 209 210 return e.complexity.User.PtrPrefs(childComplexity), true 211 212 case "User.tier": 213 if e.complexity.User.Tier == nil { 214 break 215 } 216 217 return e.complexity.User.Tier(childComplexity), true 218 219 case "User.valPrefs": 220 if e.complexity.User.ValPrefs == nil { 221 break 222 } 223 224 return e.complexity.User.ValPrefs(childComplexity), true 225 226 } 227 return 0, false 228 } 229 230 func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { 231 rc := graphql.GetOperationContext(ctx) 232 ec := executionContext{rc, e} 233 first := true 234 235 switch rc.Operation.Operation { 236 case ast.Query: 237 return func(ctx context.Context) *graphql.Response { 238 if !first { 239 return nil 240 } 241 first = false 242 data := ec._Query(ctx, rc.Operation.SelectionSet) 243 var buf bytes.Buffer 244 data.MarshalGQL(&buf) 245 246 return &graphql.Response{ 247 Data: buf.Bytes(), 248 } 249 } 250 251 default: 252 return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation")) 253 } 254 } 255 256 type executionContext struct { 257 *graphql.OperationContext 258 *executableSchema 259 } 260 261 func (ec *executionContext) introspectSchema() (*introspection.Schema, error) { 262 if ec.DisableIntrospection { 263 return nil, errors.New("introspection disabled") 264 } 265 return introspection.WrapSchema(parsedSchema), nil 266 } 267 268 func (ec *executionContext) introspectType(name string) (*introspection.Type, error) { 269 if ec.DisableIntrospection { 270 return nil, errors.New("introspection disabled") 271 } 272 return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil 273 } 274 275 var sources = []*ast.Source{ 276 {Name: "schema.graphql", Input: `type Query { 277 user(id: ID!): User 278 search(input: SearchArgs = {location: "37,144", isBanned: false}): [User!]! 279 userByTier(tier: Tier!, darkMode: DarkMode!): [User!]! 280 } 281 282 type User { 283 id: ID! 284 name: String! 285 created: Timestamp 286 modified: Timestamp 287 valPrefs: DarkMode 288 ptrPrefs: DarkMode 289 isBanned: Banned! 290 primitiveResolver: String! 291 customResolver: Point! 292 address: Address 293 tier: Tier 294 } 295 296 type Address { 297 id: ID! 298 location: Point 299 } 300 301 input SearchArgs { 302 location: Point 303 createdAfter: Timestamp 304 isBanned: Banned # TODO: This can be a Boolean again once multiple backing types are allowed 305 } 306 307 enum Tier { 308 A 309 B 310 C 311 } 312 313 scalar Timestamp 314 scalar Point 315 scalar Banned 316 scalar DarkMode 317 `, BuiltIn: false}, 318 } 319 var parsedSchema = gqlparser.MustLoadSchema(sources...) 320 321 // endregion ************************** generated!.gotpl ************************** 322 323 // region ***************************** args.gotpl ***************************** 324 325 func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 326 var err error 327 args := map[string]interface{}{} 328 var arg0 string 329 if tmp, ok := rawArgs["name"]; ok { 330 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) 331 arg0, err = ec.unmarshalNString2string(ctx, tmp) 332 if err != nil { 333 return nil, err 334 } 335 } 336 args["name"] = arg0 337 return args, nil 338 } 339 340 func (ec *executionContext) field_Query_search_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 341 var err error 342 args := map[string]interface{}{} 343 var arg0 *model.SearchArgs 344 if tmp, ok := rawArgs["input"]; ok { 345 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) 346 arg0, err = ec.unmarshalOSearchArgs2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐSearchArgs(ctx, tmp) 347 if err != nil { 348 return nil, err 349 } 350 } 351 args["input"] = arg0 352 return args, nil 353 } 354 355 func (ec *executionContext) field_Query_userByTier_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 356 var err error 357 args := map[string]interface{}{} 358 var arg0 model.Tier 359 if tmp, ok := rawArgs["tier"]; ok { 360 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tier")) 361 arg0, err = ec.unmarshalNTier2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐTier(ctx, tmp) 362 if err != nil { 363 return nil, err 364 } 365 } 366 args["tier"] = arg0 367 var arg1 *model.Prefs 368 if tmp, ok := rawArgs["darkMode"]; ok { 369 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("darkMode")) 370 arg1, err = ec.unmarshalNDarkMode2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐPrefs(ctx, tmp) 371 if err != nil { 372 return nil, err 373 } 374 } 375 args["darkMode"] = arg1 376 return args, nil 377 } 378 379 func (ec *executionContext) field_Query_user_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 380 var err error 381 args := map[string]interface{}{} 382 var arg0 external.ObjectID 383 if tmp, ok := rawArgs["id"]; ok { 384 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) 385 arg0, err = ec.unmarshalNID2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋexternalᚐObjectID(ctx, tmp) 386 if err != nil { 387 return nil, err 388 } 389 } 390 args["id"] = arg0 391 return args, nil 392 } 393 394 func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 395 var err error 396 args := map[string]interface{}{} 397 var arg0 bool 398 if tmp, ok := rawArgs["includeDeprecated"]; ok { 399 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) 400 arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) 401 if err != nil { 402 return nil, err 403 } 404 } 405 args["includeDeprecated"] = arg0 406 return args, nil 407 } 408 409 func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 410 var err error 411 args := map[string]interface{}{} 412 var arg0 bool 413 if tmp, ok := rawArgs["includeDeprecated"]; ok { 414 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) 415 arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) 416 if err != nil { 417 return nil, err 418 } 419 } 420 args["includeDeprecated"] = arg0 421 return args, nil 422 } 423 424 // endregion ***************************** args.gotpl ***************************** 425 426 // region ************************** directives.gotpl ************************** 427 428 // endregion ************************** directives.gotpl ************************** 429 430 // region **************************** field.gotpl ***************************** 431 432 func (ec *executionContext) _Address_id(ctx context.Context, field graphql.CollectedField, obj *model.Address) (ret graphql.Marshaler) { 433 defer func() { 434 if r := recover(); r != nil { 435 ec.Error(ctx, ec.Recover(ctx, r)) 436 ret = graphql.Null 437 } 438 }() 439 fc := &graphql.FieldContext{ 440 Object: "Address", 441 Field: field, 442 Args: nil, 443 IsMethod: false, 444 IsResolver: false, 445 } 446 447 ctx = graphql.WithFieldContext(ctx, fc) 448 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 449 ctx = rctx // use context from middleware stack in children 450 return obj.ID, nil 451 }) 452 if err != nil { 453 ec.Error(ctx, err) 454 return graphql.Null 455 } 456 if resTmp == nil { 457 if !graphql.HasFieldError(ctx, fc) { 458 ec.Errorf(ctx, "must not be null") 459 } 460 return graphql.Null 461 } 462 res := resTmp.(external.ObjectID) 463 fc.Result = res 464 return ec.marshalNID2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋexternalᚐObjectID(ctx, field.Selections, res) 465 } 466 467 func (ec *executionContext) _Address_location(ctx context.Context, field graphql.CollectedField, obj *model.Address) (ret graphql.Marshaler) { 468 defer func() { 469 if r := recover(); r != nil { 470 ec.Error(ctx, ec.Recover(ctx, r)) 471 ret = graphql.Null 472 } 473 }() 474 fc := &graphql.FieldContext{ 475 Object: "Address", 476 Field: field, 477 Args: nil, 478 IsMethod: false, 479 IsResolver: false, 480 } 481 482 ctx = graphql.WithFieldContext(ctx, fc) 483 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 484 ctx = rctx // use context from middleware stack in children 485 return obj.Location, nil 486 }) 487 if err != nil { 488 ec.Error(ctx, err) 489 return graphql.Null 490 } 491 if resTmp == nil { 492 return graphql.Null 493 } 494 res := resTmp.(*model.Point) 495 fc.Result = res 496 return ec.marshalOPoint2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐPoint(ctx, field.Selections, res) 497 } 498 499 func (ec *executionContext) _Query_user(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 500 defer func() { 501 if r := recover(); r != nil { 502 ec.Error(ctx, ec.Recover(ctx, r)) 503 ret = graphql.Null 504 } 505 }() 506 fc := &graphql.FieldContext{ 507 Object: "Query", 508 Field: field, 509 Args: nil, 510 IsMethod: true, 511 IsResolver: true, 512 } 513 514 ctx = graphql.WithFieldContext(ctx, fc) 515 rawArgs := field.ArgumentMap(ec.Variables) 516 args, err := ec.field_Query_user_args(ctx, rawArgs) 517 if err != nil { 518 ec.Error(ctx, err) 519 return graphql.Null 520 } 521 fc.Args = args 522 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 523 ctx = rctx // use context from middleware stack in children 524 return ec.resolvers.Query().User(rctx, args["id"].(external.ObjectID)) 525 }) 526 if err != nil { 527 ec.Error(ctx, err) 528 return graphql.Null 529 } 530 if resTmp == nil { 531 return graphql.Null 532 } 533 res := resTmp.(*model.User) 534 fc.Result = res 535 return ec.marshalOUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐUser(ctx, field.Selections, res) 536 } 537 538 func (ec *executionContext) _Query_search(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 539 defer func() { 540 if r := recover(); r != nil { 541 ec.Error(ctx, ec.Recover(ctx, r)) 542 ret = graphql.Null 543 } 544 }() 545 fc := &graphql.FieldContext{ 546 Object: "Query", 547 Field: field, 548 Args: nil, 549 IsMethod: true, 550 IsResolver: true, 551 } 552 553 ctx = graphql.WithFieldContext(ctx, fc) 554 rawArgs := field.ArgumentMap(ec.Variables) 555 args, err := ec.field_Query_search_args(ctx, rawArgs) 556 if err != nil { 557 ec.Error(ctx, err) 558 return graphql.Null 559 } 560 fc.Args = args 561 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 562 ctx = rctx // use context from middleware stack in children 563 return ec.resolvers.Query().Search(rctx, args["input"].(*model.SearchArgs)) 564 }) 565 if err != nil { 566 ec.Error(ctx, err) 567 return graphql.Null 568 } 569 if resTmp == nil { 570 if !graphql.HasFieldError(ctx, fc) { 571 ec.Errorf(ctx, "must not be null") 572 } 573 return graphql.Null 574 } 575 res := resTmp.([]*model.User) 576 fc.Result = res 577 return ec.marshalNUser2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐUserᚄ(ctx, field.Selections, res) 578 } 579 580 func (ec *executionContext) _Query_userByTier(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 581 defer func() { 582 if r := recover(); r != nil { 583 ec.Error(ctx, ec.Recover(ctx, r)) 584 ret = graphql.Null 585 } 586 }() 587 fc := &graphql.FieldContext{ 588 Object: "Query", 589 Field: field, 590 Args: nil, 591 IsMethod: true, 592 IsResolver: true, 593 } 594 595 ctx = graphql.WithFieldContext(ctx, fc) 596 rawArgs := field.ArgumentMap(ec.Variables) 597 args, err := ec.field_Query_userByTier_args(ctx, rawArgs) 598 if err != nil { 599 ec.Error(ctx, err) 600 return graphql.Null 601 } 602 fc.Args = args 603 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 604 ctx = rctx // use context from middleware stack in children 605 return ec.resolvers.Query().UserByTier(rctx, args["tier"].(model.Tier), args["darkMode"].(*model.Prefs)) 606 }) 607 if err != nil { 608 ec.Error(ctx, err) 609 return graphql.Null 610 } 611 if resTmp == nil { 612 if !graphql.HasFieldError(ctx, fc) { 613 ec.Errorf(ctx, "must not be null") 614 } 615 return graphql.Null 616 } 617 res := resTmp.([]*model.User) 618 fc.Result = res 619 return ec.marshalNUser2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐUserᚄ(ctx, field.Selections, res) 620 } 621 622 func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 623 defer func() { 624 if r := recover(); r != nil { 625 ec.Error(ctx, ec.Recover(ctx, r)) 626 ret = graphql.Null 627 } 628 }() 629 fc := &graphql.FieldContext{ 630 Object: "Query", 631 Field: field, 632 Args: nil, 633 IsMethod: true, 634 IsResolver: false, 635 } 636 637 ctx = graphql.WithFieldContext(ctx, fc) 638 rawArgs := field.ArgumentMap(ec.Variables) 639 args, err := ec.field_Query___type_args(ctx, rawArgs) 640 if err != nil { 641 ec.Error(ctx, err) 642 return graphql.Null 643 } 644 fc.Args = args 645 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 646 ctx = rctx // use context from middleware stack in children 647 return ec.introspectType(args["name"].(string)) 648 }) 649 if err != nil { 650 ec.Error(ctx, err) 651 return graphql.Null 652 } 653 if resTmp == nil { 654 return graphql.Null 655 } 656 res := resTmp.(*introspection.Type) 657 fc.Result = res 658 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 659 } 660 661 func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 662 defer func() { 663 if r := recover(); r != nil { 664 ec.Error(ctx, ec.Recover(ctx, r)) 665 ret = graphql.Null 666 } 667 }() 668 fc := &graphql.FieldContext{ 669 Object: "Query", 670 Field: field, 671 Args: nil, 672 IsMethod: true, 673 IsResolver: false, 674 } 675 676 ctx = graphql.WithFieldContext(ctx, fc) 677 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 678 ctx = rctx // use context from middleware stack in children 679 return ec.introspectSchema() 680 }) 681 if err != nil { 682 ec.Error(ctx, err) 683 return graphql.Null 684 } 685 if resTmp == nil { 686 return graphql.Null 687 } 688 res := resTmp.(*introspection.Schema) 689 fc.Result = res 690 return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) 691 } 692 693 func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { 694 defer func() { 695 if r := recover(); r != nil { 696 ec.Error(ctx, ec.Recover(ctx, r)) 697 ret = graphql.Null 698 } 699 }() 700 fc := &graphql.FieldContext{ 701 Object: "User", 702 Field: field, 703 Args: nil, 704 IsMethod: false, 705 IsResolver: false, 706 } 707 708 ctx = graphql.WithFieldContext(ctx, fc) 709 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 710 ctx = rctx // use context from middleware stack in children 711 return obj.ID, nil 712 }) 713 if err != nil { 714 ec.Error(ctx, err) 715 return graphql.Null 716 } 717 if resTmp == nil { 718 if !graphql.HasFieldError(ctx, fc) { 719 ec.Errorf(ctx, "must not be null") 720 } 721 return graphql.Null 722 } 723 res := resTmp.(external.ObjectID) 724 fc.Result = res 725 return ec.marshalNID2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋexternalᚐObjectID(ctx, field.Selections, res) 726 } 727 728 func (ec *executionContext) _User_name(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { 729 defer func() { 730 if r := recover(); r != nil { 731 ec.Error(ctx, ec.Recover(ctx, r)) 732 ret = graphql.Null 733 } 734 }() 735 fc := &graphql.FieldContext{ 736 Object: "User", 737 Field: field, 738 Args: nil, 739 IsMethod: false, 740 IsResolver: false, 741 } 742 743 ctx = graphql.WithFieldContext(ctx, fc) 744 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 745 ctx = rctx // use context from middleware stack in children 746 return obj.Name, nil 747 }) 748 if err != nil { 749 ec.Error(ctx, err) 750 return graphql.Null 751 } 752 if resTmp == nil { 753 if !graphql.HasFieldError(ctx, fc) { 754 ec.Errorf(ctx, "must not be null") 755 } 756 return graphql.Null 757 } 758 res := resTmp.(string) 759 fc.Result = res 760 return ec.marshalNString2string(ctx, field.Selections, res) 761 } 762 763 func (ec *executionContext) _User_created(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { 764 defer func() { 765 if r := recover(); r != nil { 766 ec.Error(ctx, ec.Recover(ctx, r)) 767 ret = graphql.Null 768 } 769 }() 770 fc := &graphql.FieldContext{ 771 Object: "User", 772 Field: field, 773 Args: nil, 774 IsMethod: false, 775 IsResolver: false, 776 } 777 778 ctx = graphql.WithFieldContext(ctx, fc) 779 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 780 ctx = rctx // use context from middleware stack in children 781 return obj.Created, nil 782 }) 783 if err != nil { 784 ec.Error(ctx, err) 785 return graphql.Null 786 } 787 if resTmp == nil { 788 return graphql.Null 789 } 790 res := resTmp.(time.Time) 791 fc.Result = res 792 return ec.marshalOTimestamp2timeᚐTime(ctx, field.Selections, res) 793 } 794 795 func (ec *executionContext) _User_modified(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { 796 defer func() { 797 if r := recover(); r != nil { 798 ec.Error(ctx, ec.Recover(ctx, r)) 799 ret = graphql.Null 800 } 801 }() 802 fc := &graphql.FieldContext{ 803 Object: "User", 804 Field: field, 805 Args: nil, 806 IsMethod: false, 807 IsResolver: false, 808 } 809 810 ctx = graphql.WithFieldContext(ctx, fc) 811 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 812 ctx = rctx // use context from middleware stack in children 813 return obj.Modified, nil 814 }) 815 if err != nil { 816 ec.Error(ctx, err) 817 return graphql.Null 818 } 819 if resTmp == nil { 820 return graphql.Null 821 } 822 res := resTmp.(*time.Time) 823 fc.Result = res 824 return ec.marshalOTimestamp2ᚖtimeᚐTime(ctx, field.Selections, res) 825 } 826 827 func (ec *executionContext) _User_valPrefs(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { 828 defer func() { 829 if r := recover(); r != nil { 830 ec.Error(ctx, ec.Recover(ctx, r)) 831 ret = graphql.Null 832 } 833 }() 834 fc := &graphql.FieldContext{ 835 Object: "User", 836 Field: field, 837 Args: nil, 838 IsMethod: false, 839 IsResolver: false, 840 } 841 842 ctx = graphql.WithFieldContext(ctx, fc) 843 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 844 ctx = rctx // use context from middleware stack in children 845 return obj.ValPrefs, nil 846 }) 847 if err != nil { 848 ec.Error(ctx, err) 849 return graphql.Null 850 } 851 if resTmp == nil { 852 return graphql.Null 853 } 854 res := resTmp.(model.Prefs) 855 fc.Result = res 856 return ec.marshalODarkMode2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐPrefs(ctx, field.Selections, res) 857 } 858 859 func (ec *executionContext) _User_ptrPrefs(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { 860 defer func() { 861 if r := recover(); r != nil { 862 ec.Error(ctx, ec.Recover(ctx, r)) 863 ret = graphql.Null 864 } 865 }() 866 fc := &graphql.FieldContext{ 867 Object: "User", 868 Field: field, 869 Args: nil, 870 IsMethod: false, 871 IsResolver: false, 872 } 873 874 ctx = graphql.WithFieldContext(ctx, fc) 875 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 876 ctx = rctx // use context from middleware stack in children 877 return obj.PtrPrefs, nil 878 }) 879 if err != nil { 880 ec.Error(ctx, err) 881 return graphql.Null 882 } 883 if resTmp == nil { 884 return graphql.Null 885 } 886 res := resTmp.(*model.Prefs) 887 fc.Result = res 888 return ec.marshalODarkMode2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐPrefs(ctx, field.Selections, res) 889 } 890 891 func (ec *executionContext) _User_isBanned(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { 892 defer func() { 893 if r := recover(); r != nil { 894 ec.Error(ctx, ec.Recover(ctx, r)) 895 ret = graphql.Null 896 } 897 }() 898 fc := &graphql.FieldContext{ 899 Object: "User", 900 Field: field, 901 Args: nil, 902 IsMethod: false, 903 IsResolver: false, 904 } 905 906 ctx = graphql.WithFieldContext(ctx, fc) 907 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 908 ctx = rctx // use context from middleware stack in children 909 return obj.IsBanned, nil 910 }) 911 if err != nil { 912 ec.Error(ctx, err) 913 return graphql.Null 914 } 915 if resTmp == nil { 916 if !graphql.HasFieldError(ctx, fc) { 917 ec.Errorf(ctx, "must not be null") 918 } 919 return graphql.Null 920 } 921 res := resTmp.(model.Banned) 922 fc.Result = res 923 return ec.marshalNBanned2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐBanned(ctx, field.Selections, res) 924 } 925 926 func (ec *executionContext) _User_primitiveResolver(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { 927 defer func() { 928 if r := recover(); r != nil { 929 ec.Error(ctx, ec.Recover(ctx, r)) 930 ret = graphql.Null 931 } 932 }() 933 fc := &graphql.FieldContext{ 934 Object: "User", 935 Field: field, 936 Args: nil, 937 IsMethod: true, 938 IsResolver: true, 939 } 940 941 ctx = graphql.WithFieldContext(ctx, fc) 942 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 943 ctx = rctx // use context from middleware stack in children 944 return ec.resolvers.User().PrimitiveResolver(rctx, obj) 945 }) 946 if err != nil { 947 ec.Error(ctx, err) 948 return graphql.Null 949 } 950 if resTmp == nil { 951 if !graphql.HasFieldError(ctx, fc) { 952 ec.Errorf(ctx, "must not be null") 953 } 954 return graphql.Null 955 } 956 res := resTmp.(string) 957 fc.Result = res 958 return ec.marshalNString2string(ctx, field.Selections, res) 959 } 960 961 func (ec *executionContext) _User_customResolver(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { 962 defer func() { 963 if r := recover(); r != nil { 964 ec.Error(ctx, ec.Recover(ctx, r)) 965 ret = graphql.Null 966 } 967 }() 968 fc := &graphql.FieldContext{ 969 Object: "User", 970 Field: field, 971 Args: nil, 972 IsMethod: true, 973 IsResolver: true, 974 } 975 976 ctx = graphql.WithFieldContext(ctx, fc) 977 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 978 ctx = rctx // use context from middleware stack in children 979 return ec.resolvers.User().CustomResolver(rctx, obj) 980 }) 981 if err != nil { 982 ec.Error(ctx, err) 983 return graphql.Null 984 } 985 if resTmp == nil { 986 if !graphql.HasFieldError(ctx, fc) { 987 ec.Errorf(ctx, "must not be null") 988 } 989 return graphql.Null 990 } 991 res := resTmp.(*model.Point) 992 fc.Result = res 993 return ec.marshalNPoint2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐPoint(ctx, field.Selections, res) 994 } 995 996 func (ec *executionContext) _User_address(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { 997 defer func() { 998 if r := recover(); r != nil { 999 ec.Error(ctx, ec.Recover(ctx, r)) 1000 ret = graphql.Null 1001 } 1002 }() 1003 fc := &graphql.FieldContext{ 1004 Object: "User", 1005 Field: field, 1006 Args: nil, 1007 IsMethod: false, 1008 IsResolver: false, 1009 } 1010 1011 ctx = graphql.WithFieldContext(ctx, fc) 1012 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1013 ctx = rctx // use context from middleware stack in children 1014 return obj.Address, nil 1015 }) 1016 if err != nil { 1017 ec.Error(ctx, err) 1018 return graphql.Null 1019 } 1020 if resTmp == nil { 1021 return graphql.Null 1022 } 1023 res := resTmp.(model.Address) 1024 fc.Result = res 1025 return ec.marshalOAddress2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐAddress(ctx, field.Selections, res) 1026 } 1027 1028 func (ec *executionContext) _User_tier(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) { 1029 defer func() { 1030 if r := recover(); r != nil { 1031 ec.Error(ctx, ec.Recover(ctx, r)) 1032 ret = graphql.Null 1033 } 1034 }() 1035 fc := &graphql.FieldContext{ 1036 Object: "User", 1037 Field: field, 1038 Args: nil, 1039 IsMethod: false, 1040 IsResolver: false, 1041 } 1042 1043 ctx = graphql.WithFieldContext(ctx, fc) 1044 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1045 ctx = rctx // use context from middleware stack in children 1046 return obj.Tier, nil 1047 }) 1048 if err != nil { 1049 ec.Error(ctx, err) 1050 return graphql.Null 1051 } 1052 if resTmp == nil { 1053 return graphql.Null 1054 } 1055 res := resTmp.(model.Tier) 1056 fc.Result = res 1057 return ec.marshalOTier2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐTier(ctx, field.Selections, res) 1058 } 1059 1060 func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 1061 defer func() { 1062 if r := recover(); r != nil { 1063 ec.Error(ctx, ec.Recover(ctx, r)) 1064 ret = graphql.Null 1065 } 1066 }() 1067 fc := &graphql.FieldContext{ 1068 Object: "__Directive", 1069 Field: field, 1070 Args: nil, 1071 IsMethod: false, 1072 IsResolver: false, 1073 } 1074 1075 ctx = graphql.WithFieldContext(ctx, fc) 1076 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1077 ctx = rctx // use context from middleware stack in children 1078 return obj.Name, nil 1079 }) 1080 if err != nil { 1081 ec.Error(ctx, err) 1082 return graphql.Null 1083 } 1084 if resTmp == nil { 1085 if !graphql.HasFieldError(ctx, fc) { 1086 ec.Errorf(ctx, "must not be null") 1087 } 1088 return graphql.Null 1089 } 1090 res := resTmp.(string) 1091 fc.Result = res 1092 return ec.marshalNString2string(ctx, field.Selections, res) 1093 } 1094 1095 func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 1096 defer func() { 1097 if r := recover(); r != nil { 1098 ec.Error(ctx, ec.Recover(ctx, r)) 1099 ret = graphql.Null 1100 } 1101 }() 1102 fc := &graphql.FieldContext{ 1103 Object: "__Directive", 1104 Field: field, 1105 Args: nil, 1106 IsMethod: false, 1107 IsResolver: false, 1108 } 1109 1110 ctx = graphql.WithFieldContext(ctx, fc) 1111 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1112 ctx = rctx // use context from middleware stack in children 1113 return obj.Description, nil 1114 }) 1115 if err != nil { 1116 ec.Error(ctx, err) 1117 return graphql.Null 1118 } 1119 if resTmp == nil { 1120 return graphql.Null 1121 } 1122 res := resTmp.(string) 1123 fc.Result = res 1124 return ec.marshalOString2string(ctx, field.Selections, res) 1125 } 1126 1127 func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 1128 defer func() { 1129 if r := recover(); r != nil { 1130 ec.Error(ctx, ec.Recover(ctx, r)) 1131 ret = graphql.Null 1132 } 1133 }() 1134 fc := &graphql.FieldContext{ 1135 Object: "__Directive", 1136 Field: field, 1137 Args: nil, 1138 IsMethod: false, 1139 IsResolver: false, 1140 } 1141 1142 ctx = graphql.WithFieldContext(ctx, fc) 1143 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1144 ctx = rctx // use context from middleware stack in children 1145 return obj.Locations, nil 1146 }) 1147 if err != nil { 1148 ec.Error(ctx, err) 1149 return graphql.Null 1150 } 1151 if resTmp == nil { 1152 if !graphql.HasFieldError(ctx, fc) { 1153 ec.Errorf(ctx, "must not be null") 1154 } 1155 return graphql.Null 1156 } 1157 res := resTmp.([]string) 1158 fc.Result = res 1159 return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) 1160 } 1161 1162 func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 1163 defer func() { 1164 if r := recover(); r != nil { 1165 ec.Error(ctx, ec.Recover(ctx, r)) 1166 ret = graphql.Null 1167 } 1168 }() 1169 fc := &graphql.FieldContext{ 1170 Object: "__Directive", 1171 Field: field, 1172 Args: nil, 1173 IsMethod: false, 1174 IsResolver: false, 1175 } 1176 1177 ctx = graphql.WithFieldContext(ctx, fc) 1178 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1179 ctx = rctx // use context from middleware stack in children 1180 return obj.Args, nil 1181 }) 1182 if err != nil { 1183 ec.Error(ctx, err) 1184 return graphql.Null 1185 } 1186 if resTmp == nil { 1187 if !graphql.HasFieldError(ctx, fc) { 1188 ec.Errorf(ctx, "must not be null") 1189 } 1190 return graphql.Null 1191 } 1192 res := resTmp.([]introspection.InputValue) 1193 fc.Result = res 1194 return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 1195 } 1196 1197 func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 1198 defer func() { 1199 if r := recover(); r != nil { 1200 ec.Error(ctx, ec.Recover(ctx, r)) 1201 ret = graphql.Null 1202 } 1203 }() 1204 fc := &graphql.FieldContext{ 1205 Object: "__EnumValue", 1206 Field: field, 1207 Args: nil, 1208 IsMethod: false, 1209 IsResolver: false, 1210 } 1211 1212 ctx = graphql.WithFieldContext(ctx, fc) 1213 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1214 ctx = rctx // use context from middleware stack in children 1215 return obj.Name, nil 1216 }) 1217 if err != nil { 1218 ec.Error(ctx, err) 1219 return graphql.Null 1220 } 1221 if resTmp == nil { 1222 if !graphql.HasFieldError(ctx, fc) { 1223 ec.Errorf(ctx, "must not be null") 1224 } 1225 return graphql.Null 1226 } 1227 res := resTmp.(string) 1228 fc.Result = res 1229 return ec.marshalNString2string(ctx, field.Selections, res) 1230 } 1231 1232 func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 1233 defer func() { 1234 if r := recover(); r != nil { 1235 ec.Error(ctx, ec.Recover(ctx, r)) 1236 ret = graphql.Null 1237 } 1238 }() 1239 fc := &graphql.FieldContext{ 1240 Object: "__EnumValue", 1241 Field: field, 1242 Args: nil, 1243 IsMethod: false, 1244 IsResolver: false, 1245 } 1246 1247 ctx = graphql.WithFieldContext(ctx, fc) 1248 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1249 ctx = rctx // use context from middleware stack in children 1250 return obj.Description, nil 1251 }) 1252 if err != nil { 1253 ec.Error(ctx, err) 1254 return graphql.Null 1255 } 1256 if resTmp == nil { 1257 return graphql.Null 1258 } 1259 res := resTmp.(string) 1260 fc.Result = res 1261 return ec.marshalOString2string(ctx, field.Selections, res) 1262 } 1263 1264 func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 1265 defer func() { 1266 if r := recover(); r != nil { 1267 ec.Error(ctx, ec.Recover(ctx, r)) 1268 ret = graphql.Null 1269 } 1270 }() 1271 fc := &graphql.FieldContext{ 1272 Object: "__EnumValue", 1273 Field: field, 1274 Args: nil, 1275 IsMethod: true, 1276 IsResolver: false, 1277 } 1278 1279 ctx = graphql.WithFieldContext(ctx, fc) 1280 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1281 ctx = rctx // use context from middleware stack in children 1282 return obj.IsDeprecated(), nil 1283 }) 1284 if err != nil { 1285 ec.Error(ctx, err) 1286 return graphql.Null 1287 } 1288 if resTmp == nil { 1289 if !graphql.HasFieldError(ctx, fc) { 1290 ec.Errorf(ctx, "must not be null") 1291 } 1292 return graphql.Null 1293 } 1294 res := resTmp.(bool) 1295 fc.Result = res 1296 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 1297 } 1298 1299 func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 1300 defer func() { 1301 if r := recover(); r != nil { 1302 ec.Error(ctx, ec.Recover(ctx, r)) 1303 ret = graphql.Null 1304 } 1305 }() 1306 fc := &graphql.FieldContext{ 1307 Object: "__EnumValue", 1308 Field: field, 1309 Args: nil, 1310 IsMethod: true, 1311 IsResolver: false, 1312 } 1313 1314 ctx = graphql.WithFieldContext(ctx, fc) 1315 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1316 ctx = rctx // use context from middleware stack in children 1317 return obj.DeprecationReason(), nil 1318 }) 1319 if err != nil { 1320 ec.Error(ctx, err) 1321 return graphql.Null 1322 } 1323 if resTmp == nil { 1324 return graphql.Null 1325 } 1326 res := resTmp.(*string) 1327 fc.Result = res 1328 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 1329 } 1330 1331 func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 1332 defer func() { 1333 if r := recover(); r != nil { 1334 ec.Error(ctx, ec.Recover(ctx, r)) 1335 ret = graphql.Null 1336 } 1337 }() 1338 fc := &graphql.FieldContext{ 1339 Object: "__Field", 1340 Field: field, 1341 Args: nil, 1342 IsMethod: false, 1343 IsResolver: false, 1344 } 1345 1346 ctx = graphql.WithFieldContext(ctx, fc) 1347 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1348 ctx = rctx // use context from middleware stack in children 1349 return obj.Name, nil 1350 }) 1351 if err != nil { 1352 ec.Error(ctx, err) 1353 return graphql.Null 1354 } 1355 if resTmp == nil { 1356 if !graphql.HasFieldError(ctx, fc) { 1357 ec.Errorf(ctx, "must not be null") 1358 } 1359 return graphql.Null 1360 } 1361 res := resTmp.(string) 1362 fc.Result = res 1363 return ec.marshalNString2string(ctx, field.Selections, res) 1364 } 1365 1366 func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 1367 defer func() { 1368 if r := recover(); r != nil { 1369 ec.Error(ctx, ec.Recover(ctx, r)) 1370 ret = graphql.Null 1371 } 1372 }() 1373 fc := &graphql.FieldContext{ 1374 Object: "__Field", 1375 Field: field, 1376 Args: nil, 1377 IsMethod: false, 1378 IsResolver: false, 1379 } 1380 1381 ctx = graphql.WithFieldContext(ctx, fc) 1382 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1383 ctx = rctx // use context from middleware stack in children 1384 return obj.Description, nil 1385 }) 1386 if err != nil { 1387 ec.Error(ctx, err) 1388 return graphql.Null 1389 } 1390 if resTmp == nil { 1391 return graphql.Null 1392 } 1393 res := resTmp.(string) 1394 fc.Result = res 1395 return ec.marshalOString2string(ctx, field.Selections, res) 1396 } 1397 1398 func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 1399 defer func() { 1400 if r := recover(); r != nil { 1401 ec.Error(ctx, ec.Recover(ctx, r)) 1402 ret = graphql.Null 1403 } 1404 }() 1405 fc := &graphql.FieldContext{ 1406 Object: "__Field", 1407 Field: field, 1408 Args: nil, 1409 IsMethod: false, 1410 IsResolver: false, 1411 } 1412 1413 ctx = graphql.WithFieldContext(ctx, fc) 1414 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1415 ctx = rctx // use context from middleware stack in children 1416 return obj.Args, nil 1417 }) 1418 if err != nil { 1419 ec.Error(ctx, err) 1420 return graphql.Null 1421 } 1422 if resTmp == nil { 1423 if !graphql.HasFieldError(ctx, fc) { 1424 ec.Errorf(ctx, "must not be null") 1425 } 1426 return graphql.Null 1427 } 1428 res := resTmp.([]introspection.InputValue) 1429 fc.Result = res 1430 return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 1431 } 1432 1433 func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 1434 defer func() { 1435 if r := recover(); r != nil { 1436 ec.Error(ctx, ec.Recover(ctx, r)) 1437 ret = graphql.Null 1438 } 1439 }() 1440 fc := &graphql.FieldContext{ 1441 Object: "__Field", 1442 Field: field, 1443 Args: nil, 1444 IsMethod: false, 1445 IsResolver: false, 1446 } 1447 1448 ctx = graphql.WithFieldContext(ctx, fc) 1449 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1450 ctx = rctx // use context from middleware stack in children 1451 return obj.Type, nil 1452 }) 1453 if err != nil { 1454 ec.Error(ctx, err) 1455 return graphql.Null 1456 } 1457 if resTmp == nil { 1458 if !graphql.HasFieldError(ctx, fc) { 1459 ec.Errorf(ctx, "must not be null") 1460 } 1461 return graphql.Null 1462 } 1463 res := resTmp.(*introspection.Type) 1464 fc.Result = res 1465 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 1466 } 1467 1468 func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 1469 defer func() { 1470 if r := recover(); r != nil { 1471 ec.Error(ctx, ec.Recover(ctx, r)) 1472 ret = graphql.Null 1473 } 1474 }() 1475 fc := &graphql.FieldContext{ 1476 Object: "__Field", 1477 Field: field, 1478 Args: nil, 1479 IsMethod: true, 1480 IsResolver: false, 1481 } 1482 1483 ctx = graphql.WithFieldContext(ctx, fc) 1484 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1485 ctx = rctx // use context from middleware stack in children 1486 return obj.IsDeprecated(), nil 1487 }) 1488 if err != nil { 1489 ec.Error(ctx, err) 1490 return graphql.Null 1491 } 1492 if resTmp == nil { 1493 if !graphql.HasFieldError(ctx, fc) { 1494 ec.Errorf(ctx, "must not be null") 1495 } 1496 return graphql.Null 1497 } 1498 res := resTmp.(bool) 1499 fc.Result = res 1500 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 1501 } 1502 1503 func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 1504 defer func() { 1505 if r := recover(); r != nil { 1506 ec.Error(ctx, ec.Recover(ctx, r)) 1507 ret = graphql.Null 1508 } 1509 }() 1510 fc := &graphql.FieldContext{ 1511 Object: "__Field", 1512 Field: field, 1513 Args: nil, 1514 IsMethod: true, 1515 IsResolver: false, 1516 } 1517 1518 ctx = graphql.WithFieldContext(ctx, fc) 1519 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1520 ctx = rctx // use context from middleware stack in children 1521 return obj.DeprecationReason(), nil 1522 }) 1523 if err != nil { 1524 ec.Error(ctx, err) 1525 return graphql.Null 1526 } 1527 if resTmp == nil { 1528 return graphql.Null 1529 } 1530 res := resTmp.(*string) 1531 fc.Result = res 1532 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 1533 } 1534 1535 func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 1536 defer func() { 1537 if r := recover(); r != nil { 1538 ec.Error(ctx, ec.Recover(ctx, r)) 1539 ret = graphql.Null 1540 } 1541 }() 1542 fc := &graphql.FieldContext{ 1543 Object: "__InputValue", 1544 Field: field, 1545 Args: nil, 1546 IsMethod: false, 1547 IsResolver: false, 1548 } 1549 1550 ctx = graphql.WithFieldContext(ctx, fc) 1551 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1552 ctx = rctx // use context from middleware stack in children 1553 return obj.Name, nil 1554 }) 1555 if err != nil { 1556 ec.Error(ctx, err) 1557 return graphql.Null 1558 } 1559 if resTmp == nil { 1560 if !graphql.HasFieldError(ctx, fc) { 1561 ec.Errorf(ctx, "must not be null") 1562 } 1563 return graphql.Null 1564 } 1565 res := resTmp.(string) 1566 fc.Result = res 1567 return ec.marshalNString2string(ctx, field.Selections, res) 1568 } 1569 1570 func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 1571 defer func() { 1572 if r := recover(); r != nil { 1573 ec.Error(ctx, ec.Recover(ctx, r)) 1574 ret = graphql.Null 1575 } 1576 }() 1577 fc := &graphql.FieldContext{ 1578 Object: "__InputValue", 1579 Field: field, 1580 Args: nil, 1581 IsMethod: false, 1582 IsResolver: false, 1583 } 1584 1585 ctx = graphql.WithFieldContext(ctx, fc) 1586 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1587 ctx = rctx // use context from middleware stack in children 1588 return obj.Description, nil 1589 }) 1590 if err != nil { 1591 ec.Error(ctx, err) 1592 return graphql.Null 1593 } 1594 if resTmp == nil { 1595 return graphql.Null 1596 } 1597 res := resTmp.(string) 1598 fc.Result = res 1599 return ec.marshalOString2string(ctx, field.Selections, res) 1600 } 1601 1602 func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 1603 defer func() { 1604 if r := recover(); r != nil { 1605 ec.Error(ctx, ec.Recover(ctx, r)) 1606 ret = graphql.Null 1607 } 1608 }() 1609 fc := &graphql.FieldContext{ 1610 Object: "__InputValue", 1611 Field: field, 1612 Args: nil, 1613 IsMethod: false, 1614 IsResolver: false, 1615 } 1616 1617 ctx = graphql.WithFieldContext(ctx, fc) 1618 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1619 ctx = rctx // use context from middleware stack in children 1620 return obj.Type, nil 1621 }) 1622 if err != nil { 1623 ec.Error(ctx, err) 1624 return graphql.Null 1625 } 1626 if resTmp == nil { 1627 if !graphql.HasFieldError(ctx, fc) { 1628 ec.Errorf(ctx, "must not be null") 1629 } 1630 return graphql.Null 1631 } 1632 res := resTmp.(*introspection.Type) 1633 fc.Result = res 1634 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 1635 } 1636 1637 func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 1638 defer func() { 1639 if r := recover(); r != nil { 1640 ec.Error(ctx, ec.Recover(ctx, r)) 1641 ret = graphql.Null 1642 } 1643 }() 1644 fc := &graphql.FieldContext{ 1645 Object: "__InputValue", 1646 Field: field, 1647 Args: nil, 1648 IsMethod: false, 1649 IsResolver: false, 1650 } 1651 1652 ctx = graphql.WithFieldContext(ctx, fc) 1653 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1654 ctx = rctx // use context from middleware stack in children 1655 return obj.DefaultValue, nil 1656 }) 1657 if err != nil { 1658 ec.Error(ctx, err) 1659 return graphql.Null 1660 } 1661 if resTmp == nil { 1662 return graphql.Null 1663 } 1664 res := resTmp.(*string) 1665 fc.Result = res 1666 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 1667 } 1668 1669 func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 1670 defer func() { 1671 if r := recover(); r != nil { 1672 ec.Error(ctx, ec.Recover(ctx, r)) 1673 ret = graphql.Null 1674 } 1675 }() 1676 fc := &graphql.FieldContext{ 1677 Object: "__Schema", 1678 Field: field, 1679 Args: nil, 1680 IsMethod: true, 1681 IsResolver: false, 1682 } 1683 1684 ctx = graphql.WithFieldContext(ctx, fc) 1685 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1686 ctx = rctx // use context from middleware stack in children 1687 return obj.Types(), nil 1688 }) 1689 if err != nil { 1690 ec.Error(ctx, err) 1691 return graphql.Null 1692 } 1693 if resTmp == nil { 1694 if !graphql.HasFieldError(ctx, fc) { 1695 ec.Errorf(ctx, "must not be null") 1696 } 1697 return graphql.Null 1698 } 1699 res := resTmp.([]introspection.Type) 1700 fc.Result = res 1701 return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 1702 } 1703 1704 func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 1705 defer func() { 1706 if r := recover(); r != nil { 1707 ec.Error(ctx, ec.Recover(ctx, r)) 1708 ret = graphql.Null 1709 } 1710 }() 1711 fc := &graphql.FieldContext{ 1712 Object: "__Schema", 1713 Field: field, 1714 Args: nil, 1715 IsMethod: true, 1716 IsResolver: false, 1717 } 1718 1719 ctx = graphql.WithFieldContext(ctx, fc) 1720 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1721 ctx = rctx // use context from middleware stack in children 1722 return obj.QueryType(), nil 1723 }) 1724 if err != nil { 1725 ec.Error(ctx, err) 1726 return graphql.Null 1727 } 1728 if resTmp == nil { 1729 if !graphql.HasFieldError(ctx, fc) { 1730 ec.Errorf(ctx, "must not be null") 1731 } 1732 return graphql.Null 1733 } 1734 res := resTmp.(*introspection.Type) 1735 fc.Result = res 1736 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 1737 } 1738 1739 func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 1740 defer func() { 1741 if r := recover(); r != nil { 1742 ec.Error(ctx, ec.Recover(ctx, r)) 1743 ret = graphql.Null 1744 } 1745 }() 1746 fc := &graphql.FieldContext{ 1747 Object: "__Schema", 1748 Field: field, 1749 Args: nil, 1750 IsMethod: true, 1751 IsResolver: false, 1752 } 1753 1754 ctx = graphql.WithFieldContext(ctx, fc) 1755 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1756 ctx = rctx // use context from middleware stack in children 1757 return obj.MutationType(), nil 1758 }) 1759 if err != nil { 1760 ec.Error(ctx, err) 1761 return graphql.Null 1762 } 1763 if resTmp == nil { 1764 return graphql.Null 1765 } 1766 res := resTmp.(*introspection.Type) 1767 fc.Result = res 1768 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 1769 } 1770 1771 func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 1772 defer func() { 1773 if r := recover(); r != nil { 1774 ec.Error(ctx, ec.Recover(ctx, r)) 1775 ret = graphql.Null 1776 } 1777 }() 1778 fc := &graphql.FieldContext{ 1779 Object: "__Schema", 1780 Field: field, 1781 Args: nil, 1782 IsMethod: true, 1783 IsResolver: false, 1784 } 1785 1786 ctx = graphql.WithFieldContext(ctx, fc) 1787 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1788 ctx = rctx // use context from middleware stack in children 1789 return obj.SubscriptionType(), nil 1790 }) 1791 if err != nil { 1792 ec.Error(ctx, err) 1793 return graphql.Null 1794 } 1795 if resTmp == nil { 1796 return graphql.Null 1797 } 1798 res := resTmp.(*introspection.Type) 1799 fc.Result = res 1800 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 1801 } 1802 1803 func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 1804 defer func() { 1805 if r := recover(); r != nil { 1806 ec.Error(ctx, ec.Recover(ctx, r)) 1807 ret = graphql.Null 1808 } 1809 }() 1810 fc := &graphql.FieldContext{ 1811 Object: "__Schema", 1812 Field: field, 1813 Args: nil, 1814 IsMethod: true, 1815 IsResolver: false, 1816 } 1817 1818 ctx = graphql.WithFieldContext(ctx, fc) 1819 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1820 ctx = rctx // use context from middleware stack in children 1821 return obj.Directives(), nil 1822 }) 1823 if err != nil { 1824 ec.Error(ctx, err) 1825 return graphql.Null 1826 } 1827 if resTmp == nil { 1828 if !graphql.HasFieldError(ctx, fc) { 1829 ec.Errorf(ctx, "must not be null") 1830 } 1831 return graphql.Null 1832 } 1833 res := resTmp.([]introspection.Directive) 1834 fc.Result = res 1835 return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) 1836 } 1837 1838 func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 1839 defer func() { 1840 if r := recover(); r != nil { 1841 ec.Error(ctx, ec.Recover(ctx, r)) 1842 ret = graphql.Null 1843 } 1844 }() 1845 fc := &graphql.FieldContext{ 1846 Object: "__Type", 1847 Field: field, 1848 Args: nil, 1849 IsMethod: true, 1850 IsResolver: false, 1851 } 1852 1853 ctx = graphql.WithFieldContext(ctx, fc) 1854 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1855 ctx = rctx // use context from middleware stack in children 1856 return obj.Kind(), nil 1857 }) 1858 if err != nil { 1859 ec.Error(ctx, err) 1860 return graphql.Null 1861 } 1862 if resTmp == nil { 1863 if !graphql.HasFieldError(ctx, fc) { 1864 ec.Errorf(ctx, "must not be null") 1865 } 1866 return graphql.Null 1867 } 1868 res := resTmp.(string) 1869 fc.Result = res 1870 return ec.marshalN__TypeKind2string(ctx, field.Selections, res) 1871 } 1872 1873 func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 1874 defer func() { 1875 if r := recover(); r != nil { 1876 ec.Error(ctx, ec.Recover(ctx, r)) 1877 ret = graphql.Null 1878 } 1879 }() 1880 fc := &graphql.FieldContext{ 1881 Object: "__Type", 1882 Field: field, 1883 Args: nil, 1884 IsMethod: true, 1885 IsResolver: false, 1886 } 1887 1888 ctx = graphql.WithFieldContext(ctx, fc) 1889 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1890 ctx = rctx // use context from middleware stack in children 1891 return obj.Name(), nil 1892 }) 1893 if err != nil { 1894 ec.Error(ctx, err) 1895 return graphql.Null 1896 } 1897 if resTmp == nil { 1898 return graphql.Null 1899 } 1900 res := resTmp.(*string) 1901 fc.Result = res 1902 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 1903 } 1904 1905 func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 1906 defer func() { 1907 if r := recover(); r != nil { 1908 ec.Error(ctx, ec.Recover(ctx, r)) 1909 ret = graphql.Null 1910 } 1911 }() 1912 fc := &graphql.FieldContext{ 1913 Object: "__Type", 1914 Field: field, 1915 Args: nil, 1916 IsMethod: true, 1917 IsResolver: false, 1918 } 1919 1920 ctx = graphql.WithFieldContext(ctx, fc) 1921 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1922 ctx = rctx // use context from middleware stack in children 1923 return obj.Description(), nil 1924 }) 1925 if err != nil { 1926 ec.Error(ctx, err) 1927 return graphql.Null 1928 } 1929 if resTmp == nil { 1930 return graphql.Null 1931 } 1932 res := resTmp.(string) 1933 fc.Result = res 1934 return ec.marshalOString2string(ctx, field.Selections, res) 1935 } 1936 1937 func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 1938 defer func() { 1939 if r := recover(); r != nil { 1940 ec.Error(ctx, ec.Recover(ctx, r)) 1941 ret = graphql.Null 1942 } 1943 }() 1944 fc := &graphql.FieldContext{ 1945 Object: "__Type", 1946 Field: field, 1947 Args: nil, 1948 IsMethod: true, 1949 IsResolver: false, 1950 } 1951 1952 ctx = graphql.WithFieldContext(ctx, fc) 1953 rawArgs := field.ArgumentMap(ec.Variables) 1954 args, err := ec.field___Type_fields_args(ctx, rawArgs) 1955 if err != nil { 1956 ec.Error(ctx, err) 1957 return graphql.Null 1958 } 1959 fc.Args = args 1960 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1961 ctx = rctx // use context from middleware stack in children 1962 return obj.Fields(args["includeDeprecated"].(bool)), nil 1963 }) 1964 if err != nil { 1965 ec.Error(ctx, err) 1966 return graphql.Null 1967 } 1968 if resTmp == nil { 1969 return graphql.Null 1970 } 1971 res := resTmp.([]introspection.Field) 1972 fc.Result = res 1973 return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) 1974 } 1975 1976 func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 1977 defer func() { 1978 if r := recover(); r != nil { 1979 ec.Error(ctx, ec.Recover(ctx, r)) 1980 ret = graphql.Null 1981 } 1982 }() 1983 fc := &graphql.FieldContext{ 1984 Object: "__Type", 1985 Field: field, 1986 Args: nil, 1987 IsMethod: true, 1988 IsResolver: false, 1989 } 1990 1991 ctx = graphql.WithFieldContext(ctx, fc) 1992 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1993 ctx = rctx // use context from middleware stack in children 1994 return obj.Interfaces(), nil 1995 }) 1996 if err != nil { 1997 ec.Error(ctx, err) 1998 return graphql.Null 1999 } 2000 if resTmp == nil { 2001 return graphql.Null 2002 } 2003 res := resTmp.([]introspection.Type) 2004 fc.Result = res 2005 return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 2006 } 2007 2008 func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2009 defer func() { 2010 if r := recover(); r != nil { 2011 ec.Error(ctx, ec.Recover(ctx, r)) 2012 ret = graphql.Null 2013 } 2014 }() 2015 fc := &graphql.FieldContext{ 2016 Object: "__Type", 2017 Field: field, 2018 Args: nil, 2019 IsMethod: true, 2020 IsResolver: false, 2021 } 2022 2023 ctx = graphql.WithFieldContext(ctx, fc) 2024 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2025 ctx = rctx // use context from middleware stack in children 2026 return obj.PossibleTypes(), nil 2027 }) 2028 if err != nil { 2029 ec.Error(ctx, err) 2030 return graphql.Null 2031 } 2032 if resTmp == nil { 2033 return graphql.Null 2034 } 2035 res := resTmp.([]introspection.Type) 2036 fc.Result = res 2037 return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 2038 } 2039 2040 func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2041 defer func() { 2042 if r := recover(); r != nil { 2043 ec.Error(ctx, ec.Recover(ctx, r)) 2044 ret = graphql.Null 2045 } 2046 }() 2047 fc := &graphql.FieldContext{ 2048 Object: "__Type", 2049 Field: field, 2050 Args: nil, 2051 IsMethod: true, 2052 IsResolver: false, 2053 } 2054 2055 ctx = graphql.WithFieldContext(ctx, fc) 2056 rawArgs := field.ArgumentMap(ec.Variables) 2057 args, err := ec.field___Type_enumValues_args(ctx, rawArgs) 2058 if err != nil { 2059 ec.Error(ctx, err) 2060 return graphql.Null 2061 } 2062 fc.Args = args 2063 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2064 ctx = rctx // use context from middleware stack in children 2065 return obj.EnumValues(args["includeDeprecated"].(bool)), nil 2066 }) 2067 if err != nil { 2068 ec.Error(ctx, err) 2069 return graphql.Null 2070 } 2071 if resTmp == nil { 2072 return graphql.Null 2073 } 2074 res := resTmp.([]introspection.EnumValue) 2075 fc.Result = res 2076 return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) 2077 } 2078 2079 func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2080 defer func() { 2081 if r := recover(); r != nil { 2082 ec.Error(ctx, ec.Recover(ctx, r)) 2083 ret = graphql.Null 2084 } 2085 }() 2086 fc := &graphql.FieldContext{ 2087 Object: "__Type", 2088 Field: field, 2089 Args: nil, 2090 IsMethod: true, 2091 IsResolver: false, 2092 } 2093 2094 ctx = graphql.WithFieldContext(ctx, fc) 2095 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2096 ctx = rctx // use context from middleware stack in children 2097 return obj.InputFields(), nil 2098 }) 2099 if err != nil { 2100 ec.Error(ctx, err) 2101 return graphql.Null 2102 } 2103 if resTmp == nil { 2104 return graphql.Null 2105 } 2106 res := resTmp.([]introspection.InputValue) 2107 fc.Result = res 2108 return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 2109 } 2110 2111 func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2112 defer func() { 2113 if r := recover(); r != nil { 2114 ec.Error(ctx, ec.Recover(ctx, r)) 2115 ret = graphql.Null 2116 } 2117 }() 2118 fc := &graphql.FieldContext{ 2119 Object: "__Type", 2120 Field: field, 2121 Args: nil, 2122 IsMethod: true, 2123 IsResolver: false, 2124 } 2125 2126 ctx = graphql.WithFieldContext(ctx, fc) 2127 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2128 ctx = rctx // use context from middleware stack in children 2129 return obj.OfType(), nil 2130 }) 2131 if err != nil { 2132 ec.Error(ctx, err) 2133 return graphql.Null 2134 } 2135 if resTmp == nil { 2136 return graphql.Null 2137 } 2138 res := resTmp.(*introspection.Type) 2139 fc.Result = res 2140 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 2141 } 2142 2143 // endregion **************************** field.gotpl ***************************** 2144 2145 // region **************************** input.gotpl ***************************** 2146 2147 func (ec *executionContext) unmarshalInputSearchArgs(ctx context.Context, obj interface{}) (model.SearchArgs, error) { 2148 var it model.SearchArgs 2149 var asMap = obj.(map[string]interface{}) 2150 2151 for k, v := range asMap { 2152 switch k { 2153 case "location": 2154 var err error 2155 2156 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("location")) 2157 it.Location, err = ec.unmarshalOPoint2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐPoint(ctx, v) 2158 if err != nil { 2159 return it, err 2160 } 2161 case "createdAfter": 2162 var err error 2163 2164 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("createdAfter")) 2165 it.CreatedAfter, err = ec.unmarshalOTimestamp2ᚖtimeᚐTime(ctx, v) 2166 if err != nil { 2167 return it, err 2168 } 2169 case "isBanned": 2170 var err error 2171 2172 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("isBanned")) 2173 it.IsBanned, err = ec.unmarshalOBanned2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐBanned(ctx, v) 2174 if err != nil { 2175 return it, err 2176 } 2177 } 2178 } 2179 2180 return it, nil 2181 } 2182 2183 // endregion **************************** input.gotpl ***************************** 2184 2185 // region ************************** interface.gotpl *************************** 2186 2187 // endregion ************************** interface.gotpl *************************** 2188 2189 // region **************************** object.gotpl **************************** 2190 2191 var addressImplementors = []string{"Address"} 2192 2193 func (ec *executionContext) _Address(ctx context.Context, sel ast.SelectionSet, obj *model.Address) graphql.Marshaler { 2194 fields := graphql.CollectFields(ec.OperationContext, sel, addressImplementors) 2195 2196 out := graphql.NewFieldSet(fields) 2197 var invalids uint32 2198 for i, field := range fields { 2199 switch field.Name { 2200 case "__typename": 2201 out.Values[i] = graphql.MarshalString("Address") 2202 case "id": 2203 out.Values[i] = ec._Address_id(ctx, field, obj) 2204 if out.Values[i] == graphql.Null { 2205 invalids++ 2206 } 2207 case "location": 2208 out.Values[i] = ec._Address_location(ctx, field, obj) 2209 default: 2210 panic("unknown field " + strconv.Quote(field.Name)) 2211 } 2212 } 2213 out.Dispatch() 2214 if invalids > 0 { 2215 return graphql.Null 2216 } 2217 return out 2218 } 2219 2220 var queryImplementors = []string{"Query"} 2221 2222 func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { 2223 fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) 2224 2225 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ 2226 Object: "Query", 2227 }) 2228 2229 out := graphql.NewFieldSet(fields) 2230 var invalids uint32 2231 for i, field := range fields { 2232 switch field.Name { 2233 case "__typename": 2234 out.Values[i] = graphql.MarshalString("Query") 2235 case "user": 2236 field := field 2237 out.Concurrently(i, func() (res graphql.Marshaler) { 2238 defer func() { 2239 if r := recover(); r != nil { 2240 ec.Error(ctx, ec.Recover(ctx, r)) 2241 } 2242 }() 2243 res = ec._Query_user(ctx, field) 2244 return res 2245 }) 2246 case "search": 2247 field := field 2248 out.Concurrently(i, func() (res graphql.Marshaler) { 2249 defer func() { 2250 if r := recover(); r != nil { 2251 ec.Error(ctx, ec.Recover(ctx, r)) 2252 } 2253 }() 2254 res = ec._Query_search(ctx, field) 2255 if res == graphql.Null { 2256 atomic.AddUint32(&invalids, 1) 2257 } 2258 return res 2259 }) 2260 case "userByTier": 2261 field := field 2262 out.Concurrently(i, func() (res graphql.Marshaler) { 2263 defer func() { 2264 if r := recover(); r != nil { 2265 ec.Error(ctx, ec.Recover(ctx, r)) 2266 } 2267 }() 2268 res = ec._Query_userByTier(ctx, field) 2269 if res == graphql.Null { 2270 atomic.AddUint32(&invalids, 1) 2271 } 2272 return res 2273 }) 2274 case "__type": 2275 out.Values[i] = ec._Query___type(ctx, field) 2276 case "__schema": 2277 out.Values[i] = ec._Query___schema(ctx, field) 2278 default: 2279 panic("unknown field " + strconv.Quote(field.Name)) 2280 } 2281 } 2282 out.Dispatch() 2283 if invalids > 0 { 2284 return graphql.Null 2285 } 2286 return out 2287 } 2288 2289 var userImplementors = []string{"User"} 2290 2291 func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj *model.User) graphql.Marshaler { 2292 fields := graphql.CollectFields(ec.OperationContext, sel, userImplementors) 2293 2294 out := graphql.NewFieldSet(fields) 2295 var invalids uint32 2296 for i, field := range fields { 2297 switch field.Name { 2298 case "__typename": 2299 out.Values[i] = graphql.MarshalString("User") 2300 case "id": 2301 out.Values[i] = ec._User_id(ctx, field, obj) 2302 if out.Values[i] == graphql.Null { 2303 atomic.AddUint32(&invalids, 1) 2304 } 2305 case "name": 2306 out.Values[i] = ec._User_name(ctx, field, obj) 2307 if out.Values[i] == graphql.Null { 2308 atomic.AddUint32(&invalids, 1) 2309 } 2310 case "created": 2311 out.Values[i] = ec._User_created(ctx, field, obj) 2312 case "modified": 2313 out.Values[i] = ec._User_modified(ctx, field, obj) 2314 case "valPrefs": 2315 out.Values[i] = ec._User_valPrefs(ctx, field, obj) 2316 case "ptrPrefs": 2317 out.Values[i] = ec._User_ptrPrefs(ctx, field, obj) 2318 case "isBanned": 2319 out.Values[i] = ec._User_isBanned(ctx, field, obj) 2320 if out.Values[i] == graphql.Null { 2321 atomic.AddUint32(&invalids, 1) 2322 } 2323 case "primitiveResolver": 2324 field := field 2325 out.Concurrently(i, func() (res graphql.Marshaler) { 2326 defer func() { 2327 if r := recover(); r != nil { 2328 ec.Error(ctx, ec.Recover(ctx, r)) 2329 } 2330 }() 2331 res = ec._User_primitiveResolver(ctx, field, obj) 2332 if res == graphql.Null { 2333 atomic.AddUint32(&invalids, 1) 2334 } 2335 return res 2336 }) 2337 case "customResolver": 2338 field := field 2339 out.Concurrently(i, func() (res graphql.Marshaler) { 2340 defer func() { 2341 if r := recover(); r != nil { 2342 ec.Error(ctx, ec.Recover(ctx, r)) 2343 } 2344 }() 2345 res = ec._User_customResolver(ctx, field, obj) 2346 if res == graphql.Null { 2347 atomic.AddUint32(&invalids, 1) 2348 } 2349 return res 2350 }) 2351 case "address": 2352 out.Values[i] = ec._User_address(ctx, field, obj) 2353 case "tier": 2354 out.Values[i] = ec._User_tier(ctx, field, obj) 2355 default: 2356 panic("unknown field " + strconv.Quote(field.Name)) 2357 } 2358 } 2359 out.Dispatch() 2360 if invalids > 0 { 2361 return graphql.Null 2362 } 2363 return out 2364 } 2365 2366 var __DirectiveImplementors = []string{"__Directive"} 2367 2368 func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { 2369 fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) 2370 2371 out := graphql.NewFieldSet(fields) 2372 var invalids uint32 2373 for i, field := range fields { 2374 switch field.Name { 2375 case "__typename": 2376 out.Values[i] = graphql.MarshalString("__Directive") 2377 case "name": 2378 out.Values[i] = ec.___Directive_name(ctx, field, obj) 2379 if out.Values[i] == graphql.Null { 2380 invalids++ 2381 } 2382 case "description": 2383 out.Values[i] = ec.___Directive_description(ctx, field, obj) 2384 case "locations": 2385 out.Values[i] = ec.___Directive_locations(ctx, field, obj) 2386 if out.Values[i] == graphql.Null { 2387 invalids++ 2388 } 2389 case "args": 2390 out.Values[i] = ec.___Directive_args(ctx, field, obj) 2391 if out.Values[i] == graphql.Null { 2392 invalids++ 2393 } 2394 default: 2395 panic("unknown field " + strconv.Quote(field.Name)) 2396 } 2397 } 2398 out.Dispatch() 2399 if invalids > 0 { 2400 return graphql.Null 2401 } 2402 return out 2403 } 2404 2405 var __EnumValueImplementors = []string{"__EnumValue"} 2406 2407 func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { 2408 fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) 2409 2410 out := graphql.NewFieldSet(fields) 2411 var invalids uint32 2412 for i, field := range fields { 2413 switch field.Name { 2414 case "__typename": 2415 out.Values[i] = graphql.MarshalString("__EnumValue") 2416 case "name": 2417 out.Values[i] = ec.___EnumValue_name(ctx, field, obj) 2418 if out.Values[i] == graphql.Null { 2419 invalids++ 2420 } 2421 case "description": 2422 out.Values[i] = ec.___EnumValue_description(ctx, field, obj) 2423 case "isDeprecated": 2424 out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj) 2425 if out.Values[i] == graphql.Null { 2426 invalids++ 2427 } 2428 case "deprecationReason": 2429 out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj) 2430 default: 2431 panic("unknown field " + strconv.Quote(field.Name)) 2432 } 2433 } 2434 out.Dispatch() 2435 if invalids > 0 { 2436 return graphql.Null 2437 } 2438 return out 2439 } 2440 2441 var __FieldImplementors = []string{"__Field"} 2442 2443 func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { 2444 fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) 2445 2446 out := graphql.NewFieldSet(fields) 2447 var invalids uint32 2448 for i, field := range fields { 2449 switch field.Name { 2450 case "__typename": 2451 out.Values[i] = graphql.MarshalString("__Field") 2452 case "name": 2453 out.Values[i] = ec.___Field_name(ctx, field, obj) 2454 if out.Values[i] == graphql.Null { 2455 invalids++ 2456 } 2457 case "description": 2458 out.Values[i] = ec.___Field_description(ctx, field, obj) 2459 case "args": 2460 out.Values[i] = ec.___Field_args(ctx, field, obj) 2461 if out.Values[i] == graphql.Null { 2462 invalids++ 2463 } 2464 case "type": 2465 out.Values[i] = ec.___Field_type(ctx, field, obj) 2466 if out.Values[i] == graphql.Null { 2467 invalids++ 2468 } 2469 case "isDeprecated": 2470 out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj) 2471 if out.Values[i] == graphql.Null { 2472 invalids++ 2473 } 2474 case "deprecationReason": 2475 out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj) 2476 default: 2477 panic("unknown field " + strconv.Quote(field.Name)) 2478 } 2479 } 2480 out.Dispatch() 2481 if invalids > 0 { 2482 return graphql.Null 2483 } 2484 return out 2485 } 2486 2487 var __InputValueImplementors = []string{"__InputValue"} 2488 2489 func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { 2490 fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) 2491 2492 out := graphql.NewFieldSet(fields) 2493 var invalids uint32 2494 for i, field := range fields { 2495 switch field.Name { 2496 case "__typename": 2497 out.Values[i] = graphql.MarshalString("__InputValue") 2498 case "name": 2499 out.Values[i] = ec.___InputValue_name(ctx, field, obj) 2500 if out.Values[i] == graphql.Null { 2501 invalids++ 2502 } 2503 case "description": 2504 out.Values[i] = ec.___InputValue_description(ctx, field, obj) 2505 case "type": 2506 out.Values[i] = ec.___InputValue_type(ctx, field, obj) 2507 if out.Values[i] == graphql.Null { 2508 invalids++ 2509 } 2510 case "defaultValue": 2511 out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj) 2512 default: 2513 panic("unknown field " + strconv.Quote(field.Name)) 2514 } 2515 } 2516 out.Dispatch() 2517 if invalids > 0 { 2518 return graphql.Null 2519 } 2520 return out 2521 } 2522 2523 var __SchemaImplementors = []string{"__Schema"} 2524 2525 func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { 2526 fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) 2527 2528 out := graphql.NewFieldSet(fields) 2529 var invalids uint32 2530 for i, field := range fields { 2531 switch field.Name { 2532 case "__typename": 2533 out.Values[i] = graphql.MarshalString("__Schema") 2534 case "types": 2535 out.Values[i] = ec.___Schema_types(ctx, field, obj) 2536 if out.Values[i] == graphql.Null { 2537 invalids++ 2538 } 2539 case "queryType": 2540 out.Values[i] = ec.___Schema_queryType(ctx, field, obj) 2541 if out.Values[i] == graphql.Null { 2542 invalids++ 2543 } 2544 case "mutationType": 2545 out.Values[i] = ec.___Schema_mutationType(ctx, field, obj) 2546 case "subscriptionType": 2547 out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj) 2548 case "directives": 2549 out.Values[i] = ec.___Schema_directives(ctx, field, obj) 2550 if out.Values[i] == graphql.Null { 2551 invalids++ 2552 } 2553 default: 2554 panic("unknown field " + strconv.Quote(field.Name)) 2555 } 2556 } 2557 out.Dispatch() 2558 if invalids > 0 { 2559 return graphql.Null 2560 } 2561 return out 2562 } 2563 2564 var __TypeImplementors = []string{"__Type"} 2565 2566 func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { 2567 fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) 2568 2569 out := graphql.NewFieldSet(fields) 2570 var invalids uint32 2571 for i, field := range fields { 2572 switch field.Name { 2573 case "__typename": 2574 out.Values[i] = graphql.MarshalString("__Type") 2575 case "kind": 2576 out.Values[i] = ec.___Type_kind(ctx, field, obj) 2577 if out.Values[i] == graphql.Null { 2578 invalids++ 2579 } 2580 case "name": 2581 out.Values[i] = ec.___Type_name(ctx, field, obj) 2582 case "description": 2583 out.Values[i] = ec.___Type_description(ctx, field, obj) 2584 case "fields": 2585 out.Values[i] = ec.___Type_fields(ctx, field, obj) 2586 case "interfaces": 2587 out.Values[i] = ec.___Type_interfaces(ctx, field, obj) 2588 case "possibleTypes": 2589 out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj) 2590 case "enumValues": 2591 out.Values[i] = ec.___Type_enumValues(ctx, field, obj) 2592 case "inputFields": 2593 out.Values[i] = ec.___Type_inputFields(ctx, field, obj) 2594 case "ofType": 2595 out.Values[i] = ec.___Type_ofType(ctx, field, obj) 2596 default: 2597 panic("unknown field " + strconv.Quote(field.Name)) 2598 } 2599 } 2600 out.Dispatch() 2601 if invalids > 0 { 2602 return graphql.Null 2603 } 2604 return out 2605 } 2606 2607 // endregion **************************** object.gotpl **************************** 2608 2609 // region ***************************** type.gotpl ***************************** 2610 2611 func (ec *executionContext) unmarshalNBanned2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐBanned(ctx context.Context, v interface{}) (model.Banned, error) { 2612 var res model.Banned 2613 err := res.UnmarshalGQL(v) 2614 return res, graphql.ErrorOnPath(ctx, err) 2615 } 2616 2617 func (ec *executionContext) marshalNBanned2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐBanned(ctx context.Context, sel ast.SelectionSet, v model.Banned) graphql.Marshaler { 2618 return v 2619 } 2620 2621 func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) { 2622 res, err := graphql.UnmarshalBoolean(v) 2623 return res, graphql.ErrorOnPath(ctx, err) 2624 } 2625 2626 func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { 2627 res := graphql.MarshalBoolean(v) 2628 if res == graphql.Null { 2629 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 2630 ec.Errorf(ctx, "must not be null") 2631 } 2632 } 2633 return res 2634 } 2635 2636 func (ec *executionContext) unmarshalNDarkMode2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐPrefs(ctx context.Context, v interface{}) (*model.Prefs, error) { 2637 res, err := model.UnmarshalPreferences(v) 2638 return res, graphql.ErrorOnPath(ctx, err) 2639 } 2640 2641 func (ec *executionContext) marshalNDarkMode2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐPrefs(ctx context.Context, sel ast.SelectionSet, v *model.Prefs) graphql.Marshaler { 2642 if v == nil { 2643 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 2644 ec.Errorf(ctx, "must not be null") 2645 } 2646 return graphql.Null 2647 } 2648 res := model.MarshalPreferences(v) 2649 if res == graphql.Null { 2650 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 2651 ec.Errorf(ctx, "must not be null") 2652 } 2653 } 2654 return res 2655 } 2656 2657 func (ec *executionContext) unmarshalNID2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋexternalᚐObjectID(ctx context.Context, v interface{}) (external.ObjectID, error) { 2658 res, err := model.UnmarshalID(v) 2659 return res, graphql.ErrorOnPath(ctx, err) 2660 } 2661 2662 func (ec *executionContext) marshalNID2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋexternalᚐObjectID(ctx context.Context, sel ast.SelectionSet, v external.ObjectID) graphql.Marshaler { 2663 res := model.MarshalID(v) 2664 if res == graphql.Null { 2665 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 2666 ec.Errorf(ctx, "must not be null") 2667 } 2668 } 2669 return res 2670 } 2671 2672 func (ec *executionContext) unmarshalNPoint2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐPoint(ctx context.Context, v interface{}) (model.Point, error) { 2673 var res model.Point 2674 err := res.UnmarshalGQL(v) 2675 return res, graphql.ErrorOnPath(ctx, err) 2676 } 2677 2678 func (ec *executionContext) marshalNPoint2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐPoint(ctx context.Context, sel ast.SelectionSet, v model.Point) graphql.Marshaler { 2679 return v 2680 } 2681 2682 func (ec *executionContext) unmarshalNPoint2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐPoint(ctx context.Context, v interface{}) (*model.Point, error) { 2683 var res = new(model.Point) 2684 err := res.UnmarshalGQL(v) 2685 return res, graphql.ErrorOnPath(ctx, err) 2686 } 2687 2688 func (ec *executionContext) marshalNPoint2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐPoint(ctx context.Context, sel ast.SelectionSet, v *model.Point) graphql.Marshaler { 2689 if v == nil { 2690 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 2691 ec.Errorf(ctx, "must not be null") 2692 } 2693 return graphql.Null 2694 } 2695 return v 2696 } 2697 2698 func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) { 2699 res, err := graphql.UnmarshalString(v) 2700 return res, graphql.ErrorOnPath(ctx, err) 2701 } 2702 2703 func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 2704 res := graphql.MarshalString(v) 2705 if res == graphql.Null { 2706 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 2707 ec.Errorf(ctx, "must not be null") 2708 } 2709 } 2710 return res 2711 } 2712 2713 func (ec *executionContext) unmarshalNTier2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐTier(ctx context.Context, v interface{}) (model.Tier, error) { 2714 var res model.Tier 2715 err := res.UnmarshalGQL(v) 2716 return res, graphql.ErrorOnPath(ctx, err) 2717 } 2718 2719 func (ec *executionContext) marshalNTier2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐTier(ctx context.Context, sel ast.SelectionSet, v model.Tier) graphql.Marshaler { 2720 return v 2721 } 2722 2723 func (ec *executionContext) marshalNUser2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐUserᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.User) graphql.Marshaler { 2724 ret := make(graphql.Array, len(v)) 2725 var wg sync.WaitGroup 2726 isLen1 := len(v) == 1 2727 if !isLen1 { 2728 wg.Add(len(v)) 2729 } 2730 for i := range v { 2731 i := i 2732 fc := &graphql.FieldContext{ 2733 Index: &i, 2734 Result: &v[i], 2735 } 2736 ctx := graphql.WithFieldContext(ctx, fc) 2737 f := func(i int) { 2738 defer func() { 2739 if r := recover(); r != nil { 2740 ec.Error(ctx, ec.Recover(ctx, r)) 2741 ret = nil 2742 } 2743 }() 2744 if !isLen1 { 2745 defer wg.Done() 2746 } 2747 ret[i] = ec.marshalNUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐUser(ctx, sel, v[i]) 2748 } 2749 if isLen1 { 2750 f(i) 2751 } else { 2752 go f(i) 2753 } 2754 2755 } 2756 wg.Wait() 2757 return ret 2758 } 2759 2760 func (ec *executionContext) marshalNUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v *model.User) graphql.Marshaler { 2761 if v == nil { 2762 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 2763 ec.Errorf(ctx, "must not be null") 2764 } 2765 return graphql.Null 2766 } 2767 return ec._User(ctx, sel, v) 2768 } 2769 2770 func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler { 2771 return ec.___Directive(ctx, sel, &v) 2772 } 2773 2774 func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler { 2775 ret := make(graphql.Array, len(v)) 2776 var wg sync.WaitGroup 2777 isLen1 := len(v) == 1 2778 if !isLen1 { 2779 wg.Add(len(v)) 2780 } 2781 for i := range v { 2782 i := i 2783 fc := &graphql.FieldContext{ 2784 Index: &i, 2785 Result: &v[i], 2786 } 2787 ctx := graphql.WithFieldContext(ctx, fc) 2788 f := func(i int) { 2789 defer func() { 2790 if r := recover(); r != nil { 2791 ec.Error(ctx, ec.Recover(ctx, r)) 2792 ret = nil 2793 } 2794 }() 2795 if !isLen1 { 2796 defer wg.Done() 2797 } 2798 ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i]) 2799 } 2800 if isLen1 { 2801 f(i) 2802 } else { 2803 go f(i) 2804 } 2805 2806 } 2807 wg.Wait() 2808 return ret 2809 } 2810 2811 func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) { 2812 res, err := graphql.UnmarshalString(v) 2813 return res, graphql.ErrorOnPath(ctx, err) 2814 } 2815 2816 func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 2817 res := graphql.MarshalString(v) 2818 if res == graphql.Null { 2819 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 2820 ec.Errorf(ctx, "must not be null") 2821 } 2822 } 2823 return res 2824 } 2825 2826 func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { 2827 var vSlice []interface{} 2828 if v != nil { 2829 if tmp1, ok := v.([]interface{}); ok { 2830 vSlice = tmp1 2831 } else { 2832 vSlice = []interface{}{v} 2833 } 2834 } 2835 var err error 2836 res := make([]string, len(vSlice)) 2837 for i := range vSlice { 2838 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 2839 res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i]) 2840 if err != nil { 2841 return nil, err 2842 } 2843 } 2844 return res, nil 2845 } 2846 2847 func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { 2848 ret := make(graphql.Array, len(v)) 2849 var wg sync.WaitGroup 2850 isLen1 := len(v) == 1 2851 if !isLen1 { 2852 wg.Add(len(v)) 2853 } 2854 for i := range v { 2855 i := i 2856 fc := &graphql.FieldContext{ 2857 Index: &i, 2858 Result: &v[i], 2859 } 2860 ctx := graphql.WithFieldContext(ctx, fc) 2861 f := func(i int) { 2862 defer func() { 2863 if r := recover(); r != nil { 2864 ec.Error(ctx, ec.Recover(ctx, r)) 2865 ret = nil 2866 } 2867 }() 2868 if !isLen1 { 2869 defer wg.Done() 2870 } 2871 ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i]) 2872 } 2873 if isLen1 { 2874 f(i) 2875 } else { 2876 go f(i) 2877 } 2878 2879 } 2880 wg.Wait() 2881 return ret 2882 } 2883 2884 func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler { 2885 return ec.___EnumValue(ctx, sel, &v) 2886 } 2887 2888 func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler { 2889 return ec.___Field(ctx, sel, &v) 2890 } 2891 2892 func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler { 2893 return ec.___InputValue(ctx, sel, &v) 2894 } 2895 2896 func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { 2897 ret := make(graphql.Array, len(v)) 2898 var wg sync.WaitGroup 2899 isLen1 := len(v) == 1 2900 if !isLen1 { 2901 wg.Add(len(v)) 2902 } 2903 for i := range v { 2904 i := i 2905 fc := &graphql.FieldContext{ 2906 Index: &i, 2907 Result: &v[i], 2908 } 2909 ctx := graphql.WithFieldContext(ctx, fc) 2910 f := func(i int) { 2911 defer func() { 2912 if r := recover(); r != nil { 2913 ec.Error(ctx, ec.Recover(ctx, r)) 2914 ret = nil 2915 } 2916 }() 2917 if !isLen1 { 2918 defer wg.Done() 2919 } 2920 ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) 2921 } 2922 if isLen1 { 2923 f(i) 2924 } else { 2925 go f(i) 2926 } 2927 2928 } 2929 wg.Wait() 2930 return ret 2931 } 2932 2933 func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { 2934 return ec.___Type(ctx, sel, &v) 2935 } 2936 2937 func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { 2938 ret := make(graphql.Array, len(v)) 2939 var wg sync.WaitGroup 2940 isLen1 := len(v) == 1 2941 if !isLen1 { 2942 wg.Add(len(v)) 2943 } 2944 for i := range v { 2945 i := i 2946 fc := &graphql.FieldContext{ 2947 Index: &i, 2948 Result: &v[i], 2949 } 2950 ctx := graphql.WithFieldContext(ctx, fc) 2951 f := func(i int) { 2952 defer func() { 2953 if r := recover(); r != nil { 2954 ec.Error(ctx, ec.Recover(ctx, r)) 2955 ret = nil 2956 } 2957 }() 2958 if !isLen1 { 2959 defer wg.Done() 2960 } 2961 ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) 2962 } 2963 if isLen1 { 2964 f(i) 2965 } else { 2966 go f(i) 2967 } 2968 2969 } 2970 wg.Wait() 2971 return ret 2972 } 2973 2974 func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { 2975 if v == nil { 2976 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 2977 ec.Errorf(ctx, "must not be null") 2978 } 2979 return graphql.Null 2980 } 2981 return ec.___Type(ctx, sel, v) 2982 } 2983 2984 func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) { 2985 res, err := graphql.UnmarshalString(v) 2986 return res, graphql.ErrorOnPath(ctx, err) 2987 } 2988 2989 func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 2990 res := graphql.MarshalString(v) 2991 if res == graphql.Null { 2992 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 2993 ec.Errorf(ctx, "must not be null") 2994 } 2995 } 2996 return res 2997 } 2998 2999 func (ec *executionContext) marshalOAddress2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐAddress(ctx context.Context, sel ast.SelectionSet, v model.Address) graphql.Marshaler { 3000 return ec._Address(ctx, sel, &v) 3001 } 3002 3003 func (ec *executionContext) unmarshalOBanned2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐBanned(ctx context.Context, v interface{}) (model.Banned, error) { 3004 var res model.Banned 3005 err := res.UnmarshalGQL(v) 3006 return res, graphql.ErrorOnPath(ctx, err) 3007 } 3008 3009 func (ec *executionContext) marshalOBanned2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐBanned(ctx context.Context, sel ast.SelectionSet, v model.Banned) graphql.Marshaler { 3010 return v 3011 } 3012 3013 func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) { 3014 res, err := graphql.UnmarshalBoolean(v) 3015 return res, graphql.ErrorOnPath(ctx, err) 3016 } 3017 3018 func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { 3019 return graphql.MarshalBoolean(v) 3020 } 3021 3022 func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) { 3023 if v == nil { 3024 return nil, nil 3025 } 3026 res, err := graphql.UnmarshalBoolean(v) 3027 return &res, graphql.ErrorOnPath(ctx, err) 3028 } 3029 3030 func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler { 3031 if v == nil { 3032 return graphql.Null 3033 } 3034 return graphql.MarshalBoolean(*v) 3035 } 3036 3037 func (ec *executionContext) unmarshalODarkMode2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐPrefs(ctx context.Context, v interface{}) (model.Prefs, error) { 3038 res, err := model.UnmarshalPreferences(v) 3039 return *res, graphql.ErrorOnPath(ctx, err) 3040 } 3041 3042 func (ec *executionContext) marshalODarkMode2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐPrefs(ctx context.Context, sel ast.SelectionSet, v model.Prefs) graphql.Marshaler { 3043 return model.MarshalPreferences(&v) 3044 } 3045 3046 func (ec *executionContext) unmarshalODarkMode2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐPrefs(ctx context.Context, v interface{}) (*model.Prefs, error) { 3047 if v == nil { 3048 return nil, nil 3049 } 3050 res, err := model.UnmarshalPreferences(v) 3051 return res, graphql.ErrorOnPath(ctx, err) 3052 } 3053 3054 func (ec *executionContext) marshalODarkMode2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐPrefs(ctx context.Context, sel ast.SelectionSet, v *model.Prefs) graphql.Marshaler { 3055 if v == nil { 3056 return graphql.Null 3057 } 3058 return model.MarshalPreferences(v) 3059 } 3060 3061 func (ec *executionContext) unmarshalOPoint2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐPoint(ctx context.Context, v interface{}) (*model.Point, error) { 3062 if v == nil { 3063 return nil, nil 3064 } 3065 var res = new(model.Point) 3066 err := res.UnmarshalGQL(v) 3067 return res, graphql.ErrorOnPath(ctx, err) 3068 } 3069 3070 func (ec *executionContext) marshalOPoint2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐPoint(ctx context.Context, sel ast.SelectionSet, v *model.Point) graphql.Marshaler { 3071 if v == nil { 3072 return graphql.Null 3073 } 3074 return v 3075 } 3076 3077 func (ec *executionContext) unmarshalOSearchArgs2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐSearchArgs(ctx context.Context, v interface{}) (*model.SearchArgs, error) { 3078 if v == nil { 3079 return nil, nil 3080 } 3081 res, err := ec.unmarshalInputSearchArgs(ctx, v) 3082 return &res, graphql.ErrorOnPath(ctx, err) 3083 } 3084 3085 func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) { 3086 res, err := graphql.UnmarshalString(v) 3087 return res, graphql.ErrorOnPath(ctx, err) 3088 } 3089 3090 func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 3091 return graphql.MarshalString(v) 3092 } 3093 3094 func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { 3095 if v == nil { 3096 return nil, nil 3097 } 3098 res, err := graphql.UnmarshalString(v) 3099 return &res, graphql.ErrorOnPath(ctx, err) 3100 } 3101 3102 func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { 3103 if v == nil { 3104 return graphql.Null 3105 } 3106 return graphql.MarshalString(*v) 3107 } 3108 3109 func (ec *executionContext) unmarshalOTier2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐTier(ctx context.Context, v interface{}) (model.Tier, error) { 3110 var res model.Tier 3111 err := res.UnmarshalGQL(v) 3112 return res, graphql.ErrorOnPath(ctx, err) 3113 } 3114 3115 func (ec *executionContext) marshalOTier2githubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐTier(ctx context.Context, sel ast.SelectionSet, v model.Tier) graphql.Marshaler { 3116 return v 3117 } 3118 3119 func (ec *executionContext) unmarshalOTimestamp2timeᚐTime(ctx context.Context, v interface{}) (time.Time, error) { 3120 res, err := model.UnmarshalTimestamp(v) 3121 return res, graphql.ErrorOnPath(ctx, err) 3122 } 3123 3124 func (ec *executionContext) marshalOTimestamp2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler { 3125 return model.MarshalTimestamp(v) 3126 } 3127 3128 func (ec *executionContext) unmarshalOTimestamp2ᚖtimeᚐTime(ctx context.Context, v interface{}) (*time.Time, error) { 3129 if v == nil { 3130 return nil, nil 3131 } 3132 res, err := model.UnmarshalTimestamp(v) 3133 return &res, graphql.ErrorOnPath(ctx, err) 3134 } 3135 3136 func (ec *executionContext) marshalOTimestamp2ᚖtimeᚐTime(ctx context.Context, sel ast.SelectionSet, v *time.Time) graphql.Marshaler { 3137 if v == nil { 3138 return graphql.Null 3139 } 3140 return model.MarshalTimestamp(*v) 3141 } 3142 3143 func (ec *executionContext) marshalOUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋexampleᚋscalarsᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v *model.User) graphql.Marshaler { 3144 if v == nil { 3145 return graphql.Null 3146 } 3147 return ec._User(ctx, sel, v) 3148 } 3149 3150 func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler { 3151 if v == nil { 3152 return graphql.Null 3153 } 3154 ret := make(graphql.Array, len(v)) 3155 var wg sync.WaitGroup 3156 isLen1 := len(v) == 1 3157 if !isLen1 { 3158 wg.Add(len(v)) 3159 } 3160 for i := range v { 3161 i := i 3162 fc := &graphql.FieldContext{ 3163 Index: &i, 3164 Result: &v[i], 3165 } 3166 ctx := graphql.WithFieldContext(ctx, fc) 3167 f := func(i int) { 3168 defer func() { 3169 if r := recover(); r != nil { 3170 ec.Error(ctx, ec.Recover(ctx, r)) 3171 ret = nil 3172 } 3173 }() 3174 if !isLen1 { 3175 defer wg.Done() 3176 } 3177 ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i]) 3178 } 3179 if isLen1 { 3180 f(i) 3181 } else { 3182 go f(i) 3183 } 3184 3185 } 3186 wg.Wait() 3187 return ret 3188 } 3189 3190 func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler { 3191 if v == nil { 3192 return graphql.Null 3193 } 3194 ret := make(graphql.Array, len(v)) 3195 var wg sync.WaitGroup 3196 isLen1 := len(v) == 1 3197 if !isLen1 { 3198 wg.Add(len(v)) 3199 } 3200 for i := range v { 3201 i := i 3202 fc := &graphql.FieldContext{ 3203 Index: &i, 3204 Result: &v[i], 3205 } 3206 ctx := graphql.WithFieldContext(ctx, fc) 3207 f := func(i int) { 3208 defer func() { 3209 if r := recover(); r != nil { 3210 ec.Error(ctx, ec.Recover(ctx, r)) 3211 ret = nil 3212 } 3213 }() 3214 if !isLen1 { 3215 defer wg.Done() 3216 } 3217 ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i]) 3218 } 3219 if isLen1 { 3220 f(i) 3221 } else { 3222 go f(i) 3223 } 3224 3225 } 3226 wg.Wait() 3227 return ret 3228 } 3229 3230 func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { 3231 if v == nil { 3232 return graphql.Null 3233 } 3234 ret := make(graphql.Array, len(v)) 3235 var wg sync.WaitGroup 3236 isLen1 := len(v) == 1 3237 if !isLen1 { 3238 wg.Add(len(v)) 3239 } 3240 for i := range v { 3241 i := i 3242 fc := &graphql.FieldContext{ 3243 Index: &i, 3244 Result: &v[i], 3245 } 3246 ctx := graphql.WithFieldContext(ctx, fc) 3247 f := func(i int) { 3248 defer func() { 3249 if r := recover(); r != nil { 3250 ec.Error(ctx, ec.Recover(ctx, r)) 3251 ret = nil 3252 } 3253 }() 3254 if !isLen1 { 3255 defer wg.Done() 3256 } 3257 ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) 3258 } 3259 if isLen1 { 3260 f(i) 3261 } else { 3262 go f(i) 3263 } 3264 3265 } 3266 wg.Wait() 3267 return ret 3268 } 3269 3270 func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler { 3271 if v == nil { 3272 return graphql.Null 3273 } 3274 return ec.___Schema(ctx, sel, v) 3275 } 3276 3277 func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { 3278 if v == nil { 3279 return graphql.Null 3280 } 3281 ret := make(graphql.Array, len(v)) 3282 var wg sync.WaitGroup 3283 isLen1 := len(v) == 1 3284 if !isLen1 { 3285 wg.Add(len(v)) 3286 } 3287 for i := range v { 3288 i := i 3289 fc := &graphql.FieldContext{ 3290 Index: &i, 3291 Result: &v[i], 3292 } 3293 ctx := graphql.WithFieldContext(ctx, fc) 3294 f := func(i int) { 3295 defer func() { 3296 if r := recover(); r != nil { 3297 ec.Error(ctx, ec.Recover(ctx, r)) 3298 ret = nil 3299 } 3300 }() 3301 if !isLen1 { 3302 defer wg.Done() 3303 } 3304 ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) 3305 } 3306 if isLen1 { 3307 f(i) 3308 } else { 3309 go f(i) 3310 } 3311 3312 } 3313 wg.Wait() 3314 return ret 3315 } 3316 3317 func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { 3318 if v == nil { 3319 return graphql.Null 3320 } 3321 return ec.___Type(ctx, sel, v) 3322 } 3323 3324 // endregion ***************************** type.gotpl *****************************