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