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