1
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/99designs/gqlgen/api/testdata/federation2/graph/model"
16 "github.com/99designs/gqlgen/graphql"
17 "github.com/99designs/gqlgen/graphql/introspection"
18 "github.com/99designs/gqlgen/plugin/federation/fedruntime"
19 gqlparser "github.com/vektah/gqlparser/v2"
20 "github.com/vektah/gqlparser/v2/ast"
21 )
22
23
24
25
26 func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
27 return &executableSchema{
28 schema: cfg.Schema,
29 resolvers: cfg.Resolvers,
30 directives: cfg.Directives,
31 complexity: cfg.Complexity,
32 }
33 }
34
35 type Config struct {
36 Schema *ast.Schema
37 Resolvers ResolverRoot
38 Directives DirectiveRoot
39 Complexity ComplexityRoot
40 }
41
42 type ResolverRoot interface {
43 Mutation() MutationResolver
44 Query() QueryResolver
45 }
46
47 type DirectiveRoot struct {
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 schema *ast.Schema
86 resolvers ResolverRoot
87 directives DirectiveRoot
88 complexity ComplexityRoot
89 }
90
91 func (e *executableSchema) Schema() *ast.Schema {
92 if e.schema != nil {
93 return e.schema
94 }
95 return parsedSchema
96 }
97
98 func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
99 ec := executionContext{nil, e, 0, 0, nil}
100 _ = ec
101 switch typeName + "." + field {
102
103 case "Mutation.createTodo":
104 if e.complexity.Mutation.CreateTodo == nil {
105 break
106 }
107
108 args, err := ec.field_Mutation_createTodo_args(context.TODO(), rawArgs)
109 if err != nil {
110 return 0, false
111 }
112
113 return e.complexity.Mutation.CreateTodo(childComplexity, args["input"].(model.NewTodo)), true
114
115 case "Query.todos":
116 if e.complexity.Query.Todos == nil {
117 break
118 }
119
120 return e.complexity.Query.Todos(childComplexity), true
121
122 case "Query._service":
123 if e.complexity.Query.__resolve__service == nil {
124 break
125 }
126
127 return e.complexity.Query.__resolve__service(childComplexity), true
128
129 case "Todo.done":
130 if e.complexity.Todo.Done == nil {
131 break
132 }
133
134 return e.complexity.Todo.Done(childComplexity), true
135
136 case "Todo.id":
137 if e.complexity.Todo.ID == nil {
138 break
139 }
140
141 return e.complexity.Todo.ID(childComplexity), true
142
143 case "Todo.text":
144 if e.complexity.Todo.Text == nil {
145 break
146 }
147
148 return e.complexity.Todo.Text(childComplexity), true
149
150 case "Todo.user":
151 if e.complexity.Todo.User == nil {
152 break
153 }
154
155 return e.complexity.Todo.User(childComplexity), true
156
157 case "User.id":
158 if e.complexity.User.ID == nil {
159 break
160 }
161
162 return e.complexity.User.ID(childComplexity), true
163
164 case "User.name":
165 if e.complexity.User.Name == nil {
166 break
167 }
168
169 return e.complexity.User.Name(childComplexity), true
170
171 case "_Service.sdl":
172 if e.complexity._Service.SDL == nil {
173 break
174 }
175
176 return e.complexity._Service.SDL(childComplexity), true
177
178 }
179 return 0, false
180 }
181
182 func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
183 rc := graphql.GetOperationContext(ctx)
184 ec := executionContext{rc, e, 0, 0, make(chan graphql.DeferredResult)}
185 inputUnmarshalMap := graphql.BuildUnmarshalerMap(
186 ec.unmarshalInputNewTodo,
187 )
188 first := true
189
190 switch rc.Operation.Operation {
191 case ast.Query:
192 return func(ctx context.Context) *graphql.Response {
193 var response graphql.Response
194 var data graphql.Marshaler
195 if first {
196 first = false
197 ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap)
198 data = ec._Query(ctx, rc.Operation.SelectionSet)
199 } else {
200 if atomic.LoadInt32(&ec.pendingDeferred) > 0 {
201 result := <-ec.deferredResults
202 atomic.AddInt32(&ec.pendingDeferred, -1)
203 data = result.Result
204 response.Path = result.Path
205 response.Label = result.Label
206 response.Errors = result.Errors
207 } else {
208 return nil
209 }
210 }
211 var buf bytes.Buffer
212 data.MarshalGQL(&buf)
213 response.Data = buf.Bytes()
214 if atomic.LoadInt32(&ec.deferred) > 0 {
215 hasNext := atomic.LoadInt32(&ec.pendingDeferred) > 0
216 response.HasNext = &hasNext
217 }
218
219 return &response
220 }
221 case ast.Mutation:
222 return func(ctx context.Context) *graphql.Response {
223 if !first {
224 return nil
225 }
226 first = false
227 ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap)
228 data := ec._Mutation(ctx, rc.Operation.SelectionSet)
229 var buf bytes.Buffer
230 data.MarshalGQL(&buf)
231
232 return &graphql.Response{
233 Data: buf.Bytes(),
234 }
235 }
236
237 default:
238 return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation"))
239 }
240 }
241
242 type executionContext struct {
243 *graphql.OperationContext
244 *executableSchema
245 deferred int32
246 pendingDeferred int32
247 deferredResults chan graphql.DeferredResult
248 }
249
250 func (ec *executionContext) processDeferredGroup(dg graphql.DeferredGroup) {
251 atomic.AddInt32(&ec.pendingDeferred, 1)
252 go func() {
253 ctx := graphql.WithFreshResponseContext(dg.Context)
254 dg.FieldSet.Dispatch(ctx)
255 ds := graphql.DeferredResult{
256 Path: dg.Path,
257 Label: dg.Label,
258 Result: dg.FieldSet,
259 Errors: graphql.GetErrors(ctx),
260 }
261
262 if dg.FieldSet.Invalids > 0 {
263 ds.Result = graphql.Null
264 }
265 ec.deferredResults <- ds
266 }()
267 }
268
269 func (ec *executionContext) introspectSchema() (*introspection.Schema, error) {
270 if ec.DisableIntrospection {
271 return nil, errors.New("introspection disabled")
272 }
273 return introspection.WrapSchema(ec.Schema()), nil
274 }
275
276 func (ec *executionContext) introspectType(name string) (*introspection.Type, error) {
277 if ec.DisableIntrospection {
278 return nil, errors.New("introspection disabled")
279 }
280 return introspection.WrapTypeFromDef(ec.Schema(), ec.Schema().Types[name]), nil
281 }
282
283
284 var sourcesFS embed.FS
285
286 func sourceData(filename string) string {
287 data, err := sourcesFS.ReadFile(filename)
288 if err != nil {
289 panic(fmt.Sprintf("codegen problem: %s not available", filename))
290 }
291 return string(data)
292 }
293
294 var sources = []*ast.Source{
295 {Name: "schema.graphqls", Input: sourceData("schema.graphqls"), BuiltIn: false},
296 {Name: "../federation/directives.graphql", Input: `
297 directive @authenticated on FIELD_DEFINITION | OBJECT | INTERFACE | SCALAR | ENUM
298 directive @composeDirective(name: String!) repeatable on SCHEMA
299 directive @extends on OBJECT | INTERFACE
300 directive @external on OBJECT | FIELD_DEFINITION
301 directive @key(fields: FieldSet!, resolvable: Boolean = true) repeatable on OBJECT | INTERFACE
302 directive @inaccessible on
303 | ARGUMENT_DEFINITION
304 | ENUM
305 | ENUM_VALUE
306 | FIELD_DEFINITION
307 | INPUT_FIELD_DEFINITION
308 | INPUT_OBJECT
309 | INTERFACE
310 | OBJECT
311 | SCALAR
312 | UNION
313 directive @interfaceObject on OBJECT
314 directive @link(import: [String!], url: String!) repeatable on SCHEMA
315 directive @override(from: String!, label: String) on FIELD_DEFINITION
316 directive @policy(policies: [[federation__Policy!]!]!) on
317 | FIELD_DEFINITION
318 | OBJECT
319 | INTERFACE
320 | SCALAR
321 | ENUM
322 directive @provides(fields: FieldSet!) on FIELD_DEFINITION
323 directive @requires(fields: FieldSet!) on FIELD_DEFINITION
324 directive @requiresScopes(scopes: [[federation__Scope!]!]!) on
325 | FIELD_DEFINITION
326 | OBJECT
327 | INTERFACE
328 | SCALAR
329 | ENUM
330 directive @shareable repeatable on FIELD_DEFINITION | OBJECT
331 directive @tag(name: String!) repeatable on
332 | ARGUMENT_DEFINITION
333 | ENUM
334 | ENUM_VALUE
335 | FIELD_DEFINITION
336 | INPUT_FIELD_DEFINITION
337 | INPUT_OBJECT
338 | INTERFACE
339 | OBJECT
340 | SCALAR
341 | UNION
342 scalar _Any
343 scalar FieldSet
344 scalar federation__Policy
345 scalar federation__Scope
346 `, BuiltIn: true},
347 {Name: "../federation/entity.graphql", Input: `
348 type _Service {
349 sdl: String
350 }
351
352 extend type Query {
353 _service: _Service!
354 }
355 `, BuiltIn: true},
356 }
357 var parsedSchema = gqlparser.MustLoadSchema(sources...)
358
359
360
361
362
363 func (ec *executionContext) field_Mutation_createTodo_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
364 var err error
365 args := map[string]interface{}{}
366 var arg0 model.NewTodo
367 if tmp, ok := rawArgs["input"]; ok {
368 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
369 arg0, err = ec.unmarshalNNewTodo2githubᚗcomᚋ99designsᚋgqlgenᚋapiᚋtestdataᚋfederation2ᚋgraphᚋmodelᚐNewTodo(ctx, tmp)
370 if err != nil {
371 return nil, err
372 }
373 }
374 args["input"] = arg0
375 return args, nil
376 }
377
378 func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
379 var err error
380 args := map[string]interface{}{}
381 var arg0 string
382 if tmp, ok := rawArgs["name"]; ok {
383 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
384 arg0, err = ec.unmarshalNString2string(ctx, tmp)
385 if err != nil {
386 return nil, err
387 }
388 }
389 args["name"] = arg0
390 return args, nil
391 }
392
393 func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
394 var err error
395 args := map[string]interface{}{}
396 var arg0 bool
397 if tmp, ok := rawArgs["includeDeprecated"]; ok {
398 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
399 arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
400 if err != nil {
401 return nil, err
402 }
403 }
404 args["includeDeprecated"] = arg0
405 return args, nil
406 }
407
408 func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
409 var err error
410 args := map[string]interface{}{}
411 var arg0 bool
412 if tmp, ok := rawArgs["includeDeprecated"]; ok {
413 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))
414 arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)
415 if err != nil {
416 return nil, err
417 }
418 }
419 args["includeDeprecated"] = arg0
420 return args, nil
421 }
422
423
424
425
426
427
428
429
430
431 func (ec *executionContext) _Mutation_createTodo(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
432 fc, err := ec.fieldContext_Mutation_createTodo(ctx, field)
433 if err != nil {
434 return graphql.Null
435 }
436 ctx = graphql.WithFieldContext(ctx, fc)
437 defer func() {
438 if r := recover(); r != nil {
439 ec.Error(ctx, ec.Recover(ctx, r))
440 ret = graphql.Null
441 }
442 }()
443 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
444 ctx = rctx
445 return ec.resolvers.Mutation().CreateTodo(rctx, fc.Args["input"].(model.NewTodo))
446 })
447 if err != nil {
448 ec.Error(ctx, err)
449 return graphql.Null
450 }
451 if resTmp == nil {
452 if !graphql.HasFieldError(ctx, fc) {
453 ec.Errorf(ctx, "must not be null")
454 }
455 return graphql.Null
456 }
457 res := resTmp.(*model.Todo)
458 fc.Result = res
459 return ec.marshalNTodo2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋapiᚋtestdataᚋfederation2ᚋgraphᚋmodelᚐTodo(ctx, field.Selections, res)
460 }
461
462 func (ec *executionContext) fieldContext_Mutation_createTodo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
463 fc = &graphql.FieldContext{
464 Object: "Mutation",
465 Field: field,
466 IsMethod: true,
467 IsResolver: true,
468 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
469 switch field.Name {
470 case "id":
471 return ec.fieldContext_Todo_id(ctx, field)
472 case "text":
473 return ec.fieldContext_Todo_text(ctx, field)
474 case "done":
475 return ec.fieldContext_Todo_done(ctx, field)
476 case "user":
477 return ec.fieldContext_Todo_user(ctx, field)
478 }
479 return nil, fmt.Errorf("no field named %q was found under type Todo", field.Name)
480 },
481 }
482 defer func() {
483 if r := recover(); r != nil {
484 err = ec.Recover(ctx, r)
485 ec.Error(ctx, err)
486 }
487 }()
488 ctx = graphql.WithFieldContext(ctx, fc)
489 if fc.Args, err = ec.field_Mutation_createTodo_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
490 ec.Error(ctx, err)
491 return fc, err
492 }
493 return fc, nil
494 }
495
496 func (ec *executionContext) _Query_todos(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
497 fc, err := ec.fieldContext_Query_todos(ctx, field)
498 if err != nil {
499 return graphql.Null
500 }
501 ctx = graphql.WithFieldContext(ctx, fc)
502 defer func() {
503 if r := recover(); r != nil {
504 ec.Error(ctx, ec.Recover(ctx, r))
505 ret = graphql.Null
506 }
507 }()
508 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
509 ctx = rctx
510 return ec.resolvers.Query().Todos(rctx)
511 })
512 if err != nil {
513 ec.Error(ctx, err)
514 return graphql.Null
515 }
516 if resTmp == nil {
517 if !graphql.HasFieldError(ctx, fc) {
518 ec.Errorf(ctx, "must not be null")
519 }
520 return graphql.Null
521 }
522 res := resTmp.([]*model.Todo)
523 fc.Result = res
524 return ec.marshalNTodo2ᚕᚖgithubᚗcomᚋ99designsᚋgqlgenᚋapiᚋtestdataᚋfederation2ᚋgraphᚋmodelᚐTodoᚄ(ctx, field.Selections, res)
525 }
526
527 func (ec *executionContext) fieldContext_Query_todos(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
528 fc = &graphql.FieldContext{
529 Object: "Query",
530 Field: field,
531 IsMethod: true,
532 IsResolver: true,
533 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
534 switch field.Name {
535 case "id":
536 return ec.fieldContext_Todo_id(ctx, field)
537 case "text":
538 return ec.fieldContext_Todo_text(ctx, field)
539 case "done":
540 return ec.fieldContext_Todo_done(ctx, field)
541 case "user":
542 return ec.fieldContext_Todo_user(ctx, field)
543 }
544 return nil, fmt.Errorf("no field named %q was found under type Todo", field.Name)
545 },
546 }
547 return fc, nil
548 }
549
550 func (ec *executionContext) _Query__service(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
551 fc, err := ec.fieldContext_Query__service(ctx, field)
552 if err != nil {
553 return graphql.Null
554 }
555 ctx = graphql.WithFieldContext(ctx, fc)
556 defer func() {
557 if r := recover(); r != nil {
558 ec.Error(ctx, ec.Recover(ctx, r))
559 ret = graphql.Null
560 }
561 }()
562 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
563 ctx = rctx
564 return ec.__resolve__service(ctx)
565 })
566 if err != nil {
567 ec.Error(ctx, err)
568 return graphql.Null
569 }
570 if resTmp == nil {
571 if !graphql.HasFieldError(ctx, fc) {
572 ec.Errorf(ctx, "must not be null")
573 }
574 return graphql.Null
575 }
576 res := resTmp.(fedruntime.Service)
577 fc.Result = res
578 return ec.marshalN_Service2githubᚗcomᚋ99designsᚋgqlgenᚋpluginᚋfederationᚋfedruntimeᚐService(ctx, field.Selections, res)
579 }
580
581 func (ec *executionContext) fieldContext_Query__service(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
582 fc = &graphql.FieldContext{
583 Object: "Query",
584 Field: field,
585 IsMethod: true,
586 IsResolver: false,
587 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
588 switch field.Name {
589 case "sdl":
590 return ec.fieldContext__Service_sdl(ctx, field)
591 }
592 return nil, fmt.Errorf("no field named %q was found under type _Service", field.Name)
593 },
594 }
595 return fc, nil
596 }
597
598 func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
599 fc, err := ec.fieldContext_Query___type(ctx, field)
600 if err != nil {
601 return graphql.Null
602 }
603 ctx = graphql.WithFieldContext(ctx, fc)
604 defer func() {
605 if r := recover(); r != nil {
606 ec.Error(ctx, ec.Recover(ctx, r))
607 ret = graphql.Null
608 }
609 }()
610 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
611 ctx = rctx
612 return ec.introspectType(fc.Args["name"].(string))
613 })
614 if err != nil {
615 ec.Error(ctx, err)
616 return graphql.Null
617 }
618 if resTmp == nil {
619 return graphql.Null
620 }
621 res := resTmp.(*introspection.Type)
622 fc.Result = res
623 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
624 }
625
626 func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
627 fc = &graphql.FieldContext{
628 Object: "Query",
629 Field: field,
630 IsMethod: true,
631 IsResolver: false,
632 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
633 switch field.Name {
634 case "kind":
635 return ec.fieldContext___Type_kind(ctx, field)
636 case "name":
637 return ec.fieldContext___Type_name(ctx, field)
638 case "description":
639 return ec.fieldContext___Type_description(ctx, field)
640 case "fields":
641 return ec.fieldContext___Type_fields(ctx, field)
642 case "interfaces":
643 return ec.fieldContext___Type_interfaces(ctx, field)
644 case "possibleTypes":
645 return ec.fieldContext___Type_possibleTypes(ctx, field)
646 case "enumValues":
647 return ec.fieldContext___Type_enumValues(ctx, field)
648 case "inputFields":
649 return ec.fieldContext___Type_inputFields(ctx, field)
650 case "ofType":
651 return ec.fieldContext___Type_ofType(ctx, field)
652 case "specifiedByURL":
653 return ec.fieldContext___Type_specifiedByURL(ctx, field)
654 }
655 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
656 },
657 }
658 defer func() {
659 if r := recover(); r != nil {
660 err = ec.Recover(ctx, r)
661 ec.Error(ctx, err)
662 }
663 }()
664 ctx = graphql.WithFieldContext(ctx, fc)
665 if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
666 ec.Error(ctx, err)
667 return fc, err
668 }
669 return fc, nil
670 }
671
672 func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
673 fc, err := ec.fieldContext_Query___schema(ctx, field)
674 if err != nil {
675 return graphql.Null
676 }
677 ctx = graphql.WithFieldContext(ctx, fc)
678 defer func() {
679 if r := recover(); r != nil {
680 ec.Error(ctx, ec.Recover(ctx, r))
681 ret = graphql.Null
682 }
683 }()
684 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
685 ctx = rctx
686 return ec.introspectSchema()
687 })
688 if err != nil {
689 ec.Error(ctx, err)
690 return graphql.Null
691 }
692 if resTmp == nil {
693 return graphql.Null
694 }
695 res := resTmp.(*introspection.Schema)
696 fc.Result = res
697 return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res)
698 }
699
700 func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
701 fc = &graphql.FieldContext{
702 Object: "Query",
703 Field: field,
704 IsMethod: true,
705 IsResolver: false,
706 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
707 switch field.Name {
708 case "description":
709 return ec.fieldContext___Schema_description(ctx, field)
710 case "types":
711 return ec.fieldContext___Schema_types(ctx, field)
712 case "queryType":
713 return ec.fieldContext___Schema_queryType(ctx, field)
714 case "mutationType":
715 return ec.fieldContext___Schema_mutationType(ctx, field)
716 case "subscriptionType":
717 return ec.fieldContext___Schema_subscriptionType(ctx, field)
718 case "directives":
719 return ec.fieldContext___Schema_directives(ctx, field)
720 }
721 return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name)
722 },
723 }
724 return fc, nil
725 }
726
727 func (ec *executionContext) _Todo_id(ctx context.Context, field graphql.CollectedField, obj *model.Todo) (ret graphql.Marshaler) {
728 fc, err := ec.fieldContext_Todo_id(ctx, field)
729 if err != nil {
730 return graphql.Null
731 }
732 ctx = graphql.WithFieldContext(ctx, fc)
733 defer func() {
734 if r := recover(); r != nil {
735 ec.Error(ctx, ec.Recover(ctx, r))
736 ret = graphql.Null
737 }
738 }()
739 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
740 ctx = rctx
741 return obj.ID, nil
742 })
743 if err != nil {
744 ec.Error(ctx, err)
745 return graphql.Null
746 }
747 if resTmp == nil {
748 if !graphql.HasFieldError(ctx, fc) {
749 ec.Errorf(ctx, "must not be null")
750 }
751 return graphql.Null
752 }
753 res := resTmp.(string)
754 fc.Result = res
755 return ec.marshalNID2string(ctx, field.Selections, res)
756 }
757
758 func (ec *executionContext) fieldContext_Todo_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
759 fc = &graphql.FieldContext{
760 Object: "Todo",
761 Field: field,
762 IsMethod: false,
763 IsResolver: false,
764 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
765 return nil, errors.New("field of type ID does not have child fields")
766 },
767 }
768 return fc, nil
769 }
770
771 func (ec *executionContext) _Todo_text(ctx context.Context, field graphql.CollectedField, obj *model.Todo) (ret graphql.Marshaler) {
772 fc, err := ec.fieldContext_Todo_text(ctx, field)
773 if err != nil {
774 return graphql.Null
775 }
776 ctx = graphql.WithFieldContext(ctx, fc)
777 defer func() {
778 if r := recover(); r != nil {
779 ec.Error(ctx, ec.Recover(ctx, r))
780 ret = graphql.Null
781 }
782 }()
783 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
784 ctx = rctx
785 return obj.Text, nil
786 })
787 if err != nil {
788 ec.Error(ctx, err)
789 return graphql.Null
790 }
791 if resTmp == nil {
792 if !graphql.HasFieldError(ctx, fc) {
793 ec.Errorf(ctx, "must not be null")
794 }
795 return graphql.Null
796 }
797 res := resTmp.(string)
798 fc.Result = res
799 return ec.marshalNString2string(ctx, field.Selections, res)
800 }
801
802 func (ec *executionContext) fieldContext_Todo_text(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
803 fc = &graphql.FieldContext{
804 Object: "Todo",
805 Field: field,
806 IsMethod: false,
807 IsResolver: false,
808 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
809 return nil, errors.New("field of type String does not have child fields")
810 },
811 }
812 return fc, nil
813 }
814
815 func (ec *executionContext) _Todo_done(ctx context.Context, field graphql.CollectedField, obj *model.Todo) (ret graphql.Marshaler) {
816 fc, err := ec.fieldContext_Todo_done(ctx, field)
817 if err != nil {
818 return graphql.Null
819 }
820 ctx = graphql.WithFieldContext(ctx, fc)
821 defer func() {
822 if r := recover(); r != nil {
823 ec.Error(ctx, ec.Recover(ctx, r))
824 ret = graphql.Null
825 }
826 }()
827 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
828 ctx = rctx
829 return obj.Done, nil
830 })
831 if err != nil {
832 ec.Error(ctx, err)
833 return graphql.Null
834 }
835 if resTmp == nil {
836 if !graphql.HasFieldError(ctx, fc) {
837 ec.Errorf(ctx, "must not be null")
838 }
839 return graphql.Null
840 }
841 res := resTmp.(bool)
842 fc.Result = res
843 return ec.marshalNBoolean2bool(ctx, field.Selections, res)
844 }
845
846 func (ec *executionContext) fieldContext_Todo_done(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
847 fc = &graphql.FieldContext{
848 Object: "Todo",
849 Field: field,
850 IsMethod: false,
851 IsResolver: false,
852 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
853 return nil, errors.New("field of type Boolean does not have child fields")
854 },
855 }
856 return fc, nil
857 }
858
859 func (ec *executionContext) _Todo_user(ctx context.Context, field graphql.CollectedField, obj *model.Todo) (ret graphql.Marshaler) {
860 fc, err := ec.fieldContext_Todo_user(ctx, field)
861 if err != nil {
862 return graphql.Null
863 }
864 ctx = graphql.WithFieldContext(ctx, fc)
865 defer func() {
866 if r := recover(); r != nil {
867 ec.Error(ctx, ec.Recover(ctx, r))
868 ret = graphql.Null
869 }
870 }()
871 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
872 ctx = rctx
873 return obj.User, nil
874 })
875 if err != nil {
876 ec.Error(ctx, err)
877 return graphql.Null
878 }
879 if resTmp == nil {
880 if !graphql.HasFieldError(ctx, fc) {
881 ec.Errorf(ctx, "must not be null")
882 }
883 return graphql.Null
884 }
885 res := resTmp.(*model.User)
886 fc.Result = res
887 return ec.marshalNUser2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋapiᚋtestdataᚋfederation2ᚋgraphᚋmodelᚐUser(ctx, field.Selections, res)
888 }
889
890 func (ec *executionContext) fieldContext_Todo_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
891 fc = &graphql.FieldContext{
892 Object: "Todo",
893 Field: field,
894 IsMethod: false,
895 IsResolver: false,
896 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
897 switch field.Name {
898 case "id":
899 return ec.fieldContext_User_id(ctx, field)
900 case "name":
901 return ec.fieldContext_User_name(ctx, field)
902 }
903 return nil, fmt.Errorf("no field named %q was found under type User", field.Name)
904 },
905 }
906 return fc, nil
907 }
908
909 func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
910 fc, err := ec.fieldContext_User_id(ctx, field)
911 if err != nil {
912 return graphql.Null
913 }
914 ctx = graphql.WithFieldContext(ctx, fc)
915 defer func() {
916 if r := recover(); r != nil {
917 ec.Error(ctx, ec.Recover(ctx, r))
918 ret = graphql.Null
919 }
920 }()
921 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
922 ctx = rctx
923 return obj.ID, nil
924 })
925 if err != nil {
926 ec.Error(ctx, err)
927 return graphql.Null
928 }
929 if resTmp == nil {
930 if !graphql.HasFieldError(ctx, fc) {
931 ec.Errorf(ctx, "must not be null")
932 }
933 return graphql.Null
934 }
935 res := resTmp.(string)
936 fc.Result = res
937 return ec.marshalNID2string(ctx, field.Selections, res)
938 }
939
940 func (ec *executionContext) fieldContext_User_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
941 fc = &graphql.FieldContext{
942 Object: "User",
943 Field: field,
944 IsMethod: false,
945 IsResolver: false,
946 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
947 return nil, errors.New("field of type ID does not have child fields")
948 },
949 }
950 return fc, nil
951 }
952
953 func (ec *executionContext) _User_name(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {
954 fc, err := ec.fieldContext_User_name(ctx, field)
955 if err != nil {
956 return graphql.Null
957 }
958 ctx = graphql.WithFieldContext(ctx, fc)
959 defer func() {
960 if r := recover(); r != nil {
961 ec.Error(ctx, ec.Recover(ctx, r))
962 ret = graphql.Null
963 }
964 }()
965 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
966 ctx = rctx
967 return obj.Name, nil
968 })
969 if err != nil {
970 ec.Error(ctx, err)
971 return graphql.Null
972 }
973 if resTmp == nil {
974 if !graphql.HasFieldError(ctx, fc) {
975 ec.Errorf(ctx, "must not be null")
976 }
977 return graphql.Null
978 }
979 res := resTmp.(string)
980 fc.Result = res
981 return ec.marshalNString2string(ctx, field.Selections, res)
982 }
983
984 func (ec *executionContext) fieldContext_User_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
985 fc = &graphql.FieldContext{
986 Object: "User",
987 Field: field,
988 IsMethod: false,
989 IsResolver: false,
990 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
991 return nil, errors.New("field of type String does not have child fields")
992 },
993 }
994 return fc, nil
995 }
996
997 func (ec *executionContext) __Service_sdl(ctx context.Context, field graphql.CollectedField, obj *fedruntime.Service) (ret graphql.Marshaler) {
998 fc, err := ec.fieldContext__Service_sdl(ctx, field)
999 if err != nil {
1000 return graphql.Null
1001 }
1002 ctx = graphql.WithFieldContext(ctx, fc)
1003 defer func() {
1004 if r := recover(); r != nil {
1005 ec.Error(ctx, ec.Recover(ctx, r))
1006 ret = graphql.Null
1007 }
1008 }()
1009 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1010 ctx = rctx
1011 return obj.SDL, nil
1012 })
1013 if err != nil {
1014 ec.Error(ctx, err)
1015 return graphql.Null
1016 }
1017 if resTmp == nil {
1018 return graphql.Null
1019 }
1020 res := resTmp.(string)
1021 fc.Result = res
1022 return ec.marshalOString2string(ctx, field.Selections, res)
1023 }
1024
1025 func (ec *executionContext) fieldContext__Service_sdl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1026 fc = &graphql.FieldContext{
1027 Object: "_Service",
1028 Field: field,
1029 IsMethod: false,
1030 IsResolver: false,
1031 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1032 return nil, errors.New("field of type String does not have child fields")
1033 },
1034 }
1035 return fc, nil
1036 }
1037
1038 func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
1039 fc, err := ec.fieldContext___Directive_name(ctx, field)
1040 if err != nil {
1041 return graphql.Null
1042 }
1043 ctx = graphql.WithFieldContext(ctx, fc)
1044 defer func() {
1045 if r := recover(); r != nil {
1046 ec.Error(ctx, ec.Recover(ctx, r))
1047 ret = graphql.Null
1048 }
1049 }()
1050 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1051 ctx = rctx
1052 return obj.Name, nil
1053 })
1054 if err != nil {
1055 ec.Error(ctx, err)
1056 return graphql.Null
1057 }
1058 if resTmp == nil {
1059 if !graphql.HasFieldError(ctx, fc) {
1060 ec.Errorf(ctx, "must not be null")
1061 }
1062 return graphql.Null
1063 }
1064 res := resTmp.(string)
1065 fc.Result = res
1066 return ec.marshalNString2string(ctx, field.Selections, res)
1067 }
1068
1069 func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1070 fc = &graphql.FieldContext{
1071 Object: "__Directive",
1072 Field: field,
1073 IsMethod: false,
1074 IsResolver: false,
1075 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1076 return nil, errors.New("field of type String does not have child fields")
1077 },
1078 }
1079 return fc, nil
1080 }
1081
1082 func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
1083 fc, err := ec.fieldContext___Directive_description(ctx, field)
1084 if err != nil {
1085 return graphql.Null
1086 }
1087 ctx = graphql.WithFieldContext(ctx, fc)
1088 defer func() {
1089 if r := recover(); r != nil {
1090 ec.Error(ctx, ec.Recover(ctx, r))
1091 ret = graphql.Null
1092 }
1093 }()
1094 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1095 ctx = rctx
1096 return obj.Description(), nil
1097 })
1098 if err != nil {
1099 ec.Error(ctx, err)
1100 return graphql.Null
1101 }
1102 if resTmp == nil {
1103 return graphql.Null
1104 }
1105 res := resTmp.(*string)
1106 fc.Result = res
1107 return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
1108 }
1109
1110 func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1111 fc = &graphql.FieldContext{
1112 Object: "__Directive",
1113 Field: field,
1114 IsMethod: true,
1115 IsResolver: false,
1116 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1117 return nil, errors.New("field of type String does not have child fields")
1118 },
1119 }
1120 return fc, nil
1121 }
1122
1123 func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
1124 fc, err := ec.fieldContext___Directive_locations(ctx, field)
1125 if err != nil {
1126 return graphql.Null
1127 }
1128 ctx = graphql.WithFieldContext(ctx, fc)
1129 defer func() {
1130 if r := recover(); r != nil {
1131 ec.Error(ctx, ec.Recover(ctx, r))
1132 ret = graphql.Null
1133 }
1134 }()
1135 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1136 ctx = rctx
1137 return obj.Locations, nil
1138 })
1139 if err != nil {
1140 ec.Error(ctx, err)
1141 return graphql.Null
1142 }
1143 if resTmp == nil {
1144 if !graphql.HasFieldError(ctx, fc) {
1145 ec.Errorf(ctx, "must not be null")
1146 }
1147 return graphql.Null
1148 }
1149 res := resTmp.([]string)
1150 fc.Result = res
1151 return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res)
1152 }
1153
1154 func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1155 fc = &graphql.FieldContext{
1156 Object: "__Directive",
1157 Field: field,
1158 IsMethod: false,
1159 IsResolver: false,
1160 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1161 return nil, errors.New("field of type __DirectiveLocation does not have child fields")
1162 },
1163 }
1164 return fc, nil
1165 }
1166
1167 func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
1168 fc, err := ec.fieldContext___Directive_args(ctx, field)
1169 if err != nil {
1170 return graphql.Null
1171 }
1172 ctx = graphql.WithFieldContext(ctx, fc)
1173 defer func() {
1174 if r := recover(); r != nil {
1175 ec.Error(ctx, ec.Recover(ctx, r))
1176 ret = graphql.Null
1177 }
1178 }()
1179 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1180 ctx = rctx
1181 return obj.Args, nil
1182 })
1183 if err != nil {
1184 ec.Error(ctx, err)
1185 return graphql.Null
1186 }
1187 if resTmp == nil {
1188 if !graphql.HasFieldError(ctx, fc) {
1189 ec.Errorf(ctx, "must not be null")
1190 }
1191 return graphql.Null
1192 }
1193 res := resTmp.([]introspection.InputValue)
1194 fc.Result = res
1195 return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
1196 }
1197
1198 func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1199 fc = &graphql.FieldContext{
1200 Object: "__Directive",
1201 Field: field,
1202 IsMethod: false,
1203 IsResolver: false,
1204 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1205 switch field.Name {
1206 case "name":
1207 return ec.fieldContext___InputValue_name(ctx, field)
1208 case "description":
1209 return ec.fieldContext___InputValue_description(ctx, field)
1210 case "type":
1211 return ec.fieldContext___InputValue_type(ctx, field)
1212 case "defaultValue":
1213 return ec.fieldContext___InputValue_defaultValue(ctx, field)
1214 }
1215 return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
1216 },
1217 }
1218 return fc, nil
1219 }
1220
1221 func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
1222 fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field)
1223 if err != nil {
1224 return graphql.Null
1225 }
1226 ctx = graphql.WithFieldContext(ctx, fc)
1227 defer func() {
1228 if r := recover(); r != nil {
1229 ec.Error(ctx, ec.Recover(ctx, r))
1230 ret = graphql.Null
1231 }
1232 }()
1233 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1234 ctx = rctx
1235 return obj.IsRepeatable, nil
1236 })
1237 if err != nil {
1238 ec.Error(ctx, err)
1239 return graphql.Null
1240 }
1241 if resTmp == nil {
1242 if !graphql.HasFieldError(ctx, fc) {
1243 ec.Errorf(ctx, "must not be null")
1244 }
1245 return graphql.Null
1246 }
1247 res := resTmp.(bool)
1248 fc.Result = res
1249 return ec.marshalNBoolean2bool(ctx, field.Selections, res)
1250 }
1251
1252 func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1253 fc = &graphql.FieldContext{
1254 Object: "__Directive",
1255 Field: field,
1256 IsMethod: false,
1257 IsResolver: false,
1258 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1259 return nil, errors.New("field of type Boolean does not have child fields")
1260 },
1261 }
1262 return fc, nil
1263 }
1264
1265 func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
1266 fc, err := ec.fieldContext___EnumValue_name(ctx, field)
1267 if err != nil {
1268 return graphql.Null
1269 }
1270 ctx = graphql.WithFieldContext(ctx, fc)
1271 defer func() {
1272 if r := recover(); r != nil {
1273 ec.Error(ctx, ec.Recover(ctx, r))
1274 ret = graphql.Null
1275 }
1276 }()
1277 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1278 ctx = rctx
1279 return obj.Name, nil
1280 })
1281 if err != nil {
1282 ec.Error(ctx, err)
1283 return graphql.Null
1284 }
1285 if resTmp == nil {
1286 if !graphql.HasFieldError(ctx, fc) {
1287 ec.Errorf(ctx, "must not be null")
1288 }
1289 return graphql.Null
1290 }
1291 res := resTmp.(string)
1292 fc.Result = res
1293 return ec.marshalNString2string(ctx, field.Selections, res)
1294 }
1295
1296 func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1297 fc = &graphql.FieldContext{
1298 Object: "__EnumValue",
1299 Field: field,
1300 IsMethod: false,
1301 IsResolver: false,
1302 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1303 return nil, errors.New("field of type String does not have child fields")
1304 },
1305 }
1306 return fc, nil
1307 }
1308
1309 func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
1310 fc, err := ec.fieldContext___EnumValue_description(ctx, field)
1311 if err != nil {
1312 return graphql.Null
1313 }
1314 ctx = graphql.WithFieldContext(ctx, fc)
1315 defer func() {
1316 if r := recover(); r != nil {
1317 ec.Error(ctx, ec.Recover(ctx, r))
1318 ret = graphql.Null
1319 }
1320 }()
1321 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1322 ctx = rctx
1323 return obj.Description(), nil
1324 })
1325 if err != nil {
1326 ec.Error(ctx, err)
1327 return graphql.Null
1328 }
1329 if resTmp == nil {
1330 return graphql.Null
1331 }
1332 res := resTmp.(*string)
1333 fc.Result = res
1334 return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
1335 }
1336
1337 func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1338 fc = &graphql.FieldContext{
1339 Object: "__EnumValue",
1340 Field: field,
1341 IsMethod: true,
1342 IsResolver: false,
1343 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1344 return nil, errors.New("field of type String does not have child fields")
1345 },
1346 }
1347 return fc, nil
1348 }
1349
1350 func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
1351 fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field)
1352 if err != nil {
1353 return graphql.Null
1354 }
1355 ctx = graphql.WithFieldContext(ctx, fc)
1356 defer func() {
1357 if r := recover(); r != nil {
1358 ec.Error(ctx, ec.Recover(ctx, r))
1359 ret = graphql.Null
1360 }
1361 }()
1362 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1363 ctx = rctx
1364 return obj.IsDeprecated(), nil
1365 })
1366 if err != nil {
1367 ec.Error(ctx, err)
1368 return graphql.Null
1369 }
1370 if resTmp == nil {
1371 if !graphql.HasFieldError(ctx, fc) {
1372 ec.Errorf(ctx, "must not be null")
1373 }
1374 return graphql.Null
1375 }
1376 res := resTmp.(bool)
1377 fc.Result = res
1378 return ec.marshalNBoolean2bool(ctx, field.Selections, res)
1379 }
1380
1381 func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1382 fc = &graphql.FieldContext{
1383 Object: "__EnumValue",
1384 Field: field,
1385 IsMethod: true,
1386 IsResolver: false,
1387 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1388 return nil, errors.New("field of type Boolean does not have child fields")
1389 },
1390 }
1391 return fc, nil
1392 }
1393
1394 func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
1395 fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field)
1396 if err != nil {
1397 return graphql.Null
1398 }
1399 ctx = graphql.WithFieldContext(ctx, fc)
1400 defer func() {
1401 if r := recover(); r != nil {
1402 ec.Error(ctx, ec.Recover(ctx, r))
1403 ret = graphql.Null
1404 }
1405 }()
1406 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1407 ctx = rctx
1408 return obj.DeprecationReason(), nil
1409 })
1410 if err != nil {
1411 ec.Error(ctx, err)
1412 return graphql.Null
1413 }
1414 if resTmp == nil {
1415 return graphql.Null
1416 }
1417 res := resTmp.(*string)
1418 fc.Result = res
1419 return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
1420 }
1421
1422 func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1423 fc = &graphql.FieldContext{
1424 Object: "__EnumValue",
1425 Field: field,
1426 IsMethod: true,
1427 IsResolver: false,
1428 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1429 return nil, errors.New("field of type String does not have child fields")
1430 },
1431 }
1432 return fc, nil
1433 }
1434
1435 func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
1436 fc, err := ec.fieldContext___Field_name(ctx, field)
1437 if err != nil {
1438 return graphql.Null
1439 }
1440 ctx = graphql.WithFieldContext(ctx, fc)
1441 defer func() {
1442 if r := recover(); r != nil {
1443 ec.Error(ctx, ec.Recover(ctx, r))
1444 ret = graphql.Null
1445 }
1446 }()
1447 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1448 ctx = rctx
1449 return obj.Name, nil
1450 })
1451 if err != nil {
1452 ec.Error(ctx, err)
1453 return graphql.Null
1454 }
1455 if resTmp == nil {
1456 if !graphql.HasFieldError(ctx, fc) {
1457 ec.Errorf(ctx, "must not be null")
1458 }
1459 return graphql.Null
1460 }
1461 res := resTmp.(string)
1462 fc.Result = res
1463 return ec.marshalNString2string(ctx, field.Selections, res)
1464 }
1465
1466 func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1467 fc = &graphql.FieldContext{
1468 Object: "__Field",
1469 Field: field,
1470 IsMethod: false,
1471 IsResolver: false,
1472 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1473 return nil, errors.New("field of type String does not have child fields")
1474 },
1475 }
1476 return fc, nil
1477 }
1478
1479 func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
1480 fc, err := ec.fieldContext___Field_description(ctx, field)
1481 if err != nil {
1482 return graphql.Null
1483 }
1484 ctx = graphql.WithFieldContext(ctx, fc)
1485 defer func() {
1486 if r := recover(); r != nil {
1487 ec.Error(ctx, ec.Recover(ctx, r))
1488 ret = graphql.Null
1489 }
1490 }()
1491 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1492 ctx = rctx
1493 return obj.Description(), nil
1494 })
1495 if err != nil {
1496 ec.Error(ctx, err)
1497 return graphql.Null
1498 }
1499 if resTmp == nil {
1500 return graphql.Null
1501 }
1502 res := resTmp.(*string)
1503 fc.Result = res
1504 return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
1505 }
1506
1507 func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1508 fc = &graphql.FieldContext{
1509 Object: "__Field",
1510 Field: field,
1511 IsMethod: true,
1512 IsResolver: false,
1513 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1514 return nil, errors.New("field of type String does not have child fields")
1515 },
1516 }
1517 return fc, nil
1518 }
1519
1520 func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
1521 fc, err := ec.fieldContext___Field_args(ctx, field)
1522 if err != nil {
1523 return graphql.Null
1524 }
1525 ctx = graphql.WithFieldContext(ctx, fc)
1526 defer func() {
1527 if r := recover(); r != nil {
1528 ec.Error(ctx, ec.Recover(ctx, r))
1529 ret = graphql.Null
1530 }
1531 }()
1532 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1533 ctx = rctx
1534 return obj.Args, nil
1535 })
1536 if err != nil {
1537 ec.Error(ctx, err)
1538 return graphql.Null
1539 }
1540 if resTmp == nil {
1541 if !graphql.HasFieldError(ctx, fc) {
1542 ec.Errorf(ctx, "must not be null")
1543 }
1544 return graphql.Null
1545 }
1546 res := resTmp.([]introspection.InputValue)
1547 fc.Result = res
1548 return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
1549 }
1550
1551 func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1552 fc = &graphql.FieldContext{
1553 Object: "__Field",
1554 Field: field,
1555 IsMethod: false,
1556 IsResolver: false,
1557 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1558 switch field.Name {
1559 case "name":
1560 return ec.fieldContext___InputValue_name(ctx, field)
1561 case "description":
1562 return ec.fieldContext___InputValue_description(ctx, field)
1563 case "type":
1564 return ec.fieldContext___InputValue_type(ctx, field)
1565 case "defaultValue":
1566 return ec.fieldContext___InputValue_defaultValue(ctx, field)
1567 }
1568 return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
1569 },
1570 }
1571 return fc, nil
1572 }
1573
1574 func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
1575 fc, err := ec.fieldContext___Field_type(ctx, field)
1576 if err != nil {
1577 return graphql.Null
1578 }
1579 ctx = graphql.WithFieldContext(ctx, fc)
1580 defer func() {
1581 if r := recover(); r != nil {
1582 ec.Error(ctx, ec.Recover(ctx, r))
1583 ret = graphql.Null
1584 }
1585 }()
1586 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1587 ctx = rctx
1588 return obj.Type, nil
1589 })
1590 if err != nil {
1591 ec.Error(ctx, err)
1592 return graphql.Null
1593 }
1594 if resTmp == nil {
1595 if !graphql.HasFieldError(ctx, fc) {
1596 ec.Errorf(ctx, "must not be null")
1597 }
1598 return graphql.Null
1599 }
1600 res := resTmp.(*introspection.Type)
1601 fc.Result = res
1602 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
1603 }
1604
1605 func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1606 fc = &graphql.FieldContext{
1607 Object: "__Field",
1608 Field: field,
1609 IsMethod: false,
1610 IsResolver: false,
1611 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1612 switch field.Name {
1613 case "kind":
1614 return ec.fieldContext___Type_kind(ctx, field)
1615 case "name":
1616 return ec.fieldContext___Type_name(ctx, field)
1617 case "description":
1618 return ec.fieldContext___Type_description(ctx, field)
1619 case "fields":
1620 return ec.fieldContext___Type_fields(ctx, field)
1621 case "interfaces":
1622 return ec.fieldContext___Type_interfaces(ctx, field)
1623 case "possibleTypes":
1624 return ec.fieldContext___Type_possibleTypes(ctx, field)
1625 case "enumValues":
1626 return ec.fieldContext___Type_enumValues(ctx, field)
1627 case "inputFields":
1628 return ec.fieldContext___Type_inputFields(ctx, field)
1629 case "ofType":
1630 return ec.fieldContext___Type_ofType(ctx, field)
1631 case "specifiedByURL":
1632 return ec.fieldContext___Type_specifiedByURL(ctx, field)
1633 }
1634 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
1635 },
1636 }
1637 return fc, nil
1638 }
1639
1640 func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
1641 fc, err := ec.fieldContext___Field_isDeprecated(ctx, field)
1642 if err != nil {
1643 return graphql.Null
1644 }
1645 ctx = graphql.WithFieldContext(ctx, fc)
1646 defer func() {
1647 if r := recover(); r != nil {
1648 ec.Error(ctx, ec.Recover(ctx, r))
1649 ret = graphql.Null
1650 }
1651 }()
1652 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1653 ctx = rctx
1654 return obj.IsDeprecated(), nil
1655 })
1656 if err != nil {
1657 ec.Error(ctx, err)
1658 return graphql.Null
1659 }
1660 if resTmp == nil {
1661 if !graphql.HasFieldError(ctx, fc) {
1662 ec.Errorf(ctx, "must not be null")
1663 }
1664 return graphql.Null
1665 }
1666 res := resTmp.(bool)
1667 fc.Result = res
1668 return ec.marshalNBoolean2bool(ctx, field.Selections, res)
1669 }
1670
1671 func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1672 fc = &graphql.FieldContext{
1673 Object: "__Field",
1674 Field: field,
1675 IsMethod: true,
1676 IsResolver: false,
1677 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1678 return nil, errors.New("field of type Boolean does not have child fields")
1679 },
1680 }
1681 return fc, nil
1682 }
1683
1684 func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
1685 fc, err := ec.fieldContext___Field_deprecationReason(ctx, field)
1686 if err != nil {
1687 return graphql.Null
1688 }
1689 ctx = graphql.WithFieldContext(ctx, fc)
1690 defer func() {
1691 if r := recover(); r != nil {
1692 ec.Error(ctx, ec.Recover(ctx, r))
1693 ret = graphql.Null
1694 }
1695 }()
1696 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1697 ctx = rctx
1698 return obj.DeprecationReason(), nil
1699 })
1700 if err != nil {
1701 ec.Error(ctx, err)
1702 return graphql.Null
1703 }
1704 if resTmp == nil {
1705 return graphql.Null
1706 }
1707 res := resTmp.(*string)
1708 fc.Result = res
1709 return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
1710 }
1711
1712 func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1713 fc = &graphql.FieldContext{
1714 Object: "__Field",
1715 Field: field,
1716 IsMethod: true,
1717 IsResolver: false,
1718 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1719 return nil, errors.New("field of type String does not have child fields")
1720 },
1721 }
1722 return fc, nil
1723 }
1724
1725 func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
1726 fc, err := ec.fieldContext___InputValue_name(ctx, field)
1727 if err != nil {
1728 return graphql.Null
1729 }
1730 ctx = graphql.WithFieldContext(ctx, fc)
1731 defer func() {
1732 if r := recover(); r != nil {
1733 ec.Error(ctx, ec.Recover(ctx, r))
1734 ret = graphql.Null
1735 }
1736 }()
1737 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1738 ctx = rctx
1739 return obj.Name, nil
1740 })
1741 if err != nil {
1742 ec.Error(ctx, err)
1743 return graphql.Null
1744 }
1745 if resTmp == nil {
1746 if !graphql.HasFieldError(ctx, fc) {
1747 ec.Errorf(ctx, "must not be null")
1748 }
1749 return graphql.Null
1750 }
1751 res := resTmp.(string)
1752 fc.Result = res
1753 return ec.marshalNString2string(ctx, field.Selections, res)
1754 }
1755
1756 func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1757 fc = &graphql.FieldContext{
1758 Object: "__InputValue",
1759 Field: field,
1760 IsMethod: false,
1761 IsResolver: false,
1762 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1763 return nil, errors.New("field of type String does not have child fields")
1764 },
1765 }
1766 return fc, nil
1767 }
1768
1769 func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
1770 fc, err := ec.fieldContext___InputValue_description(ctx, field)
1771 if err != nil {
1772 return graphql.Null
1773 }
1774 ctx = graphql.WithFieldContext(ctx, fc)
1775 defer func() {
1776 if r := recover(); r != nil {
1777 ec.Error(ctx, ec.Recover(ctx, r))
1778 ret = graphql.Null
1779 }
1780 }()
1781 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1782 ctx = rctx
1783 return obj.Description(), nil
1784 })
1785 if err != nil {
1786 ec.Error(ctx, err)
1787 return graphql.Null
1788 }
1789 if resTmp == nil {
1790 return graphql.Null
1791 }
1792 res := resTmp.(*string)
1793 fc.Result = res
1794 return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
1795 }
1796
1797 func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1798 fc = &graphql.FieldContext{
1799 Object: "__InputValue",
1800 Field: field,
1801 IsMethod: true,
1802 IsResolver: false,
1803 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1804 return nil, errors.New("field of type String does not have child fields")
1805 },
1806 }
1807 return fc, nil
1808 }
1809
1810 func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
1811 fc, err := ec.fieldContext___InputValue_type(ctx, field)
1812 if err != nil {
1813 return graphql.Null
1814 }
1815 ctx = graphql.WithFieldContext(ctx, fc)
1816 defer func() {
1817 if r := recover(); r != nil {
1818 ec.Error(ctx, ec.Recover(ctx, r))
1819 ret = graphql.Null
1820 }
1821 }()
1822 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1823 ctx = rctx
1824 return obj.Type, nil
1825 })
1826 if err != nil {
1827 ec.Error(ctx, err)
1828 return graphql.Null
1829 }
1830 if resTmp == nil {
1831 if !graphql.HasFieldError(ctx, fc) {
1832 ec.Errorf(ctx, "must not be null")
1833 }
1834 return graphql.Null
1835 }
1836 res := resTmp.(*introspection.Type)
1837 fc.Result = res
1838 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
1839 }
1840
1841 func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1842 fc = &graphql.FieldContext{
1843 Object: "__InputValue",
1844 Field: field,
1845 IsMethod: false,
1846 IsResolver: false,
1847 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1848 switch field.Name {
1849 case "kind":
1850 return ec.fieldContext___Type_kind(ctx, field)
1851 case "name":
1852 return ec.fieldContext___Type_name(ctx, field)
1853 case "description":
1854 return ec.fieldContext___Type_description(ctx, field)
1855 case "fields":
1856 return ec.fieldContext___Type_fields(ctx, field)
1857 case "interfaces":
1858 return ec.fieldContext___Type_interfaces(ctx, field)
1859 case "possibleTypes":
1860 return ec.fieldContext___Type_possibleTypes(ctx, field)
1861 case "enumValues":
1862 return ec.fieldContext___Type_enumValues(ctx, field)
1863 case "inputFields":
1864 return ec.fieldContext___Type_inputFields(ctx, field)
1865 case "ofType":
1866 return ec.fieldContext___Type_ofType(ctx, field)
1867 case "specifiedByURL":
1868 return ec.fieldContext___Type_specifiedByURL(ctx, field)
1869 }
1870 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
1871 },
1872 }
1873 return fc, nil
1874 }
1875
1876 func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
1877 fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field)
1878 if err != nil {
1879 return graphql.Null
1880 }
1881 ctx = graphql.WithFieldContext(ctx, fc)
1882 defer func() {
1883 if r := recover(); r != nil {
1884 ec.Error(ctx, ec.Recover(ctx, r))
1885 ret = graphql.Null
1886 }
1887 }()
1888 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1889 ctx = rctx
1890 return obj.DefaultValue, nil
1891 })
1892 if err != nil {
1893 ec.Error(ctx, err)
1894 return graphql.Null
1895 }
1896 if resTmp == nil {
1897 return graphql.Null
1898 }
1899 res := resTmp.(*string)
1900 fc.Result = res
1901 return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
1902 }
1903
1904 func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1905 fc = &graphql.FieldContext{
1906 Object: "__InputValue",
1907 Field: field,
1908 IsMethod: false,
1909 IsResolver: false,
1910 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1911 return nil, errors.New("field of type String does not have child fields")
1912 },
1913 }
1914 return fc, nil
1915 }
1916
1917 func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
1918 fc, err := ec.fieldContext___Schema_description(ctx, field)
1919 if err != nil {
1920 return graphql.Null
1921 }
1922 ctx = graphql.WithFieldContext(ctx, fc)
1923 defer func() {
1924 if r := recover(); r != nil {
1925 ec.Error(ctx, ec.Recover(ctx, r))
1926 ret = graphql.Null
1927 }
1928 }()
1929 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1930 ctx = rctx
1931 return obj.Description(), nil
1932 })
1933 if err != nil {
1934 ec.Error(ctx, err)
1935 return graphql.Null
1936 }
1937 if resTmp == nil {
1938 return graphql.Null
1939 }
1940 res := resTmp.(*string)
1941 fc.Result = res
1942 return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
1943 }
1944
1945 func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1946 fc = &graphql.FieldContext{
1947 Object: "__Schema",
1948 Field: field,
1949 IsMethod: true,
1950 IsResolver: false,
1951 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1952 return nil, errors.New("field of type String does not have child fields")
1953 },
1954 }
1955 return fc, nil
1956 }
1957
1958 func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
1959 fc, err := ec.fieldContext___Schema_types(ctx, field)
1960 if err != nil {
1961 return graphql.Null
1962 }
1963 ctx = graphql.WithFieldContext(ctx, fc)
1964 defer func() {
1965 if r := recover(); r != nil {
1966 ec.Error(ctx, ec.Recover(ctx, r))
1967 ret = graphql.Null
1968 }
1969 }()
1970 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1971 ctx = rctx
1972 return obj.Types(), nil
1973 })
1974 if err != nil {
1975 ec.Error(ctx, err)
1976 return graphql.Null
1977 }
1978 if resTmp == nil {
1979 if !graphql.HasFieldError(ctx, fc) {
1980 ec.Errorf(ctx, "must not be null")
1981 }
1982 return graphql.Null
1983 }
1984 res := resTmp.([]introspection.Type)
1985 fc.Result = res
1986 return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
1987 }
1988
1989 func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1990 fc = &graphql.FieldContext{
1991 Object: "__Schema",
1992 Field: field,
1993 IsMethod: true,
1994 IsResolver: false,
1995 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1996 switch field.Name {
1997 case "kind":
1998 return ec.fieldContext___Type_kind(ctx, field)
1999 case "name":
2000 return ec.fieldContext___Type_name(ctx, field)
2001 case "description":
2002 return ec.fieldContext___Type_description(ctx, field)
2003 case "fields":
2004 return ec.fieldContext___Type_fields(ctx, field)
2005 case "interfaces":
2006 return ec.fieldContext___Type_interfaces(ctx, field)
2007 case "possibleTypes":
2008 return ec.fieldContext___Type_possibleTypes(ctx, field)
2009 case "enumValues":
2010 return ec.fieldContext___Type_enumValues(ctx, field)
2011 case "inputFields":
2012 return ec.fieldContext___Type_inputFields(ctx, field)
2013 case "ofType":
2014 return ec.fieldContext___Type_ofType(ctx, field)
2015 case "specifiedByURL":
2016 return ec.fieldContext___Type_specifiedByURL(ctx, field)
2017 }
2018 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
2019 },
2020 }
2021 return fc, nil
2022 }
2023
2024 func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
2025 fc, err := ec.fieldContext___Schema_queryType(ctx, field)
2026 if err != nil {
2027 return graphql.Null
2028 }
2029 ctx = graphql.WithFieldContext(ctx, fc)
2030 defer func() {
2031 if r := recover(); r != nil {
2032 ec.Error(ctx, ec.Recover(ctx, r))
2033 ret = graphql.Null
2034 }
2035 }()
2036 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
2037 ctx = rctx
2038 return obj.QueryType(), nil
2039 })
2040 if err != nil {
2041 ec.Error(ctx, err)
2042 return graphql.Null
2043 }
2044 if resTmp == nil {
2045 if !graphql.HasFieldError(ctx, fc) {
2046 ec.Errorf(ctx, "must not be null")
2047 }
2048 return graphql.Null
2049 }
2050 res := resTmp.(*introspection.Type)
2051 fc.Result = res
2052 return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
2053 }
2054
2055 func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2056 fc = &graphql.FieldContext{
2057 Object: "__Schema",
2058 Field: field,
2059 IsMethod: true,
2060 IsResolver: false,
2061 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2062 switch field.Name {
2063 case "kind":
2064 return ec.fieldContext___Type_kind(ctx, field)
2065 case "name":
2066 return ec.fieldContext___Type_name(ctx, field)
2067 case "description":
2068 return ec.fieldContext___Type_description(ctx, field)
2069 case "fields":
2070 return ec.fieldContext___Type_fields(ctx, field)
2071 case "interfaces":
2072 return ec.fieldContext___Type_interfaces(ctx, field)
2073 case "possibleTypes":
2074 return ec.fieldContext___Type_possibleTypes(ctx, field)
2075 case "enumValues":
2076 return ec.fieldContext___Type_enumValues(ctx, field)
2077 case "inputFields":
2078 return ec.fieldContext___Type_inputFields(ctx, field)
2079 case "ofType":
2080 return ec.fieldContext___Type_ofType(ctx, field)
2081 case "specifiedByURL":
2082 return ec.fieldContext___Type_specifiedByURL(ctx, field)
2083 }
2084 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
2085 },
2086 }
2087 return fc, nil
2088 }
2089
2090 func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
2091 fc, err := ec.fieldContext___Schema_mutationType(ctx, field)
2092 if err != nil {
2093 return graphql.Null
2094 }
2095 ctx = graphql.WithFieldContext(ctx, fc)
2096 defer func() {
2097 if r := recover(); r != nil {
2098 ec.Error(ctx, ec.Recover(ctx, r))
2099 ret = graphql.Null
2100 }
2101 }()
2102 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
2103 ctx = rctx
2104 return obj.MutationType(), nil
2105 })
2106 if err != nil {
2107 ec.Error(ctx, err)
2108 return graphql.Null
2109 }
2110 if resTmp == nil {
2111 return graphql.Null
2112 }
2113 res := resTmp.(*introspection.Type)
2114 fc.Result = res
2115 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
2116 }
2117
2118 func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2119 fc = &graphql.FieldContext{
2120 Object: "__Schema",
2121 Field: field,
2122 IsMethod: true,
2123 IsResolver: false,
2124 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2125 switch field.Name {
2126 case "kind":
2127 return ec.fieldContext___Type_kind(ctx, field)
2128 case "name":
2129 return ec.fieldContext___Type_name(ctx, field)
2130 case "description":
2131 return ec.fieldContext___Type_description(ctx, field)
2132 case "fields":
2133 return ec.fieldContext___Type_fields(ctx, field)
2134 case "interfaces":
2135 return ec.fieldContext___Type_interfaces(ctx, field)
2136 case "possibleTypes":
2137 return ec.fieldContext___Type_possibleTypes(ctx, field)
2138 case "enumValues":
2139 return ec.fieldContext___Type_enumValues(ctx, field)
2140 case "inputFields":
2141 return ec.fieldContext___Type_inputFields(ctx, field)
2142 case "ofType":
2143 return ec.fieldContext___Type_ofType(ctx, field)
2144 case "specifiedByURL":
2145 return ec.fieldContext___Type_specifiedByURL(ctx, field)
2146 }
2147 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
2148 },
2149 }
2150 return fc, nil
2151 }
2152
2153 func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
2154 fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field)
2155 if err != nil {
2156 return graphql.Null
2157 }
2158 ctx = graphql.WithFieldContext(ctx, fc)
2159 defer func() {
2160 if r := recover(); r != nil {
2161 ec.Error(ctx, ec.Recover(ctx, r))
2162 ret = graphql.Null
2163 }
2164 }()
2165 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
2166 ctx = rctx
2167 return obj.SubscriptionType(), nil
2168 })
2169 if err != nil {
2170 ec.Error(ctx, err)
2171 return graphql.Null
2172 }
2173 if resTmp == nil {
2174 return graphql.Null
2175 }
2176 res := resTmp.(*introspection.Type)
2177 fc.Result = res
2178 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
2179 }
2180
2181 func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2182 fc = &graphql.FieldContext{
2183 Object: "__Schema",
2184 Field: field,
2185 IsMethod: true,
2186 IsResolver: false,
2187 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2188 switch field.Name {
2189 case "kind":
2190 return ec.fieldContext___Type_kind(ctx, field)
2191 case "name":
2192 return ec.fieldContext___Type_name(ctx, field)
2193 case "description":
2194 return ec.fieldContext___Type_description(ctx, field)
2195 case "fields":
2196 return ec.fieldContext___Type_fields(ctx, field)
2197 case "interfaces":
2198 return ec.fieldContext___Type_interfaces(ctx, field)
2199 case "possibleTypes":
2200 return ec.fieldContext___Type_possibleTypes(ctx, field)
2201 case "enumValues":
2202 return ec.fieldContext___Type_enumValues(ctx, field)
2203 case "inputFields":
2204 return ec.fieldContext___Type_inputFields(ctx, field)
2205 case "ofType":
2206 return ec.fieldContext___Type_ofType(ctx, field)
2207 case "specifiedByURL":
2208 return ec.fieldContext___Type_specifiedByURL(ctx, field)
2209 }
2210 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
2211 },
2212 }
2213 return fc, nil
2214 }
2215
2216 func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
2217 fc, err := ec.fieldContext___Schema_directives(ctx, field)
2218 if err != nil {
2219 return graphql.Null
2220 }
2221 ctx = graphql.WithFieldContext(ctx, fc)
2222 defer func() {
2223 if r := recover(); r != nil {
2224 ec.Error(ctx, ec.Recover(ctx, r))
2225 ret = graphql.Null
2226 }
2227 }()
2228 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
2229 ctx = rctx
2230 return obj.Directives(), nil
2231 })
2232 if err != nil {
2233 ec.Error(ctx, err)
2234 return graphql.Null
2235 }
2236 if resTmp == nil {
2237 if !graphql.HasFieldError(ctx, fc) {
2238 ec.Errorf(ctx, "must not be null")
2239 }
2240 return graphql.Null
2241 }
2242 res := resTmp.([]introspection.Directive)
2243 fc.Result = res
2244 return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res)
2245 }
2246
2247 func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2248 fc = &graphql.FieldContext{
2249 Object: "__Schema",
2250 Field: field,
2251 IsMethod: true,
2252 IsResolver: false,
2253 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2254 switch field.Name {
2255 case "name":
2256 return ec.fieldContext___Directive_name(ctx, field)
2257 case "description":
2258 return ec.fieldContext___Directive_description(ctx, field)
2259 case "locations":
2260 return ec.fieldContext___Directive_locations(ctx, field)
2261 case "args":
2262 return ec.fieldContext___Directive_args(ctx, field)
2263 case "isRepeatable":
2264 return ec.fieldContext___Directive_isRepeatable(ctx, field)
2265 }
2266 return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name)
2267 },
2268 }
2269 return fc, nil
2270 }
2271
2272 func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
2273 fc, err := ec.fieldContext___Type_kind(ctx, field)
2274 if err != nil {
2275 return graphql.Null
2276 }
2277 ctx = graphql.WithFieldContext(ctx, fc)
2278 defer func() {
2279 if r := recover(); r != nil {
2280 ec.Error(ctx, ec.Recover(ctx, r))
2281 ret = graphql.Null
2282 }
2283 }()
2284 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
2285 ctx = rctx
2286 return obj.Kind(), nil
2287 })
2288 if err != nil {
2289 ec.Error(ctx, err)
2290 return graphql.Null
2291 }
2292 if resTmp == nil {
2293 if !graphql.HasFieldError(ctx, fc) {
2294 ec.Errorf(ctx, "must not be null")
2295 }
2296 return graphql.Null
2297 }
2298 res := resTmp.(string)
2299 fc.Result = res
2300 return ec.marshalN__TypeKind2string(ctx, field.Selections, res)
2301 }
2302
2303 func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2304 fc = &graphql.FieldContext{
2305 Object: "__Type",
2306 Field: field,
2307 IsMethod: true,
2308 IsResolver: false,
2309 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2310 return nil, errors.New("field of type __TypeKind does not have child fields")
2311 },
2312 }
2313 return fc, nil
2314 }
2315
2316 func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
2317 fc, err := ec.fieldContext___Type_name(ctx, field)
2318 if err != nil {
2319 return graphql.Null
2320 }
2321 ctx = graphql.WithFieldContext(ctx, fc)
2322 defer func() {
2323 if r := recover(); r != nil {
2324 ec.Error(ctx, ec.Recover(ctx, r))
2325 ret = graphql.Null
2326 }
2327 }()
2328 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
2329 ctx = rctx
2330 return obj.Name(), nil
2331 })
2332 if err != nil {
2333 ec.Error(ctx, err)
2334 return graphql.Null
2335 }
2336 if resTmp == nil {
2337 return graphql.Null
2338 }
2339 res := resTmp.(*string)
2340 fc.Result = res
2341 return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
2342 }
2343
2344 func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2345 fc = &graphql.FieldContext{
2346 Object: "__Type",
2347 Field: field,
2348 IsMethod: true,
2349 IsResolver: false,
2350 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2351 return nil, errors.New("field of type String does not have child fields")
2352 },
2353 }
2354 return fc, nil
2355 }
2356
2357 func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
2358 fc, err := ec.fieldContext___Type_description(ctx, field)
2359 if err != nil {
2360 return graphql.Null
2361 }
2362 ctx = graphql.WithFieldContext(ctx, fc)
2363 defer func() {
2364 if r := recover(); r != nil {
2365 ec.Error(ctx, ec.Recover(ctx, r))
2366 ret = graphql.Null
2367 }
2368 }()
2369 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
2370 ctx = rctx
2371 return obj.Description(), nil
2372 })
2373 if err != nil {
2374 ec.Error(ctx, err)
2375 return graphql.Null
2376 }
2377 if resTmp == nil {
2378 return graphql.Null
2379 }
2380 res := resTmp.(*string)
2381 fc.Result = res
2382 return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
2383 }
2384
2385 func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2386 fc = &graphql.FieldContext{
2387 Object: "__Type",
2388 Field: field,
2389 IsMethod: true,
2390 IsResolver: false,
2391 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2392 return nil, errors.New("field of type String does not have child fields")
2393 },
2394 }
2395 return fc, nil
2396 }
2397
2398 func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
2399 fc, err := ec.fieldContext___Type_fields(ctx, field)
2400 if err != nil {
2401 return graphql.Null
2402 }
2403 ctx = graphql.WithFieldContext(ctx, fc)
2404 defer func() {
2405 if r := recover(); r != nil {
2406 ec.Error(ctx, ec.Recover(ctx, r))
2407 ret = graphql.Null
2408 }
2409 }()
2410 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
2411 ctx = rctx
2412 return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil
2413 })
2414 if err != nil {
2415 ec.Error(ctx, err)
2416 return graphql.Null
2417 }
2418 if resTmp == nil {
2419 return graphql.Null
2420 }
2421 res := resTmp.([]introspection.Field)
2422 fc.Result = res
2423 return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res)
2424 }
2425
2426 func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2427 fc = &graphql.FieldContext{
2428 Object: "__Type",
2429 Field: field,
2430 IsMethod: true,
2431 IsResolver: false,
2432 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2433 switch field.Name {
2434 case "name":
2435 return ec.fieldContext___Field_name(ctx, field)
2436 case "description":
2437 return ec.fieldContext___Field_description(ctx, field)
2438 case "args":
2439 return ec.fieldContext___Field_args(ctx, field)
2440 case "type":
2441 return ec.fieldContext___Field_type(ctx, field)
2442 case "isDeprecated":
2443 return ec.fieldContext___Field_isDeprecated(ctx, field)
2444 case "deprecationReason":
2445 return ec.fieldContext___Field_deprecationReason(ctx, field)
2446 }
2447 return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name)
2448 },
2449 }
2450 defer func() {
2451 if r := recover(); r != nil {
2452 err = ec.Recover(ctx, r)
2453 ec.Error(ctx, err)
2454 }
2455 }()
2456 ctx = graphql.WithFieldContext(ctx, fc)
2457 if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2458 ec.Error(ctx, err)
2459 return fc, err
2460 }
2461 return fc, nil
2462 }
2463
2464 func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
2465 fc, err := ec.fieldContext___Type_interfaces(ctx, field)
2466 if err != nil {
2467 return graphql.Null
2468 }
2469 ctx = graphql.WithFieldContext(ctx, fc)
2470 defer func() {
2471 if r := recover(); r != nil {
2472 ec.Error(ctx, ec.Recover(ctx, r))
2473 ret = graphql.Null
2474 }
2475 }()
2476 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
2477 ctx = rctx
2478 return obj.Interfaces(), nil
2479 })
2480 if err != nil {
2481 ec.Error(ctx, err)
2482 return graphql.Null
2483 }
2484 if resTmp == nil {
2485 return graphql.Null
2486 }
2487 res := resTmp.([]introspection.Type)
2488 fc.Result = res
2489 return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
2490 }
2491
2492 func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2493 fc = &graphql.FieldContext{
2494 Object: "__Type",
2495 Field: field,
2496 IsMethod: true,
2497 IsResolver: false,
2498 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2499 switch field.Name {
2500 case "kind":
2501 return ec.fieldContext___Type_kind(ctx, field)
2502 case "name":
2503 return ec.fieldContext___Type_name(ctx, field)
2504 case "description":
2505 return ec.fieldContext___Type_description(ctx, field)
2506 case "fields":
2507 return ec.fieldContext___Type_fields(ctx, field)
2508 case "interfaces":
2509 return ec.fieldContext___Type_interfaces(ctx, field)
2510 case "possibleTypes":
2511 return ec.fieldContext___Type_possibleTypes(ctx, field)
2512 case "enumValues":
2513 return ec.fieldContext___Type_enumValues(ctx, field)
2514 case "inputFields":
2515 return ec.fieldContext___Type_inputFields(ctx, field)
2516 case "ofType":
2517 return ec.fieldContext___Type_ofType(ctx, field)
2518 case "specifiedByURL":
2519 return ec.fieldContext___Type_specifiedByURL(ctx, field)
2520 }
2521 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
2522 },
2523 }
2524 return fc, nil
2525 }
2526
2527 func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
2528 fc, err := ec.fieldContext___Type_possibleTypes(ctx, field)
2529 if err != nil {
2530 return graphql.Null
2531 }
2532 ctx = graphql.WithFieldContext(ctx, fc)
2533 defer func() {
2534 if r := recover(); r != nil {
2535 ec.Error(ctx, ec.Recover(ctx, r))
2536 ret = graphql.Null
2537 }
2538 }()
2539 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
2540 ctx = rctx
2541 return obj.PossibleTypes(), nil
2542 })
2543 if err != nil {
2544 ec.Error(ctx, err)
2545 return graphql.Null
2546 }
2547 if resTmp == nil {
2548 return graphql.Null
2549 }
2550 res := resTmp.([]introspection.Type)
2551 fc.Result = res
2552 return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
2553 }
2554
2555 func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2556 fc = &graphql.FieldContext{
2557 Object: "__Type",
2558 Field: field,
2559 IsMethod: true,
2560 IsResolver: false,
2561 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2562 switch field.Name {
2563 case "kind":
2564 return ec.fieldContext___Type_kind(ctx, field)
2565 case "name":
2566 return ec.fieldContext___Type_name(ctx, field)
2567 case "description":
2568 return ec.fieldContext___Type_description(ctx, field)
2569 case "fields":
2570 return ec.fieldContext___Type_fields(ctx, field)
2571 case "interfaces":
2572 return ec.fieldContext___Type_interfaces(ctx, field)
2573 case "possibleTypes":
2574 return ec.fieldContext___Type_possibleTypes(ctx, field)
2575 case "enumValues":
2576 return ec.fieldContext___Type_enumValues(ctx, field)
2577 case "inputFields":
2578 return ec.fieldContext___Type_inputFields(ctx, field)
2579 case "ofType":
2580 return ec.fieldContext___Type_ofType(ctx, field)
2581 case "specifiedByURL":
2582 return ec.fieldContext___Type_specifiedByURL(ctx, field)
2583 }
2584 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
2585 },
2586 }
2587 return fc, nil
2588 }
2589
2590 func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
2591 fc, err := ec.fieldContext___Type_enumValues(ctx, field)
2592 if err != nil {
2593 return graphql.Null
2594 }
2595 ctx = graphql.WithFieldContext(ctx, fc)
2596 defer func() {
2597 if r := recover(); r != nil {
2598 ec.Error(ctx, ec.Recover(ctx, r))
2599 ret = graphql.Null
2600 }
2601 }()
2602 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
2603 ctx = rctx
2604 return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil
2605 })
2606 if err != nil {
2607 ec.Error(ctx, err)
2608 return graphql.Null
2609 }
2610 if resTmp == nil {
2611 return graphql.Null
2612 }
2613 res := resTmp.([]introspection.EnumValue)
2614 fc.Result = res
2615 return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res)
2616 }
2617
2618 func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2619 fc = &graphql.FieldContext{
2620 Object: "__Type",
2621 Field: field,
2622 IsMethod: true,
2623 IsResolver: false,
2624 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2625 switch field.Name {
2626 case "name":
2627 return ec.fieldContext___EnumValue_name(ctx, field)
2628 case "description":
2629 return ec.fieldContext___EnumValue_description(ctx, field)
2630 case "isDeprecated":
2631 return ec.fieldContext___EnumValue_isDeprecated(ctx, field)
2632 case "deprecationReason":
2633 return ec.fieldContext___EnumValue_deprecationReason(ctx, field)
2634 }
2635 return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name)
2636 },
2637 }
2638 defer func() {
2639 if r := recover(); r != nil {
2640 err = ec.Recover(ctx, r)
2641 ec.Error(ctx, err)
2642 }
2643 }()
2644 ctx = graphql.WithFieldContext(ctx, fc)
2645 if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
2646 ec.Error(ctx, err)
2647 return fc, err
2648 }
2649 return fc, nil
2650 }
2651
2652 func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
2653 fc, err := ec.fieldContext___Type_inputFields(ctx, field)
2654 if err != nil {
2655 return graphql.Null
2656 }
2657 ctx = graphql.WithFieldContext(ctx, fc)
2658 defer func() {
2659 if r := recover(); r != nil {
2660 ec.Error(ctx, ec.Recover(ctx, r))
2661 ret = graphql.Null
2662 }
2663 }()
2664 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
2665 ctx = rctx
2666 return obj.InputFields(), nil
2667 })
2668 if err != nil {
2669 ec.Error(ctx, err)
2670 return graphql.Null
2671 }
2672 if resTmp == nil {
2673 return graphql.Null
2674 }
2675 res := resTmp.([]introspection.InputValue)
2676 fc.Result = res
2677 return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
2678 }
2679
2680 func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2681 fc = &graphql.FieldContext{
2682 Object: "__Type",
2683 Field: field,
2684 IsMethod: true,
2685 IsResolver: false,
2686 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2687 switch field.Name {
2688 case "name":
2689 return ec.fieldContext___InputValue_name(ctx, field)
2690 case "description":
2691 return ec.fieldContext___InputValue_description(ctx, field)
2692 case "type":
2693 return ec.fieldContext___InputValue_type(ctx, field)
2694 case "defaultValue":
2695 return ec.fieldContext___InputValue_defaultValue(ctx, field)
2696 }
2697 return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name)
2698 },
2699 }
2700 return fc, nil
2701 }
2702
2703 func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
2704 fc, err := ec.fieldContext___Type_ofType(ctx, field)
2705 if err != nil {
2706 return graphql.Null
2707 }
2708 ctx = graphql.WithFieldContext(ctx, fc)
2709 defer func() {
2710 if r := recover(); r != nil {
2711 ec.Error(ctx, ec.Recover(ctx, r))
2712 ret = graphql.Null
2713 }
2714 }()
2715 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
2716 ctx = rctx
2717 return obj.OfType(), nil
2718 })
2719 if err != nil {
2720 ec.Error(ctx, err)
2721 return graphql.Null
2722 }
2723 if resTmp == nil {
2724 return graphql.Null
2725 }
2726 res := resTmp.(*introspection.Type)
2727 fc.Result = res
2728 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
2729 }
2730
2731 func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2732 fc = &graphql.FieldContext{
2733 Object: "__Type",
2734 Field: field,
2735 IsMethod: true,
2736 IsResolver: false,
2737 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2738 switch field.Name {
2739 case "kind":
2740 return ec.fieldContext___Type_kind(ctx, field)
2741 case "name":
2742 return ec.fieldContext___Type_name(ctx, field)
2743 case "description":
2744 return ec.fieldContext___Type_description(ctx, field)
2745 case "fields":
2746 return ec.fieldContext___Type_fields(ctx, field)
2747 case "interfaces":
2748 return ec.fieldContext___Type_interfaces(ctx, field)
2749 case "possibleTypes":
2750 return ec.fieldContext___Type_possibleTypes(ctx, field)
2751 case "enumValues":
2752 return ec.fieldContext___Type_enumValues(ctx, field)
2753 case "inputFields":
2754 return ec.fieldContext___Type_inputFields(ctx, field)
2755 case "ofType":
2756 return ec.fieldContext___Type_ofType(ctx, field)
2757 case "specifiedByURL":
2758 return ec.fieldContext___Type_specifiedByURL(ctx, field)
2759 }
2760 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
2761 },
2762 }
2763 return fc, nil
2764 }
2765
2766 func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
2767 fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field)
2768 if err != nil {
2769 return graphql.Null
2770 }
2771 ctx = graphql.WithFieldContext(ctx, fc)
2772 defer func() {
2773 if r := recover(); r != nil {
2774 ec.Error(ctx, ec.Recover(ctx, r))
2775 ret = graphql.Null
2776 }
2777 }()
2778 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
2779 ctx = rctx
2780 return obj.SpecifiedByURL(), nil
2781 })
2782 if err != nil {
2783 ec.Error(ctx, err)
2784 return graphql.Null
2785 }
2786 if resTmp == nil {
2787 return graphql.Null
2788 }
2789 res := resTmp.(*string)
2790 fc.Result = res
2791 return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
2792 }
2793
2794 func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
2795 fc = &graphql.FieldContext{
2796 Object: "__Type",
2797 Field: field,
2798 IsMethod: true,
2799 IsResolver: false,
2800 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
2801 return nil, errors.New("field of type String does not have child fields")
2802 },
2803 }
2804 return fc, nil
2805 }
2806
2807
2808
2809
2810
2811 func (ec *executionContext) unmarshalInputNewTodo(ctx context.Context, obj interface{}) (model.NewTodo, error) {
2812 var it model.NewTodo
2813 asMap := map[string]interface{}{}
2814 for k, v := range obj.(map[string]interface{}) {
2815 asMap[k] = v
2816 }
2817
2818 fieldsInOrder := [...]string{"text", "userId"}
2819 for _, k := range fieldsInOrder {
2820 v, ok := asMap[k]
2821 if !ok {
2822 continue
2823 }
2824 switch k {
2825 case "text":
2826 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text"))
2827 data, err := ec.unmarshalNString2string(ctx, v)
2828 if err != nil {
2829 return it, err
2830 }
2831 it.Text = data
2832 case "userId":
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
2846
2847
2848
2849
2850
2851
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
3453
3454
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ᚋ99designsᚋ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ᚋ99designsᚋ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ᚋ99designsᚋ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ᚋ99designsᚋ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ᚋ99designsᚋ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ᚋ99designsᚋ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ᚋ99designsᚋ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ᚋ99designsᚋ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ᚋ99designsᚋ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ᚋ99designsᚋ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ᚋ99designsᚋ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ᚋ99designsᚋ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ᚋ99designsᚋ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ᚋ99designsᚋ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ᚋ99designsᚋ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ᚋ99designsᚋ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ᚋ99designsᚋ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ᚋ99designsᚋ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ᚋ99designsᚋ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) unmarshalNfederation__Policy2string(ctx context.Context, v interface{}) (string, error) {
3847 res, err := graphql.UnmarshalString(v)
3848 return res, graphql.ErrorOnPath(ctx, err)
3849 }
3850
3851 func (ec *executionContext) marshalNfederation__Policy2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
3852 res := graphql.MarshalString(v)
3853 if res == graphql.Null {
3854 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
3855 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
3856 }
3857 }
3858 return res
3859 }
3860
3861 func (ec *executionContext) unmarshalNfederation__Policy2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
3862 var vSlice []interface{}
3863 if v != nil {
3864 vSlice = graphql.CoerceList(v)
3865 }
3866 var err error
3867 res := make([]string, len(vSlice))
3868 for i := range vSlice {
3869 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
3870 res[i], err = ec.unmarshalNfederation__Policy2string(ctx, vSlice[i])
3871 if err != nil {
3872 return nil, err
3873 }
3874 }
3875 return res, nil
3876 }
3877
3878 func (ec *executionContext) marshalNfederation__Policy2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
3879 ret := make(graphql.Array, len(v))
3880 for i := range v {
3881 ret[i] = ec.marshalNfederation__Policy2string(ctx, sel, v[i])
3882 }
3883
3884 for _, e := range ret {
3885 if e == graphql.Null {
3886 return graphql.Null
3887 }
3888 }
3889
3890 return ret
3891 }
3892
3893 func (ec *executionContext) unmarshalNfederation__Policy2ᚕᚕstringᚄ(ctx context.Context, v interface{}) ([][]string, error) {
3894 var vSlice []interface{}
3895 if v != nil {
3896 vSlice = graphql.CoerceList(v)
3897 }
3898 var err error
3899 res := make([][]string, len(vSlice))
3900 for i := range vSlice {
3901 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
3902 res[i], err = ec.unmarshalNfederation__Policy2ᚕstringᚄ(ctx, vSlice[i])
3903 if err != nil {
3904 return nil, err
3905 }
3906 }
3907 return res, nil
3908 }
3909
3910 func (ec *executionContext) marshalNfederation__Policy2ᚕᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v [][]string) graphql.Marshaler {
3911 ret := make(graphql.Array, len(v))
3912 for i := range v {
3913 ret[i] = ec.marshalNfederation__Policy2ᚕstringᚄ(ctx, sel, v[i])
3914 }
3915
3916 for _, e := range ret {
3917 if e == graphql.Null {
3918 return graphql.Null
3919 }
3920 }
3921
3922 return ret
3923 }
3924
3925 func (ec *executionContext) unmarshalNfederation__Scope2string(ctx context.Context, v interface{}) (string, error) {
3926 res, err := graphql.UnmarshalString(v)
3927 return res, graphql.ErrorOnPath(ctx, err)
3928 }
3929
3930 func (ec *executionContext) marshalNfederation__Scope2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
3931 res := graphql.MarshalString(v)
3932 if res == graphql.Null {
3933 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
3934 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
3935 }
3936 }
3937 return res
3938 }
3939
3940 func (ec *executionContext) unmarshalNfederation__Scope2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
3941 var vSlice []interface{}
3942 if v != nil {
3943 vSlice = graphql.CoerceList(v)
3944 }
3945 var err error
3946 res := make([]string, len(vSlice))
3947 for i := range vSlice {
3948 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
3949 res[i], err = ec.unmarshalNfederation__Scope2string(ctx, vSlice[i])
3950 if err != nil {
3951 return nil, err
3952 }
3953 }
3954 return res, nil
3955 }
3956
3957 func (ec *executionContext) marshalNfederation__Scope2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
3958 ret := make(graphql.Array, len(v))
3959 for i := range v {
3960 ret[i] = ec.marshalNfederation__Scope2string(ctx, sel, v[i])
3961 }
3962
3963 for _, e := range ret {
3964 if e == graphql.Null {
3965 return graphql.Null
3966 }
3967 }
3968
3969 return ret
3970 }
3971
3972 func (ec *executionContext) unmarshalNfederation__Scope2ᚕᚕstringᚄ(ctx context.Context, v interface{}) ([][]string, error) {
3973 var vSlice []interface{}
3974 if v != nil {
3975 vSlice = graphql.CoerceList(v)
3976 }
3977 var err error
3978 res := make([][]string, len(vSlice))
3979 for i := range vSlice {
3980 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
3981 res[i], err = ec.unmarshalNfederation__Scope2ᚕstringᚄ(ctx, vSlice[i])
3982 if err != nil {
3983 return nil, err
3984 }
3985 }
3986 return res, nil
3987 }
3988
3989 func (ec *executionContext) marshalNfederation__Scope2ᚕᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v [][]string) graphql.Marshaler {
3990 ret := make(graphql.Array, len(v))
3991 for i := range v {
3992 ret[i] = ec.marshalNfederation__Scope2ᚕstringᚄ(ctx, sel, v[i])
3993 }
3994
3995 for _, e := range ret {
3996 if e == graphql.Null {
3997 return graphql.Null
3998 }
3999 }
4000
4001 return ret
4002 }
4003
4004 func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
4005 res, err := graphql.UnmarshalBoolean(v)
4006 return res, graphql.ErrorOnPath(ctx, err)
4007 }
4008
4009 func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
4010 res := graphql.MarshalBoolean(v)
4011 return res
4012 }
4013
4014 func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) {
4015 if v == nil {
4016 return nil, nil
4017 }
4018 res, err := graphql.UnmarshalBoolean(v)
4019 return &res, graphql.ErrorOnPath(ctx, err)
4020 }
4021
4022 func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler {
4023 if v == nil {
4024 return graphql.Null
4025 }
4026 res := graphql.MarshalBoolean(*v)
4027 return res
4028 }
4029
4030 func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) {
4031 res, err := graphql.UnmarshalString(v)
4032 return res, graphql.ErrorOnPath(ctx, err)
4033 }
4034
4035 func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
4036 res := graphql.MarshalString(v)
4037 return res
4038 }
4039
4040 func (ec *executionContext) unmarshalOString2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
4041 if v == nil {
4042 return nil, nil
4043 }
4044 var vSlice []interface{}
4045 if v != nil {
4046 vSlice = graphql.CoerceList(v)
4047 }
4048 var err error
4049 res := make([]string, len(vSlice))
4050 for i := range vSlice {
4051 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
4052 res[i], err = ec.unmarshalNString2string(ctx, vSlice[i])
4053 if err != nil {
4054 return nil, err
4055 }
4056 }
4057 return res, nil
4058 }
4059
4060 func (ec *executionContext) marshalOString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
4061 if v == nil {
4062 return graphql.Null
4063 }
4064 ret := make(graphql.Array, len(v))
4065 for i := range v {
4066 ret[i] = ec.marshalNString2string(ctx, sel, v[i])
4067 }
4068
4069 for _, e := range ret {
4070 if e == graphql.Null {
4071 return graphql.Null
4072 }
4073 }
4074
4075 return ret
4076 }
4077
4078 func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) {
4079 if v == nil {
4080 return nil, nil
4081 }
4082 res, err := graphql.UnmarshalString(v)
4083 return &res, graphql.ErrorOnPath(ctx, err)
4084 }
4085
4086 func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {
4087 if v == nil {
4088 return graphql.Null
4089 }
4090 res := graphql.MarshalString(*v)
4091 return res
4092 }
4093
4094 func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler {
4095 if v == nil {
4096 return graphql.Null
4097 }
4098 ret := make(graphql.Array, len(v))
4099 var wg sync.WaitGroup
4100 isLen1 := len(v) == 1
4101 if !isLen1 {
4102 wg.Add(len(v))
4103 }
4104 for i := range v {
4105 i := i
4106 fc := &graphql.FieldContext{
4107 Index: &i,
4108 Result: &v[i],
4109 }
4110 ctx := graphql.WithFieldContext(ctx, fc)
4111 f := func(i int) {
4112 defer func() {
4113 if r := recover(); r != nil {
4114 ec.Error(ctx, ec.Recover(ctx, r))
4115 ret = nil
4116 }
4117 }()
4118 if !isLen1 {
4119 defer wg.Done()
4120 }
4121 ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i])
4122 }
4123 if isLen1 {
4124 f(i)
4125 } else {
4126 go f(i)
4127 }
4128
4129 }
4130 wg.Wait()
4131
4132 for _, e := range ret {
4133 if e == graphql.Null {
4134 return graphql.Null
4135 }
4136 }
4137
4138 return ret
4139 }
4140
4141 func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler {
4142 if v == nil {
4143 return graphql.Null
4144 }
4145 ret := make(graphql.Array, len(v))
4146 var wg sync.WaitGroup
4147 isLen1 := len(v) == 1
4148 if !isLen1 {
4149 wg.Add(len(v))
4150 }
4151 for i := range v {
4152 i := i
4153 fc := &graphql.FieldContext{
4154 Index: &i,
4155 Result: &v[i],
4156 }
4157 ctx := graphql.WithFieldContext(ctx, fc)
4158 f := func(i int) {
4159 defer func() {
4160 if r := recover(); r != nil {
4161 ec.Error(ctx, ec.Recover(ctx, r))
4162 ret = nil
4163 }
4164 }()
4165 if !isLen1 {
4166 defer wg.Done()
4167 }
4168 ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i])
4169 }
4170 if isLen1 {
4171 f(i)
4172 } else {
4173 go f(i)
4174 }
4175
4176 }
4177 wg.Wait()
4178
4179 for _, e := range ret {
4180 if e == graphql.Null {
4181 return graphql.Null
4182 }
4183 }
4184
4185 return ret
4186 }
4187
4188 func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
4189 if v == nil {
4190 return graphql.Null
4191 }
4192 ret := make(graphql.Array, len(v))
4193 var wg sync.WaitGroup
4194 isLen1 := len(v) == 1
4195 if !isLen1 {
4196 wg.Add(len(v))
4197 }
4198 for i := range v {
4199 i := i
4200 fc := &graphql.FieldContext{
4201 Index: &i,
4202 Result: &v[i],
4203 }
4204 ctx := graphql.WithFieldContext(ctx, fc)
4205 f := func(i int) {
4206 defer func() {
4207 if r := recover(); r != nil {
4208 ec.Error(ctx, ec.Recover(ctx, r))
4209 ret = nil
4210 }
4211 }()
4212 if !isLen1 {
4213 defer wg.Done()
4214 }
4215 ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
4216 }
4217 if isLen1 {
4218 f(i)
4219 } else {
4220 go f(i)
4221 }
4222
4223 }
4224 wg.Wait()
4225
4226 for _, e := range ret {
4227 if e == graphql.Null {
4228 return graphql.Null
4229 }
4230 }
4231
4232 return ret
4233 }
4234
4235 func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler {
4236 if v == nil {
4237 return graphql.Null
4238 }
4239 return ec.___Schema(ctx, sel, v)
4240 }
4241
4242 func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
4243 if v == nil {
4244 return graphql.Null
4245 }
4246 ret := make(graphql.Array, len(v))
4247 var wg sync.WaitGroup
4248 isLen1 := len(v) == 1
4249 if !isLen1 {
4250 wg.Add(len(v))
4251 }
4252 for i := range v {
4253 i := i
4254 fc := &graphql.FieldContext{
4255 Index: &i,
4256 Result: &v[i],
4257 }
4258 ctx := graphql.WithFieldContext(ctx, fc)
4259 f := func(i int) {
4260 defer func() {
4261 if r := recover(); r != nil {
4262 ec.Error(ctx, ec.Recover(ctx, r))
4263 ret = nil
4264 }
4265 }()
4266 if !isLen1 {
4267 defer wg.Done()
4268 }
4269 ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
4270 }
4271 if isLen1 {
4272 f(i)
4273 } else {
4274 go f(i)
4275 }
4276
4277 }
4278 wg.Wait()
4279
4280 for _, e := range ret {
4281 if e == graphql.Null {
4282 return graphql.Null
4283 }
4284 }
4285
4286 return ret
4287 }
4288
4289 func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
4290 if v == nil {
4291 return graphql.Null
4292 }
4293 return ec.___Type(ctx, sel, v)
4294 }
4295
4296
4297
View as plain text