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