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