github.com/apipluspower/gqlgen@v0.15.2/codegen/testserver/followschema/prelude.generated.go (about) 1 // Code generated by github.com/99designs/gqlgen, DO NOT EDIT. 2 3 package followschema 4 5 import ( 6 "context" 7 "strconv" 8 "sync" 9 10 "github.com/apipluspower/gqlgen/graphql" 11 "github.com/apipluspower/gqlgen/graphql/introspection" 12 "github.com/vektah/gqlparser/v2/ast" 13 ) 14 15 // region ************************** generated!.gotpl ************************** 16 17 // endregion ************************** generated!.gotpl ************************** 18 19 // region ***************************** args.gotpl ***************************** 20 21 func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 22 var err error 23 args := map[string]interface{}{} 24 var arg0 bool 25 if tmp, ok := rawArgs["includeDeprecated"]; ok { 26 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) 27 arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) 28 if err != nil { 29 return nil, err 30 } 31 } 32 args["includeDeprecated"] = arg0 33 return args, nil 34 } 35 36 func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { 37 var err error 38 args := map[string]interface{}{} 39 var arg0 bool 40 if tmp, ok := rawArgs["includeDeprecated"]; ok { 41 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) 42 arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) 43 if err != nil { 44 return nil, err 45 } 46 } 47 args["includeDeprecated"] = arg0 48 return args, nil 49 } 50 51 // endregion ***************************** args.gotpl ***************************** 52 53 // region ************************** directives.gotpl ************************** 54 55 // endregion ************************** directives.gotpl ************************** 56 57 // region **************************** field.gotpl ***************************** 58 59 func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 60 defer func() { 61 if r := recover(); r != nil { 62 ec.Error(ctx, ec.Recover(ctx, r)) 63 ret = graphql.Null 64 } 65 }() 66 fc := &graphql.FieldContext{ 67 Object: "__Directive", 68 Field: field, 69 Args: nil, 70 IsMethod: false, 71 IsResolver: false, 72 } 73 74 ctx = graphql.WithFieldContext(ctx, fc) 75 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 76 ctx = rctx // use context from middleware stack in children 77 return obj.Name, nil 78 }) 79 80 if resTmp == nil { 81 if !graphql.HasFieldError(ctx, fc) { 82 ec.Errorf(ctx, "must not be null") 83 } 84 return graphql.Null 85 } 86 res := resTmp.(string) 87 fc.Result = res 88 return ec.marshalNString2string(ctx, field.Selections, res) 89 } 90 91 func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 92 defer func() { 93 if r := recover(); r != nil { 94 ec.Error(ctx, ec.Recover(ctx, r)) 95 ret = graphql.Null 96 } 97 }() 98 fc := &graphql.FieldContext{ 99 Object: "__Directive", 100 Field: field, 101 Args: nil, 102 IsMethod: false, 103 IsResolver: false, 104 } 105 106 ctx = graphql.WithFieldContext(ctx, fc) 107 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 108 ctx = rctx // use context from middleware stack in children 109 return obj.Description, nil 110 }) 111 112 if resTmp == nil { 113 return graphql.Null 114 } 115 res := resTmp.(string) 116 fc.Result = res 117 return ec.marshalOString2string(ctx, field.Selections, res) 118 } 119 120 func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 121 defer func() { 122 if r := recover(); r != nil { 123 ec.Error(ctx, ec.Recover(ctx, r)) 124 ret = graphql.Null 125 } 126 }() 127 fc := &graphql.FieldContext{ 128 Object: "__Directive", 129 Field: field, 130 Args: nil, 131 IsMethod: false, 132 IsResolver: false, 133 } 134 135 ctx = graphql.WithFieldContext(ctx, fc) 136 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 137 ctx = rctx // use context from middleware stack in children 138 return obj.Locations, nil 139 }) 140 141 if resTmp == nil { 142 if !graphql.HasFieldError(ctx, fc) { 143 ec.Errorf(ctx, "must not be null") 144 } 145 return graphql.Null 146 } 147 res := resTmp.([]string) 148 fc.Result = res 149 return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) 150 } 151 152 func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 153 defer func() { 154 if r := recover(); r != nil { 155 ec.Error(ctx, ec.Recover(ctx, r)) 156 ret = graphql.Null 157 } 158 }() 159 fc := &graphql.FieldContext{ 160 Object: "__Directive", 161 Field: field, 162 Args: nil, 163 IsMethod: false, 164 IsResolver: false, 165 } 166 167 ctx = graphql.WithFieldContext(ctx, fc) 168 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 169 ctx = rctx // use context from middleware stack in children 170 return obj.Args, nil 171 }) 172 173 if resTmp == nil { 174 if !graphql.HasFieldError(ctx, fc) { 175 ec.Errorf(ctx, "must not be null") 176 } 177 return graphql.Null 178 } 179 res := resTmp.([]introspection.InputValue) 180 fc.Result = res 181 return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 182 } 183 184 func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { 185 defer func() { 186 if r := recover(); r != nil { 187 ec.Error(ctx, ec.Recover(ctx, r)) 188 ret = graphql.Null 189 } 190 }() 191 fc := &graphql.FieldContext{ 192 Object: "__Directive", 193 Field: field, 194 Args: nil, 195 IsMethod: false, 196 IsResolver: false, 197 } 198 199 ctx = graphql.WithFieldContext(ctx, fc) 200 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 201 ctx = rctx // use context from middleware stack in children 202 return obj.IsRepeatable, nil 203 }) 204 205 if resTmp == nil { 206 if !graphql.HasFieldError(ctx, fc) { 207 ec.Errorf(ctx, "must not be null") 208 } 209 return graphql.Null 210 } 211 res := resTmp.(bool) 212 fc.Result = res 213 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 214 } 215 216 func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 217 defer func() { 218 if r := recover(); r != nil { 219 ec.Error(ctx, ec.Recover(ctx, r)) 220 ret = graphql.Null 221 } 222 }() 223 fc := &graphql.FieldContext{ 224 Object: "__EnumValue", 225 Field: field, 226 Args: nil, 227 IsMethod: false, 228 IsResolver: false, 229 } 230 231 ctx = graphql.WithFieldContext(ctx, fc) 232 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 233 ctx = rctx // use context from middleware stack in children 234 return obj.Name, nil 235 }) 236 237 if resTmp == nil { 238 if !graphql.HasFieldError(ctx, fc) { 239 ec.Errorf(ctx, "must not be null") 240 } 241 return graphql.Null 242 } 243 res := resTmp.(string) 244 fc.Result = res 245 return ec.marshalNString2string(ctx, field.Selections, res) 246 } 247 248 func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 249 defer func() { 250 if r := recover(); r != nil { 251 ec.Error(ctx, ec.Recover(ctx, r)) 252 ret = graphql.Null 253 } 254 }() 255 fc := &graphql.FieldContext{ 256 Object: "__EnumValue", 257 Field: field, 258 Args: nil, 259 IsMethod: false, 260 IsResolver: false, 261 } 262 263 ctx = graphql.WithFieldContext(ctx, fc) 264 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 265 ctx = rctx // use context from middleware stack in children 266 return obj.Description, nil 267 }) 268 269 if resTmp == nil { 270 return graphql.Null 271 } 272 res := resTmp.(string) 273 fc.Result = res 274 return ec.marshalOString2string(ctx, field.Selections, res) 275 } 276 277 func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 278 defer func() { 279 if r := recover(); r != nil { 280 ec.Error(ctx, ec.Recover(ctx, r)) 281 ret = graphql.Null 282 } 283 }() 284 fc := &graphql.FieldContext{ 285 Object: "__EnumValue", 286 Field: field, 287 Args: nil, 288 IsMethod: true, 289 IsResolver: false, 290 } 291 292 ctx = graphql.WithFieldContext(ctx, fc) 293 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 294 ctx = rctx // use context from middleware stack in children 295 return obj.IsDeprecated(), nil 296 }) 297 298 if resTmp == nil { 299 if !graphql.HasFieldError(ctx, fc) { 300 ec.Errorf(ctx, "must not be null") 301 } 302 return graphql.Null 303 } 304 res := resTmp.(bool) 305 fc.Result = res 306 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 307 } 308 309 func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { 310 defer func() { 311 if r := recover(); r != nil { 312 ec.Error(ctx, ec.Recover(ctx, r)) 313 ret = graphql.Null 314 } 315 }() 316 fc := &graphql.FieldContext{ 317 Object: "__EnumValue", 318 Field: field, 319 Args: nil, 320 IsMethod: true, 321 IsResolver: false, 322 } 323 324 ctx = graphql.WithFieldContext(ctx, fc) 325 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 326 ctx = rctx // use context from middleware stack in children 327 return obj.DeprecationReason(), nil 328 }) 329 330 if resTmp == nil { 331 return graphql.Null 332 } 333 res := resTmp.(*string) 334 fc.Result = res 335 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 336 } 337 338 func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 339 defer func() { 340 if r := recover(); r != nil { 341 ec.Error(ctx, ec.Recover(ctx, r)) 342 ret = graphql.Null 343 } 344 }() 345 fc := &graphql.FieldContext{ 346 Object: "__Field", 347 Field: field, 348 Args: nil, 349 IsMethod: false, 350 IsResolver: false, 351 } 352 353 ctx = graphql.WithFieldContext(ctx, fc) 354 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 355 ctx = rctx // use context from middleware stack in children 356 return obj.Name, nil 357 }) 358 359 if resTmp == nil { 360 if !graphql.HasFieldError(ctx, fc) { 361 ec.Errorf(ctx, "must not be null") 362 } 363 return graphql.Null 364 } 365 res := resTmp.(string) 366 fc.Result = res 367 return ec.marshalNString2string(ctx, field.Selections, res) 368 } 369 370 func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 371 defer func() { 372 if r := recover(); r != nil { 373 ec.Error(ctx, ec.Recover(ctx, r)) 374 ret = graphql.Null 375 } 376 }() 377 fc := &graphql.FieldContext{ 378 Object: "__Field", 379 Field: field, 380 Args: nil, 381 IsMethod: false, 382 IsResolver: false, 383 } 384 385 ctx = graphql.WithFieldContext(ctx, fc) 386 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 387 ctx = rctx // use context from middleware stack in children 388 return obj.Description, nil 389 }) 390 391 if resTmp == nil { 392 return graphql.Null 393 } 394 res := resTmp.(string) 395 fc.Result = res 396 return ec.marshalOString2string(ctx, field.Selections, res) 397 } 398 399 func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 400 defer func() { 401 if r := recover(); r != nil { 402 ec.Error(ctx, ec.Recover(ctx, r)) 403 ret = graphql.Null 404 } 405 }() 406 fc := &graphql.FieldContext{ 407 Object: "__Field", 408 Field: field, 409 Args: nil, 410 IsMethod: false, 411 IsResolver: false, 412 } 413 414 ctx = graphql.WithFieldContext(ctx, fc) 415 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 416 ctx = rctx // use context from middleware stack in children 417 return obj.Args, nil 418 }) 419 420 if resTmp == nil { 421 if !graphql.HasFieldError(ctx, fc) { 422 ec.Errorf(ctx, "must not be null") 423 } 424 return graphql.Null 425 } 426 res := resTmp.([]introspection.InputValue) 427 fc.Result = res 428 return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 429 } 430 431 func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 432 defer func() { 433 if r := recover(); r != nil { 434 ec.Error(ctx, ec.Recover(ctx, r)) 435 ret = graphql.Null 436 } 437 }() 438 fc := &graphql.FieldContext{ 439 Object: "__Field", 440 Field: field, 441 Args: nil, 442 IsMethod: false, 443 IsResolver: false, 444 } 445 446 ctx = graphql.WithFieldContext(ctx, fc) 447 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 448 ctx = rctx // use context from middleware stack in children 449 return obj.Type, nil 450 }) 451 452 if resTmp == nil { 453 if !graphql.HasFieldError(ctx, fc) { 454 ec.Errorf(ctx, "must not be null") 455 } 456 return graphql.Null 457 } 458 res := resTmp.(*introspection.Type) 459 fc.Result = res 460 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 461 } 462 463 func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 464 defer func() { 465 if r := recover(); r != nil { 466 ec.Error(ctx, ec.Recover(ctx, r)) 467 ret = graphql.Null 468 } 469 }() 470 fc := &graphql.FieldContext{ 471 Object: "__Field", 472 Field: field, 473 Args: nil, 474 IsMethod: true, 475 IsResolver: false, 476 } 477 478 ctx = graphql.WithFieldContext(ctx, fc) 479 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 480 ctx = rctx // use context from middleware stack in children 481 return obj.IsDeprecated(), nil 482 }) 483 484 if resTmp == nil { 485 if !graphql.HasFieldError(ctx, fc) { 486 ec.Errorf(ctx, "must not be null") 487 } 488 return graphql.Null 489 } 490 res := resTmp.(bool) 491 fc.Result = res 492 return ec.marshalNBoolean2bool(ctx, field.Selections, res) 493 } 494 495 func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { 496 defer func() { 497 if r := recover(); r != nil { 498 ec.Error(ctx, ec.Recover(ctx, r)) 499 ret = graphql.Null 500 } 501 }() 502 fc := &graphql.FieldContext{ 503 Object: "__Field", 504 Field: field, 505 Args: nil, 506 IsMethod: true, 507 IsResolver: false, 508 } 509 510 ctx = graphql.WithFieldContext(ctx, fc) 511 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 512 ctx = rctx // use context from middleware stack in children 513 return obj.DeprecationReason(), nil 514 }) 515 516 if resTmp == nil { 517 return graphql.Null 518 } 519 res := resTmp.(*string) 520 fc.Result = res 521 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 522 } 523 524 func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 525 defer func() { 526 if r := recover(); r != nil { 527 ec.Error(ctx, ec.Recover(ctx, r)) 528 ret = graphql.Null 529 } 530 }() 531 fc := &graphql.FieldContext{ 532 Object: "__InputValue", 533 Field: field, 534 Args: nil, 535 IsMethod: false, 536 IsResolver: false, 537 } 538 539 ctx = graphql.WithFieldContext(ctx, fc) 540 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 541 ctx = rctx // use context from middleware stack in children 542 return obj.Name, nil 543 }) 544 545 if resTmp == nil { 546 if !graphql.HasFieldError(ctx, fc) { 547 ec.Errorf(ctx, "must not be null") 548 } 549 return graphql.Null 550 } 551 res := resTmp.(string) 552 fc.Result = res 553 return ec.marshalNString2string(ctx, field.Selections, res) 554 } 555 556 func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 557 defer func() { 558 if r := recover(); r != nil { 559 ec.Error(ctx, ec.Recover(ctx, r)) 560 ret = graphql.Null 561 } 562 }() 563 fc := &graphql.FieldContext{ 564 Object: "__InputValue", 565 Field: field, 566 Args: nil, 567 IsMethod: false, 568 IsResolver: false, 569 } 570 571 ctx = graphql.WithFieldContext(ctx, fc) 572 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 573 ctx = rctx // use context from middleware stack in children 574 return obj.Description, nil 575 }) 576 577 if resTmp == nil { 578 return graphql.Null 579 } 580 res := resTmp.(string) 581 fc.Result = res 582 return ec.marshalOString2string(ctx, field.Selections, res) 583 } 584 585 func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 586 defer func() { 587 if r := recover(); r != nil { 588 ec.Error(ctx, ec.Recover(ctx, r)) 589 ret = graphql.Null 590 } 591 }() 592 fc := &graphql.FieldContext{ 593 Object: "__InputValue", 594 Field: field, 595 Args: nil, 596 IsMethod: false, 597 IsResolver: false, 598 } 599 600 ctx = graphql.WithFieldContext(ctx, fc) 601 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 602 ctx = rctx // use context from middleware stack in children 603 return obj.Type, nil 604 }) 605 606 if resTmp == nil { 607 if !graphql.HasFieldError(ctx, fc) { 608 ec.Errorf(ctx, "must not be null") 609 } 610 return graphql.Null 611 } 612 res := resTmp.(*introspection.Type) 613 fc.Result = res 614 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 615 } 616 617 func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { 618 defer func() { 619 if r := recover(); r != nil { 620 ec.Error(ctx, ec.Recover(ctx, r)) 621 ret = graphql.Null 622 } 623 }() 624 fc := &graphql.FieldContext{ 625 Object: "__InputValue", 626 Field: field, 627 Args: nil, 628 IsMethod: false, 629 IsResolver: false, 630 } 631 632 ctx = graphql.WithFieldContext(ctx, fc) 633 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 634 ctx = rctx // use context from middleware stack in children 635 return obj.DefaultValue, nil 636 }) 637 638 if resTmp == nil { 639 return graphql.Null 640 } 641 res := resTmp.(*string) 642 fc.Result = res 643 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 644 } 645 646 func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 647 defer func() { 648 if r := recover(); r != nil { 649 ec.Error(ctx, ec.Recover(ctx, r)) 650 ret = graphql.Null 651 } 652 }() 653 fc := &graphql.FieldContext{ 654 Object: "__Schema", 655 Field: field, 656 Args: nil, 657 IsMethod: true, 658 IsResolver: false, 659 } 660 661 ctx = graphql.WithFieldContext(ctx, fc) 662 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 663 ctx = rctx // use context from middleware stack in children 664 return obj.Types(), nil 665 }) 666 667 if resTmp == nil { 668 if !graphql.HasFieldError(ctx, fc) { 669 ec.Errorf(ctx, "must not be null") 670 } 671 return graphql.Null 672 } 673 res := resTmp.([]introspection.Type) 674 fc.Result = res 675 return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 676 } 677 678 func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 679 defer func() { 680 if r := recover(); r != nil { 681 ec.Error(ctx, ec.Recover(ctx, r)) 682 ret = graphql.Null 683 } 684 }() 685 fc := &graphql.FieldContext{ 686 Object: "__Schema", 687 Field: field, 688 Args: nil, 689 IsMethod: true, 690 IsResolver: false, 691 } 692 693 ctx = graphql.WithFieldContext(ctx, fc) 694 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 695 ctx = rctx // use context from middleware stack in children 696 return obj.QueryType(), nil 697 }) 698 699 if resTmp == nil { 700 if !graphql.HasFieldError(ctx, fc) { 701 ec.Errorf(ctx, "must not be null") 702 } 703 return graphql.Null 704 } 705 res := resTmp.(*introspection.Type) 706 fc.Result = res 707 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 708 } 709 710 func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 711 defer func() { 712 if r := recover(); r != nil { 713 ec.Error(ctx, ec.Recover(ctx, r)) 714 ret = graphql.Null 715 } 716 }() 717 fc := &graphql.FieldContext{ 718 Object: "__Schema", 719 Field: field, 720 Args: nil, 721 IsMethod: true, 722 IsResolver: false, 723 } 724 725 ctx = graphql.WithFieldContext(ctx, fc) 726 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 727 ctx = rctx // use context from middleware stack in children 728 return obj.MutationType(), nil 729 }) 730 731 if resTmp == nil { 732 return graphql.Null 733 } 734 res := resTmp.(*introspection.Type) 735 fc.Result = res 736 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 737 } 738 739 func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 740 defer func() { 741 if r := recover(); r != nil { 742 ec.Error(ctx, ec.Recover(ctx, r)) 743 ret = graphql.Null 744 } 745 }() 746 fc := &graphql.FieldContext{ 747 Object: "__Schema", 748 Field: field, 749 Args: nil, 750 IsMethod: true, 751 IsResolver: false, 752 } 753 754 ctx = graphql.WithFieldContext(ctx, fc) 755 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 756 ctx = rctx // use context from middleware stack in children 757 return obj.SubscriptionType(), nil 758 }) 759 760 if resTmp == nil { 761 return graphql.Null 762 } 763 res := resTmp.(*introspection.Type) 764 fc.Result = res 765 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 766 } 767 768 func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { 769 defer func() { 770 if r := recover(); r != nil { 771 ec.Error(ctx, ec.Recover(ctx, r)) 772 ret = graphql.Null 773 } 774 }() 775 fc := &graphql.FieldContext{ 776 Object: "__Schema", 777 Field: field, 778 Args: nil, 779 IsMethod: true, 780 IsResolver: false, 781 } 782 783 ctx = graphql.WithFieldContext(ctx, fc) 784 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 785 ctx = rctx // use context from middleware stack in children 786 return obj.Directives(), nil 787 }) 788 789 if resTmp == nil { 790 if !graphql.HasFieldError(ctx, fc) { 791 ec.Errorf(ctx, "must not be null") 792 } 793 return graphql.Null 794 } 795 res := resTmp.([]introspection.Directive) 796 fc.Result = res 797 return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) 798 } 799 800 func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 801 defer func() { 802 if r := recover(); r != nil { 803 ec.Error(ctx, ec.Recover(ctx, r)) 804 ret = graphql.Null 805 } 806 }() 807 fc := &graphql.FieldContext{ 808 Object: "__Type", 809 Field: field, 810 Args: nil, 811 IsMethod: true, 812 IsResolver: false, 813 } 814 815 ctx = graphql.WithFieldContext(ctx, fc) 816 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 817 ctx = rctx // use context from middleware stack in children 818 return obj.Kind(), nil 819 }) 820 821 if resTmp == nil { 822 if !graphql.HasFieldError(ctx, fc) { 823 ec.Errorf(ctx, "must not be null") 824 } 825 return graphql.Null 826 } 827 res := resTmp.(string) 828 fc.Result = res 829 return ec.marshalN__TypeKind2string(ctx, field.Selections, res) 830 } 831 832 func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 833 defer func() { 834 if r := recover(); r != nil { 835 ec.Error(ctx, ec.Recover(ctx, r)) 836 ret = graphql.Null 837 } 838 }() 839 fc := &graphql.FieldContext{ 840 Object: "__Type", 841 Field: field, 842 Args: nil, 843 IsMethod: true, 844 IsResolver: false, 845 } 846 847 ctx = graphql.WithFieldContext(ctx, fc) 848 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 849 ctx = rctx // use context from middleware stack in children 850 return obj.Name(), nil 851 }) 852 853 if resTmp == nil { 854 return graphql.Null 855 } 856 res := resTmp.(*string) 857 fc.Result = res 858 return ec.marshalOString2ᚖstring(ctx, field.Selections, res) 859 } 860 861 func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 862 defer func() { 863 if r := recover(); r != nil { 864 ec.Error(ctx, ec.Recover(ctx, r)) 865 ret = graphql.Null 866 } 867 }() 868 fc := &graphql.FieldContext{ 869 Object: "__Type", 870 Field: field, 871 Args: nil, 872 IsMethod: true, 873 IsResolver: false, 874 } 875 876 ctx = graphql.WithFieldContext(ctx, fc) 877 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 878 ctx = rctx // use context from middleware stack in children 879 return obj.Description(), nil 880 }) 881 882 if resTmp == nil { 883 return graphql.Null 884 } 885 res := resTmp.(string) 886 fc.Result = res 887 return ec.marshalOString2string(ctx, field.Selections, res) 888 } 889 890 func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 891 defer func() { 892 if r := recover(); r != nil { 893 ec.Error(ctx, ec.Recover(ctx, r)) 894 ret = graphql.Null 895 } 896 }() 897 fc := &graphql.FieldContext{ 898 Object: "__Type", 899 Field: field, 900 Args: nil, 901 IsMethod: true, 902 IsResolver: false, 903 } 904 905 ctx = graphql.WithFieldContext(ctx, fc) 906 rawArgs := field.ArgumentMap(ec.Variables) 907 args, err := ec.field___Type_fields_args(ctx, rawArgs) 908 if err != nil { 909 ec.Error(ctx, err) 910 return graphql.Null 911 } 912 fc.Args = args 913 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 914 ctx = rctx // use context from middleware stack in children 915 return obj.Fields(args["includeDeprecated"].(bool)), nil 916 }) 917 918 if resTmp == nil { 919 return graphql.Null 920 } 921 res := resTmp.([]introspection.Field) 922 fc.Result = res 923 return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) 924 } 925 926 func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 927 defer func() { 928 if r := recover(); r != nil { 929 ec.Error(ctx, ec.Recover(ctx, r)) 930 ret = graphql.Null 931 } 932 }() 933 fc := &graphql.FieldContext{ 934 Object: "__Type", 935 Field: field, 936 Args: nil, 937 IsMethod: true, 938 IsResolver: false, 939 } 940 941 ctx = graphql.WithFieldContext(ctx, fc) 942 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 943 ctx = rctx // use context from middleware stack in children 944 return obj.Interfaces(), nil 945 }) 946 947 if resTmp == nil { 948 return graphql.Null 949 } 950 res := resTmp.([]introspection.Type) 951 fc.Result = res 952 return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 953 } 954 955 func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 956 defer func() { 957 if r := recover(); r != nil { 958 ec.Error(ctx, ec.Recover(ctx, r)) 959 ret = graphql.Null 960 } 961 }() 962 fc := &graphql.FieldContext{ 963 Object: "__Type", 964 Field: field, 965 Args: nil, 966 IsMethod: true, 967 IsResolver: false, 968 } 969 970 ctx = graphql.WithFieldContext(ctx, fc) 971 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 972 ctx = rctx // use context from middleware stack in children 973 return obj.PossibleTypes(), nil 974 }) 975 976 if resTmp == nil { 977 return graphql.Null 978 } 979 res := resTmp.([]introspection.Type) 980 fc.Result = res 981 return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) 982 } 983 984 func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 985 defer func() { 986 if r := recover(); r != nil { 987 ec.Error(ctx, ec.Recover(ctx, r)) 988 ret = graphql.Null 989 } 990 }() 991 fc := &graphql.FieldContext{ 992 Object: "__Type", 993 Field: field, 994 Args: nil, 995 IsMethod: true, 996 IsResolver: false, 997 } 998 999 ctx = graphql.WithFieldContext(ctx, fc) 1000 rawArgs := field.ArgumentMap(ec.Variables) 1001 args, err := ec.field___Type_enumValues_args(ctx, rawArgs) 1002 if err != nil { 1003 ec.Error(ctx, err) 1004 return graphql.Null 1005 } 1006 fc.Args = args 1007 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 1008 ctx = rctx // use context from middleware stack in children 1009 return obj.EnumValues(args["includeDeprecated"].(bool)), nil 1010 }) 1011 1012 if resTmp == nil { 1013 return graphql.Null 1014 } 1015 res := resTmp.([]introspection.EnumValue) 1016 fc.Result = res 1017 return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) 1018 } 1019 1020 func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 1021 defer func() { 1022 if r := recover(); r != nil { 1023 ec.Error(ctx, ec.Recover(ctx, r)) 1024 ret = graphql.Null 1025 } 1026 }() 1027 fc := &graphql.FieldContext{ 1028 Object: "__Type", 1029 Field: field, 1030 Args: nil, 1031 IsMethod: true, 1032 IsResolver: false, 1033 } 1034 1035 ctx = graphql.WithFieldContext(ctx, fc) 1036 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 1037 ctx = rctx // use context from middleware stack in children 1038 return obj.InputFields(), nil 1039 }) 1040 1041 if resTmp == nil { 1042 return graphql.Null 1043 } 1044 res := resTmp.([]introspection.InputValue) 1045 fc.Result = res 1046 return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) 1047 } 1048 1049 func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { 1050 defer func() { 1051 if r := recover(); r != nil { 1052 ec.Error(ctx, ec.Recover(ctx, r)) 1053 ret = graphql.Null 1054 } 1055 }() 1056 fc := &graphql.FieldContext{ 1057 Object: "__Type", 1058 Field: field, 1059 Args: nil, 1060 IsMethod: true, 1061 IsResolver: false, 1062 } 1063 1064 ctx = graphql.WithFieldContext(ctx, fc) 1065 resTmp := ec._fieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { 1066 ctx = rctx // use context from middleware stack in children 1067 return obj.OfType(), nil 1068 }) 1069 1070 if resTmp == nil { 1071 return graphql.Null 1072 } 1073 res := resTmp.(*introspection.Type) 1074 fc.Result = res 1075 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) 1076 } 1077 1078 // endregion **************************** field.gotpl ***************************** 1079 1080 // region **************************** input.gotpl ***************************** 1081 1082 // endregion **************************** input.gotpl ***************************** 1083 1084 // region ************************** interface.gotpl *************************** 1085 1086 // endregion ************************** interface.gotpl *************************** 1087 1088 // region **************************** object.gotpl **************************** 1089 1090 var __DirectiveImplementors = []string{"__Directive"} 1091 1092 func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { 1093 fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) 1094 out := graphql.NewFieldSet(fields) 1095 var invalids uint32 1096 for i, field := range fields { 1097 switch field.Name { 1098 case "__typename": 1099 out.Values[i] = graphql.MarshalString("__Directive") 1100 case "name": 1101 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1102 return ec.___Directive_name(ctx, field, obj) 1103 } 1104 1105 out.Values[i] = innerFunc(ctx) 1106 1107 if out.Values[i] == graphql.Null { 1108 invalids++ 1109 } 1110 case "description": 1111 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1112 return ec.___Directive_description(ctx, field, obj) 1113 } 1114 1115 out.Values[i] = innerFunc(ctx) 1116 1117 case "locations": 1118 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1119 return ec.___Directive_locations(ctx, field, obj) 1120 } 1121 1122 out.Values[i] = innerFunc(ctx) 1123 1124 if out.Values[i] == graphql.Null { 1125 invalids++ 1126 } 1127 case "args": 1128 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1129 return ec.___Directive_args(ctx, field, obj) 1130 } 1131 1132 out.Values[i] = innerFunc(ctx) 1133 1134 if out.Values[i] == graphql.Null { 1135 invalids++ 1136 } 1137 case "isRepeatable": 1138 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1139 return ec.___Directive_isRepeatable(ctx, field, obj) 1140 } 1141 1142 out.Values[i] = innerFunc(ctx) 1143 1144 if out.Values[i] == graphql.Null { 1145 invalids++ 1146 } 1147 default: 1148 panic("unknown field " + strconv.Quote(field.Name)) 1149 } 1150 } 1151 out.Dispatch() 1152 if invalids > 0 { 1153 return graphql.Null 1154 } 1155 return out 1156 } 1157 1158 var __EnumValueImplementors = []string{"__EnumValue"} 1159 1160 func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { 1161 fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) 1162 out := graphql.NewFieldSet(fields) 1163 var invalids uint32 1164 for i, field := range fields { 1165 switch field.Name { 1166 case "__typename": 1167 out.Values[i] = graphql.MarshalString("__EnumValue") 1168 case "name": 1169 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1170 return ec.___EnumValue_name(ctx, field, obj) 1171 } 1172 1173 out.Values[i] = innerFunc(ctx) 1174 1175 if out.Values[i] == graphql.Null { 1176 invalids++ 1177 } 1178 case "description": 1179 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1180 return ec.___EnumValue_description(ctx, field, obj) 1181 } 1182 1183 out.Values[i] = innerFunc(ctx) 1184 1185 case "isDeprecated": 1186 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1187 return ec.___EnumValue_isDeprecated(ctx, field, obj) 1188 } 1189 1190 out.Values[i] = innerFunc(ctx) 1191 1192 if out.Values[i] == graphql.Null { 1193 invalids++ 1194 } 1195 case "deprecationReason": 1196 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1197 return ec.___EnumValue_deprecationReason(ctx, field, obj) 1198 } 1199 1200 out.Values[i] = innerFunc(ctx) 1201 1202 default: 1203 panic("unknown field " + strconv.Quote(field.Name)) 1204 } 1205 } 1206 out.Dispatch() 1207 if invalids > 0 { 1208 return graphql.Null 1209 } 1210 return out 1211 } 1212 1213 var __FieldImplementors = []string{"__Field"} 1214 1215 func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { 1216 fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) 1217 out := graphql.NewFieldSet(fields) 1218 var invalids uint32 1219 for i, field := range fields { 1220 switch field.Name { 1221 case "__typename": 1222 out.Values[i] = graphql.MarshalString("__Field") 1223 case "name": 1224 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1225 return ec.___Field_name(ctx, field, obj) 1226 } 1227 1228 out.Values[i] = innerFunc(ctx) 1229 1230 if out.Values[i] == graphql.Null { 1231 invalids++ 1232 } 1233 case "description": 1234 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1235 return ec.___Field_description(ctx, field, obj) 1236 } 1237 1238 out.Values[i] = innerFunc(ctx) 1239 1240 case "args": 1241 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1242 return ec.___Field_args(ctx, field, obj) 1243 } 1244 1245 out.Values[i] = innerFunc(ctx) 1246 1247 if out.Values[i] == graphql.Null { 1248 invalids++ 1249 } 1250 case "type": 1251 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1252 return ec.___Field_type(ctx, field, obj) 1253 } 1254 1255 out.Values[i] = innerFunc(ctx) 1256 1257 if out.Values[i] == graphql.Null { 1258 invalids++ 1259 } 1260 case "isDeprecated": 1261 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1262 return ec.___Field_isDeprecated(ctx, field, obj) 1263 } 1264 1265 out.Values[i] = innerFunc(ctx) 1266 1267 if out.Values[i] == graphql.Null { 1268 invalids++ 1269 } 1270 case "deprecationReason": 1271 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1272 return ec.___Field_deprecationReason(ctx, field, obj) 1273 } 1274 1275 out.Values[i] = innerFunc(ctx) 1276 1277 default: 1278 panic("unknown field " + strconv.Quote(field.Name)) 1279 } 1280 } 1281 out.Dispatch() 1282 if invalids > 0 { 1283 return graphql.Null 1284 } 1285 return out 1286 } 1287 1288 var __InputValueImplementors = []string{"__InputValue"} 1289 1290 func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { 1291 fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) 1292 out := graphql.NewFieldSet(fields) 1293 var invalids uint32 1294 for i, field := range fields { 1295 switch field.Name { 1296 case "__typename": 1297 out.Values[i] = graphql.MarshalString("__InputValue") 1298 case "name": 1299 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1300 return ec.___InputValue_name(ctx, field, obj) 1301 } 1302 1303 out.Values[i] = innerFunc(ctx) 1304 1305 if out.Values[i] == graphql.Null { 1306 invalids++ 1307 } 1308 case "description": 1309 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1310 return ec.___InputValue_description(ctx, field, obj) 1311 } 1312 1313 out.Values[i] = innerFunc(ctx) 1314 1315 case "type": 1316 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1317 return ec.___InputValue_type(ctx, field, obj) 1318 } 1319 1320 out.Values[i] = innerFunc(ctx) 1321 1322 if out.Values[i] == graphql.Null { 1323 invalids++ 1324 } 1325 case "defaultValue": 1326 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1327 return ec.___InputValue_defaultValue(ctx, field, obj) 1328 } 1329 1330 out.Values[i] = innerFunc(ctx) 1331 1332 default: 1333 panic("unknown field " + strconv.Quote(field.Name)) 1334 } 1335 } 1336 out.Dispatch() 1337 if invalids > 0 { 1338 return graphql.Null 1339 } 1340 return out 1341 } 1342 1343 var __SchemaImplementors = []string{"__Schema"} 1344 1345 func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { 1346 fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) 1347 out := graphql.NewFieldSet(fields) 1348 var invalids uint32 1349 for i, field := range fields { 1350 switch field.Name { 1351 case "__typename": 1352 out.Values[i] = graphql.MarshalString("__Schema") 1353 case "types": 1354 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1355 return ec.___Schema_types(ctx, field, obj) 1356 } 1357 1358 out.Values[i] = innerFunc(ctx) 1359 1360 if out.Values[i] == graphql.Null { 1361 invalids++ 1362 } 1363 case "queryType": 1364 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1365 return ec.___Schema_queryType(ctx, field, obj) 1366 } 1367 1368 out.Values[i] = innerFunc(ctx) 1369 1370 if out.Values[i] == graphql.Null { 1371 invalids++ 1372 } 1373 case "mutationType": 1374 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1375 return ec.___Schema_mutationType(ctx, field, obj) 1376 } 1377 1378 out.Values[i] = innerFunc(ctx) 1379 1380 case "subscriptionType": 1381 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1382 return ec.___Schema_subscriptionType(ctx, field, obj) 1383 } 1384 1385 out.Values[i] = innerFunc(ctx) 1386 1387 case "directives": 1388 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1389 return ec.___Schema_directives(ctx, field, obj) 1390 } 1391 1392 out.Values[i] = innerFunc(ctx) 1393 1394 if out.Values[i] == graphql.Null { 1395 invalids++ 1396 } 1397 default: 1398 panic("unknown field " + strconv.Quote(field.Name)) 1399 } 1400 } 1401 out.Dispatch() 1402 if invalids > 0 { 1403 return graphql.Null 1404 } 1405 return out 1406 } 1407 1408 var __TypeImplementors = []string{"__Type"} 1409 1410 func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { 1411 fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) 1412 out := graphql.NewFieldSet(fields) 1413 var invalids uint32 1414 for i, field := range fields { 1415 switch field.Name { 1416 case "__typename": 1417 out.Values[i] = graphql.MarshalString("__Type") 1418 case "kind": 1419 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1420 return ec.___Type_kind(ctx, field, obj) 1421 } 1422 1423 out.Values[i] = innerFunc(ctx) 1424 1425 if out.Values[i] == graphql.Null { 1426 invalids++ 1427 } 1428 case "name": 1429 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1430 return ec.___Type_name(ctx, field, obj) 1431 } 1432 1433 out.Values[i] = innerFunc(ctx) 1434 1435 case "description": 1436 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1437 return ec.___Type_description(ctx, field, obj) 1438 } 1439 1440 out.Values[i] = innerFunc(ctx) 1441 1442 case "fields": 1443 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1444 return ec.___Type_fields(ctx, field, obj) 1445 } 1446 1447 out.Values[i] = innerFunc(ctx) 1448 1449 case "interfaces": 1450 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1451 return ec.___Type_interfaces(ctx, field, obj) 1452 } 1453 1454 out.Values[i] = innerFunc(ctx) 1455 1456 case "possibleTypes": 1457 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1458 return ec.___Type_possibleTypes(ctx, field, obj) 1459 } 1460 1461 out.Values[i] = innerFunc(ctx) 1462 1463 case "enumValues": 1464 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1465 return ec.___Type_enumValues(ctx, field, obj) 1466 } 1467 1468 out.Values[i] = innerFunc(ctx) 1469 1470 case "inputFields": 1471 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1472 return ec.___Type_inputFields(ctx, field, obj) 1473 } 1474 1475 out.Values[i] = innerFunc(ctx) 1476 1477 case "ofType": 1478 innerFunc := func(ctx context.Context) (res graphql.Marshaler) { 1479 return ec.___Type_ofType(ctx, field, obj) 1480 } 1481 1482 out.Values[i] = innerFunc(ctx) 1483 1484 default: 1485 panic("unknown field " + strconv.Quote(field.Name)) 1486 } 1487 } 1488 out.Dispatch() 1489 if invalids > 0 { 1490 return graphql.Null 1491 } 1492 return out 1493 } 1494 1495 // endregion **************************** object.gotpl **************************** 1496 1497 // region ***************************** type.gotpl ***************************** 1498 1499 func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) { 1500 res, err := graphql.UnmarshalBoolean(v) 1501 return res, graphql.ErrorOnPath(ctx, err) 1502 } 1503 1504 func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { 1505 res := graphql.MarshalBoolean(v) 1506 if res == graphql.Null { 1507 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 1508 ec.Errorf(ctx, "must not be null") 1509 } 1510 } 1511 return res 1512 } 1513 1514 func (ec *executionContext) unmarshalNFloat2float64(ctx context.Context, v interface{}) (float64, error) { 1515 res, err := graphql.UnmarshalFloatContext(ctx, v) 1516 return res, graphql.ErrorOnPath(ctx, err) 1517 } 1518 1519 func (ec *executionContext) marshalNFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler { 1520 res := graphql.MarshalFloatContext(v) 1521 if res == graphql.Null { 1522 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 1523 ec.Errorf(ctx, "must not be null") 1524 } 1525 } 1526 return graphql.WrapContextMarshaler(ctx, res) 1527 } 1528 1529 func (ec *executionContext) unmarshalNID2int(ctx context.Context, v interface{}) (int, error) { 1530 res, err := graphql.UnmarshalIntID(v) 1531 return res, graphql.ErrorOnPath(ctx, err) 1532 } 1533 1534 func (ec *executionContext) marshalNID2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { 1535 res := graphql.MarshalIntID(v) 1536 if res == graphql.Null { 1537 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 1538 ec.Errorf(ctx, "must not be null") 1539 } 1540 } 1541 return res 1542 } 1543 1544 func (ec *executionContext) unmarshalNID2string(ctx context.Context, v interface{}) (string, error) { 1545 res, err := graphql.UnmarshalID(v) 1546 return res, graphql.ErrorOnPath(ctx, err) 1547 } 1548 1549 func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 1550 res := graphql.MarshalID(v) 1551 if res == graphql.Null { 1552 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 1553 ec.Errorf(ctx, "must not be null") 1554 } 1555 } 1556 return res 1557 } 1558 1559 func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) { 1560 res, err := graphql.UnmarshalInt(v) 1561 return res, graphql.ErrorOnPath(ctx, err) 1562 } 1563 1564 func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { 1565 res := graphql.MarshalInt(v) 1566 if res == graphql.Null { 1567 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 1568 ec.Errorf(ctx, "must not be null") 1569 } 1570 } 1571 return res 1572 } 1573 1574 func (ec *executionContext) unmarshalNInt2int32(ctx context.Context, v interface{}) (int32, error) { 1575 res, err := graphql.UnmarshalInt32(v) 1576 return res, graphql.ErrorOnPath(ctx, err) 1577 } 1578 1579 func (ec *executionContext) marshalNInt2int32(ctx context.Context, sel ast.SelectionSet, v int32) graphql.Marshaler { 1580 res := graphql.MarshalInt32(v) 1581 if res == graphql.Null { 1582 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 1583 ec.Errorf(ctx, "must not be null") 1584 } 1585 } 1586 return res 1587 } 1588 1589 func (ec *executionContext) unmarshalNInt2int64(ctx context.Context, v interface{}) (int64, error) { 1590 res, err := graphql.UnmarshalInt64(v) 1591 return res, graphql.ErrorOnPath(ctx, err) 1592 } 1593 1594 func (ec *executionContext) marshalNInt2int64(ctx context.Context, sel ast.SelectionSet, v int64) graphql.Marshaler { 1595 res := graphql.MarshalInt64(v) 1596 if res == graphql.Null { 1597 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 1598 ec.Errorf(ctx, "must not be null") 1599 } 1600 } 1601 return res 1602 } 1603 1604 func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) { 1605 res, err := graphql.UnmarshalString(v) 1606 return res, graphql.ErrorOnPath(ctx, err) 1607 } 1608 1609 func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 1610 res := graphql.MarshalString(v) 1611 if res == graphql.Null { 1612 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 1613 ec.Errorf(ctx, "must not be null") 1614 } 1615 } 1616 return res 1617 } 1618 1619 func (ec *executionContext) unmarshalNString2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { 1620 var vSlice []interface{} 1621 if v != nil { 1622 vSlice = graphql.CoerceList(v) 1623 } 1624 var err error 1625 res := make([]string, len(vSlice)) 1626 for i := range vSlice { 1627 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 1628 res[i], err = ec.unmarshalNString2string(ctx, vSlice[i]) 1629 if err != nil { 1630 return nil, err 1631 } 1632 } 1633 return res, nil 1634 } 1635 1636 func (ec *executionContext) marshalNString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { 1637 ret := make(graphql.Array, len(v)) 1638 for i := range v { 1639 ret[i] = ec.marshalNString2string(ctx, sel, v[i]) 1640 } 1641 1642 for _, e := range ret { 1643 if e == graphql.Null { 1644 return graphql.Null 1645 } 1646 } 1647 1648 return ret 1649 } 1650 1651 func (ec *executionContext) unmarshalNString2ᚕᚖstring(ctx context.Context, v interface{}) ([]*string, error) { 1652 var vSlice []interface{} 1653 if v != nil { 1654 vSlice = graphql.CoerceList(v) 1655 } 1656 var err error 1657 res := make([]*string, len(vSlice)) 1658 for i := range vSlice { 1659 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 1660 res[i], err = ec.unmarshalOString2ᚖstring(ctx, vSlice[i]) 1661 if err != nil { 1662 return nil, err 1663 } 1664 } 1665 return res, nil 1666 } 1667 1668 func (ec *executionContext) marshalNString2ᚕᚖstring(ctx context.Context, sel ast.SelectionSet, v []*string) graphql.Marshaler { 1669 ret := make(graphql.Array, len(v)) 1670 for i := range v { 1671 ret[i] = ec.marshalOString2ᚖstring(ctx, sel, v[i]) 1672 } 1673 1674 return ret 1675 } 1676 1677 func (ec *executionContext) unmarshalNString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { 1678 res, err := graphql.UnmarshalString(v) 1679 return &res, graphql.ErrorOnPath(ctx, err) 1680 } 1681 1682 func (ec *executionContext) marshalNString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { 1683 if v == nil { 1684 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 1685 ec.Errorf(ctx, "must not be null") 1686 } 1687 return graphql.Null 1688 } 1689 res := graphql.MarshalString(*v) 1690 if res == graphql.Null { 1691 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 1692 ec.Errorf(ctx, "must not be null") 1693 } 1694 } 1695 return res 1696 } 1697 1698 func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler { 1699 return ec.___Directive(ctx, sel, &v) 1700 } 1701 1702 func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler { 1703 ret := make(graphql.Array, len(v)) 1704 var wg sync.WaitGroup 1705 isLen1 := len(v) == 1 1706 if !isLen1 { 1707 wg.Add(len(v)) 1708 } 1709 for i := range v { 1710 i := i 1711 fc := &graphql.FieldContext{ 1712 Index: &i, 1713 Result: &v[i], 1714 } 1715 ctx := graphql.WithFieldContext(ctx, fc) 1716 f := func(i int) { 1717 defer func() { 1718 if r := recover(); r != nil { 1719 ec.Error(ctx, ec.Recover(ctx, r)) 1720 ret = nil 1721 } 1722 }() 1723 if !isLen1 { 1724 defer wg.Done() 1725 } 1726 ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i]) 1727 } 1728 if isLen1 { 1729 f(i) 1730 } else { 1731 go f(i) 1732 } 1733 1734 } 1735 wg.Wait() 1736 1737 for _, e := range ret { 1738 if e == graphql.Null { 1739 return graphql.Null 1740 } 1741 } 1742 1743 return ret 1744 } 1745 1746 func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) { 1747 res, err := graphql.UnmarshalString(v) 1748 return res, graphql.ErrorOnPath(ctx, err) 1749 } 1750 1751 func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 1752 res := graphql.MarshalString(v) 1753 if res == graphql.Null { 1754 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 1755 ec.Errorf(ctx, "must not be null") 1756 } 1757 } 1758 return res 1759 } 1760 1761 func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { 1762 var vSlice []interface{} 1763 if v != nil { 1764 vSlice = graphql.CoerceList(v) 1765 } 1766 var err error 1767 res := make([]string, len(vSlice)) 1768 for i := range vSlice { 1769 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 1770 res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i]) 1771 if err != nil { 1772 return nil, err 1773 } 1774 } 1775 return res, nil 1776 } 1777 1778 func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { 1779 ret := make(graphql.Array, len(v)) 1780 var wg sync.WaitGroup 1781 isLen1 := len(v) == 1 1782 if !isLen1 { 1783 wg.Add(len(v)) 1784 } 1785 for i := range v { 1786 i := i 1787 fc := &graphql.FieldContext{ 1788 Index: &i, 1789 Result: &v[i], 1790 } 1791 ctx := graphql.WithFieldContext(ctx, fc) 1792 f := func(i int) { 1793 defer func() { 1794 if r := recover(); r != nil { 1795 ec.Error(ctx, ec.Recover(ctx, r)) 1796 ret = nil 1797 } 1798 }() 1799 if !isLen1 { 1800 defer wg.Done() 1801 } 1802 ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i]) 1803 } 1804 if isLen1 { 1805 f(i) 1806 } else { 1807 go f(i) 1808 } 1809 1810 } 1811 wg.Wait() 1812 1813 for _, e := range ret { 1814 if e == graphql.Null { 1815 return graphql.Null 1816 } 1817 } 1818 1819 return ret 1820 } 1821 1822 func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler { 1823 return ec.___EnumValue(ctx, sel, &v) 1824 } 1825 1826 func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler { 1827 return ec.___Field(ctx, sel, &v) 1828 } 1829 1830 func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler { 1831 return ec.___InputValue(ctx, sel, &v) 1832 } 1833 1834 func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { 1835 ret := make(graphql.Array, len(v)) 1836 var wg sync.WaitGroup 1837 isLen1 := len(v) == 1 1838 if !isLen1 { 1839 wg.Add(len(v)) 1840 } 1841 for i := range v { 1842 i := i 1843 fc := &graphql.FieldContext{ 1844 Index: &i, 1845 Result: &v[i], 1846 } 1847 ctx := graphql.WithFieldContext(ctx, fc) 1848 f := func(i int) { 1849 defer func() { 1850 if r := recover(); r != nil { 1851 ec.Error(ctx, ec.Recover(ctx, r)) 1852 ret = nil 1853 } 1854 }() 1855 if !isLen1 { 1856 defer wg.Done() 1857 } 1858 ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) 1859 } 1860 if isLen1 { 1861 f(i) 1862 } else { 1863 go f(i) 1864 } 1865 1866 } 1867 wg.Wait() 1868 1869 for _, e := range ret { 1870 if e == graphql.Null { 1871 return graphql.Null 1872 } 1873 } 1874 1875 return ret 1876 } 1877 1878 func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { 1879 return ec.___Type(ctx, sel, &v) 1880 } 1881 1882 func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { 1883 ret := make(graphql.Array, len(v)) 1884 var wg sync.WaitGroup 1885 isLen1 := len(v) == 1 1886 if !isLen1 { 1887 wg.Add(len(v)) 1888 } 1889 for i := range v { 1890 i := i 1891 fc := &graphql.FieldContext{ 1892 Index: &i, 1893 Result: &v[i], 1894 } 1895 ctx := graphql.WithFieldContext(ctx, fc) 1896 f := func(i int) { 1897 defer func() { 1898 if r := recover(); r != nil { 1899 ec.Error(ctx, ec.Recover(ctx, r)) 1900 ret = nil 1901 } 1902 }() 1903 if !isLen1 { 1904 defer wg.Done() 1905 } 1906 ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) 1907 } 1908 if isLen1 { 1909 f(i) 1910 } else { 1911 go f(i) 1912 } 1913 1914 } 1915 wg.Wait() 1916 1917 for _, e := range ret { 1918 if e == graphql.Null { 1919 return graphql.Null 1920 } 1921 } 1922 1923 return ret 1924 } 1925 1926 func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { 1927 if v == nil { 1928 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 1929 ec.Errorf(ctx, "must not be null") 1930 } 1931 return graphql.Null 1932 } 1933 return ec.___Type(ctx, sel, v) 1934 } 1935 1936 func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) { 1937 res, err := graphql.UnmarshalString(v) 1938 return res, graphql.ErrorOnPath(ctx, err) 1939 } 1940 1941 func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 1942 res := graphql.MarshalString(v) 1943 if res == graphql.Null { 1944 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { 1945 ec.Errorf(ctx, "must not be null") 1946 } 1947 } 1948 return res 1949 } 1950 1951 func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) { 1952 res, err := graphql.UnmarshalBoolean(v) 1953 return res, graphql.ErrorOnPath(ctx, err) 1954 } 1955 1956 func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { 1957 res := graphql.MarshalBoolean(v) 1958 return res 1959 } 1960 1961 func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) { 1962 if v == nil { 1963 return nil, nil 1964 } 1965 res, err := graphql.UnmarshalBoolean(v) 1966 return &res, graphql.ErrorOnPath(ctx, err) 1967 } 1968 1969 func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler { 1970 if v == nil { 1971 return graphql.Null 1972 } 1973 res := graphql.MarshalBoolean(*v) 1974 return res 1975 } 1976 1977 func (ec *executionContext) unmarshalOFloat2float64(ctx context.Context, v interface{}) (float64, error) { 1978 res, err := graphql.UnmarshalFloatContext(ctx, v) 1979 return res, graphql.ErrorOnPath(ctx, err) 1980 } 1981 1982 func (ec *executionContext) marshalOFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler { 1983 res := graphql.MarshalFloatContext(v) 1984 return graphql.WrapContextMarshaler(ctx, res) 1985 } 1986 1987 func (ec *executionContext) unmarshalOInt2ᚖint(ctx context.Context, v interface{}) (*int, error) { 1988 if v == nil { 1989 return nil, nil 1990 } 1991 res, err := graphql.UnmarshalInt(v) 1992 return &res, graphql.ErrorOnPath(ctx, err) 1993 } 1994 1995 func (ec *executionContext) marshalOInt2ᚖint(ctx context.Context, sel ast.SelectionSet, v *int) graphql.Marshaler { 1996 if v == nil { 1997 return graphql.Null 1998 } 1999 res := graphql.MarshalInt(*v) 2000 return res 2001 } 2002 2003 func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) { 2004 res, err := graphql.UnmarshalString(v) 2005 return res, graphql.ErrorOnPath(ctx, err) 2006 } 2007 2008 func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { 2009 res := graphql.MarshalString(v) 2010 return res 2011 } 2012 2013 func (ec *executionContext) unmarshalOString2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { 2014 if v == nil { 2015 return nil, nil 2016 } 2017 var vSlice []interface{} 2018 if v != nil { 2019 vSlice = graphql.CoerceList(v) 2020 } 2021 var err error 2022 res := make([]string, len(vSlice)) 2023 for i := range vSlice { 2024 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 2025 res[i], err = ec.unmarshalNString2string(ctx, vSlice[i]) 2026 if err != nil { 2027 return nil, err 2028 } 2029 } 2030 return res, nil 2031 } 2032 2033 func (ec *executionContext) marshalOString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { 2034 if v == nil { 2035 return graphql.Null 2036 } 2037 ret := make(graphql.Array, len(v)) 2038 for i := range v { 2039 ret[i] = ec.marshalNString2string(ctx, sel, v[i]) 2040 } 2041 2042 for _, e := range ret { 2043 if e == graphql.Null { 2044 return graphql.Null 2045 } 2046 } 2047 2048 return ret 2049 } 2050 2051 func (ec *executionContext) unmarshalOString2ᚕᚖstring(ctx context.Context, v interface{}) ([]*string, error) { 2052 if v == nil { 2053 return nil, nil 2054 } 2055 var vSlice []interface{} 2056 if v != nil { 2057 vSlice = graphql.CoerceList(v) 2058 } 2059 var err error 2060 res := make([]*string, len(vSlice)) 2061 for i := range vSlice { 2062 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) 2063 res[i], err = ec.unmarshalOString2ᚖstring(ctx, vSlice[i]) 2064 if err != nil { 2065 return nil, err 2066 } 2067 } 2068 return res, nil 2069 } 2070 2071 func (ec *executionContext) marshalOString2ᚕᚖstring(ctx context.Context, sel ast.SelectionSet, v []*string) graphql.Marshaler { 2072 if v == nil { 2073 return graphql.Null 2074 } 2075 ret := make(graphql.Array, len(v)) 2076 for i := range v { 2077 ret[i] = ec.marshalOString2ᚖstring(ctx, sel, v[i]) 2078 } 2079 2080 return ret 2081 } 2082 2083 func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { 2084 if v == nil { 2085 return nil, nil 2086 } 2087 res, err := graphql.UnmarshalString(v) 2088 return &res, graphql.ErrorOnPath(ctx, err) 2089 } 2090 2091 func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { 2092 if v == nil { 2093 return graphql.Null 2094 } 2095 res := graphql.MarshalString(*v) 2096 return res 2097 } 2098 2099 func (ec *executionContext) unmarshalOString2ᚖᚕstringᚄ(ctx context.Context, v interface{}) (*[]string, error) { 2100 if v == nil { 2101 return nil, nil 2102 } 2103 res, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) 2104 return &res, graphql.ErrorOnPath(ctx, err) 2105 } 2106 2107 func (ec *executionContext) marshalOString2ᚖᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v *[]string) graphql.Marshaler { 2108 return ec.marshalOString2ᚕstringᚄ(ctx, sel, *v) 2109 } 2110 2111 func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler { 2112 if v == nil { 2113 return graphql.Null 2114 } 2115 ret := make(graphql.Array, len(v)) 2116 var wg sync.WaitGroup 2117 isLen1 := len(v) == 1 2118 if !isLen1 { 2119 wg.Add(len(v)) 2120 } 2121 for i := range v { 2122 i := i 2123 fc := &graphql.FieldContext{ 2124 Index: &i, 2125 Result: &v[i], 2126 } 2127 ctx := graphql.WithFieldContext(ctx, fc) 2128 f := func(i int) { 2129 defer func() { 2130 if r := recover(); r != nil { 2131 ec.Error(ctx, ec.Recover(ctx, r)) 2132 ret = nil 2133 } 2134 }() 2135 if !isLen1 { 2136 defer wg.Done() 2137 } 2138 ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i]) 2139 } 2140 if isLen1 { 2141 f(i) 2142 } else { 2143 go f(i) 2144 } 2145 2146 } 2147 wg.Wait() 2148 2149 for _, e := range ret { 2150 if e == graphql.Null { 2151 return graphql.Null 2152 } 2153 } 2154 2155 return ret 2156 } 2157 2158 func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler { 2159 if v == nil { 2160 return graphql.Null 2161 } 2162 ret := make(graphql.Array, len(v)) 2163 var wg sync.WaitGroup 2164 isLen1 := len(v) == 1 2165 if !isLen1 { 2166 wg.Add(len(v)) 2167 } 2168 for i := range v { 2169 i := i 2170 fc := &graphql.FieldContext{ 2171 Index: &i, 2172 Result: &v[i], 2173 } 2174 ctx := graphql.WithFieldContext(ctx, fc) 2175 f := func(i int) { 2176 defer func() { 2177 if r := recover(); r != nil { 2178 ec.Error(ctx, ec.Recover(ctx, r)) 2179 ret = nil 2180 } 2181 }() 2182 if !isLen1 { 2183 defer wg.Done() 2184 } 2185 ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i]) 2186 } 2187 if isLen1 { 2188 f(i) 2189 } else { 2190 go f(i) 2191 } 2192 2193 } 2194 wg.Wait() 2195 2196 for _, e := range ret { 2197 if e == graphql.Null { 2198 return graphql.Null 2199 } 2200 } 2201 2202 return ret 2203 } 2204 2205 func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { 2206 if v == nil { 2207 return graphql.Null 2208 } 2209 ret := make(graphql.Array, len(v)) 2210 var wg sync.WaitGroup 2211 isLen1 := len(v) == 1 2212 if !isLen1 { 2213 wg.Add(len(v)) 2214 } 2215 for i := range v { 2216 i := i 2217 fc := &graphql.FieldContext{ 2218 Index: &i, 2219 Result: &v[i], 2220 } 2221 ctx := graphql.WithFieldContext(ctx, fc) 2222 f := func(i int) { 2223 defer func() { 2224 if r := recover(); r != nil { 2225 ec.Error(ctx, ec.Recover(ctx, r)) 2226 ret = nil 2227 } 2228 }() 2229 if !isLen1 { 2230 defer wg.Done() 2231 } 2232 ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) 2233 } 2234 if isLen1 { 2235 f(i) 2236 } else { 2237 go f(i) 2238 } 2239 2240 } 2241 wg.Wait() 2242 2243 for _, e := range ret { 2244 if e == graphql.Null { 2245 return graphql.Null 2246 } 2247 } 2248 2249 return ret 2250 } 2251 2252 func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler { 2253 if v == nil { 2254 return graphql.Null 2255 } 2256 return ec.___Schema(ctx, sel, v) 2257 } 2258 2259 func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { 2260 if v == nil { 2261 return graphql.Null 2262 } 2263 ret := make(graphql.Array, len(v)) 2264 var wg sync.WaitGroup 2265 isLen1 := len(v) == 1 2266 if !isLen1 { 2267 wg.Add(len(v)) 2268 } 2269 for i := range v { 2270 i := i 2271 fc := &graphql.FieldContext{ 2272 Index: &i, 2273 Result: &v[i], 2274 } 2275 ctx := graphql.WithFieldContext(ctx, fc) 2276 f := func(i int) { 2277 defer func() { 2278 if r := recover(); r != nil { 2279 ec.Error(ctx, ec.Recover(ctx, r)) 2280 ret = nil 2281 } 2282 }() 2283 if !isLen1 { 2284 defer wg.Done() 2285 } 2286 ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) 2287 } 2288 if isLen1 { 2289 f(i) 2290 } else { 2291 go f(i) 2292 } 2293 2294 } 2295 wg.Wait() 2296 2297 for _, e := range ret { 2298 if e == graphql.Null { 2299 return graphql.Null 2300 } 2301 } 2302 2303 return ret 2304 } 2305 2306 func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { 2307 if v == nil { 2308 return graphql.Null 2309 } 2310 return ec.___Type(ctx, sel, v) 2311 } 2312 2313 // endregion ***************************** type.gotpl *****************************