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