github.com/shippio/gqlgen@v0.0.0-20220912092219-633ea699ef07/integration/generated.go (about) 1 // Code generated by github.com/99designs/gqlgen, DO NOT EDIT. 2 3 package integration 4 5 import ( 6 "bytes" 7 "context" 8 "embed" 9 "errors" 10 "fmt" 11 "strconv" 12 "sync" 13 "sync/atomic" 14 15 "github.com/99designs/gqlgen/graphql" 16 "github.com/99designs/gqlgen/graphql/introspection" 17 models "github.com/99designs/gqlgen/integration/models-go" 18 "github.com/99designs/gqlgen/integration/remote_api" 19 gqlparser "github.com/vektah/gqlparser/v2" 20 "github.com/vektah/gqlparser/v2/ast" 21 ) 22 23 // region ************************** generated!.gotpl ************************** 24 25 // NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface. 26 func NewExecutableSchema(cfg Config) graphql.ExecutableSchema { 27 return &executableSchema{ 28 resolvers: cfg.Resolvers, 29 directives: cfg.Directives, 30 complexity: cfg.Complexity, 31 } 32 } 33 34 type Config struct { 35 Resolvers ResolverRoot 36 Directives DirectiveRoot 37 Complexity ComplexityRoot 38 } 39 40 type ResolverRoot interface { 41 Element() ElementResolver 42 Query() QueryResolver 43 User() UserResolver 44 } 45 46 type DirectiveRoot struct { 47 Magic func(ctx context.Context, obj interface{}, next graphql.Resolver, kind *int) (res interface{}, err error) 48 } 49 50 type ComplexityRoot struct { 51 Element struct { 52 Child func(childComplexity int) int 53 Error func(childComplexity int) int 54 Mismatched func(childComplexity int) int 55 } 56 57 Query struct { 58 Coercion func(childComplexity int, value []*models.ListCoercion) int 59 Complexity func(childComplexity int, value int) int 60 Date func(childComplexity int, filter models.DateFilter) int 61 Error func(childComplexity int, typeArg *models.ErrorType) int 62 JSONEncoding func(childComplexity int) int 63 Path func(childComplexity int) int 64 Viewer func(childComplexity int) int 65 } 66 67 User struct { 68 Likes func(childComplexity int) int 69 Name func(childComplexity int) int 70 } 71 72 Viewer struct { 73 User func(childComplexity int) int 74 } 75 } 76 77 type ElementResolver interface { 78 Child(ctx context.Context, obj *models.Element) (*models.Element, error) 79 Error(ctx context.Context, obj *models.Element) (bool, error) 80 Mismatched(ctx context.Context, obj *models.Element) ([]bool, error) 81 } 82 type QueryResolver interface { 83 Path(ctx context.Context) ([]*models.Element, error) 84 Date(ctx context.Context, filter models.DateFilter) (bool, error) 85 Viewer(ctx context.Context) (*models.Viewer, error) 86 JSONEncoding(ctx context.Context) (string, error) 87 Error(ctx context.Context, typeArg *models.ErrorType) (bool, error) 88 Complexity(ctx context.Context, value int) (bool, error) 89 Coercion(ctx context.Context, value []*models.ListCoercion) (bool, error) 90 } 91 type UserResolver interface { 92 Likes(ctx context.Context, obj *remote_api.User) ([]string, error) 93 } 94 95 type executableSchema struct { 96 resolvers ResolverRoot 97 directives DirectiveRoot 98 complexity ComplexityRoot 99 } 100 101 func (e *executableSchema) Schema() *ast.Schema { 102 return parsedSchema 103 } 104 105 func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) { 106 ec := executionContext{nil, e} 107 _ = ec 108 switch typeName + "." + field { 109 110 case "Element.child": 111 if e.complexity.Element.Child == nil { 112 break 113 } 114 115 return e.complexity.Element.Child(childComplexity), true 116 117 case "Element.error": 118 if e.complexity.Element.Error == nil { 119 break 120 } 121 122 return e.complexity.Element.Error(childComplexity), true 123 124 case "Element.mismatched": 125 if e.complexity.Element.Mismatched == nil { 126 break 127 } 128 129 return e.complexity.Element.Mismatched(childComplexity), true 130 131 case "Query.coercion": 132 if e.complexity.Query.Coercion == nil { 133 break 134 } 135 136 args, err := ec.field_Query_coercion_args(context.TODO(), rawArgs) 137 if err != nil { 138 return 0, false 139 } 140 141 return e.complexity.Query.Coercion(childComplexity, args["value"].([]*models.ListCoercion)), true 142 143 case "Query.complexity": 144 if e.complexity.Query.Complexity == nil { 145 break 146 } 147 148 args, err := ec.field_Query_complexity_args(context.TODO(), rawArgs) 149 if err != nil { 150 return 0, false 151 } 152 153 return e.complexity.Query.Complexity(childComplexity, args["value"].(int)), true 154 155 case "Query.date": 156 if e.complexity.Query.Date == nil { 157 break 158 } 159 160 args, err := ec.field_Query_date_args(context.TODO(), rawArgs) 161 if err != nil { 162 return 0, false 163 } 164 165 return e.complexity.Query.Date(childComplexity, args["filter"].(models.DateFilter)), true 166 167 case "Query.error": 168 if e.complexity.Query.Error == nil { 169 break 170 } 171 172 args, err := ec.field_Query_error_args(context.TODO(), rawArgs) 173 if err != nil { 174 return 0, false 175 } 176 177 return e.complexity.Query.Error(childComplexity, args["type"].(*models.ErrorType)), true 178 179 case "Query.jsonEncoding": 180 if e.complexity.Query.JSONEncoding == nil { 181 break 182 } 183 184 return e.complexity.Query.JSONEncoding(childComplexity), true 185 186 case "Query.path": 187 if e.complexity.Query.Path == nil { 188 break 189 } 190 191 return e.complexity.Query.Path(childComplexity), true 192 193 case "Query.viewer": 194 if e.complexity.Query.Viewer == nil { 195 break 196 } 197 198 return e.complexity.Query.Viewer(childComplexity), true 199 200 case "User.likes": 201 if e.complexity.User.Likes == nil { 202 break 203 } 204 205 return e.complexity.User.Likes(childComplexity), true 206 207 case "User.name": 208 if e.complexity.User.Name == nil { 209 break 210 } 211 212 return e.complexity.User.Name(childComplexity), true 213 214 case "Viewer.user": 215 if e.complexity.Viewer.User == nil { 216 break 217 } 218 219 return e.complexity.Viewer.User(childComplexity), true 220 221 } 222 return 0, false 223 } 224 225 func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { 226 rc := graphql.GetOperationContext(ctx) 227 ec := executionContext{rc, e} 228 inputUnmarshalMap := graphql.BuildUnmarshalerMap( 229 ec.unmarshalInputDateFilter, 230 ec.unmarshalInputListCoercion, 231 ) 232 first := true 233 234 switch rc.Operation.Operation { 235 case ast.Query: 236 return func(ctx context.Context) *graphql.Response { 237 if !first { 238 return nil 239 } 240 first = false 241 ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) 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 //go:embed "schema.graphql" "user.graphql" 276 var sourcesFS embed.FS 277 278 func sourceData(filename string) string { 279 data, err := sourcesFS.ReadFile(filename) 280 if err != nil { 281 panic(fmt.Sprintf("codegen problem: %s not available", filename)) 282 } 283 return string(data) 284 } 285 286 var sources = []*ast.Source{ 287 {Name: "schema.graphql", Input: sourceData("schema.graphql"), BuiltIn: false}, 288 {Name: "user.graphql", Input: sourceData("user.graphql"), BuiltIn: false}, 289 } 290 var parsedSchema = gqlparser.MustLoadSchema(sources...) 291 292 // endregion ************************** generated!.gotpl ************************** 293 294 // region ***************************** args.gotpl ***************************** 295 296 func (ec *executionContext) dir_magic_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 297 var err error 298 args := map[string]interface{}{} 299 var arg0 *int 300 if tmp, ok := rawArgs["kind"]; ok { 301 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind")) 302 arg0, err = ec.unmarshalOInt2ᚖint(ctx, tmp) 303 if err != nil { 304 return nil, err 305 } 306 } 307 args["kind"] = arg0 308 return args, nil 309 } 310 311 func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 312 var err error 313 args := map[string]interface{}{} 314 var arg0 string 315 if tmp, ok := rawArgs["name"]; ok { 316 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) 317 arg0, err = ec.unmarshalNString2string(ctx, tmp) 318 if err != nil { 319 return nil, err 320 } 321 } 322 args["name"] = arg0 323 return args, nil 324 } 325 326 func (ec *executionContext) field_Query_coercion_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 327 var err error 328 args := map[string]interface{}{} 329 var arg0 []*models.ListCoercion 330 if tmp, ok := rawArgs["value"]; ok { 331 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) 332 arg0, err = ec.unmarshalOListCoercion2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐListCoercionᚄ(ctx, tmp) 333 if err != nil { 334 return nil, err 335 } 336 } 337 args["value"] = arg0 338 return args, nil 339 } 340 341 func (ec *executionContext) field_Query_complexity_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 342 var err error 343 args := map[string]interface{}{} 344 var arg0 int 345 if tmp, ok := rawArgs["value"]; ok { 346 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) 347 arg0, err = ec.unmarshalNInt2int(ctx, tmp) 348 if err != nil { 349 return nil, err 350 } 351 } 352 args["value"] = arg0 353 return args, nil 354 } 355 356 func (ec *executionContext) field_Query_date_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 357 var err error 358 args := map[string]interface{}{} 359 var arg0 models.DateFilter 360 if tmp, ok := rawArgs["filter"]; ok { 361 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("filter")) 362 arg0, err = ec.unmarshalNDateFilter2githubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐDateFilter(ctx, tmp) 363 if err != nil { 364 return nil, err 365 } 366 } 367 args["filter"] = arg0 368 return args, nil 369 } 370 371 func (ec *executionContext) field_Query_error_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 372 var err error 373 args := map[string]interface{}{} 374 var arg0 *models.ErrorType 375 if tmp, ok := rawArgs["type"]; ok { 376 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type")) 377 arg0, err = ec.unmarshalOErrorType2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐErrorType(ctx, tmp) 378 if err != nil { 379 return nil, err 380 } 381 } 382 args["type"] = arg0 383 return args, nil 384 } 385 386 func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 387 var err error 388 args := map[string]interface{}{} 389 var arg0 bool 390 if tmp, ok := rawArgs["includeDeprecated"]; ok { 391 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) 392 arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) 393 if err != nil { 394 return nil, err 395 } 396 } 397 args["includeDeprecated"] = arg0 398 return args, nil 399 } 400 401 func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 402 var err error 403 args := map[string]interface{}{} 404 var arg0 bool 405 if tmp, ok := rawArgs["includeDeprecated"]; ok { 406 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) 407 arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) 408 if err != nil { 409 return nil, err 410 } 411 } 412 args["includeDeprecated"] = arg0 413 return args, nil 414 } 415 416 // endregion ***************************** args.gotpl ***************************** 417 418 // region ************************** directives.gotpl ************************** 419 420 // endregion ************************** directives.gotpl ************************** 421 422 // region **************************** field.gotpl ***************************** 423 424 func (ec *executionContext) _Element_child(ctx context.Context, field graphql.CollectedField, obj *models.Element) (ret graphql.Marshaler) { 425 fc, err := ec.fieldContext_Element_child(ctx, field) 426 if err != nil { 427 return graphql.Null 428 } 429 ctx = graphql.WithFieldContext(ctx, fc) 430 defer func() { 431 if r := recover(); r != nil { 432 ec.Error(ctx, ec.Recover(ctx, r)) 433 ret = graphql.Null 434 } 435 }() 436 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 437 ctx = rctx // use context from middleware stack in children 438 return ec.resolvers.Element().Child(rctx, obj) 439 }) 440 if err != nil { 441 ec.Error(ctx, err) 442 return graphql.Null 443 } 444 if resTmp == nil { 445 if !graphql.HasFieldError(ctx, fc) { 446 ec.Errorf(ctx, "must not be null") 447 } 448 return graphql.Null 449 } 450 res := resTmp.(*models.Element) 451 fc.Result = res 452 return ec.marshalNElement2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐElement(ctx, field.Selections, res) 453 } 454 455 func (ec *executionContext) fieldContext_Element_child(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 456 fc = &graphql.FieldContext{ 457 Object: "Element", 458 Field: field, 459 IsMethod: true, 460 IsResolver: true, 461 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 462 switch field.Name { 463 case "child": 464 return ec.fieldContext_Element_child(ctx, field) 465 case "error": 466 return ec.fieldContext_Element_error(ctx, field) 467 case "mismatched": 468 return ec.fieldContext_Element_mismatched(ctx, field) 469 } 470 return nil, fmt.Errorf("no field named %q was found under type Element", field.Name) 471 }, 472 } 473 return fc, nil 474 } 475 476 func (ec *executionContext) _Element_error(ctx context.Context, field graphql.CollectedField, obj *models.Element) (ret graphql.Marshaler) { 477 fc, err := ec.fieldContext_Element_error(ctx, field) 478 if err != nil { 479 return graphql.Null 480 } 481 ctx = graphql.WithFieldContext(ctx, fc) 482 defer func() { 483 if r := recover(); r != nil { 484 ec.Error(ctx, ec.Recover(ctx, r)) 485 ret = graphql.Null 486 } 487 }() 488 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 489 ctx = rctx // use context from middleware stack in children 490 return ec.resolvers.Element().Error(rctx, obj) 491 }) 492 if err != nil { 493 ec.Error(ctx, err) 494 return graphql.Null 495 } 496 if resTmp == nil { 497 if !graphql.HasFieldError(ctx, fc) { 498 ec.Errorf(ctx, "must not be null") 499 } 500 return graphql.Null 501 } 502 res := resTmp.(bool) 503 fc.Result = res 504 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 505 } 506 507 func (ec *executionContext) fieldContext_Element_error(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 508 fc = &graphql.FieldContext{ 509 Object: "Element", 510 Field: field, 511 IsMethod: true, 512 IsResolver: true, 513 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 514 return nil, errors.New("field of type Boolean does not have child fields") 515 }, 516 } 517 return fc, nil 518 } 519 520 func (ec *executionContext) _Element_mismatched(ctx context.Context, field graphql.CollectedField, obj *models.Element) (ret graphql.Marshaler) { 521 fc, err := ec.fieldContext_Element_mismatched(ctx, field) 522 if err != nil { 523 return graphql.Null 524 } 525 ctx = graphql.WithFieldContext(ctx, fc) 526 defer func() { 527 if r := recover(); r != nil { 528 ec.Error(ctx, ec.Recover(ctx, r)) 529 ret = graphql.Null 530 } 531 }() 532 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 533 ctx = rctx // use context from middleware stack in children 534 return ec.resolvers.Element().Mismatched(rctx, obj) 535 }) 536 if err != nil { 537 ec.Error(ctx, err) 538 return graphql.Null 539 } 540 if resTmp == nil { 541 return graphql.Null 542 } 543 res := resTmp.([]bool) 544 fc.Result = res 545 return ec.marshalOBoolean2ᚕboolᚄ(ctx, field.Selections, res) 546 } 547 548 func (ec *executionContext) fieldContext_Element_mismatched(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 549 fc = &graphql.FieldContext{ 550 Object: "Element", 551 Field: field, 552 IsMethod: true, 553 IsResolver: true, 554 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 555 return nil, errors.New("field of type Boolean does not have child fields") 556 }, 557 } 558 return fc, nil 559 } 560 561 func (ec *executionContext) _Query_path(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 562 fc, err := ec.fieldContext_Query_path(ctx, field) 563 if err != nil { 564 return graphql.Null 565 } 566 ctx = graphql.WithFieldContext(ctx, fc) 567 defer func() { 568 if r := recover(); r != nil { 569 ec.Error(ctx, ec.Recover(ctx, r)) 570 ret = graphql.Null 571 } 572 }() 573 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 574 ctx = rctx // use context from middleware stack in children 575 return ec.resolvers.Query().Path(rctx) 576 }) 577 if err != nil { 578 ec.Error(ctx, err) 579 return graphql.Null 580 } 581 if resTmp == nil { 582 return graphql.Null 583 } 584 res := resTmp.([]*models.Element) 585 fc.Result = res 586 return ec.marshalOElement2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐElement(ctx, field.Selections, res) 587 } 588 589 func (ec *executionContext) fieldContext_Query_path(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 590 fc = &graphql.FieldContext{ 591 Object: "Query", 592 Field: field, 593 IsMethod: true, 594 IsResolver: true, 595 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 596 switch field.Name { 597 case "child": 598 return ec.fieldContext_Element_child(ctx, field) 599 case "error": 600 return ec.fieldContext_Element_error(ctx, field) 601 case "mismatched": 602 return ec.fieldContext_Element_mismatched(ctx, field) 603 } 604 return nil, fmt.Errorf("no field named %q was found under type Element", field.Name) 605 }, 606 } 607 return fc, nil 608 } 609 610 func (ec *executionContext) _Query_date(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 611 fc, err := ec.fieldContext_Query_date(ctx, field) 612 if err != nil { 613 return graphql.Null 614 } 615 ctx = graphql.WithFieldContext(ctx, fc) 616 defer func() { 617 if r := recover(); r != nil { 618 ec.Error(ctx, ec.Recover(ctx, r)) 619 ret = graphql.Null 620 } 621 }() 622 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 623 ctx = rctx // use context from middleware stack in children 624 return ec.resolvers.Query().Date(rctx, fc.Args["filter"].(models.DateFilter)) 625 }) 626 if err != nil { 627 ec.Error(ctx, err) 628 return graphql.Null 629 } 630 if resTmp == nil { 631 if !graphql.HasFieldError(ctx, fc) { 632 ec.Errorf(ctx, "must not be null") 633 } 634 return graphql.Null 635 } 636 res := resTmp.(bool) 637 fc.Result = res 638 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 639 } 640 641 func (ec *executionContext) fieldContext_Query_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 642 fc = &graphql.FieldContext{ 643 Object: "Query", 644 Field: field, 645 IsMethod: true, 646 IsResolver: true, 647 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 648 return nil, errors.New("field of type Boolean does not have child fields") 649 }, 650 } 651 defer func() { 652 if r := recover(); r != nil { 653 err = ec.Recover(ctx, r) 654 ec.Error(ctx, err) 655 } 656 }() 657 ctx = graphql.WithFieldContext(ctx, fc) 658 if fc.Args, err = ec.field_Query_date_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 659 ec.Error(ctx, err) 660 return 661 } 662 return fc, nil 663 } 664 665 func (ec *executionContext) _Query_viewer(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 666 fc, err := ec.fieldContext_Query_viewer(ctx, field) 667 if err != nil { 668 return graphql.Null 669 } 670 ctx = graphql.WithFieldContext(ctx, fc) 671 defer func() { 672 if r := recover(); r != nil { 673 ec.Error(ctx, ec.Recover(ctx, r)) 674 ret = graphql.Null 675 } 676 }() 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.resolvers.Query().Viewer(rctx) 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.(*models.Viewer) 689 fc.Result = res 690 return ec.marshalOViewer2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐViewer(ctx, field.Selections, res) 691 } 692 693 func (ec *executionContext) fieldContext_Query_viewer(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 694 fc = &graphql.FieldContext{ 695 Object: "Query", 696 Field: field, 697 IsMethod: true, 698 IsResolver: true, 699 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 700 switch field.Name { 701 case "user": 702 return ec.fieldContext_Viewer_user(ctx, field) 703 } 704 return nil, fmt.Errorf("no field named %q was found under type Viewer", field.Name) 705 }, 706 } 707 return fc, nil 708 } 709 710 func (ec *executionContext) _Query_jsonEncoding(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 711 fc, err := ec.fieldContext_Query_jsonEncoding(ctx, field) 712 if err != nil { 713 return graphql.Null 714 } 715 ctx = graphql.WithFieldContext(ctx, fc) 716 defer func() { 717 if r := recover(); r != nil { 718 ec.Error(ctx, ec.Recover(ctx, r)) 719 ret = graphql.Null 720 } 721 }() 722 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 723 ctx = rctx // use context from middleware stack in children 724 return ec.resolvers.Query().JSONEncoding(rctx) 725 }) 726 if err != nil { 727 ec.Error(ctx, err) 728 return graphql.Null 729 } 730 if resTmp == nil { 731 if !graphql.HasFieldError(ctx, fc) { 732 ec.Errorf(ctx, "must not be null") 733 } 734 return graphql.Null 735 } 736 res := resTmp.(string) 737 fc.Result = res 738 return ec.marshalNString2string(ctx, field.Selections, res) 739 } 740 741 func (ec *executionContext) fieldContext_Query_jsonEncoding(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 742 fc = &graphql.FieldContext{ 743 Object: "Query", 744 Field: field, 745 IsMethod: true, 746 IsResolver: true, 747 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 748 return nil, errors.New("field of type String does not have child fields") 749 }, 750 } 751 return fc, nil 752 } 753 754 func (ec *executionContext) _Query_error(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 755 fc, err := ec.fieldContext_Query_error(ctx, field) 756 if err != nil { 757 return graphql.Null 758 } 759 ctx = graphql.WithFieldContext(ctx, fc) 760 defer func() { 761 if r := recover(); r != nil { 762 ec.Error(ctx, ec.Recover(ctx, r)) 763 ret = graphql.Null 764 } 765 }() 766 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 767 ctx = rctx // use context from middleware stack in children 768 return ec.resolvers.Query().Error(rctx, fc.Args["type"].(*models.ErrorType)) 769 }) 770 if err != nil { 771 ec.Error(ctx, err) 772 return graphql.Null 773 } 774 if resTmp == nil { 775 if !graphql.HasFieldError(ctx, fc) { 776 ec.Errorf(ctx, "must not be null") 777 } 778 return graphql.Null 779 } 780 res := resTmp.(bool) 781 fc.Result = res 782 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 783 } 784 785 func (ec *executionContext) fieldContext_Query_error(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 786 fc = &graphql.FieldContext{ 787 Object: "Query", 788 Field: field, 789 IsMethod: true, 790 IsResolver: true, 791 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 792 return nil, errors.New("field of type Boolean does not have child fields") 793 }, 794 } 795 defer func() { 796 if r := recover(); r != nil { 797 err = ec.Recover(ctx, r) 798 ec.Error(ctx, err) 799 } 800 }() 801 ctx = graphql.WithFieldContext(ctx, fc) 802 if fc.Args, err = ec.field_Query_error_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 803 ec.Error(ctx, err) 804 return 805 } 806 return fc, nil 807 } 808 809 func (ec *executionContext) _Query_complexity(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 810 fc, err := ec.fieldContext_Query_complexity(ctx, field) 811 if err != nil { 812 return graphql.Null 813 } 814 ctx = graphql.WithFieldContext(ctx, fc) 815 defer func() { 816 if r := recover(); r != nil { 817 ec.Error(ctx, ec.Recover(ctx, r)) 818 ret = graphql.Null 819 } 820 }() 821 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 822 ctx = rctx // use context from middleware stack in children 823 return ec.resolvers.Query().Complexity(rctx, fc.Args["value"].(int)) 824 }) 825 if err != nil { 826 ec.Error(ctx, err) 827 return graphql.Null 828 } 829 if resTmp == nil { 830 if !graphql.HasFieldError(ctx, fc) { 831 ec.Errorf(ctx, "must not be null") 832 } 833 return graphql.Null 834 } 835 res := resTmp.(bool) 836 fc.Result = res 837 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 838 } 839 840 func (ec *executionContext) fieldContext_Query_complexity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 841 fc = &graphql.FieldContext{ 842 Object: "Query", 843 Field: field, 844 IsMethod: true, 845 IsResolver: true, 846 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 847 return nil, errors.New("field of type Boolean does not have child fields") 848 }, 849 } 850 defer func() { 851 if r := recover(); r != nil { 852 err = ec.Recover(ctx, r) 853 ec.Error(ctx, err) 854 } 855 }() 856 ctx = graphql.WithFieldContext(ctx, fc) 857 if fc.Args, err = ec.field_Query_complexity_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 858 ec.Error(ctx, err) 859 return 860 } 861 return fc, nil 862 } 863 864 func (ec *executionContext) _Query_coercion(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 865 fc, err := ec.fieldContext_Query_coercion(ctx, field) 866 if err != nil { 867 return graphql.Null 868 } 869 ctx = graphql.WithFieldContext(ctx, fc) 870 defer func() { 871 if r := recover(); r != nil { 872 ec.Error(ctx, ec.Recover(ctx, r)) 873 ret = graphql.Null 874 } 875 }() 876 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 877 ctx = rctx // use context from middleware stack in children 878 return ec.resolvers.Query().Coercion(rctx, fc.Args["value"].([]*models.ListCoercion)) 879 }) 880 if err != nil { 881 ec.Error(ctx, err) 882 return graphql.Null 883 } 884 if resTmp == nil { 885 if !graphql.HasFieldError(ctx, fc) { 886 ec.Errorf(ctx, "must not be null") 887 } 888 return graphql.Null 889 } 890 res := resTmp.(bool) 891 fc.Result = res 892 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 893 } 894 895 func (ec *executionContext) fieldContext_Query_coercion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 896 fc = &graphql.FieldContext{ 897 Object: "Query", 898 Field: field, 899 IsMethod: true, 900 IsResolver: true, 901 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 902 return nil, errors.New("field of type Boolean does not have child fields") 903 }, 904 } 905 defer func() { 906 if r := recover(); r != nil { 907 err = ec.Recover(ctx, r) 908 ec.Error(ctx, err) 909 } 910 }() 911 ctx = graphql.WithFieldContext(ctx, fc) 912 if fc.Args, err = ec.field_Query_coercion_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 913 ec.Error(ctx, err) 914 return 915 } 916 return fc, nil 917 } 918 919 func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 920 fc, err := ec.fieldContext_Query___type(ctx, field) 921 if err != nil { 922 return graphql.Null 923 } 924 ctx = graphql.WithFieldContext(ctx, fc) 925 defer func() { 926 if r := recover(); r != nil { 927 ec.Error(ctx, ec.Recover(ctx, r)) 928 ret = graphql.Null 929 } 930 }() 931 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 932 ctx = rctx // use context from middleware stack in children 933 return ec.introspectType(fc.Args["name"].(string)) 934 }) 935 if err != nil { 936 ec.Error(ctx, err) 937 return graphql.Null 938 } 939 if resTmp == nil { 940 return graphql.Null 941 } 942 res := resTmp.(*introspection.Type) 943 fc.Result = res 944 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 945 } 946 947 func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 948 fc = &graphql.FieldContext{ 949 Object: "Query", 950 Field: field, 951 IsMethod: true, 952 IsResolver: false, 953 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 954 switch field.Name { 955 case "kind": 956 return ec.fieldContext___Type_kind(ctx, field) 957 case "name": 958 return ec.fieldContext___Type_name(ctx, field) 959 case "description": 960 return ec.fieldContext___Type_description(ctx, field) 961 case "fields": 962 return ec.fieldContext___Type_fields(ctx, field) 963 case "interfaces": 964 return ec.fieldContext___Type_interfaces(ctx, field) 965 case "possibleTypes": 966 return ec.fieldContext___Type_possibleTypes(ctx, field) 967 case "enumValues": 968 return ec.fieldContext___Type_enumValues(ctx, field) 969 case "inputFields": 970 return ec.fieldContext___Type_inputFields(ctx, field) 971 case "ofType": 972 return ec.fieldContext___Type_ofType(ctx, field) 973 case "specifiedByURL": 974 return ec.fieldContext___Type_specifiedByURL(ctx, field) 975 } 976 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 977 }, 978 } 979 defer func() { 980 if r := recover(); r != nil { 981 err = ec.Recover(ctx, r) 982 ec.Error(ctx, err) 983 } 984 }() 985 ctx = graphql.WithFieldContext(ctx, fc) 986 if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 987 ec.Error(ctx, err) 988 return 989 } 990 return fc, nil 991 } 992 993 func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { 994 fc, err := ec.fieldContext_Query___schema(ctx, field) 995 if err != nil { 996 return graphql.Null 997 } 998 ctx = graphql.WithFieldContext(ctx, fc) 999 defer func() { 1000 if r := recover(); r != nil { 1001 ec.Error(ctx, ec.Recover(ctx, r)) 1002 ret = graphql.Null 1003 } 1004 }() 1005 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1006 ctx = rctx // use context from middleware stack in children 1007 return ec.introspectSchema() 1008 }) 1009 if err != nil { 1010 ec.Error(ctx, err) 1011 return graphql.Null 1012 } 1013 if resTmp == nil { 1014 return graphql.Null 1015 } 1016 res := resTmp.(*introspection.Schema) 1017 fc.Result = res 1018 return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) 1019 } 1020 1021 func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1022 fc = &graphql.FieldContext{ 1023 Object: "Query", 1024 Field: field, 1025 IsMethod: true, 1026 IsResolver: false, 1027 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1028 switch field.Name { 1029 case "description": 1030 return ec.fieldContext___Schema_description(ctx, field) 1031 case "types": 1032 return ec.fieldContext___Schema_types(ctx, field) 1033 case "queryType": 1034 return ec.fieldContext___Schema_queryType(ctx, field) 1035 case "mutationType": 1036 return ec.fieldContext___Schema_mutationType(ctx, field) 1037 case "subscriptionType": 1038 return ec.fieldContext___Schema_subscriptionType(ctx, field) 1039 case "directives": 1040 return ec.fieldContext___Schema_directives(ctx, field) 1041 } 1042 return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name) 1043 }, 1044 } 1045 return fc, nil 1046 } 1047 1048 func (ec *executionContext) _User_name(ctx context.Context, field graphql.CollectedField, obj *remote_api.User) (ret graphql.Marshaler) { 1049 fc, err := ec.fieldContext_User_name(ctx, field) 1050 if err != nil { 1051 return graphql.Null 1052 } 1053 ctx = graphql.WithFieldContext(ctx, fc) 1054 defer func() { 1055 if r := recover(); r != nil { 1056 ec.Error(ctx, ec.Recover(ctx, r)) 1057 ret = graphql.Null 1058 } 1059 }() 1060 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1061 ctx = rctx // use context from middleware stack in children 1062 return obj.Name, nil 1063 }) 1064 if err != nil { 1065 ec.Error(ctx, err) 1066 return graphql.Null 1067 } 1068 if resTmp == nil { 1069 if !graphql.HasFieldError(ctx, fc) { 1070 ec.Errorf(ctx, "must not be null") 1071 } 1072 return graphql.Null 1073 } 1074 res := resTmp.(string) 1075 fc.Result = res 1076 return ec.marshalNString2string(ctx, field.Selections, res) 1077 } 1078 1079 func (ec *executionContext) fieldContext_User_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1080 fc = &graphql.FieldContext{ 1081 Object: "User", 1082 Field: field, 1083 IsMethod: false, 1084 IsResolver: false, 1085 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1086 return nil, errors.New("field of type String does not have child fields") 1087 }, 1088 } 1089 return fc, nil 1090 } 1091 1092 func (ec *executionContext) _User_likes(ctx context.Context, field graphql.CollectedField, obj *remote_api.User) (ret graphql.Marshaler) { 1093 fc, err := ec.fieldContext_User_likes(ctx, field) 1094 if err != nil { 1095 return graphql.Null 1096 } 1097 ctx = graphql.WithFieldContext(ctx, fc) 1098 defer func() { 1099 if r := recover(); r != nil { 1100 ec.Error(ctx, ec.Recover(ctx, r)) 1101 ret = graphql.Null 1102 } 1103 }() 1104 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1105 ctx = rctx // use context from middleware stack in children 1106 return ec.resolvers.User().Likes(rctx, obj) 1107 }) 1108 if err != nil { 1109 ec.Error(ctx, err) 1110 return graphql.Null 1111 } 1112 if resTmp == nil { 1113 if !graphql.HasFieldError(ctx, fc) { 1114 ec.Errorf(ctx, "must not be null") 1115 } 1116 return graphql.Null 1117 } 1118 res := resTmp.([]string) 1119 fc.Result = res 1120 return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) 1121 } 1122 1123 func (ec *executionContext) fieldContext_User_likes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1124 fc = &graphql.FieldContext{ 1125 Object: "User", 1126 Field: field, 1127 IsMethod: true, 1128 IsResolver: true, 1129 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1130 return nil, errors.New("field of type String does not have child fields") 1131 }, 1132 } 1133 return fc, nil 1134 } 1135 1136 func (ec *executionContext) _Viewer_user(ctx context.Context, field graphql.CollectedField, obj *models.Viewer) (ret graphql.Marshaler) { 1137 fc, err := ec.fieldContext_Viewer_user(ctx, field) 1138 if err != nil { 1139 return graphql.Null 1140 } 1141 ctx = graphql.WithFieldContext(ctx, fc) 1142 defer func() { 1143 if r := recover(); r != nil { 1144 ec.Error(ctx, ec.Recover(ctx, r)) 1145 ret = graphql.Null 1146 } 1147 }() 1148 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1149 ctx = rctx // use context from middleware stack in children 1150 return obj.User, nil 1151 }) 1152 if err != nil { 1153 ec.Error(ctx, err) 1154 return graphql.Null 1155 } 1156 if resTmp == nil { 1157 return graphql.Null 1158 } 1159 res := resTmp.(*remote_api.User) 1160 fc.Result = res 1161 return ec.marshalOUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋremote_apiᚐUser(ctx, field.Selections, res) 1162 } 1163 1164 func (ec *executionContext) fieldContext_Viewer_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1165 fc = &graphql.FieldContext{ 1166 Object: "Viewer", 1167 Field: field, 1168 IsMethod: false, 1169 IsResolver: false, 1170 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1171 switch field.Name { 1172 case "name": 1173 return ec.fieldContext_User_name(ctx, field) 1174 case "likes": 1175 return ec.fieldContext_User_likes(ctx, field) 1176 } 1177 return nil, fmt.Errorf("no field named %q was found under type User", field.Name) 1178 }, 1179 } 1180 return fc, nil 1181 } 1182 1183 func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 1184 fc, err := ec.fieldContext___Directive_name(ctx, field) 1185 if err != nil { 1186 return graphql.Null 1187 } 1188 ctx = graphql.WithFieldContext(ctx, fc) 1189 defer func() { 1190 if r := recover(); r != nil { 1191 ec.Error(ctx, ec.Recover(ctx, r)) 1192 ret = graphql.Null 1193 } 1194 }() 1195 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1196 ctx = rctx // use context from middleware stack in children 1197 return obj.Name, nil 1198 }) 1199 if err != nil { 1200 ec.Error(ctx, err) 1201 return graphql.Null 1202 } 1203 if resTmp == nil { 1204 if !graphql.HasFieldError(ctx, fc) { 1205 ec.Errorf(ctx, "must not be null") 1206 } 1207 return graphql.Null 1208 } 1209 res := resTmp.(string) 1210 fc.Result = res 1211 return ec.marshalNString2string(ctx, field.Selections, res) 1212 } 1213 1214 func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1215 fc = &graphql.FieldContext{ 1216 Object: "__Directive", 1217 Field: field, 1218 IsMethod: false, 1219 IsResolver: false, 1220 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1221 return nil, errors.New("field of type String does not have child fields") 1222 }, 1223 } 1224 return fc, nil 1225 } 1226 1227 func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 1228 fc, err := ec.fieldContext___Directive_description(ctx, field) 1229 if err != nil { 1230 return graphql.Null 1231 } 1232 ctx = graphql.WithFieldContext(ctx, fc) 1233 defer func() { 1234 if r := recover(); r != nil { 1235 ec.Error(ctx, ec.Recover(ctx, r)) 1236 ret = graphql.Null 1237 } 1238 }() 1239 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1240 ctx = rctx // use context from middleware stack in children 1241 return obj.Description(), nil 1242 }) 1243 if err != nil { 1244 ec.Error(ctx, err) 1245 return graphql.Null 1246 } 1247 if resTmp == nil { 1248 return graphql.Null 1249 } 1250 res := resTmp.(*string) 1251 fc.Result = res 1252 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 1253 } 1254 1255 func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1256 fc = &graphql.FieldContext{ 1257 Object: "__Directive", 1258 Field: field, 1259 IsMethod: true, 1260 IsResolver: false, 1261 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1262 return nil, errors.New("field of type String does not have child fields") 1263 }, 1264 } 1265 return fc, nil 1266 } 1267 1268 func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 1269 fc, err := ec.fieldContext___Directive_locations(ctx, field) 1270 if err != nil { 1271 return graphql.Null 1272 } 1273 ctx = graphql.WithFieldContext(ctx, fc) 1274 defer func() { 1275 if r := recover(); r != nil { 1276 ec.Error(ctx, ec.Recover(ctx, r)) 1277 ret = graphql.Null 1278 } 1279 }() 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.Locations, 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.([]string) 1295 fc.Result = res 1296 return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) 1297 } 1298 1299 func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1300 fc = &graphql.FieldContext{ 1301 Object: "__Directive", 1302 Field: field, 1303 IsMethod: false, 1304 IsResolver: false, 1305 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1306 return nil, errors.New("field of type __DirectiveLocation does not have child fields") 1307 }, 1308 } 1309 return fc, nil 1310 } 1311 1312 func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 1313 fc, err := ec.fieldContext___Directive_args(ctx, field) 1314 if err != nil { 1315 return graphql.Null 1316 } 1317 ctx = graphql.WithFieldContext(ctx, fc) 1318 defer func() { 1319 if r := recover(); r != nil { 1320 ec.Error(ctx, ec.Recover(ctx, r)) 1321 ret = graphql.Null 1322 } 1323 }() 1324 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1325 ctx = rctx // use context from middleware stack in children 1326 return obj.Args, nil 1327 }) 1328 if err != nil { 1329 ec.Error(ctx, err) 1330 return graphql.Null 1331 } 1332 if resTmp == nil { 1333 if !graphql.HasFieldError(ctx, fc) { 1334 ec.Errorf(ctx, "must not be null") 1335 } 1336 return graphql.Null 1337 } 1338 res := resTmp.([]introspection.InputValue) 1339 fc.Result = res 1340 return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 1341 } 1342 1343 func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1344 fc = &graphql.FieldContext{ 1345 Object: "__Directive", 1346 Field: field, 1347 IsMethod: false, 1348 IsResolver: false, 1349 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1350 switch field.Name { 1351 case "name": 1352 return ec.fieldContext___InputValue_name(ctx, field) 1353 case "description": 1354 return ec.fieldContext___InputValue_description(ctx, field) 1355 case "type": 1356 return ec.fieldContext___InputValue_type(ctx, field) 1357 case "defaultValue": 1358 return ec.fieldContext___InputValue_defaultValue(ctx, field) 1359 } 1360 return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) 1361 }, 1362 } 1363 return fc, nil 1364 } 1365 1366 func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 1367 fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field) 1368 if err != nil { 1369 return graphql.Null 1370 } 1371 ctx = graphql.WithFieldContext(ctx, fc) 1372 defer func() { 1373 if r := recover(); r != nil { 1374 ec.Error(ctx, ec.Recover(ctx, r)) 1375 ret = graphql.Null 1376 } 1377 }() 1378 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1379 ctx = rctx // use context from middleware stack in children 1380 return obj.IsRepeatable, nil 1381 }) 1382 if err != nil { 1383 ec.Error(ctx, err) 1384 return graphql.Null 1385 } 1386 if resTmp == nil { 1387 if !graphql.HasFieldError(ctx, fc) { 1388 ec.Errorf(ctx, "must not be null") 1389 } 1390 return graphql.Null 1391 } 1392 res := resTmp.(bool) 1393 fc.Result = res 1394 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 1395 } 1396 1397 func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1398 fc = &graphql.FieldContext{ 1399 Object: "__Directive", 1400 Field: field, 1401 IsMethod: false, 1402 IsResolver: false, 1403 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1404 return nil, errors.New("field of type Boolean does not have child fields") 1405 }, 1406 } 1407 return fc, nil 1408 } 1409 1410 func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 1411 fc, err := ec.fieldContext___EnumValue_name(ctx, field) 1412 if err != nil { 1413 return graphql.Null 1414 } 1415 ctx = graphql.WithFieldContext(ctx, fc) 1416 defer func() { 1417 if r := recover(); r != nil { 1418 ec.Error(ctx, ec.Recover(ctx, r)) 1419 ret = graphql.Null 1420 } 1421 }() 1422 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1423 ctx = rctx // use context from middleware stack in children 1424 return obj.Name, nil 1425 }) 1426 if err != nil { 1427 ec.Error(ctx, err) 1428 return graphql.Null 1429 } 1430 if resTmp == nil { 1431 if !graphql.HasFieldError(ctx, fc) { 1432 ec.Errorf(ctx, "must not be null") 1433 } 1434 return graphql.Null 1435 } 1436 res := resTmp.(string) 1437 fc.Result = res 1438 return ec.marshalNString2string(ctx, field.Selections, res) 1439 } 1440 1441 func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1442 fc = &graphql.FieldContext{ 1443 Object: "__EnumValue", 1444 Field: field, 1445 IsMethod: false, 1446 IsResolver: false, 1447 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1448 return nil, errors.New("field of type String does not have child fields") 1449 }, 1450 } 1451 return fc, nil 1452 } 1453 1454 func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 1455 fc, err := ec.fieldContext___EnumValue_description(ctx, field) 1456 if err != nil { 1457 return graphql.Null 1458 } 1459 ctx = graphql.WithFieldContext(ctx, fc) 1460 defer func() { 1461 if r := recover(); r != nil { 1462 ec.Error(ctx, ec.Recover(ctx, r)) 1463 ret = graphql.Null 1464 } 1465 }() 1466 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1467 ctx = rctx // use context from middleware stack in children 1468 return obj.Description(), nil 1469 }) 1470 if err != nil { 1471 ec.Error(ctx, err) 1472 return graphql.Null 1473 } 1474 if resTmp == nil { 1475 return graphql.Null 1476 } 1477 res := resTmp.(*string) 1478 fc.Result = res 1479 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 1480 } 1481 1482 func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1483 fc = &graphql.FieldContext{ 1484 Object: "__EnumValue", 1485 Field: field, 1486 IsMethod: true, 1487 IsResolver: false, 1488 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1489 return nil, errors.New("field of type String does not have child fields") 1490 }, 1491 } 1492 return fc, nil 1493 } 1494 1495 func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 1496 fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field) 1497 if err != nil { 1498 return graphql.Null 1499 } 1500 ctx = graphql.WithFieldContext(ctx, fc) 1501 defer func() { 1502 if r := recover(); r != nil { 1503 ec.Error(ctx, ec.Recover(ctx, r)) 1504 ret = graphql.Null 1505 } 1506 }() 1507 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1508 ctx = rctx // use context from middleware stack in children 1509 return obj.IsDeprecated(), nil 1510 }) 1511 if err != nil { 1512 ec.Error(ctx, err) 1513 return graphql.Null 1514 } 1515 if resTmp == nil { 1516 if !graphql.HasFieldError(ctx, fc) { 1517 ec.Errorf(ctx, "must not be null") 1518 } 1519 return graphql.Null 1520 } 1521 res := resTmp.(bool) 1522 fc.Result = res 1523 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 1524 } 1525 1526 func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1527 fc = &graphql.FieldContext{ 1528 Object: "__EnumValue", 1529 Field: field, 1530 IsMethod: true, 1531 IsResolver: false, 1532 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1533 return nil, errors.New("field of type Boolean does not have child fields") 1534 }, 1535 } 1536 return fc, nil 1537 } 1538 1539 func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 1540 fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field) 1541 if err != nil { 1542 return graphql.Null 1543 } 1544 ctx = graphql.WithFieldContext(ctx, fc) 1545 defer func() { 1546 if r := recover(); r != nil { 1547 ec.Error(ctx, ec.Recover(ctx, r)) 1548 ret = graphql.Null 1549 } 1550 }() 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.DeprecationReason(), nil 1554 }) 1555 if err != nil { 1556 ec.Error(ctx, err) 1557 return graphql.Null 1558 } 1559 if resTmp == nil { 1560 return graphql.Null 1561 } 1562 res := resTmp.(*string) 1563 fc.Result = res 1564 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 1565 } 1566 1567 func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1568 fc = &graphql.FieldContext{ 1569 Object: "__EnumValue", 1570 Field: field, 1571 IsMethod: true, 1572 IsResolver: false, 1573 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1574 return nil, errors.New("field of type String does not have child fields") 1575 }, 1576 } 1577 return fc, nil 1578 } 1579 1580 func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 1581 fc, err := ec.fieldContext___Field_name(ctx, field) 1582 if err != nil { 1583 return graphql.Null 1584 } 1585 ctx = graphql.WithFieldContext(ctx, fc) 1586 defer func() { 1587 if r := recover(); r != nil { 1588 ec.Error(ctx, ec.Recover(ctx, r)) 1589 ret = graphql.Null 1590 } 1591 }() 1592 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1593 ctx = rctx // use context from middleware stack in children 1594 return obj.Name, nil 1595 }) 1596 if err != nil { 1597 ec.Error(ctx, err) 1598 return graphql.Null 1599 } 1600 if resTmp == nil { 1601 if !graphql.HasFieldError(ctx, fc) { 1602 ec.Errorf(ctx, "must not be null") 1603 } 1604 return graphql.Null 1605 } 1606 res := resTmp.(string) 1607 fc.Result = res 1608 return ec.marshalNString2string(ctx, field.Selections, res) 1609 } 1610 1611 func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1612 fc = &graphql.FieldContext{ 1613 Object: "__Field", 1614 Field: field, 1615 IsMethod: false, 1616 IsResolver: false, 1617 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1618 return nil, errors.New("field of type String does not have child fields") 1619 }, 1620 } 1621 return fc, nil 1622 } 1623 1624 func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 1625 fc, err := ec.fieldContext___Field_description(ctx, field) 1626 if err != nil { 1627 return graphql.Null 1628 } 1629 ctx = graphql.WithFieldContext(ctx, fc) 1630 defer func() { 1631 if r := recover(); r != nil { 1632 ec.Error(ctx, ec.Recover(ctx, r)) 1633 ret = graphql.Null 1634 } 1635 }() 1636 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1637 ctx = rctx // use context from middleware stack in children 1638 return obj.Description(), nil 1639 }) 1640 if err != nil { 1641 ec.Error(ctx, err) 1642 return graphql.Null 1643 } 1644 if resTmp == nil { 1645 return graphql.Null 1646 } 1647 res := resTmp.(*string) 1648 fc.Result = res 1649 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 1650 } 1651 1652 func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1653 fc = &graphql.FieldContext{ 1654 Object: "__Field", 1655 Field: field, 1656 IsMethod: true, 1657 IsResolver: false, 1658 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1659 return nil, errors.New("field of type String does not have child fields") 1660 }, 1661 } 1662 return fc, nil 1663 } 1664 1665 func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 1666 fc, err := ec.fieldContext___Field_args(ctx, field) 1667 if err != nil { 1668 return graphql.Null 1669 } 1670 ctx = graphql.WithFieldContext(ctx, fc) 1671 defer func() { 1672 if r := recover(); r != nil { 1673 ec.Error(ctx, ec.Recover(ctx, r)) 1674 ret = graphql.Null 1675 } 1676 }() 1677 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1678 ctx = rctx // use context from middleware stack in children 1679 return obj.Args, nil 1680 }) 1681 if err != nil { 1682 ec.Error(ctx, err) 1683 return graphql.Null 1684 } 1685 if resTmp == nil { 1686 if !graphql.HasFieldError(ctx, fc) { 1687 ec.Errorf(ctx, "must not be null") 1688 } 1689 return graphql.Null 1690 } 1691 res := resTmp.([]introspection.InputValue) 1692 fc.Result = res 1693 return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 1694 } 1695 1696 func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1697 fc = &graphql.FieldContext{ 1698 Object: "__Field", 1699 Field: field, 1700 IsMethod: false, 1701 IsResolver: false, 1702 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1703 switch field.Name { 1704 case "name": 1705 return ec.fieldContext___InputValue_name(ctx, field) 1706 case "description": 1707 return ec.fieldContext___InputValue_description(ctx, field) 1708 case "type": 1709 return ec.fieldContext___InputValue_type(ctx, field) 1710 case "defaultValue": 1711 return ec.fieldContext___InputValue_defaultValue(ctx, field) 1712 } 1713 return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) 1714 }, 1715 } 1716 return fc, nil 1717 } 1718 1719 func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 1720 fc, err := ec.fieldContext___Field_type(ctx, field) 1721 if err != nil { 1722 return graphql.Null 1723 } 1724 ctx = graphql.WithFieldContext(ctx, fc) 1725 defer func() { 1726 if r := recover(); r != nil { 1727 ec.Error(ctx, ec.Recover(ctx, r)) 1728 ret = graphql.Null 1729 } 1730 }() 1731 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1732 ctx = rctx // use context from middleware stack in children 1733 return obj.Type, nil 1734 }) 1735 if err != nil { 1736 ec.Error(ctx, err) 1737 return graphql.Null 1738 } 1739 if resTmp == nil { 1740 if !graphql.HasFieldError(ctx, fc) { 1741 ec.Errorf(ctx, "must not be null") 1742 } 1743 return graphql.Null 1744 } 1745 res := resTmp.(*introspection.Type) 1746 fc.Result = res 1747 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 1748 } 1749 1750 func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1751 fc = &graphql.FieldContext{ 1752 Object: "__Field", 1753 Field: field, 1754 IsMethod: false, 1755 IsResolver: false, 1756 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1757 switch field.Name { 1758 case "kind": 1759 return ec.fieldContext___Type_kind(ctx, field) 1760 case "name": 1761 return ec.fieldContext___Type_name(ctx, field) 1762 case "description": 1763 return ec.fieldContext___Type_description(ctx, field) 1764 case "fields": 1765 return ec.fieldContext___Type_fields(ctx, field) 1766 case "interfaces": 1767 return ec.fieldContext___Type_interfaces(ctx, field) 1768 case "possibleTypes": 1769 return ec.fieldContext___Type_possibleTypes(ctx, field) 1770 case "enumValues": 1771 return ec.fieldContext___Type_enumValues(ctx, field) 1772 case "inputFields": 1773 return ec.fieldContext___Type_inputFields(ctx, field) 1774 case "ofType": 1775 return ec.fieldContext___Type_ofType(ctx, field) 1776 case "specifiedByURL": 1777 return ec.fieldContext___Type_specifiedByURL(ctx, field) 1778 } 1779 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 1780 }, 1781 } 1782 return fc, nil 1783 } 1784 1785 func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 1786 fc, err := ec.fieldContext___Field_isDeprecated(ctx, field) 1787 if err != nil { 1788 return graphql.Null 1789 } 1790 ctx = graphql.WithFieldContext(ctx, fc) 1791 defer func() { 1792 if r := recover(); r != nil { 1793 ec.Error(ctx, ec.Recover(ctx, r)) 1794 ret = graphql.Null 1795 } 1796 }() 1797 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1798 ctx = rctx // use context from middleware stack in children 1799 return obj.IsDeprecated(), nil 1800 }) 1801 if err != nil { 1802 ec.Error(ctx, err) 1803 return graphql.Null 1804 } 1805 if resTmp == nil { 1806 if !graphql.HasFieldError(ctx, fc) { 1807 ec.Errorf(ctx, "must not be null") 1808 } 1809 return graphql.Null 1810 } 1811 res := resTmp.(bool) 1812 fc.Result = res 1813 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 1814 } 1815 1816 func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1817 fc = &graphql.FieldContext{ 1818 Object: "__Field", 1819 Field: field, 1820 IsMethod: true, 1821 IsResolver: false, 1822 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1823 return nil, errors.New("field of type Boolean does not have child fields") 1824 }, 1825 } 1826 return fc, nil 1827 } 1828 1829 func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 1830 fc, err := ec.fieldContext___Field_deprecationReason(ctx, field) 1831 if err != nil { 1832 return graphql.Null 1833 } 1834 ctx = graphql.WithFieldContext(ctx, fc) 1835 defer func() { 1836 if r := recover(); r != nil { 1837 ec.Error(ctx, ec.Recover(ctx, r)) 1838 ret = graphql.Null 1839 } 1840 }() 1841 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1842 ctx = rctx // use context from middleware stack in children 1843 return obj.DeprecationReason(), nil 1844 }) 1845 if err != nil { 1846 ec.Error(ctx, err) 1847 return graphql.Null 1848 } 1849 if resTmp == nil { 1850 return graphql.Null 1851 } 1852 res := resTmp.(*string) 1853 fc.Result = res 1854 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 1855 } 1856 1857 func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1858 fc = &graphql.FieldContext{ 1859 Object: "__Field", 1860 Field: field, 1861 IsMethod: true, 1862 IsResolver: false, 1863 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1864 return nil, errors.New("field of type String does not have child fields") 1865 }, 1866 } 1867 return fc, nil 1868 } 1869 1870 func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 1871 fc, err := ec.fieldContext___InputValue_name(ctx, field) 1872 if err != nil { 1873 return graphql.Null 1874 } 1875 ctx = graphql.WithFieldContext(ctx, fc) 1876 defer func() { 1877 if r := recover(); r != nil { 1878 ec.Error(ctx, ec.Recover(ctx, r)) 1879 ret = graphql.Null 1880 } 1881 }() 1882 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1883 ctx = rctx // use context from middleware stack in children 1884 return obj.Name, nil 1885 }) 1886 if err != nil { 1887 ec.Error(ctx, err) 1888 return graphql.Null 1889 } 1890 if resTmp == nil { 1891 if !graphql.HasFieldError(ctx, fc) { 1892 ec.Errorf(ctx, "must not be null") 1893 } 1894 return graphql.Null 1895 } 1896 res := resTmp.(string) 1897 fc.Result = res 1898 return ec.marshalNString2string(ctx, field.Selections, res) 1899 } 1900 1901 func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1902 fc = &graphql.FieldContext{ 1903 Object: "__InputValue", 1904 Field: field, 1905 IsMethod: false, 1906 IsResolver: false, 1907 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1908 return nil, errors.New("field of type String does not have child fields") 1909 }, 1910 } 1911 return fc, nil 1912 } 1913 1914 func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 1915 fc, err := ec.fieldContext___InputValue_description(ctx, field) 1916 if err != nil { 1917 return graphql.Null 1918 } 1919 ctx = graphql.WithFieldContext(ctx, fc) 1920 defer func() { 1921 if r := recover(); r != nil { 1922 ec.Error(ctx, ec.Recover(ctx, r)) 1923 ret = graphql.Null 1924 } 1925 }() 1926 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1927 ctx = rctx // use context from middleware stack in children 1928 return obj.Description(), nil 1929 }) 1930 if err != nil { 1931 ec.Error(ctx, err) 1932 return graphql.Null 1933 } 1934 if resTmp == nil { 1935 return graphql.Null 1936 } 1937 res := resTmp.(*string) 1938 fc.Result = res 1939 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 1940 } 1941 1942 func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1943 fc = &graphql.FieldContext{ 1944 Object: "__InputValue", 1945 Field: field, 1946 IsMethod: true, 1947 IsResolver: false, 1948 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1949 return nil, errors.New("field of type String does not have child fields") 1950 }, 1951 } 1952 return fc, nil 1953 } 1954 1955 func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 1956 fc, err := ec.fieldContext___InputValue_type(ctx, field) 1957 if err != nil { 1958 return graphql.Null 1959 } 1960 ctx = graphql.WithFieldContext(ctx, fc) 1961 defer func() { 1962 if r := recover(); r != nil { 1963 ec.Error(ctx, ec.Recover(ctx, r)) 1964 ret = graphql.Null 1965 } 1966 }() 1967 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 1968 ctx = rctx // use context from middleware stack in children 1969 return obj.Type, nil 1970 }) 1971 if err != nil { 1972 ec.Error(ctx, err) 1973 return graphql.Null 1974 } 1975 if resTmp == nil { 1976 if !graphql.HasFieldError(ctx, fc) { 1977 ec.Errorf(ctx, "must not be null") 1978 } 1979 return graphql.Null 1980 } 1981 res := resTmp.(*introspection.Type) 1982 fc.Result = res 1983 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 1984 } 1985 1986 func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 1987 fc = &graphql.FieldContext{ 1988 Object: "__InputValue", 1989 Field: field, 1990 IsMethod: false, 1991 IsResolver: false, 1992 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 1993 switch field.Name { 1994 case "kind": 1995 return ec.fieldContext___Type_kind(ctx, field) 1996 case "name": 1997 return ec.fieldContext___Type_name(ctx, field) 1998 case "description": 1999 return ec.fieldContext___Type_description(ctx, field) 2000 case "fields": 2001 return ec.fieldContext___Type_fields(ctx, field) 2002 case "interfaces": 2003 return ec.fieldContext___Type_interfaces(ctx, field) 2004 case "possibleTypes": 2005 return ec.fieldContext___Type_possibleTypes(ctx, field) 2006 case "enumValues": 2007 return ec.fieldContext___Type_enumValues(ctx, field) 2008 case "inputFields": 2009 return ec.fieldContext___Type_inputFields(ctx, field) 2010 case "ofType": 2011 return ec.fieldContext___Type_ofType(ctx, field) 2012 case "specifiedByURL": 2013 return ec.fieldContext___Type_specifiedByURL(ctx, field) 2014 } 2015 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 2016 }, 2017 } 2018 return fc, nil 2019 } 2020 2021 func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 2022 fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field) 2023 if err != nil { 2024 return graphql.Null 2025 } 2026 ctx = graphql.WithFieldContext(ctx, fc) 2027 defer func() { 2028 if r := recover(); r != nil { 2029 ec.Error(ctx, ec.Recover(ctx, r)) 2030 ret = graphql.Null 2031 } 2032 }() 2033 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2034 ctx = rctx // use context from middleware stack in children 2035 return obj.DefaultValue, nil 2036 }) 2037 if err != nil { 2038 ec.Error(ctx, err) 2039 return graphql.Null 2040 } 2041 if resTmp == nil { 2042 return graphql.Null 2043 } 2044 res := resTmp.(*string) 2045 fc.Result = res 2046 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 2047 } 2048 2049 func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2050 fc = &graphql.FieldContext{ 2051 Object: "__InputValue", 2052 Field: field, 2053 IsMethod: false, 2054 IsResolver: false, 2055 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2056 return nil, errors.New("field of type String does not have child fields") 2057 }, 2058 } 2059 return fc, nil 2060 } 2061 2062 func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 2063 fc, err := ec.fieldContext___Schema_description(ctx, field) 2064 if err != nil { 2065 return graphql.Null 2066 } 2067 ctx = graphql.WithFieldContext(ctx, fc) 2068 defer func() { 2069 if r := recover(); r != nil { 2070 ec.Error(ctx, ec.Recover(ctx, r)) 2071 ret = graphql.Null 2072 } 2073 }() 2074 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2075 ctx = rctx // use context from middleware stack in children 2076 return obj.Description(), nil 2077 }) 2078 if err != nil { 2079 ec.Error(ctx, err) 2080 return graphql.Null 2081 } 2082 if resTmp == nil { 2083 return graphql.Null 2084 } 2085 res := resTmp.(*string) 2086 fc.Result = res 2087 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 2088 } 2089 2090 func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2091 fc = &graphql.FieldContext{ 2092 Object: "__Schema", 2093 Field: field, 2094 IsMethod: true, 2095 IsResolver: false, 2096 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2097 return nil, errors.New("field of type String does not have child fields") 2098 }, 2099 } 2100 return fc, nil 2101 } 2102 2103 func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 2104 fc, err := ec.fieldContext___Schema_types(ctx, field) 2105 if err != nil { 2106 return graphql.Null 2107 } 2108 ctx = graphql.WithFieldContext(ctx, fc) 2109 defer func() { 2110 if r := recover(); r != nil { 2111 ec.Error(ctx, ec.Recover(ctx, r)) 2112 ret = graphql.Null 2113 } 2114 }() 2115 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2116 ctx = rctx // use context from middleware stack in children 2117 return obj.Types(), nil 2118 }) 2119 if err != nil { 2120 ec.Error(ctx, err) 2121 return graphql.Null 2122 } 2123 if resTmp == nil { 2124 if !graphql.HasFieldError(ctx, fc) { 2125 ec.Errorf(ctx, "must not be null") 2126 } 2127 return graphql.Null 2128 } 2129 res := resTmp.([]introspection.Type) 2130 fc.Result = res 2131 return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 2132 } 2133 2134 func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2135 fc = &graphql.FieldContext{ 2136 Object: "__Schema", 2137 Field: field, 2138 IsMethod: true, 2139 IsResolver: false, 2140 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2141 switch field.Name { 2142 case "kind": 2143 return ec.fieldContext___Type_kind(ctx, field) 2144 case "name": 2145 return ec.fieldContext___Type_name(ctx, field) 2146 case "description": 2147 return ec.fieldContext___Type_description(ctx, field) 2148 case "fields": 2149 return ec.fieldContext___Type_fields(ctx, field) 2150 case "interfaces": 2151 return ec.fieldContext___Type_interfaces(ctx, field) 2152 case "possibleTypes": 2153 return ec.fieldContext___Type_possibleTypes(ctx, field) 2154 case "enumValues": 2155 return ec.fieldContext___Type_enumValues(ctx, field) 2156 case "inputFields": 2157 return ec.fieldContext___Type_inputFields(ctx, field) 2158 case "ofType": 2159 return ec.fieldContext___Type_ofType(ctx, field) 2160 case "specifiedByURL": 2161 return ec.fieldContext___Type_specifiedByURL(ctx, field) 2162 } 2163 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 2164 }, 2165 } 2166 return fc, nil 2167 } 2168 2169 func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 2170 fc, err := ec.fieldContext___Schema_queryType(ctx, field) 2171 if err != nil { 2172 return graphql.Null 2173 } 2174 ctx = graphql.WithFieldContext(ctx, fc) 2175 defer func() { 2176 if r := recover(); r != nil { 2177 ec.Error(ctx, ec.Recover(ctx, r)) 2178 ret = graphql.Null 2179 } 2180 }() 2181 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2182 ctx = rctx // use context from middleware stack in children 2183 return obj.QueryType(), nil 2184 }) 2185 if err != nil { 2186 ec.Error(ctx, err) 2187 return graphql.Null 2188 } 2189 if resTmp == nil { 2190 if !graphql.HasFieldError(ctx, fc) { 2191 ec.Errorf(ctx, "must not be null") 2192 } 2193 return graphql.Null 2194 } 2195 res := resTmp.(*introspection.Type) 2196 fc.Result = res 2197 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 2198 } 2199 2200 func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2201 fc = &graphql.FieldContext{ 2202 Object: "__Schema", 2203 Field: field, 2204 IsMethod: true, 2205 IsResolver: false, 2206 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2207 switch field.Name { 2208 case "kind": 2209 return ec.fieldContext___Type_kind(ctx, field) 2210 case "name": 2211 return ec.fieldContext___Type_name(ctx, field) 2212 case "description": 2213 return ec.fieldContext___Type_description(ctx, field) 2214 case "fields": 2215 return ec.fieldContext___Type_fields(ctx, field) 2216 case "interfaces": 2217 return ec.fieldContext___Type_interfaces(ctx, field) 2218 case "possibleTypes": 2219 return ec.fieldContext___Type_possibleTypes(ctx, field) 2220 case "enumValues": 2221 return ec.fieldContext___Type_enumValues(ctx, field) 2222 case "inputFields": 2223 return ec.fieldContext___Type_inputFields(ctx, field) 2224 case "ofType": 2225 return ec.fieldContext___Type_ofType(ctx, field) 2226 case "specifiedByURL": 2227 return ec.fieldContext___Type_specifiedByURL(ctx, field) 2228 } 2229 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 2230 }, 2231 } 2232 return fc, nil 2233 } 2234 2235 func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 2236 fc, err := ec.fieldContext___Schema_mutationType(ctx, field) 2237 if err != nil { 2238 return graphql.Null 2239 } 2240 ctx = graphql.WithFieldContext(ctx, fc) 2241 defer func() { 2242 if r := recover(); r != nil { 2243 ec.Error(ctx, ec.Recover(ctx, r)) 2244 ret = graphql.Null 2245 } 2246 }() 2247 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2248 ctx = rctx // use context from middleware stack in children 2249 return obj.MutationType(), nil 2250 }) 2251 if err != nil { 2252 ec.Error(ctx, err) 2253 return graphql.Null 2254 } 2255 if resTmp == nil { 2256 return graphql.Null 2257 } 2258 res := resTmp.(*introspection.Type) 2259 fc.Result = res 2260 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 2261 } 2262 2263 func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2264 fc = &graphql.FieldContext{ 2265 Object: "__Schema", 2266 Field: field, 2267 IsMethod: true, 2268 IsResolver: false, 2269 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2270 switch field.Name { 2271 case "kind": 2272 return ec.fieldContext___Type_kind(ctx, field) 2273 case "name": 2274 return ec.fieldContext___Type_name(ctx, field) 2275 case "description": 2276 return ec.fieldContext___Type_description(ctx, field) 2277 case "fields": 2278 return ec.fieldContext___Type_fields(ctx, field) 2279 case "interfaces": 2280 return ec.fieldContext___Type_interfaces(ctx, field) 2281 case "possibleTypes": 2282 return ec.fieldContext___Type_possibleTypes(ctx, field) 2283 case "enumValues": 2284 return ec.fieldContext___Type_enumValues(ctx, field) 2285 case "inputFields": 2286 return ec.fieldContext___Type_inputFields(ctx, field) 2287 case "ofType": 2288 return ec.fieldContext___Type_ofType(ctx, field) 2289 case "specifiedByURL": 2290 return ec.fieldContext___Type_specifiedByURL(ctx, field) 2291 } 2292 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 2293 }, 2294 } 2295 return fc, nil 2296 } 2297 2298 func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 2299 fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field) 2300 if err != nil { 2301 return graphql.Null 2302 } 2303 ctx = graphql.WithFieldContext(ctx, fc) 2304 defer func() { 2305 if r := recover(); r != nil { 2306 ec.Error(ctx, ec.Recover(ctx, r)) 2307 ret = graphql.Null 2308 } 2309 }() 2310 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2311 ctx = rctx // use context from middleware stack in children 2312 return obj.SubscriptionType(), nil 2313 }) 2314 if err != nil { 2315 ec.Error(ctx, err) 2316 return graphql.Null 2317 } 2318 if resTmp == nil { 2319 return graphql.Null 2320 } 2321 res := resTmp.(*introspection.Type) 2322 fc.Result = res 2323 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 2324 } 2325 2326 func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2327 fc = &graphql.FieldContext{ 2328 Object: "__Schema", 2329 Field: field, 2330 IsMethod: true, 2331 IsResolver: false, 2332 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2333 switch field.Name { 2334 case "kind": 2335 return ec.fieldContext___Type_kind(ctx, field) 2336 case "name": 2337 return ec.fieldContext___Type_name(ctx, field) 2338 case "description": 2339 return ec.fieldContext___Type_description(ctx, field) 2340 case "fields": 2341 return ec.fieldContext___Type_fields(ctx, field) 2342 case "interfaces": 2343 return ec.fieldContext___Type_interfaces(ctx, field) 2344 case "possibleTypes": 2345 return ec.fieldContext___Type_possibleTypes(ctx, field) 2346 case "enumValues": 2347 return ec.fieldContext___Type_enumValues(ctx, field) 2348 case "inputFields": 2349 return ec.fieldContext___Type_inputFields(ctx, field) 2350 case "ofType": 2351 return ec.fieldContext___Type_ofType(ctx, field) 2352 case "specifiedByURL": 2353 return ec.fieldContext___Type_specifiedByURL(ctx, field) 2354 } 2355 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 2356 }, 2357 } 2358 return fc, nil 2359 } 2360 2361 func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 2362 fc, err := ec.fieldContext___Schema_directives(ctx, field) 2363 if err != nil { 2364 return graphql.Null 2365 } 2366 ctx = graphql.WithFieldContext(ctx, fc) 2367 defer func() { 2368 if r := recover(); r != nil { 2369 ec.Error(ctx, ec.Recover(ctx, r)) 2370 ret = graphql.Null 2371 } 2372 }() 2373 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2374 ctx = rctx // use context from middleware stack in children 2375 return obj.Directives(), nil 2376 }) 2377 if err != nil { 2378 ec.Error(ctx, err) 2379 return graphql.Null 2380 } 2381 if resTmp == nil { 2382 if !graphql.HasFieldError(ctx, fc) { 2383 ec.Errorf(ctx, "must not be null") 2384 } 2385 return graphql.Null 2386 } 2387 res := resTmp.([]introspection.Directive) 2388 fc.Result = res 2389 return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) 2390 } 2391 2392 func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2393 fc = &graphql.FieldContext{ 2394 Object: "__Schema", 2395 Field: field, 2396 IsMethod: true, 2397 IsResolver: false, 2398 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2399 switch field.Name { 2400 case "name": 2401 return ec.fieldContext___Directive_name(ctx, field) 2402 case "description": 2403 return ec.fieldContext___Directive_description(ctx, field) 2404 case "locations": 2405 return ec.fieldContext___Directive_locations(ctx, field) 2406 case "args": 2407 return ec.fieldContext___Directive_args(ctx, field) 2408 case "isRepeatable": 2409 return ec.fieldContext___Directive_isRepeatable(ctx, field) 2410 } 2411 return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name) 2412 }, 2413 } 2414 return fc, nil 2415 } 2416 2417 func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2418 fc, err := ec.fieldContext___Type_kind(ctx, field) 2419 if err != nil { 2420 return graphql.Null 2421 } 2422 ctx = graphql.WithFieldContext(ctx, fc) 2423 defer func() { 2424 if r := recover(); r != nil { 2425 ec.Error(ctx, ec.Recover(ctx, r)) 2426 ret = graphql.Null 2427 } 2428 }() 2429 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2430 ctx = rctx // use context from middleware stack in children 2431 return obj.Kind(), nil 2432 }) 2433 if err != nil { 2434 ec.Error(ctx, err) 2435 return graphql.Null 2436 } 2437 if resTmp == nil { 2438 if !graphql.HasFieldError(ctx, fc) { 2439 ec.Errorf(ctx, "must not be null") 2440 } 2441 return graphql.Null 2442 } 2443 res := resTmp.(string) 2444 fc.Result = res 2445 return ec.marshalN__TypeKind2string(ctx, field.Selections, res) 2446 } 2447 2448 func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2449 fc = &graphql.FieldContext{ 2450 Object: "__Type", 2451 Field: field, 2452 IsMethod: true, 2453 IsResolver: false, 2454 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2455 return nil, errors.New("field of type __TypeKind does not have child fields") 2456 }, 2457 } 2458 return fc, nil 2459 } 2460 2461 func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2462 fc, err := ec.fieldContext___Type_name(ctx, field) 2463 if err != nil { 2464 return graphql.Null 2465 } 2466 ctx = graphql.WithFieldContext(ctx, fc) 2467 defer func() { 2468 if r := recover(); r != nil { 2469 ec.Error(ctx, ec.Recover(ctx, r)) 2470 ret = graphql.Null 2471 } 2472 }() 2473 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2474 ctx = rctx // use context from middleware stack in children 2475 return obj.Name(), nil 2476 }) 2477 if err != nil { 2478 ec.Error(ctx, err) 2479 return graphql.Null 2480 } 2481 if resTmp == nil { 2482 return graphql.Null 2483 } 2484 res := resTmp.(*string) 2485 fc.Result = res 2486 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 2487 } 2488 2489 func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2490 fc = &graphql.FieldContext{ 2491 Object: "__Type", 2492 Field: field, 2493 IsMethod: true, 2494 IsResolver: false, 2495 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2496 return nil, errors.New("field of type String does not have child fields") 2497 }, 2498 } 2499 return fc, nil 2500 } 2501 2502 func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2503 fc, err := ec.fieldContext___Type_description(ctx, field) 2504 if err != nil { 2505 return graphql.Null 2506 } 2507 ctx = graphql.WithFieldContext(ctx, fc) 2508 defer func() { 2509 if r := recover(); r != nil { 2510 ec.Error(ctx, ec.Recover(ctx, r)) 2511 ret = graphql.Null 2512 } 2513 }() 2514 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2515 ctx = rctx // use context from middleware stack in children 2516 return obj.Description(), nil 2517 }) 2518 if err != nil { 2519 ec.Error(ctx, err) 2520 return graphql.Null 2521 } 2522 if resTmp == nil { 2523 return graphql.Null 2524 } 2525 res := resTmp.(*string) 2526 fc.Result = res 2527 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 2528 } 2529 2530 func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2531 fc = &graphql.FieldContext{ 2532 Object: "__Type", 2533 Field: field, 2534 IsMethod: true, 2535 IsResolver: false, 2536 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2537 return nil, errors.New("field of type String does not have child fields") 2538 }, 2539 } 2540 return fc, nil 2541 } 2542 2543 func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2544 fc, err := ec.fieldContext___Type_fields(ctx, field) 2545 if err != nil { 2546 return graphql.Null 2547 } 2548 ctx = graphql.WithFieldContext(ctx, fc) 2549 defer func() { 2550 if r := recover(); r != nil { 2551 ec.Error(ctx, ec.Recover(ctx, r)) 2552 ret = graphql.Null 2553 } 2554 }() 2555 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2556 ctx = rctx // use context from middleware stack in children 2557 return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil 2558 }) 2559 if err != nil { 2560 ec.Error(ctx, err) 2561 return graphql.Null 2562 } 2563 if resTmp == nil { 2564 return graphql.Null 2565 } 2566 res := resTmp.([]introspection.Field) 2567 fc.Result = res 2568 return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) 2569 } 2570 2571 func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2572 fc = &graphql.FieldContext{ 2573 Object: "__Type", 2574 Field: field, 2575 IsMethod: true, 2576 IsResolver: false, 2577 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2578 switch field.Name { 2579 case "name": 2580 return ec.fieldContext___Field_name(ctx, field) 2581 case "description": 2582 return ec.fieldContext___Field_description(ctx, field) 2583 case "args": 2584 return ec.fieldContext___Field_args(ctx, field) 2585 case "type": 2586 return ec.fieldContext___Field_type(ctx, field) 2587 case "isDeprecated": 2588 return ec.fieldContext___Field_isDeprecated(ctx, field) 2589 case "deprecationReason": 2590 return ec.fieldContext___Field_deprecationReason(ctx, field) 2591 } 2592 return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name) 2593 }, 2594 } 2595 defer func() { 2596 if r := recover(); r != nil { 2597 err = ec.Recover(ctx, r) 2598 ec.Error(ctx, err) 2599 } 2600 }() 2601 ctx = graphql.WithFieldContext(ctx, fc) 2602 if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 2603 ec.Error(ctx, err) 2604 return 2605 } 2606 return fc, nil 2607 } 2608 2609 func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2610 fc, err := ec.fieldContext___Type_interfaces(ctx, field) 2611 if err != nil { 2612 return graphql.Null 2613 } 2614 ctx = graphql.WithFieldContext(ctx, fc) 2615 defer func() { 2616 if r := recover(); r != nil { 2617 ec.Error(ctx, ec.Recover(ctx, r)) 2618 ret = graphql.Null 2619 } 2620 }() 2621 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2622 ctx = rctx // use context from middleware stack in children 2623 return obj.Interfaces(), nil 2624 }) 2625 if err != nil { 2626 ec.Error(ctx, err) 2627 return graphql.Null 2628 } 2629 if resTmp == nil { 2630 return graphql.Null 2631 } 2632 res := resTmp.([]introspection.Type) 2633 fc.Result = res 2634 return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 2635 } 2636 2637 func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2638 fc = &graphql.FieldContext{ 2639 Object: "__Type", 2640 Field: field, 2641 IsMethod: true, 2642 IsResolver: false, 2643 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2644 switch field.Name { 2645 case "kind": 2646 return ec.fieldContext___Type_kind(ctx, field) 2647 case "name": 2648 return ec.fieldContext___Type_name(ctx, field) 2649 case "description": 2650 return ec.fieldContext___Type_description(ctx, field) 2651 case "fields": 2652 return ec.fieldContext___Type_fields(ctx, field) 2653 case "interfaces": 2654 return ec.fieldContext___Type_interfaces(ctx, field) 2655 case "possibleTypes": 2656 return ec.fieldContext___Type_possibleTypes(ctx, field) 2657 case "enumValues": 2658 return ec.fieldContext___Type_enumValues(ctx, field) 2659 case "inputFields": 2660 return ec.fieldContext___Type_inputFields(ctx, field) 2661 case "ofType": 2662 return ec.fieldContext___Type_ofType(ctx, field) 2663 case "specifiedByURL": 2664 return ec.fieldContext___Type_specifiedByURL(ctx, field) 2665 } 2666 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 2667 }, 2668 } 2669 return fc, nil 2670 } 2671 2672 func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2673 fc, err := ec.fieldContext___Type_possibleTypes(ctx, field) 2674 if err != nil { 2675 return graphql.Null 2676 } 2677 ctx = graphql.WithFieldContext(ctx, fc) 2678 defer func() { 2679 if r := recover(); r != nil { 2680 ec.Error(ctx, ec.Recover(ctx, r)) 2681 ret = graphql.Null 2682 } 2683 }() 2684 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2685 ctx = rctx // use context from middleware stack in children 2686 return obj.PossibleTypes(), nil 2687 }) 2688 if err != nil { 2689 ec.Error(ctx, err) 2690 return graphql.Null 2691 } 2692 if resTmp == nil { 2693 return graphql.Null 2694 } 2695 res := resTmp.([]introspection.Type) 2696 fc.Result = res 2697 return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 2698 } 2699 2700 func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2701 fc = &graphql.FieldContext{ 2702 Object: "__Type", 2703 Field: field, 2704 IsMethod: true, 2705 IsResolver: false, 2706 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2707 switch field.Name { 2708 case "kind": 2709 return ec.fieldContext___Type_kind(ctx, field) 2710 case "name": 2711 return ec.fieldContext___Type_name(ctx, field) 2712 case "description": 2713 return ec.fieldContext___Type_description(ctx, field) 2714 case "fields": 2715 return ec.fieldContext___Type_fields(ctx, field) 2716 case "interfaces": 2717 return ec.fieldContext___Type_interfaces(ctx, field) 2718 case "possibleTypes": 2719 return ec.fieldContext___Type_possibleTypes(ctx, field) 2720 case "enumValues": 2721 return ec.fieldContext___Type_enumValues(ctx, field) 2722 case "inputFields": 2723 return ec.fieldContext___Type_inputFields(ctx, field) 2724 case "ofType": 2725 return ec.fieldContext___Type_ofType(ctx, field) 2726 case "specifiedByURL": 2727 return ec.fieldContext___Type_specifiedByURL(ctx, field) 2728 } 2729 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 2730 }, 2731 } 2732 return fc, nil 2733 } 2734 2735 func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2736 fc, err := ec.fieldContext___Type_enumValues(ctx, field) 2737 if err != nil { 2738 return graphql.Null 2739 } 2740 ctx = graphql.WithFieldContext(ctx, fc) 2741 defer func() { 2742 if r := recover(); r != nil { 2743 ec.Error(ctx, ec.Recover(ctx, r)) 2744 ret = graphql.Null 2745 } 2746 }() 2747 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2748 ctx = rctx // use context from middleware stack in children 2749 return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil 2750 }) 2751 if err != nil { 2752 ec.Error(ctx, err) 2753 return graphql.Null 2754 } 2755 if resTmp == nil { 2756 return graphql.Null 2757 } 2758 res := resTmp.([]introspection.EnumValue) 2759 fc.Result = res 2760 return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) 2761 } 2762 2763 func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2764 fc = &graphql.FieldContext{ 2765 Object: "__Type", 2766 Field: field, 2767 IsMethod: true, 2768 IsResolver: false, 2769 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2770 switch field.Name { 2771 case "name": 2772 return ec.fieldContext___EnumValue_name(ctx, field) 2773 case "description": 2774 return ec.fieldContext___EnumValue_description(ctx, field) 2775 case "isDeprecated": 2776 return ec.fieldContext___EnumValue_isDeprecated(ctx, field) 2777 case "deprecationReason": 2778 return ec.fieldContext___EnumValue_deprecationReason(ctx, field) 2779 } 2780 return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name) 2781 }, 2782 } 2783 defer func() { 2784 if r := recover(); r != nil { 2785 err = ec.Recover(ctx, r) 2786 ec.Error(ctx, err) 2787 } 2788 }() 2789 ctx = graphql.WithFieldContext(ctx, fc) 2790 if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { 2791 ec.Error(ctx, err) 2792 return 2793 } 2794 return fc, nil 2795 } 2796 2797 func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2798 fc, err := ec.fieldContext___Type_inputFields(ctx, field) 2799 if err != nil { 2800 return graphql.Null 2801 } 2802 ctx = graphql.WithFieldContext(ctx, fc) 2803 defer func() { 2804 if r := recover(); r != nil { 2805 ec.Error(ctx, ec.Recover(ctx, r)) 2806 ret = graphql.Null 2807 } 2808 }() 2809 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2810 ctx = rctx // use context from middleware stack in children 2811 return obj.InputFields(), nil 2812 }) 2813 if err != nil { 2814 ec.Error(ctx, err) 2815 return graphql.Null 2816 } 2817 if resTmp == nil { 2818 return graphql.Null 2819 } 2820 res := resTmp.([]introspection.InputValue) 2821 fc.Result = res 2822 return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 2823 } 2824 2825 func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2826 fc = &graphql.FieldContext{ 2827 Object: "__Type", 2828 Field: field, 2829 IsMethod: true, 2830 IsResolver: false, 2831 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2832 switch field.Name { 2833 case "name": 2834 return ec.fieldContext___InputValue_name(ctx, field) 2835 case "description": 2836 return ec.fieldContext___InputValue_description(ctx, field) 2837 case "type": 2838 return ec.fieldContext___InputValue_type(ctx, field) 2839 case "defaultValue": 2840 return ec.fieldContext___InputValue_defaultValue(ctx, field) 2841 } 2842 return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) 2843 }, 2844 } 2845 return fc, nil 2846 } 2847 2848 func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2849 fc, err := ec.fieldContext___Type_ofType(ctx, field) 2850 if err != nil { 2851 return graphql.Null 2852 } 2853 ctx = graphql.WithFieldContext(ctx, fc) 2854 defer func() { 2855 if r := recover(); r != nil { 2856 ec.Error(ctx, ec.Recover(ctx, r)) 2857 ret = graphql.Null 2858 } 2859 }() 2860 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2861 ctx = rctx // use context from middleware stack in children 2862 return obj.OfType(), nil 2863 }) 2864 if err != nil { 2865 ec.Error(ctx, err) 2866 return graphql.Null 2867 } 2868 if resTmp == nil { 2869 return graphql.Null 2870 } 2871 res := resTmp.(*introspection.Type) 2872 fc.Result = res 2873 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 2874 } 2875 2876 func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2877 fc = &graphql.FieldContext{ 2878 Object: "__Type", 2879 Field: field, 2880 IsMethod: true, 2881 IsResolver: false, 2882 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2883 switch field.Name { 2884 case "kind": 2885 return ec.fieldContext___Type_kind(ctx, field) 2886 case "name": 2887 return ec.fieldContext___Type_name(ctx, field) 2888 case "description": 2889 return ec.fieldContext___Type_description(ctx, field) 2890 case "fields": 2891 return ec.fieldContext___Type_fields(ctx, field) 2892 case "interfaces": 2893 return ec.fieldContext___Type_interfaces(ctx, field) 2894 case "possibleTypes": 2895 return ec.fieldContext___Type_possibleTypes(ctx, field) 2896 case "enumValues": 2897 return ec.fieldContext___Type_enumValues(ctx, field) 2898 case "inputFields": 2899 return ec.fieldContext___Type_inputFields(ctx, field) 2900 case "ofType": 2901 return ec.fieldContext___Type_ofType(ctx, field) 2902 case "specifiedByURL": 2903 return ec.fieldContext___Type_specifiedByURL(ctx, field) 2904 } 2905 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) 2906 }, 2907 } 2908 return fc, nil 2909 } 2910 2911 func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 2912 fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field) 2913 if err != nil { 2914 return graphql.Null 2915 } 2916 ctx = graphql.WithFieldContext(ctx, fc) 2917 defer func() { 2918 if r := recover(); r != nil { 2919 ec.Error(ctx, ec.Recover(ctx, r)) 2920 ret = graphql.Null 2921 } 2922 }() 2923 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { 2924 ctx = rctx // use context from middleware stack in children 2925 return obj.SpecifiedByURL(), nil 2926 }) 2927 if err != nil { 2928 ec.Error(ctx, err) 2929 return graphql.Null 2930 } 2931 if resTmp == nil { 2932 return graphql.Null 2933 } 2934 res := resTmp.(*string) 2935 fc.Result = res 2936 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 2937 } 2938 2939 func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { 2940 fc = &graphql.FieldContext{ 2941 Object: "__Type", 2942 Field: field, 2943 IsMethod: true, 2944 IsResolver: false, 2945 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { 2946 return nil, errors.New("field of type String does not have child fields") 2947 }, 2948 } 2949 return fc, nil 2950 } 2951 2952 // endregion **************************** field.gotpl ***************************** 2953 2954 // region **************************** input.gotpl ***************************** 2955 2956 func (ec *executionContext) unmarshalInputDateFilter(ctx context.Context, obj interface{}) (models.DateFilter, error) { 2957 var it models.DateFilter 2958 asMap := map[string]interface{}{} 2959 for k, v := range obj.(map[string]interface{}) { 2960 asMap[k] = v 2961 } 2962 2963 if _, present := asMap["timezone"]; !present { 2964 asMap["timezone"] = "UTC" 2965 } 2966 if _, present := asMap["op"]; !present { 2967 asMap["op"] = "EQ" 2968 } 2969 2970 fieldsInOrder := [...]string{"value", "timezone", "op"} 2971 for _, k := range fieldsInOrder { 2972 v, ok := asMap[k] 2973 if !ok { 2974 continue 2975 } 2976 switch k { 2977 case "value": 2978 var err error 2979 2980 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) 2981 it.Value, err = ec.unmarshalNString2string(ctx, v) 2982 if err != nil { 2983 return it, err 2984 } 2985 case "timezone": 2986 var err error 2987 2988 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("timezone")) 2989 it.Timezone, err = ec.unmarshalOString2ᚖstring(ctx, v) 2990 if err != nil { 2991 return it, err 2992 } 2993 case "op": 2994 var err error 2995 2996 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("op")) 2997 it.Op, err = ec.unmarshalODATE_FILTER_OP2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐDateFilterOp(ctx, v) 2998 if err != nil { 2999 return it, err 3000 } 3001 } 3002 } 3003 3004 return it, nil 3005 } 3006 3007 func (ec *executionContext) unmarshalInputListCoercion(ctx context.Context, obj interface{}) (models.ListCoercion, error) { 3008 var it models.ListCoercion 3009 asMap := map[string]interface{}{} 3010 for k, v := range obj.(map[string]interface{}) { 3011 asMap[k] = v 3012 } 3013 3014 fieldsInOrder := [...]string{"enumVal", "strVal", "intVal", "scalarVal"} 3015 for _, k := range fieldsInOrder { 3016 v, ok := asMap[k] 3017 if !ok { 3018 continue 3019 } 3020 switch k { 3021 case "enumVal": 3022 var err error 3023 3024 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("enumVal")) 3025 it.EnumVal, err = ec.unmarshalOErrorType2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐErrorType(ctx, v) 3026 if err != nil { 3027 return it, err 3028 } 3029 case "strVal": 3030 var err error 3031 3032 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("strVal")) 3033 it.StrVal, err = ec.unmarshalOString2ᚕᚖstring(ctx, v) 3034 if err != nil { 3035 return it, err 3036 } 3037 case "intVal": 3038 var err error 3039 3040 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("intVal")) 3041 it.IntVal, err = ec.unmarshalOInt2ᚕᚖint(ctx, v) 3042 if err != nil { 3043 return it, err 3044 } 3045 case "scalarVal": 3046 var err error 3047 3048 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("scalarVal")) 3049 it.ScalarVal, err = ec.unmarshalOMap2ᚕmap(ctx, v) 3050 if err != nil { 3051 return it, err 3052 } 3053 } 3054 } 3055 3056 return it, nil 3057 } 3058 3059 // endregion **************************** input.gotpl ***************************** 3060 3061 // region ************************** interface.gotpl *************************** 3062 3063 // endregion ************************** interface.gotpl *************************** 3064 3065 // region **************************** object.gotpl **************************** 3066 3067 var elementImplementors = []string{"Element"} 3068 3069 func (ec *executionContext) _Element(ctx context.Context, sel ast.SelectionSet, obj *models.Element) graphql.Marshaler { 3070 fields := graphql.CollectFields(ec.OperationContext, sel, elementImplementors) 3071 out := graphql.NewFieldSet(fields) 3072 var invalids uint32 3073 for i, field := range fields { 3074 switch field.Name { 3075 case "__typename": 3076 out.Values[i] = graphql.MarshalString("Element") 3077 case "child": 3078 field := field 3079 3080 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3081 defer func() { 3082 if r := recover(); r != nil { 3083 ec.Error(ctx, ec.Recover(ctx, r)) 3084 } 3085 }() 3086 res = ec._Element_child(ctx, field, obj) 3087 if res == graphql.Null { 3088 atomic.AddUint32(&invalids, 1) 3089 } 3090 return res 3091 } 3092 3093 out.Concurrently(i, func() graphql.Marshaler { 3094 return innerFunc(ctx) 3095 3096 }) 3097 case "error": 3098 field := field 3099 3100 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3101 defer func() { 3102 if r := recover(); r != nil { 3103 ec.Error(ctx, ec.Recover(ctx, r)) 3104 } 3105 }() 3106 res = ec._Element_error(ctx, field, obj) 3107 if res == graphql.Null { 3108 atomic.AddUint32(&invalids, 1) 3109 } 3110 return res 3111 } 3112 3113 out.Concurrently(i, func() graphql.Marshaler { 3114 return innerFunc(ctx) 3115 3116 }) 3117 case "mismatched": 3118 field := field 3119 3120 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3121 defer func() { 3122 if r := recover(); r != nil { 3123 ec.Error(ctx, ec.Recover(ctx, r)) 3124 } 3125 }() 3126 res = ec._Element_mismatched(ctx, field, obj) 3127 return res 3128 } 3129 3130 out.Concurrently(i, func() graphql.Marshaler { 3131 return innerFunc(ctx) 3132 3133 }) 3134 default: 3135 panic("unknown field " + strconv.Quote(field.Name)) 3136 } 3137 } 3138 out.Dispatch() 3139 if invalids > 0 { 3140 return graphql.Null 3141 } 3142 return out 3143 } 3144 3145 var queryImplementors = []string{"Query"} 3146 3147 func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { 3148 fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) 3149 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ 3150 Object: "Query", 3151 }) 3152 3153 out := graphql.NewFieldSet(fields) 3154 var invalids uint32 3155 for i, field := range fields { 3156 innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ 3157 Object: field.Name, 3158 Field: field, 3159 }) 3160 3161 switch field.Name { 3162 case "__typename": 3163 out.Values[i] = graphql.MarshalString("Query") 3164 case "path": 3165 field := field 3166 3167 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3168 defer func() { 3169 if r := recover(); r != nil { 3170 ec.Error(ctx, ec.Recover(ctx, r)) 3171 } 3172 }() 3173 res = ec._Query_path(ctx, field) 3174 return res 3175 } 3176 3177 rrm := func(ctx context.Context) graphql.Marshaler { 3178 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 3179 } 3180 3181 out.Concurrently(i, func() graphql.Marshaler { 3182 return rrm(innerCtx) 3183 }) 3184 case "date": 3185 field := field 3186 3187 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3188 defer func() { 3189 if r := recover(); r != nil { 3190 ec.Error(ctx, ec.Recover(ctx, r)) 3191 } 3192 }() 3193 res = ec._Query_date(ctx, field) 3194 if res == graphql.Null { 3195 atomic.AddUint32(&invalids, 1) 3196 } 3197 return res 3198 } 3199 3200 rrm := func(ctx context.Context) graphql.Marshaler { 3201 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 3202 } 3203 3204 out.Concurrently(i, func() graphql.Marshaler { 3205 return rrm(innerCtx) 3206 }) 3207 case "viewer": 3208 field := field 3209 3210 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3211 defer func() { 3212 if r := recover(); r != nil { 3213 ec.Error(ctx, ec.Recover(ctx, r)) 3214 } 3215 }() 3216 res = ec._Query_viewer(ctx, field) 3217 return res 3218 } 3219 3220 rrm := func(ctx context.Context) graphql.Marshaler { 3221 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 3222 } 3223 3224 out.Concurrently(i, func() graphql.Marshaler { 3225 return rrm(innerCtx) 3226 }) 3227 case "jsonEncoding": 3228 field := field 3229 3230 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3231 defer func() { 3232 if r := recover(); r != nil { 3233 ec.Error(ctx, ec.Recover(ctx, r)) 3234 } 3235 }() 3236 res = ec._Query_jsonEncoding(ctx, field) 3237 if res == graphql.Null { 3238 atomic.AddUint32(&invalids, 1) 3239 } 3240 return res 3241 } 3242 3243 rrm := func(ctx context.Context) graphql.Marshaler { 3244 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 3245 } 3246 3247 out.Concurrently(i, func() graphql.Marshaler { 3248 return rrm(innerCtx) 3249 }) 3250 case "error": 3251 field := field 3252 3253 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3254 defer func() { 3255 if r := recover(); r != nil { 3256 ec.Error(ctx, ec.Recover(ctx, r)) 3257 } 3258 }() 3259 res = ec._Query_error(ctx, field) 3260 if res == graphql.Null { 3261 atomic.AddUint32(&invalids, 1) 3262 } 3263 return res 3264 } 3265 3266 rrm := func(ctx context.Context) graphql.Marshaler { 3267 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 3268 } 3269 3270 out.Concurrently(i, func() graphql.Marshaler { 3271 return rrm(innerCtx) 3272 }) 3273 case "complexity": 3274 field := field 3275 3276 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3277 defer func() { 3278 if r := recover(); r != nil { 3279 ec.Error(ctx, ec.Recover(ctx, r)) 3280 } 3281 }() 3282 res = ec._Query_complexity(ctx, field) 3283 if res == graphql.Null { 3284 atomic.AddUint32(&invalids, 1) 3285 } 3286 return res 3287 } 3288 3289 rrm := func(ctx context.Context) graphql.Marshaler { 3290 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 3291 } 3292 3293 out.Concurrently(i, func() graphql.Marshaler { 3294 return rrm(innerCtx) 3295 }) 3296 case "coercion": 3297 field := field 3298 3299 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3300 defer func() { 3301 if r := recover(); r != nil { 3302 ec.Error(ctx, ec.Recover(ctx, r)) 3303 } 3304 }() 3305 res = ec._Query_coercion(ctx, field) 3306 if res == graphql.Null { 3307 atomic.AddUint32(&invalids, 1) 3308 } 3309 return res 3310 } 3311 3312 rrm := func(ctx context.Context) graphql.Marshaler { 3313 return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc) 3314 } 3315 3316 out.Concurrently(i, func() graphql.Marshaler { 3317 return rrm(innerCtx) 3318 }) 3319 case "__type": 3320 3321 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 3322 return ec._Query___type(ctx, field) 3323 }) 3324 3325 case "__schema": 3326 3327 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { 3328 return ec._Query___schema(ctx, field) 3329 }) 3330 3331 default: 3332 panic("unknown field " + strconv.Quote(field.Name)) 3333 } 3334 } 3335 out.Dispatch() 3336 if invalids > 0 { 3337 return graphql.Null 3338 } 3339 return out 3340 } 3341 3342 var userImplementors = []string{"User"} 3343 3344 func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj *remote_api.User) graphql.Marshaler { 3345 fields := graphql.CollectFields(ec.OperationContext, sel, userImplementors) 3346 out := graphql.NewFieldSet(fields) 3347 var invalids uint32 3348 for i, field := range fields { 3349 switch field.Name { 3350 case "__typename": 3351 out.Values[i] = graphql.MarshalString("User") 3352 case "name": 3353 3354 out.Values[i] = ec._User_name(ctx, field, obj) 3355 3356 if out.Values[i] == graphql.Null { 3357 atomic.AddUint32(&invalids, 1) 3358 } 3359 case "likes": 3360 field := field 3361 3362 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 3363 defer func() { 3364 if r := recover(); r != nil { 3365 ec.Error(ctx, ec.Recover(ctx, r)) 3366 } 3367 }() 3368 res = ec._User_likes(ctx, field, obj) 3369 if res == graphql.Null { 3370 atomic.AddUint32(&invalids, 1) 3371 } 3372 return res 3373 } 3374 3375 out.Concurrently(i, func() graphql.Marshaler { 3376 return innerFunc(ctx) 3377 3378 }) 3379 default: 3380 panic("unknown field " + strconv.Quote(field.Name)) 3381 } 3382 } 3383 out.Dispatch() 3384 if invalids > 0 { 3385 return graphql.Null 3386 } 3387 return out 3388 } 3389 3390 var viewerImplementors = []string{"Viewer"} 3391 3392 func (ec *executionContext) _Viewer(ctx context.Context, sel ast.SelectionSet, obj *models.Viewer) graphql.Marshaler { 3393 fields := graphql.CollectFields(ec.OperationContext, sel, viewerImplementors) 3394 out := graphql.NewFieldSet(fields) 3395 var invalids uint32 3396 for i, field := range fields { 3397 switch field.Name { 3398 case "__typename": 3399 out.Values[i] = graphql.MarshalString("Viewer") 3400 case "user": 3401 3402 out.Values[i] = ec._Viewer_user(ctx, field, obj) 3403 3404 default: 3405 panic("unknown field " + strconv.Quote(field.Name)) 3406 } 3407 } 3408 out.Dispatch() 3409 if invalids > 0 { 3410 return graphql.Null 3411 } 3412 return out 3413 } 3414 3415 var __DirectiveImplementors = []string{"__Directive"} 3416 3417 func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { 3418 fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) 3419 out := graphql.NewFieldSet(fields) 3420 var invalids uint32 3421 for i, field := range fields { 3422 switch field.Name { 3423 case "__typename": 3424 out.Values[i] = graphql.MarshalString("__Directive") 3425 case "name": 3426 3427 out.Values[i] = ec.___Directive_name(ctx, field, obj) 3428 3429 if out.Values[i] == graphql.Null { 3430 invalids++ 3431 } 3432 case "description": 3433 3434 out.Values[i] = ec.___Directive_description(ctx, field, obj) 3435 3436 case "locations": 3437 3438 out.Values[i] = ec.___Directive_locations(ctx, field, obj) 3439 3440 if out.Values[i] == graphql.Null { 3441 invalids++ 3442 } 3443 case "args": 3444 3445 out.Values[i] = ec.___Directive_args(ctx, field, obj) 3446 3447 if out.Values[i] == graphql.Null { 3448 invalids++ 3449 } 3450 case "isRepeatable": 3451 3452 out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj) 3453 3454 if out.Values[i] == graphql.Null { 3455 invalids++ 3456 } 3457 default: 3458 panic("unknown field " + strconv.Quote(field.Name)) 3459 } 3460 } 3461 out.Dispatch() 3462 if invalids > 0 { 3463 return graphql.Null 3464 } 3465 return out 3466 } 3467 3468 var __EnumValueImplementors = []string{"__EnumValue"} 3469 3470 func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { 3471 fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) 3472 out := graphql.NewFieldSet(fields) 3473 var invalids uint32 3474 for i, field := range fields { 3475 switch field.Name { 3476 case "__typename": 3477 out.Values[i] = graphql.MarshalString("__EnumValue") 3478 case "name": 3479 3480 out.Values[i] = ec.___EnumValue_name(ctx, field, obj) 3481 3482 if out.Values[i] == graphql.Null { 3483 invalids++ 3484 } 3485 case "description": 3486 3487 out.Values[i] = ec.___EnumValue_description(ctx, field, obj) 3488 3489 case "isDeprecated": 3490 3491 out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj) 3492 3493 if out.Values[i] == graphql.Null { 3494 invalids++ 3495 } 3496 case "deprecationReason": 3497 3498 out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj) 3499 3500 default: 3501 panic("unknown field " + strconv.Quote(field.Name)) 3502 } 3503 } 3504 out.Dispatch() 3505 if invalids > 0 { 3506 return graphql.Null 3507 } 3508 return out 3509 } 3510 3511 var __FieldImplementors = []string{"__Field"} 3512 3513 func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { 3514 fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) 3515 out := graphql.NewFieldSet(fields) 3516 var invalids uint32 3517 for i, field := range fields { 3518 switch field.Name { 3519 case "__typename": 3520 out.Values[i] = graphql.MarshalString("__Field") 3521 case "name": 3522 3523 out.Values[i] = ec.___Field_name(ctx, field, obj) 3524 3525 if out.Values[i] == graphql.Null { 3526 invalids++ 3527 } 3528 case "description": 3529 3530 out.Values[i] = ec.___Field_description(ctx, field, obj) 3531 3532 case "args": 3533 3534 out.Values[i] = ec.___Field_args(ctx, field, obj) 3535 3536 if out.Values[i] == graphql.Null { 3537 invalids++ 3538 } 3539 case "type": 3540 3541 out.Values[i] = ec.___Field_type(ctx, field, obj) 3542 3543 if out.Values[i] == graphql.Null { 3544 invalids++ 3545 } 3546 case "isDeprecated": 3547 3548 out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj) 3549 3550 if out.Values[i] == graphql.Null { 3551 invalids++ 3552 } 3553 case "deprecationReason": 3554 3555 out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj) 3556 3557 default: 3558 panic("unknown field " + strconv.Quote(field.Name)) 3559 } 3560 } 3561 out.Dispatch() 3562 if invalids > 0 { 3563 return graphql.Null 3564 } 3565 return out 3566 } 3567 3568 var __InputValueImplementors = []string{"__InputValue"} 3569 3570 func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { 3571 fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) 3572 out := graphql.NewFieldSet(fields) 3573 var invalids uint32 3574 for i, field := range fields { 3575 switch field.Name { 3576 case "__typename": 3577 out.Values[i] = graphql.MarshalString("__InputValue") 3578 case "name": 3579 3580 out.Values[i] = ec.___InputValue_name(ctx, field, obj) 3581 3582 if out.Values[i] == graphql.Null { 3583 invalids++ 3584 } 3585 case "description": 3586 3587 out.Values[i] = ec.___InputValue_description(ctx, field, obj) 3588 3589 case "type": 3590 3591 out.Values[i] = ec.___InputValue_type(ctx, field, obj) 3592 3593 if out.Values[i] == graphql.Null { 3594 invalids++ 3595 } 3596 case "defaultValue": 3597 3598 out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj) 3599 3600 default: 3601 panic("unknown field " + strconv.Quote(field.Name)) 3602 } 3603 } 3604 out.Dispatch() 3605 if invalids > 0 { 3606 return graphql.Null 3607 } 3608 return out 3609 } 3610 3611 var __SchemaImplementors = []string{"__Schema"} 3612 3613 func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { 3614 fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) 3615 out := graphql.NewFieldSet(fields) 3616 var invalids uint32 3617 for i, field := range fields { 3618 switch field.Name { 3619 case "__typename": 3620 out.Values[i] = graphql.MarshalString("__Schema") 3621 case "description": 3622 3623 out.Values[i] = ec.___Schema_description(ctx, field, obj) 3624 3625 case "types": 3626 3627 out.Values[i] = ec.___Schema_types(ctx, field, obj) 3628 3629 if out.Values[i] == graphql.Null { 3630 invalids++ 3631 } 3632 case "queryType": 3633 3634 out.Values[i] = ec.___Schema_queryType(ctx, field, obj) 3635 3636 if out.Values[i] == graphql.Null { 3637 invalids++ 3638 } 3639 case "mutationType": 3640 3641 out.Values[i] = ec.___Schema_mutationType(ctx, field, obj) 3642 3643 case "subscriptionType": 3644 3645 out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj) 3646 3647 case "directives": 3648 3649 out.Values[i] = ec.___Schema_directives(ctx, field, obj) 3650 3651 if out.Values[i] == graphql.Null { 3652 invalids++ 3653 } 3654 default: 3655 panic("unknown field " + strconv.Quote(field.Name)) 3656 } 3657 } 3658 out.Dispatch() 3659 if invalids > 0 { 3660 return graphql.Null 3661 } 3662 return out 3663 } 3664 3665 var __TypeImplementors = []string{"__Type"} 3666 3667 func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { 3668 fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) 3669 out := graphql.NewFieldSet(fields) 3670 var invalids uint32 3671 for i, field := range fields { 3672 switch field.Name { 3673 case "__typename": 3674 out.Values[i] = graphql.MarshalString("__Type") 3675 case "kind": 3676 3677 out.Values[i] = ec.___Type_kind(ctx, field, obj) 3678 3679 if out.Values[i] == graphql.Null { 3680 invalids++ 3681 } 3682 case "name": 3683 3684 out.Values[i] = ec.___Type_name(ctx, field, obj) 3685 3686 case "description": 3687 3688 out.Values[i] = ec.___Type_description(ctx, field, obj) 3689 3690 case "fields": 3691 3692 out.Values[i] = ec.___Type_fields(ctx, field, obj) 3693 3694 case "interfaces": 3695 3696 out.Values[i] = ec.___Type_interfaces(ctx, field, obj) 3697 3698 case "possibleTypes": 3699 3700 out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj) 3701 3702 case "enumValues": 3703 3704 out.Values[i] = ec.___Type_enumValues(ctx, field, obj) 3705 3706 case "inputFields": 3707 3708 out.Values[i] = ec.___Type_inputFields(ctx, field, obj) 3709 3710 case "ofType": 3711 3712 out.Values[i] = ec.___Type_ofType(ctx, field, obj) 3713 3714 case "specifiedByURL": 3715 3716 out.Values[i] = ec.___Type_specifiedByURL(ctx, field, obj) 3717 3718 default: 3719 panic("unknown field " + strconv.Quote(field.Name)) 3720 } 3721 } 3722 out.Dispatch() 3723 if invalids > 0 { 3724 return graphql.Null 3725 } 3726 return out 3727 } 3728 3729 // endregion **************************** object.gotpl **************************** 3730 3731 // region ***************************** type.gotpl ***************************** 3732 3733 func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) { 3734 res, err := graphql.UnmarshalBoolean(v) 3735 return res, graphql.ErrorOnPath(ctx, err) 3736 } 3737 3738 func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { 3739 res := graphql.MarshalBoolean(v) 3740 if res == graphql.Null { 3741 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 3742 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 3743 } 3744 } 3745 return res 3746 } 3747 3748 func (ec *executionContext) unmarshalNDateFilter2githubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐDateFilter(ctx context.Context, v interface{}) (models.DateFilter, error) { 3749 res, err := ec.unmarshalInputDateFilter(ctx, v) 3750 return res, graphql.ErrorOnPath(ctx, err) 3751 } 3752 3753 func (ec *executionContext) marshalNElement2githubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐElement(ctx context.Context, sel ast.SelectionSet, v models.Element) graphql.Marshaler { 3754 return ec._Element(ctx, sel, &v) 3755 } 3756 3757 func (ec *executionContext) marshalNElement2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐElement(ctx context.Context, sel ast.SelectionSet, v *models.Element) graphql.Marshaler { 3758 if v == nil { 3759 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 3760 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 3761 } 3762 return graphql.Null 3763 } 3764 return ec._Element(ctx, sel, v) 3765 } 3766 3767 func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) { 3768 res, err := graphql.UnmarshalInt(v) 3769 return res, graphql.ErrorOnPath(ctx, err) 3770 } 3771 3772 func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { 3773 res := graphql.MarshalInt(v) 3774 if res == graphql.Null { 3775 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 3776 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 3777 } 3778 } 3779 return res 3780 } 3781 3782 func (ec *executionContext) unmarshalNListCoercion2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐListCoercion(ctx context.Context, v interface{}) (*models.ListCoercion, error) { 3783 res, err := ec.unmarshalInputListCoercion(ctx, v) 3784 return &res, graphql.ErrorOnPath(ctx, err) 3785 } 3786 3787 func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) { 3788 res, err := graphql.UnmarshalString(v) 3789 return res, graphql.ErrorOnPath(ctx, err) 3790 } 3791 3792 func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 3793 res := graphql.MarshalString(v) 3794 if res == graphql.Null { 3795 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 3796 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 3797 } 3798 } 3799 return res 3800 } 3801 3802 func (ec *executionContext) unmarshalNString2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { 3803 var vSlice []interface{} 3804 if v != nil { 3805 vSlice = graphql.CoerceList(v) 3806 } 3807 var err error 3808 res := make([]string, len(vSlice)) 3809 for i := range vSlice { 3810 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 3811 res[i], err = ec.unmarshalNString2string(ctx, vSlice[i]) 3812 if err != nil { 3813 return nil, err 3814 } 3815 } 3816 return res, nil 3817 } 3818 3819 func (ec *executionContext) marshalNString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { 3820 ret := make(graphql.Array, len(v)) 3821 for i := range v { 3822 ret[i] = ec.marshalNString2string(ctx, sel, v[i]) 3823 } 3824 3825 for _, e := range ret { 3826 if e == graphql.Null { 3827 return graphql.Null 3828 } 3829 } 3830 3831 return ret 3832 } 3833 3834 func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler { 3835 return ec.___Directive(ctx, sel, &v) 3836 } 3837 3838 func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler { 3839 ret := make(graphql.Array, len(v)) 3840 var wg sync.WaitGroup 3841 isLen1 := len(v) == 1 3842 if !isLen1 { 3843 wg.Add(len(v)) 3844 } 3845 for i := range v { 3846 i := i 3847 fc := &graphql.FieldContext{ 3848 Index: &i, 3849 Result: &v[i], 3850 } 3851 ctx := graphql.WithFieldContext(ctx, fc) 3852 f := func(i int) { 3853 defer func() { 3854 if r := recover(); r != nil { 3855 ec.Error(ctx, ec.Recover(ctx, r)) 3856 ret = nil 3857 } 3858 }() 3859 if !isLen1 { 3860 defer wg.Done() 3861 } 3862 ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i]) 3863 } 3864 if isLen1 { 3865 f(i) 3866 } else { 3867 go f(i) 3868 } 3869 3870 } 3871 wg.Wait() 3872 3873 for _, e := range ret { 3874 if e == graphql.Null { 3875 return graphql.Null 3876 } 3877 } 3878 3879 return ret 3880 } 3881 3882 func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) { 3883 res, err := graphql.UnmarshalString(v) 3884 return res, graphql.ErrorOnPath(ctx, err) 3885 } 3886 3887 func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 3888 res := graphql.MarshalString(v) 3889 if res == graphql.Null { 3890 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 3891 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 3892 } 3893 } 3894 return res 3895 } 3896 3897 func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { 3898 var vSlice []interface{} 3899 if v != nil { 3900 vSlice = graphql.CoerceList(v) 3901 } 3902 var err error 3903 res := make([]string, len(vSlice)) 3904 for i := range vSlice { 3905 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 3906 res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i]) 3907 if err != nil { 3908 return nil, err 3909 } 3910 } 3911 return res, nil 3912 } 3913 3914 func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { 3915 ret := make(graphql.Array, len(v)) 3916 var wg sync.WaitGroup 3917 isLen1 := len(v) == 1 3918 if !isLen1 { 3919 wg.Add(len(v)) 3920 } 3921 for i := range v { 3922 i := i 3923 fc := &graphql.FieldContext{ 3924 Index: &i, 3925 Result: &v[i], 3926 } 3927 ctx := graphql.WithFieldContext(ctx, fc) 3928 f := func(i int) { 3929 defer func() { 3930 if r := recover(); r != nil { 3931 ec.Error(ctx, ec.Recover(ctx, r)) 3932 ret = nil 3933 } 3934 }() 3935 if !isLen1 { 3936 defer wg.Done() 3937 } 3938 ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i]) 3939 } 3940 if isLen1 { 3941 f(i) 3942 } else { 3943 go f(i) 3944 } 3945 3946 } 3947 wg.Wait() 3948 3949 for _, e := range ret { 3950 if e == graphql.Null { 3951 return graphql.Null 3952 } 3953 } 3954 3955 return ret 3956 } 3957 3958 func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler { 3959 return ec.___EnumValue(ctx, sel, &v) 3960 } 3961 3962 func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler { 3963 return ec.___Field(ctx, sel, &v) 3964 } 3965 3966 func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler { 3967 return ec.___InputValue(ctx, sel, &v) 3968 } 3969 3970 func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { 3971 ret := make(graphql.Array, len(v)) 3972 var wg sync.WaitGroup 3973 isLen1 := len(v) == 1 3974 if !isLen1 { 3975 wg.Add(len(v)) 3976 } 3977 for i := range v { 3978 i := i 3979 fc := &graphql.FieldContext{ 3980 Index: &i, 3981 Result: &v[i], 3982 } 3983 ctx := graphql.WithFieldContext(ctx, fc) 3984 f := func(i int) { 3985 defer func() { 3986 if r := recover(); r != nil { 3987 ec.Error(ctx, ec.Recover(ctx, r)) 3988 ret = nil 3989 } 3990 }() 3991 if !isLen1 { 3992 defer wg.Done() 3993 } 3994 ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) 3995 } 3996 if isLen1 { 3997 f(i) 3998 } else { 3999 go f(i) 4000 } 4001 4002 } 4003 wg.Wait() 4004 4005 for _, e := range ret { 4006 if e == graphql.Null { 4007 return graphql.Null 4008 } 4009 } 4010 4011 return ret 4012 } 4013 4014 func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { 4015 return ec.___Type(ctx, sel, &v) 4016 } 4017 4018 func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { 4019 ret := make(graphql.Array, len(v)) 4020 var wg sync.WaitGroup 4021 isLen1 := len(v) == 1 4022 if !isLen1 { 4023 wg.Add(len(v)) 4024 } 4025 for i := range v { 4026 i := i 4027 fc := &graphql.FieldContext{ 4028 Index: &i, 4029 Result: &v[i], 4030 } 4031 ctx := graphql.WithFieldContext(ctx, fc) 4032 f := func(i int) { 4033 defer func() { 4034 if r := recover(); r != nil { 4035 ec.Error(ctx, ec.Recover(ctx, r)) 4036 ret = nil 4037 } 4038 }() 4039 if !isLen1 { 4040 defer wg.Done() 4041 } 4042 ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) 4043 } 4044 if isLen1 { 4045 f(i) 4046 } else { 4047 go f(i) 4048 } 4049 4050 } 4051 wg.Wait() 4052 4053 for _, e := range ret { 4054 if e == graphql.Null { 4055 return graphql.Null 4056 } 4057 } 4058 4059 return ret 4060 } 4061 4062 func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { 4063 if v == nil { 4064 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 4065 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 4066 } 4067 return graphql.Null 4068 } 4069 return ec.___Type(ctx, sel, v) 4070 } 4071 4072 func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) { 4073 res, err := graphql.UnmarshalString(v) 4074 return res, graphql.ErrorOnPath(ctx, err) 4075 } 4076 4077 func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 4078 res := graphql.MarshalString(v) 4079 if res == graphql.Null { 4080 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 4081 ec.Errorf(ctx, "the requested element is null which the schema does not allow") 4082 } 4083 } 4084 return res 4085 } 4086 4087 func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) { 4088 res, err := graphql.UnmarshalBoolean(v) 4089 return res, graphql.ErrorOnPath(ctx, err) 4090 } 4091 4092 func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { 4093 res := graphql.MarshalBoolean(v) 4094 return res 4095 } 4096 4097 func (ec *executionContext) unmarshalOBoolean2ᚕboolᚄ(ctx context.Context, v interface{}) ([]bool, error) { 4098 if v == nil { 4099 return nil, nil 4100 } 4101 var vSlice []interface{} 4102 if v != nil { 4103 vSlice = graphql.CoerceList(v) 4104 } 4105 var err error 4106 res := make([]bool, len(vSlice)) 4107 for i := range vSlice { 4108 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 4109 res[i], err = ec.unmarshalNBoolean2bool(ctx, vSlice[i]) 4110 if err != nil { 4111 return nil, err 4112 } 4113 } 4114 return res, nil 4115 } 4116 4117 func (ec *executionContext) marshalOBoolean2ᚕboolᚄ(ctx context.Context, sel ast.SelectionSet, v []bool) graphql.Marshaler { 4118 if v == nil { 4119 return graphql.Null 4120 } 4121 ret := make(graphql.Array, len(v)) 4122 for i := range v { 4123 ret[i] = ec.marshalNBoolean2bool(ctx, sel, v[i]) 4124 } 4125 4126 for _, e := range ret { 4127 if e == graphql.Null { 4128 return graphql.Null 4129 } 4130 } 4131 4132 return ret 4133 } 4134 4135 func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) { 4136 if v == nil { 4137 return nil, nil 4138 } 4139 res, err := graphql.UnmarshalBoolean(v) 4140 return &res, graphql.ErrorOnPath(ctx, err) 4141 } 4142 4143 func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler { 4144 if v == nil { 4145 return graphql.Null 4146 } 4147 res := graphql.MarshalBoolean(*v) 4148 return res 4149 } 4150 4151 func (ec *executionContext) unmarshalODATE_FILTER_OP2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐDateFilterOp(ctx context.Context, v interface{}) (*models.DateFilterOp, error) { 4152 if v == nil { 4153 return nil, nil 4154 } 4155 var res = new(models.DateFilterOp) 4156 err := res.UnmarshalGQL(v) 4157 return res, graphql.ErrorOnPath(ctx, err) 4158 } 4159 4160 func (ec *executionContext) marshalODATE_FILTER_OP2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐDateFilterOp(ctx context.Context, sel ast.SelectionSet, v *models.DateFilterOp) graphql.Marshaler { 4161 if v == nil { 4162 return graphql.Null 4163 } 4164 return v 4165 } 4166 4167 func (ec *executionContext) marshalOElement2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐElement(ctx context.Context, sel ast.SelectionSet, v []*models.Element) graphql.Marshaler { 4168 if v == nil { 4169 return graphql.Null 4170 } 4171 ret := make(graphql.Array, len(v)) 4172 var wg sync.WaitGroup 4173 isLen1 := len(v) == 1 4174 if !isLen1 { 4175 wg.Add(len(v)) 4176 } 4177 for i := range v { 4178 i := i 4179 fc := &graphql.FieldContext{ 4180 Index: &i, 4181 Result: &v[i], 4182 } 4183 ctx := graphql.WithFieldContext(ctx, fc) 4184 f := func(i int) { 4185 defer func() { 4186 if r := recover(); r != nil { 4187 ec.Error(ctx, ec.Recover(ctx, r)) 4188 ret = nil 4189 } 4190 }() 4191 if !isLen1 { 4192 defer wg.Done() 4193 } 4194 ret[i] = ec.marshalOElement2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐElement(ctx, sel, v[i]) 4195 } 4196 if isLen1 { 4197 f(i) 4198 } else { 4199 go f(i) 4200 } 4201 4202 } 4203 wg.Wait() 4204 4205 return ret 4206 } 4207 4208 func (ec *executionContext) marshalOElement2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐElement(ctx context.Context, sel ast.SelectionSet, v *models.Element) graphql.Marshaler { 4209 if v == nil { 4210 return graphql.Null 4211 } 4212 return ec._Element(ctx, sel, v) 4213 } 4214 4215 func (ec *executionContext) unmarshalOErrorType2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐErrorType(ctx context.Context, v interface{}) ([]*models.ErrorType, error) { 4216 if v == nil { 4217 return nil, nil 4218 } 4219 var vSlice []interface{} 4220 if v != nil { 4221 vSlice = graphql.CoerceList(v) 4222 } 4223 var err error 4224 res := make([]*models.ErrorType, len(vSlice)) 4225 for i := range vSlice { 4226 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 4227 res[i], err = ec.unmarshalOErrorType2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐErrorType(ctx, vSlice[i]) 4228 if err != nil { 4229 return nil, err 4230 } 4231 } 4232 return res, nil 4233 } 4234 4235 func (ec *executionContext) marshalOErrorType2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐErrorType(ctx context.Context, sel ast.SelectionSet, v []*models.ErrorType) graphql.Marshaler { 4236 if v == nil { 4237 return graphql.Null 4238 } 4239 ret := make(graphql.Array, len(v)) 4240 var wg sync.WaitGroup 4241 isLen1 := len(v) == 1 4242 if !isLen1 { 4243 wg.Add(len(v)) 4244 } 4245 for i := range v { 4246 i := i 4247 fc := &graphql.FieldContext{ 4248 Index: &i, 4249 Result: &v[i], 4250 } 4251 ctx := graphql.WithFieldContext(ctx, fc) 4252 f := func(i int) { 4253 defer func() { 4254 if r := recover(); r != nil { 4255 ec.Error(ctx, ec.Recover(ctx, r)) 4256 ret = nil 4257 } 4258 }() 4259 if !isLen1 { 4260 defer wg.Done() 4261 } 4262 ret[i] = ec.marshalOErrorType2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐErrorType(ctx, sel, v[i]) 4263 } 4264 if isLen1 { 4265 f(i) 4266 } else { 4267 go f(i) 4268 } 4269 4270 } 4271 wg.Wait() 4272 4273 return ret 4274 } 4275 4276 func (ec *executionContext) unmarshalOErrorType2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐErrorType(ctx context.Context, v interface{}) (*models.ErrorType, error) { 4277 if v == nil { 4278 return nil, nil 4279 } 4280 var res = new(models.ErrorType) 4281 err := res.UnmarshalGQL(v) 4282 return res, graphql.ErrorOnPath(ctx, err) 4283 } 4284 4285 func (ec *executionContext) marshalOErrorType2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐErrorType(ctx context.Context, sel ast.SelectionSet, v *models.ErrorType) graphql.Marshaler { 4286 if v == nil { 4287 return graphql.Null 4288 } 4289 return v 4290 } 4291 4292 func (ec *executionContext) unmarshalOInt2ᚕᚖint(ctx context.Context, v interface{}) ([]*int, error) { 4293 if v == nil { 4294 return nil, nil 4295 } 4296 var vSlice []interface{} 4297 if v != nil { 4298 vSlice = graphql.CoerceList(v) 4299 } 4300 var err error 4301 res := make([]*int, len(vSlice)) 4302 for i := range vSlice { 4303 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 4304 res[i], err = ec.unmarshalOInt2ᚖint(ctx, vSlice[i]) 4305 if err != nil { 4306 return nil, err 4307 } 4308 } 4309 return res, nil 4310 } 4311 4312 func (ec *executionContext) marshalOInt2ᚕᚖint(ctx context.Context, sel ast.SelectionSet, v []*int) graphql.Marshaler { 4313 if v == nil { 4314 return graphql.Null 4315 } 4316 ret := make(graphql.Array, len(v)) 4317 for i := range v { 4318 ret[i] = ec.marshalOInt2ᚖint(ctx, sel, v[i]) 4319 } 4320 4321 return ret 4322 } 4323 4324 func (ec *executionContext) unmarshalOInt2ᚖint(ctx context.Context, v interface{}) (*int, error) { 4325 if v == nil { 4326 return nil, nil 4327 } 4328 res, err := graphql.UnmarshalInt(v) 4329 return &res, graphql.ErrorOnPath(ctx, err) 4330 } 4331 4332 func (ec *executionContext) marshalOInt2ᚖint(ctx context.Context, sel ast.SelectionSet, v *int) graphql.Marshaler { 4333 if v == nil { 4334 return graphql.Null 4335 } 4336 res := graphql.MarshalInt(*v) 4337 return res 4338 } 4339 4340 func (ec *executionContext) unmarshalOListCoercion2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐListCoercionᚄ(ctx context.Context, v interface{}) ([]*models.ListCoercion, error) { 4341 if v == nil { 4342 return nil, nil 4343 } 4344 var vSlice []interface{} 4345 if v != nil { 4346 vSlice = graphql.CoerceList(v) 4347 } 4348 var err error 4349 res := make([]*models.ListCoercion, len(vSlice)) 4350 for i := range vSlice { 4351 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 4352 res[i], err = ec.unmarshalNListCoercion2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐListCoercion(ctx, vSlice[i]) 4353 if err != nil { 4354 return nil, err 4355 } 4356 } 4357 return res, nil 4358 } 4359 4360 func (ec *executionContext) unmarshalOMap2map(ctx context.Context, v interface{}) (map[string]interface{}, error) { 4361 if v == nil { 4362 return nil, nil 4363 } 4364 res, err := graphql.UnmarshalMap(v) 4365 return res, graphql.ErrorOnPath(ctx, err) 4366 } 4367 4368 func (ec *executionContext) marshalOMap2map(ctx context.Context, sel ast.SelectionSet, v map[string]interface{}) graphql.Marshaler { 4369 if v == nil { 4370 return graphql.Null 4371 } 4372 res := graphql.MarshalMap(v) 4373 return res 4374 } 4375 4376 func (ec *executionContext) unmarshalOMap2ᚕmap(ctx context.Context, v interface{}) ([]map[string]interface{}, error) { 4377 if v == nil { 4378 return nil, nil 4379 } 4380 var vSlice []interface{} 4381 if v != nil { 4382 vSlice = graphql.CoerceList(v) 4383 } 4384 var err error 4385 res := make([]map[string]interface{}, len(vSlice)) 4386 for i := range vSlice { 4387 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 4388 res[i], err = ec.unmarshalOMap2map(ctx, vSlice[i]) 4389 if err != nil { 4390 return nil, err 4391 } 4392 } 4393 return res, nil 4394 } 4395 4396 func (ec *executionContext) marshalOMap2ᚕmap(ctx context.Context, sel ast.SelectionSet, v []map[string]interface{}) graphql.Marshaler { 4397 if v == nil { 4398 return graphql.Null 4399 } 4400 ret := make(graphql.Array, len(v)) 4401 for i := range v { 4402 ret[i] = ec.marshalOMap2map(ctx, sel, v[i]) 4403 } 4404 4405 return ret 4406 } 4407 4408 func (ec *executionContext) unmarshalOString2ᚕᚖstring(ctx context.Context, v interface{}) ([]*string, error) { 4409 if v == nil { 4410 return nil, nil 4411 } 4412 var vSlice []interface{} 4413 if v != nil { 4414 vSlice = graphql.CoerceList(v) 4415 } 4416 var err error 4417 res := make([]*string, len(vSlice)) 4418 for i := range vSlice { 4419 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 4420 res[i], err = ec.unmarshalOString2ᚖstring(ctx, vSlice[i]) 4421 if err != nil { 4422 return nil, err 4423 } 4424 } 4425 return res, nil 4426 } 4427 4428 func (ec *executionContext) marshalOString2ᚕᚖstring(ctx context.Context, sel ast.SelectionSet, v []*string) graphql.Marshaler { 4429 if v == nil { 4430 return graphql.Null 4431 } 4432 ret := make(graphql.Array, len(v)) 4433 for i := range v { 4434 ret[i] = ec.marshalOString2ᚖstring(ctx, sel, v[i]) 4435 } 4436 4437 return ret 4438 } 4439 4440 func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { 4441 if v == nil { 4442 return nil, nil 4443 } 4444 res, err := graphql.UnmarshalString(v) 4445 return &res, graphql.ErrorOnPath(ctx, err) 4446 } 4447 4448 func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { 4449 if v == nil { 4450 return graphql.Null 4451 } 4452 res := graphql.MarshalString(*v) 4453 return res 4454 } 4455 4456 func (ec *executionContext) marshalOUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋremote_apiᚐUser(ctx context.Context, sel ast.SelectionSet, v *remote_api.User) graphql.Marshaler { 4457 if v == nil { 4458 return graphql.Null 4459 } 4460 return ec._User(ctx, sel, v) 4461 } 4462 4463 func (ec *executionContext) marshalOViewer2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋintegrationᚋmodelsᚑgoᚐViewer(ctx context.Context, sel ast.SelectionSet, v *models.Viewer) graphql.Marshaler { 4464 if v == nil { 4465 return graphql.Null 4466 } 4467 return ec._Viewer(ctx, sel, v) 4468 } 4469 4470 func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler { 4471 if v == nil { 4472 return graphql.Null 4473 } 4474 ret := make(graphql.Array, len(v)) 4475 var wg sync.WaitGroup 4476 isLen1 := len(v) == 1 4477 if !isLen1 { 4478 wg.Add(len(v)) 4479 } 4480 for i := range v { 4481 i := i 4482 fc := &graphql.FieldContext{ 4483 Index: &i, 4484 Result: &v[i], 4485 } 4486 ctx := graphql.WithFieldContext(ctx, fc) 4487 f := func(i int) { 4488 defer func() { 4489 if r := recover(); r != nil { 4490 ec.Error(ctx, ec.Recover(ctx, r)) 4491 ret = nil 4492 } 4493 }() 4494 if !isLen1 { 4495 defer wg.Done() 4496 } 4497 ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i]) 4498 } 4499 if isLen1 { 4500 f(i) 4501 } else { 4502 go f(i) 4503 } 4504 4505 } 4506 wg.Wait() 4507 4508 for _, e := range ret { 4509 if e == graphql.Null { 4510 return graphql.Null 4511 } 4512 } 4513 4514 return ret 4515 } 4516 4517 func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler { 4518 if v == nil { 4519 return graphql.Null 4520 } 4521 ret := make(graphql.Array, len(v)) 4522 var wg sync.WaitGroup 4523 isLen1 := len(v) == 1 4524 if !isLen1 { 4525 wg.Add(len(v)) 4526 } 4527 for i := range v { 4528 i := i 4529 fc := &graphql.FieldContext{ 4530 Index: &i, 4531 Result: &v[i], 4532 } 4533 ctx := graphql.WithFieldContext(ctx, fc) 4534 f := func(i int) { 4535 defer func() { 4536 if r := recover(); r != nil { 4537 ec.Error(ctx, ec.Recover(ctx, r)) 4538 ret = nil 4539 } 4540 }() 4541 if !isLen1 { 4542 defer wg.Done() 4543 } 4544 ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i]) 4545 } 4546 if isLen1 { 4547 f(i) 4548 } else { 4549 go f(i) 4550 } 4551 4552 } 4553 wg.Wait() 4554 4555 for _, e := range ret { 4556 if e == graphql.Null { 4557 return graphql.Null 4558 } 4559 } 4560 4561 return ret 4562 } 4563 4564 func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { 4565 if v == nil { 4566 return graphql.Null 4567 } 4568 ret := make(graphql.Array, len(v)) 4569 var wg sync.WaitGroup 4570 isLen1 := len(v) == 1 4571 if !isLen1 { 4572 wg.Add(len(v)) 4573 } 4574 for i := range v { 4575 i := i 4576 fc := &graphql.FieldContext{ 4577 Index: &i, 4578 Result: &v[i], 4579 } 4580 ctx := graphql.WithFieldContext(ctx, fc) 4581 f := func(i int) { 4582 defer func() { 4583 if r := recover(); r != nil { 4584 ec.Error(ctx, ec.Recover(ctx, r)) 4585 ret = nil 4586 } 4587 }() 4588 if !isLen1 { 4589 defer wg.Done() 4590 } 4591 ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) 4592 } 4593 if isLen1 { 4594 f(i) 4595 } else { 4596 go f(i) 4597 } 4598 4599 } 4600 wg.Wait() 4601 4602 for _, e := range ret { 4603 if e == graphql.Null { 4604 return graphql.Null 4605 } 4606 } 4607 4608 return ret 4609 } 4610 4611 func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler { 4612 if v == nil { 4613 return graphql.Null 4614 } 4615 return ec.___Schema(ctx, sel, v) 4616 } 4617 4618 func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { 4619 if v == nil { 4620 return graphql.Null 4621 } 4622 ret := make(graphql.Array, len(v)) 4623 var wg sync.WaitGroup 4624 isLen1 := len(v) == 1 4625 if !isLen1 { 4626 wg.Add(len(v)) 4627 } 4628 for i := range v { 4629 i := i 4630 fc := &graphql.FieldContext{ 4631 Index: &i, 4632 Result: &v[i], 4633 } 4634 ctx := graphql.WithFieldContext(ctx, fc) 4635 f := func(i int) { 4636 defer func() { 4637 if r := recover(); r != nil { 4638 ec.Error(ctx, ec.Recover(ctx, r)) 4639 ret = nil 4640 } 4641 }() 4642 if !isLen1 { 4643 defer wg.Done() 4644 } 4645 ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) 4646 } 4647 if isLen1 { 4648 f(i) 4649 } else { 4650 go f(i) 4651 } 4652 4653 } 4654 wg.Wait() 4655 4656 for _, e := range ret { 4657 if e == graphql.Null { 4658 return graphql.Null 4659 } 4660 } 4661 4662 return ret 4663 } 4664 4665 func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { 4666 if v == nil { 4667 return graphql.Null 4668 } 4669 return ec.___Type(ctx, sel, v) 4670 } 4671 4672 // endregion ***************************** type.gotpl *****************************