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