1// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
2
3package graph
4
5import (
6 "context"
7 "errors"
8 "fmt"
9 "strconv"
10 "sync/atomic"
11 "time"
12
13 "github.com/99designs/gqlgen/graphql"
14 "github.com/git-bug/git-bug/api/graphql/models"
15 "github.com/git-bug/git-bug/entities/bug"
16 "github.com/git-bug/git-bug/entities/common"
17 "github.com/git-bug/git-bug/entity"
18 "github.com/git-bug/git-bug/repository"
19 "github.com/vektah/gqlparser/v2/ast"
20)
21
22// region ************************** generated!.gotpl **************************
23
24type BugAddCommentOperationResolver interface {
25 Author(ctx context.Context, obj *bug.AddCommentOperation) (models.IdentityWrapper, error)
26}
27type BugCreateOperationResolver interface {
28 Author(ctx context.Context, obj *bug.CreateOperation) (models.IdentityWrapper, error)
29}
30type BugEditCommentOperationResolver interface {
31 Author(ctx context.Context, obj *bug.EditCommentOperation) (models.IdentityWrapper, error)
32
33 Target(ctx context.Context, obj *bug.EditCommentOperation) (string, error)
34}
35type BugLabelChangeOperationResolver interface {
36 Author(ctx context.Context, obj *bug.LabelChangeOperation) (models.IdentityWrapper, error)
37}
38type BugSetStatusOperationResolver interface {
39 Author(ctx context.Context, obj *bug.SetStatusOperation) (models.IdentityWrapper, error)
40}
41type BugSetTitleOperationResolver interface {
42 Author(ctx context.Context, obj *bug.SetTitleOperation) (models.IdentityWrapper, error)
43}
44
45// endregion ************************** generated!.gotpl **************************
46
47// region ***************************** args.gotpl *****************************
48
49// endregion ***************************** args.gotpl *****************************
50
51// region ************************** directives.gotpl **************************
52
53// endregion ************************** directives.gotpl **************************
54
55// region **************************** field.gotpl *****************************
56
57func (ec *executionContext) _BugAddCommentOperation_id(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) (ret graphql.Marshaler) {
58 fc, err := ec.fieldContext_BugAddCommentOperation_id(ctx, field)
59 if err != nil {
60 return graphql.Null
61 }
62 ctx = graphql.WithFieldContext(ctx, fc)
63 defer func() {
64 if r := recover(); r != nil {
65 ec.Error(ctx, ec.Recover(ctx, r))
66 ret = graphql.Null
67 }
68 }()
69 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
70 ctx = rctx // use context from middleware stack in children
71 return obj.Id(), nil
72 })
73 if err != nil {
74 ec.Error(ctx, err)
75 return graphql.Null
76 }
77 if resTmp == nil {
78 if !graphql.HasFieldError(ctx, fc) {
79 ec.Errorf(ctx, "must not be null")
80 }
81 return graphql.Null
82 }
83 res := resTmp.(entity.Id)
84 fc.Result = res
85 return ec.marshalNID2githubácomágitábugágitábugáentityáId(ctx, field.Selections, res)
86}
87
88func (ec *executionContext) fieldContext_BugAddCommentOperation_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
89 fc = &graphql.FieldContext{
90 Object: "BugAddCommentOperation",
91 Field: field,
92 IsMethod: true,
93 IsResolver: false,
94 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
95 return nil, errors.New("field of type ID does not have child fields")
96 },
97 }
98 return fc, nil
99}
100
101func (ec *executionContext) _BugAddCommentOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) (ret graphql.Marshaler) {
102 fc, err := ec.fieldContext_BugAddCommentOperation_author(ctx, field)
103 if err != nil {
104 return graphql.Null
105 }
106 ctx = graphql.WithFieldContext(ctx, fc)
107 defer func() {
108 if r := recover(); r != nil {
109 ec.Error(ctx, ec.Recover(ctx, r))
110 ret = graphql.Null
111 }
112 }()
113 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
114 ctx = rctx // use context from middleware stack in children
115 return ec.resolvers.BugAddCommentOperation().Author(rctx, obj)
116 })
117 if err != nil {
118 ec.Error(ctx, err)
119 return graphql.Null
120 }
121 if resTmp == nil {
122 if !graphql.HasFieldError(ctx, fc) {
123 ec.Errorf(ctx, "must not be null")
124 }
125 return graphql.Null
126 }
127 res := resTmp.(models.IdentityWrapper)
128 fc.Result = res
129 return ec.marshalNIdentity2githubácomágitábugágitábugáapiágraphqlámodelsáIdentityWrapper(ctx, field.Selections, res)
130}
131
132func (ec *executionContext) fieldContext_BugAddCommentOperation_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
133 fc = &graphql.FieldContext{
134 Object: "BugAddCommentOperation",
135 Field: field,
136 IsMethod: true,
137 IsResolver: true,
138 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
139 switch field.Name {
140 case "id":
141 return ec.fieldContext_Identity_id(ctx, field)
142 case "humanId":
143 return ec.fieldContext_Identity_humanId(ctx, field)
144 case "name":
145 return ec.fieldContext_Identity_name(ctx, field)
146 case "email":
147 return ec.fieldContext_Identity_email(ctx, field)
148 case "login":
149 return ec.fieldContext_Identity_login(ctx, field)
150 case "displayName":
151 return ec.fieldContext_Identity_displayName(ctx, field)
152 case "avatarUrl":
153 return ec.fieldContext_Identity_avatarUrl(ctx, field)
154 case "isProtected":
155 return ec.fieldContext_Identity_isProtected(ctx, field)
156 }
157 return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
158 },
159 }
160 return fc, nil
161}
162
163func (ec *executionContext) _BugAddCommentOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) (ret graphql.Marshaler) {
164 fc, err := ec.fieldContext_BugAddCommentOperation_date(ctx, field)
165 if err != nil {
166 return graphql.Null
167 }
168 ctx = graphql.WithFieldContext(ctx, fc)
169 defer func() {
170 if r := recover(); r != nil {
171 ec.Error(ctx, ec.Recover(ctx, r))
172 ret = graphql.Null
173 }
174 }()
175 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
176 ctx = rctx // use context from middleware stack in children
177 return obj.Time(), nil
178 })
179 if err != nil {
180 ec.Error(ctx, err)
181 return graphql.Null
182 }
183 if resTmp == nil {
184 if !graphql.HasFieldError(ctx, fc) {
185 ec.Errorf(ctx, "must not be null")
186 }
187 return graphql.Null
188 }
189 res := resTmp.(time.Time)
190 fc.Result = res
191 return ec.marshalNTime2timeáTime(ctx, field.Selections, res)
192}
193
194func (ec *executionContext) fieldContext_BugAddCommentOperation_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
195 fc = &graphql.FieldContext{
196 Object: "BugAddCommentOperation",
197 Field: field,
198 IsMethod: true,
199 IsResolver: false,
200 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
201 return nil, errors.New("field of type Time does not have child fields")
202 },
203 }
204 return fc, nil
205}
206
207func (ec *executionContext) _BugAddCommentOperation_message(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) (ret graphql.Marshaler) {
208 fc, err := ec.fieldContext_BugAddCommentOperation_message(ctx, field)
209 if err != nil {
210 return graphql.Null
211 }
212 ctx = graphql.WithFieldContext(ctx, fc)
213 defer func() {
214 if r := recover(); r != nil {
215 ec.Error(ctx, ec.Recover(ctx, r))
216 ret = graphql.Null
217 }
218 }()
219 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
220 ctx = rctx // use context from middleware stack in children
221 return obj.Message, nil
222 })
223 if err != nil {
224 ec.Error(ctx, err)
225 return graphql.Null
226 }
227 if resTmp == nil {
228 if !graphql.HasFieldError(ctx, fc) {
229 ec.Errorf(ctx, "must not be null")
230 }
231 return graphql.Null
232 }
233 res := resTmp.(string)
234 fc.Result = res
235 return ec.marshalNString2string(ctx, field.Selections, res)
236}
237
238func (ec *executionContext) fieldContext_BugAddCommentOperation_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
239 fc = &graphql.FieldContext{
240 Object: "BugAddCommentOperation",
241 Field: field,
242 IsMethod: false,
243 IsResolver: false,
244 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
245 return nil, errors.New("field of type String does not have child fields")
246 },
247 }
248 return fc, nil
249}
250
251func (ec *executionContext) _BugAddCommentOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) (ret graphql.Marshaler) {
252 fc, err := ec.fieldContext_BugAddCommentOperation_files(ctx, field)
253 if err != nil {
254 return graphql.Null
255 }
256 ctx = graphql.WithFieldContext(ctx, fc)
257 defer func() {
258 if r := recover(); r != nil {
259 ec.Error(ctx, ec.Recover(ctx, r))
260 ret = graphql.Null
261 }
262 }()
263 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
264 ctx = rctx // use context from middleware stack in children
265 return obj.Files, nil
266 })
267 if err != nil {
268 ec.Error(ctx, err)
269 return graphql.Null
270 }
271 if resTmp == nil {
272 if !graphql.HasFieldError(ctx, fc) {
273 ec.Errorf(ctx, "must not be null")
274 }
275 return graphql.Null
276 }
277 res := resTmp.([]repository.Hash)
278 fc.Result = res
279 return ec.marshalNHash2ágithubácomágitábugágitábugárepositoryáHashá(ctx, field.Selections, res)
280}
281
282func (ec *executionContext) fieldContext_BugAddCommentOperation_files(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
283 fc = &graphql.FieldContext{
284 Object: "BugAddCommentOperation",
285 Field: field,
286 IsMethod: false,
287 IsResolver: false,
288 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
289 return nil, errors.New("field of type Hash does not have child fields")
290 },
291 }
292 return fc, nil
293}
294
295func (ec *executionContext) _BugCreateOperation_id(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
296 fc, err := ec.fieldContext_BugCreateOperation_id(ctx, field)
297 if err != nil {
298 return graphql.Null
299 }
300 ctx = graphql.WithFieldContext(ctx, fc)
301 defer func() {
302 if r := recover(); r != nil {
303 ec.Error(ctx, ec.Recover(ctx, r))
304 ret = graphql.Null
305 }
306 }()
307 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
308 ctx = rctx // use context from middleware stack in children
309 return obj.Id(), nil
310 })
311 if err != nil {
312 ec.Error(ctx, err)
313 return graphql.Null
314 }
315 if resTmp == nil {
316 if !graphql.HasFieldError(ctx, fc) {
317 ec.Errorf(ctx, "must not be null")
318 }
319 return graphql.Null
320 }
321 res := resTmp.(entity.Id)
322 fc.Result = res
323 return ec.marshalNID2githubácomágitábugágitábugáentityáId(ctx, field.Selections, res)
324}
325
326func (ec *executionContext) fieldContext_BugCreateOperation_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
327 fc = &graphql.FieldContext{
328 Object: "BugCreateOperation",
329 Field: field,
330 IsMethod: true,
331 IsResolver: false,
332 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
333 return nil, errors.New("field of type ID does not have child fields")
334 },
335 }
336 return fc, nil
337}
338
339func (ec *executionContext) _BugCreateOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
340 fc, err := ec.fieldContext_BugCreateOperation_author(ctx, field)
341 if err != nil {
342 return graphql.Null
343 }
344 ctx = graphql.WithFieldContext(ctx, fc)
345 defer func() {
346 if r := recover(); r != nil {
347 ec.Error(ctx, ec.Recover(ctx, r))
348 ret = graphql.Null
349 }
350 }()
351 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
352 ctx = rctx // use context from middleware stack in children
353 return ec.resolvers.BugCreateOperation().Author(rctx, obj)
354 })
355 if err != nil {
356 ec.Error(ctx, err)
357 return graphql.Null
358 }
359 if resTmp == nil {
360 if !graphql.HasFieldError(ctx, fc) {
361 ec.Errorf(ctx, "must not be null")
362 }
363 return graphql.Null
364 }
365 res := resTmp.(models.IdentityWrapper)
366 fc.Result = res
367 return ec.marshalNIdentity2githubácomágitábugágitábugáapiágraphqlámodelsáIdentityWrapper(ctx, field.Selections, res)
368}
369
370func (ec *executionContext) fieldContext_BugCreateOperation_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
371 fc = &graphql.FieldContext{
372 Object: "BugCreateOperation",
373 Field: field,
374 IsMethod: true,
375 IsResolver: true,
376 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
377 switch field.Name {
378 case "id":
379 return ec.fieldContext_Identity_id(ctx, field)
380 case "humanId":
381 return ec.fieldContext_Identity_humanId(ctx, field)
382 case "name":
383 return ec.fieldContext_Identity_name(ctx, field)
384 case "email":
385 return ec.fieldContext_Identity_email(ctx, field)
386 case "login":
387 return ec.fieldContext_Identity_login(ctx, field)
388 case "displayName":
389 return ec.fieldContext_Identity_displayName(ctx, field)
390 case "avatarUrl":
391 return ec.fieldContext_Identity_avatarUrl(ctx, field)
392 case "isProtected":
393 return ec.fieldContext_Identity_isProtected(ctx, field)
394 }
395 return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
396 },
397 }
398 return fc, nil
399}
400
401func (ec *executionContext) _BugCreateOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
402 fc, err := ec.fieldContext_BugCreateOperation_date(ctx, field)
403 if err != nil {
404 return graphql.Null
405 }
406 ctx = graphql.WithFieldContext(ctx, fc)
407 defer func() {
408 if r := recover(); r != nil {
409 ec.Error(ctx, ec.Recover(ctx, r))
410 ret = graphql.Null
411 }
412 }()
413 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
414 ctx = rctx // use context from middleware stack in children
415 return obj.Time(), nil
416 })
417 if err != nil {
418 ec.Error(ctx, err)
419 return graphql.Null
420 }
421 if resTmp == nil {
422 if !graphql.HasFieldError(ctx, fc) {
423 ec.Errorf(ctx, "must not be null")
424 }
425 return graphql.Null
426 }
427 res := resTmp.(time.Time)
428 fc.Result = res
429 return ec.marshalNTime2timeáTime(ctx, field.Selections, res)
430}
431
432func (ec *executionContext) fieldContext_BugCreateOperation_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
433 fc = &graphql.FieldContext{
434 Object: "BugCreateOperation",
435 Field: field,
436 IsMethod: true,
437 IsResolver: false,
438 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
439 return nil, errors.New("field of type Time does not have child fields")
440 },
441 }
442 return fc, nil
443}
444
445func (ec *executionContext) _BugCreateOperation_title(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
446 fc, err := ec.fieldContext_BugCreateOperation_title(ctx, field)
447 if err != nil {
448 return graphql.Null
449 }
450 ctx = graphql.WithFieldContext(ctx, fc)
451 defer func() {
452 if r := recover(); r != nil {
453 ec.Error(ctx, ec.Recover(ctx, r))
454 ret = graphql.Null
455 }
456 }()
457 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
458 ctx = rctx // use context from middleware stack in children
459 return obj.Title, nil
460 })
461 if err != nil {
462 ec.Error(ctx, err)
463 return graphql.Null
464 }
465 if resTmp == nil {
466 if !graphql.HasFieldError(ctx, fc) {
467 ec.Errorf(ctx, "must not be null")
468 }
469 return graphql.Null
470 }
471 res := resTmp.(string)
472 fc.Result = res
473 return ec.marshalNString2string(ctx, field.Selections, res)
474}
475
476func (ec *executionContext) fieldContext_BugCreateOperation_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
477 fc = &graphql.FieldContext{
478 Object: "BugCreateOperation",
479 Field: field,
480 IsMethod: false,
481 IsResolver: false,
482 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
483 return nil, errors.New("field of type String does not have child fields")
484 },
485 }
486 return fc, nil
487}
488
489func (ec *executionContext) _BugCreateOperation_message(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
490 fc, err := ec.fieldContext_BugCreateOperation_message(ctx, field)
491 if err != nil {
492 return graphql.Null
493 }
494 ctx = graphql.WithFieldContext(ctx, fc)
495 defer func() {
496 if r := recover(); r != nil {
497 ec.Error(ctx, ec.Recover(ctx, r))
498 ret = graphql.Null
499 }
500 }()
501 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
502 ctx = rctx // use context from middleware stack in children
503 return obj.Message, nil
504 })
505 if err != nil {
506 ec.Error(ctx, err)
507 return graphql.Null
508 }
509 if resTmp == nil {
510 if !graphql.HasFieldError(ctx, fc) {
511 ec.Errorf(ctx, "must not be null")
512 }
513 return graphql.Null
514 }
515 res := resTmp.(string)
516 fc.Result = res
517 return ec.marshalNString2string(ctx, field.Selections, res)
518}
519
520func (ec *executionContext) fieldContext_BugCreateOperation_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
521 fc = &graphql.FieldContext{
522 Object: "BugCreateOperation",
523 Field: field,
524 IsMethod: false,
525 IsResolver: false,
526 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
527 return nil, errors.New("field of type String does not have child fields")
528 },
529 }
530 return fc, nil
531}
532
533func (ec *executionContext) _BugCreateOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
534 fc, err := ec.fieldContext_BugCreateOperation_files(ctx, field)
535 if err != nil {
536 return graphql.Null
537 }
538 ctx = graphql.WithFieldContext(ctx, fc)
539 defer func() {
540 if r := recover(); r != nil {
541 ec.Error(ctx, ec.Recover(ctx, r))
542 ret = graphql.Null
543 }
544 }()
545 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
546 ctx = rctx // use context from middleware stack in children
547 return obj.Files, nil
548 })
549 if err != nil {
550 ec.Error(ctx, err)
551 return graphql.Null
552 }
553 if resTmp == nil {
554 if !graphql.HasFieldError(ctx, fc) {
555 ec.Errorf(ctx, "must not be null")
556 }
557 return graphql.Null
558 }
559 res := resTmp.([]repository.Hash)
560 fc.Result = res
561 return ec.marshalNHash2ágithubácomágitábugágitábugárepositoryáHashá(ctx, field.Selections, res)
562}
563
564func (ec *executionContext) fieldContext_BugCreateOperation_files(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
565 fc = &graphql.FieldContext{
566 Object: "BugCreateOperation",
567 Field: field,
568 IsMethod: false,
569 IsResolver: false,
570 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
571 return nil, errors.New("field of type Hash does not have child fields")
572 },
573 }
574 return fc, nil
575}
576
577func (ec *executionContext) _BugEditCommentOperation_id(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
578 fc, err := ec.fieldContext_BugEditCommentOperation_id(ctx, field)
579 if err != nil {
580 return graphql.Null
581 }
582 ctx = graphql.WithFieldContext(ctx, fc)
583 defer func() {
584 if r := recover(); r != nil {
585 ec.Error(ctx, ec.Recover(ctx, r))
586 ret = graphql.Null
587 }
588 }()
589 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
590 ctx = rctx // use context from middleware stack in children
591 return obj.Id(), nil
592 })
593 if err != nil {
594 ec.Error(ctx, err)
595 return graphql.Null
596 }
597 if resTmp == nil {
598 if !graphql.HasFieldError(ctx, fc) {
599 ec.Errorf(ctx, "must not be null")
600 }
601 return graphql.Null
602 }
603 res := resTmp.(entity.Id)
604 fc.Result = res
605 return ec.marshalNID2githubácomágitábugágitábugáentityáId(ctx, field.Selections, res)
606}
607
608func (ec *executionContext) fieldContext_BugEditCommentOperation_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
609 fc = &graphql.FieldContext{
610 Object: "BugEditCommentOperation",
611 Field: field,
612 IsMethod: true,
613 IsResolver: false,
614 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
615 return nil, errors.New("field of type ID does not have child fields")
616 },
617 }
618 return fc, nil
619}
620
621func (ec *executionContext) _BugEditCommentOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
622 fc, err := ec.fieldContext_BugEditCommentOperation_author(ctx, field)
623 if err != nil {
624 return graphql.Null
625 }
626 ctx = graphql.WithFieldContext(ctx, fc)
627 defer func() {
628 if r := recover(); r != nil {
629 ec.Error(ctx, ec.Recover(ctx, r))
630 ret = graphql.Null
631 }
632 }()
633 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
634 ctx = rctx // use context from middleware stack in children
635 return ec.resolvers.BugEditCommentOperation().Author(rctx, obj)
636 })
637 if err != nil {
638 ec.Error(ctx, err)
639 return graphql.Null
640 }
641 if resTmp == nil {
642 if !graphql.HasFieldError(ctx, fc) {
643 ec.Errorf(ctx, "must not be null")
644 }
645 return graphql.Null
646 }
647 res := resTmp.(models.IdentityWrapper)
648 fc.Result = res
649 return ec.marshalNIdentity2githubácomágitábugágitábugáapiágraphqlámodelsáIdentityWrapper(ctx, field.Selections, res)
650}
651
652func (ec *executionContext) fieldContext_BugEditCommentOperation_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
653 fc = &graphql.FieldContext{
654 Object: "BugEditCommentOperation",
655 Field: field,
656 IsMethod: true,
657 IsResolver: true,
658 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
659 switch field.Name {
660 case "id":
661 return ec.fieldContext_Identity_id(ctx, field)
662 case "humanId":
663 return ec.fieldContext_Identity_humanId(ctx, field)
664 case "name":
665 return ec.fieldContext_Identity_name(ctx, field)
666 case "email":
667 return ec.fieldContext_Identity_email(ctx, field)
668 case "login":
669 return ec.fieldContext_Identity_login(ctx, field)
670 case "displayName":
671 return ec.fieldContext_Identity_displayName(ctx, field)
672 case "avatarUrl":
673 return ec.fieldContext_Identity_avatarUrl(ctx, field)
674 case "isProtected":
675 return ec.fieldContext_Identity_isProtected(ctx, field)
676 }
677 return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
678 },
679 }
680 return fc, nil
681}
682
683func (ec *executionContext) _BugEditCommentOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
684 fc, err := ec.fieldContext_BugEditCommentOperation_date(ctx, field)
685 if err != nil {
686 return graphql.Null
687 }
688 ctx = graphql.WithFieldContext(ctx, fc)
689 defer func() {
690 if r := recover(); r != nil {
691 ec.Error(ctx, ec.Recover(ctx, r))
692 ret = graphql.Null
693 }
694 }()
695 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
696 ctx = rctx // use context from middleware stack in children
697 return obj.Time(), nil
698 })
699 if err != nil {
700 ec.Error(ctx, err)
701 return graphql.Null
702 }
703 if resTmp == nil {
704 if !graphql.HasFieldError(ctx, fc) {
705 ec.Errorf(ctx, "must not be null")
706 }
707 return graphql.Null
708 }
709 res := resTmp.(time.Time)
710 fc.Result = res
711 return ec.marshalNTime2timeáTime(ctx, field.Selections, res)
712}
713
714func (ec *executionContext) fieldContext_BugEditCommentOperation_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
715 fc = &graphql.FieldContext{
716 Object: "BugEditCommentOperation",
717 Field: field,
718 IsMethod: true,
719 IsResolver: false,
720 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
721 return nil, errors.New("field of type Time does not have child fields")
722 },
723 }
724 return fc, nil
725}
726
727func (ec *executionContext) _BugEditCommentOperation_target(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
728 fc, err := ec.fieldContext_BugEditCommentOperation_target(ctx, field)
729 if err != nil {
730 return graphql.Null
731 }
732 ctx = graphql.WithFieldContext(ctx, fc)
733 defer func() {
734 if r := recover(); r != nil {
735 ec.Error(ctx, ec.Recover(ctx, r))
736 ret = graphql.Null
737 }
738 }()
739 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
740 ctx = rctx // use context from middleware stack in children
741 return ec.resolvers.BugEditCommentOperation().Target(rctx, obj)
742 })
743 if err != nil {
744 ec.Error(ctx, err)
745 return graphql.Null
746 }
747 if resTmp == nil {
748 if !graphql.HasFieldError(ctx, fc) {
749 ec.Errorf(ctx, "must not be null")
750 }
751 return graphql.Null
752 }
753 res := resTmp.(string)
754 fc.Result = res
755 return ec.marshalNString2string(ctx, field.Selections, res)
756}
757
758func (ec *executionContext) fieldContext_BugEditCommentOperation_target(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
759 fc = &graphql.FieldContext{
760 Object: "BugEditCommentOperation",
761 Field: field,
762 IsMethod: true,
763 IsResolver: true,
764 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
765 return nil, errors.New("field of type String does not have child fields")
766 },
767 }
768 return fc, nil
769}
770
771func (ec *executionContext) _BugEditCommentOperation_message(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
772 fc, err := ec.fieldContext_BugEditCommentOperation_message(ctx, field)
773 if err != nil {
774 return graphql.Null
775 }
776 ctx = graphql.WithFieldContext(ctx, fc)
777 defer func() {
778 if r := recover(); r != nil {
779 ec.Error(ctx, ec.Recover(ctx, r))
780 ret = graphql.Null
781 }
782 }()
783 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
784 ctx = rctx // use context from middleware stack in children
785 return obj.Message, nil
786 })
787 if err != nil {
788 ec.Error(ctx, err)
789 return graphql.Null
790 }
791 if resTmp == nil {
792 if !graphql.HasFieldError(ctx, fc) {
793 ec.Errorf(ctx, "must not be null")
794 }
795 return graphql.Null
796 }
797 res := resTmp.(string)
798 fc.Result = res
799 return ec.marshalNString2string(ctx, field.Selections, res)
800}
801
802func (ec *executionContext) fieldContext_BugEditCommentOperation_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
803 fc = &graphql.FieldContext{
804 Object: "BugEditCommentOperation",
805 Field: field,
806 IsMethod: false,
807 IsResolver: false,
808 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
809 return nil, errors.New("field of type String does not have child fields")
810 },
811 }
812 return fc, nil
813}
814
815func (ec *executionContext) _BugEditCommentOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
816 fc, err := ec.fieldContext_BugEditCommentOperation_files(ctx, field)
817 if err != nil {
818 return graphql.Null
819 }
820 ctx = graphql.WithFieldContext(ctx, fc)
821 defer func() {
822 if r := recover(); r != nil {
823 ec.Error(ctx, ec.Recover(ctx, r))
824 ret = graphql.Null
825 }
826 }()
827 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
828 ctx = rctx // use context from middleware stack in children
829 return obj.Files, nil
830 })
831 if err != nil {
832 ec.Error(ctx, err)
833 return graphql.Null
834 }
835 if resTmp == nil {
836 if !graphql.HasFieldError(ctx, fc) {
837 ec.Errorf(ctx, "must not be null")
838 }
839 return graphql.Null
840 }
841 res := resTmp.([]repository.Hash)
842 fc.Result = res
843 return ec.marshalNHash2ágithubácomágitábugágitábugárepositoryáHashá(ctx, field.Selections, res)
844}
845
846func (ec *executionContext) fieldContext_BugEditCommentOperation_files(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
847 fc = &graphql.FieldContext{
848 Object: "BugEditCommentOperation",
849 Field: field,
850 IsMethod: false,
851 IsResolver: false,
852 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
853 return nil, errors.New("field of type Hash does not have child fields")
854 },
855 }
856 return fc, nil
857}
858
859func (ec *executionContext) _BugLabelChangeOperation_id(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) (ret graphql.Marshaler) {
860 fc, err := ec.fieldContext_BugLabelChangeOperation_id(ctx, field)
861 if err != nil {
862 return graphql.Null
863 }
864 ctx = graphql.WithFieldContext(ctx, fc)
865 defer func() {
866 if r := recover(); r != nil {
867 ec.Error(ctx, ec.Recover(ctx, r))
868 ret = graphql.Null
869 }
870 }()
871 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
872 ctx = rctx // use context from middleware stack in children
873 return obj.Id(), nil
874 })
875 if err != nil {
876 ec.Error(ctx, err)
877 return graphql.Null
878 }
879 if resTmp == nil {
880 if !graphql.HasFieldError(ctx, fc) {
881 ec.Errorf(ctx, "must not be null")
882 }
883 return graphql.Null
884 }
885 res := resTmp.(entity.Id)
886 fc.Result = res
887 return ec.marshalNID2githubácomágitábugágitábugáentityáId(ctx, field.Selections, res)
888}
889
890func (ec *executionContext) fieldContext_BugLabelChangeOperation_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
891 fc = &graphql.FieldContext{
892 Object: "BugLabelChangeOperation",
893 Field: field,
894 IsMethod: true,
895 IsResolver: false,
896 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
897 return nil, errors.New("field of type ID does not have child fields")
898 },
899 }
900 return fc, nil
901}
902
903func (ec *executionContext) _BugLabelChangeOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) (ret graphql.Marshaler) {
904 fc, err := ec.fieldContext_BugLabelChangeOperation_author(ctx, field)
905 if err != nil {
906 return graphql.Null
907 }
908 ctx = graphql.WithFieldContext(ctx, fc)
909 defer func() {
910 if r := recover(); r != nil {
911 ec.Error(ctx, ec.Recover(ctx, r))
912 ret = graphql.Null
913 }
914 }()
915 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
916 ctx = rctx // use context from middleware stack in children
917 return ec.resolvers.BugLabelChangeOperation().Author(rctx, obj)
918 })
919 if err != nil {
920 ec.Error(ctx, err)
921 return graphql.Null
922 }
923 if resTmp == nil {
924 if !graphql.HasFieldError(ctx, fc) {
925 ec.Errorf(ctx, "must not be null")
926 }
927 return graphql.Null
928 }
929 res := resTmp.(models.IdentityWrapper)
930 fc.Result = res
931 return ec.marshalNIdentity2githubácomágitábugágitábugáapiágraphqlámodelsáIdentityWrapper(ctx, field.Selections, res)
932}
933
934func (ec *executionContext) fieldContext_BugLabelChangeOperation_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
935 fc = &graphql.FieldContext{
936 Object: "BugLabelChangeOperation",
937 Field: field,
938 IsMethod: true,
939 IsResolver: true,
940 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
941 switch field.Name {
942 case "id":
943 return ec.fieldContext_Identity_id(ctx, field)
944 case "humanId":
945 return ec.fieldContext_Identity_humanId(ctx, field)
946 case "name":
947 return ec.fieldContext_Identity_name(ctx, field)
948 case "email":
949 return ec.fieldContext_Identity_email(ctx, field)
950 case "login":
951 return ec.fieldContext_Identity_login(ctx, field)
952 case "displayName":
953 return ec.fieldContext_Identity_displayName(ctx, field)
954 case "avatarUrl":
955 return ec.fieldContext_Identity_avatarUrl(ctx, field)
956 case "isProtected":
957 return ec.fieldContext_Identity_isProtected(ctx, field)
958 }
959 return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
960 },
961 }
962 return fc, nil
963}
964
965func (ec *executionContext) _BugLabelChangeOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) (ret graphql.Marshaler) {
966 fc, err := ec.fieldContext_BugLabelChangeOperation_date(ctx, field)
967 if err != nil {
968 return graphql.Null
969 }
970 ctx = graphql.WithFieldContext(ctx, fc)
971 defer func() {
972 if r := recover(); r != nil {
973 ec.Error(ctx, ec.Recover(ctx, r))
974 ret = graphql.Null
975 }
976 }()
977 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
978 ctx = rctx // use context from middleware stack in children
979 return obj.Time(), nil
980 })
981 if err != nil {
982 ec.Error(ctx, err)
983 return graphql.Null
984 }
985 if resTmp == nil {
986 if !graphql.HasFieldError(ctx, fc) {
987 ec.Errorf(ctx, "must not be null")
988 }
989 return graphql.Null
990 }
991 res := resTmp.(time.Time)
992 fc.Result = res
993 return ec.marshalNTime2timeáTime(ctx, field.Selections, res)
994}
995
996func (ec *executionContext) fieldContext_BugLabelChangeOperation_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
997 fc = &graphql.FieldContext{
998 Object: "BugLabelChangeOperation",
999 Field: field,
1000 IsMethod: true,
1001 IsResolver: false,
1002 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1003 return nil, errors.New("field of type Time does not have child fields")
1004 },
1005 }
1006 return fc, nil
1007}
1008
1009func (ec *executionContext) _BugLabelChangeOperation_added(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) (ret graphql.Marshaler) {
1010 fc, err := ec.fieldContext_BugLabelChangeOperation_added(ctx, field)
1011 if err != nil {
1012 return graphql.Null
1013 }
1014 ctx = graphql.WithFieldContext(ctx, fc)
1015 defer func() {
1016 if r := recover(); r != nil {
1017 ec.Error(ctx, ec.Recover(ctx, r))
1018 ret = graphql.Null
1019 }
1020 }()
1021 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1022 ctx = rctx // use context from middleware stack in children
1023 return obj.Added, nil
1024 })
1025 if err != nil {
1026 ec.Error(ctx, err)
1027 return graphql.Null
1028 }
1029 if resTmp == nil {
1030 if !graphql.HasFieldError(ctx, fc) {
1031 ec.Errorf(ctx, "must not be null")
1032 }
1033 return graphql.Null
1034 }
1035 res := resTmp.([]common.Label)
1036 fc.Result = res
1037 return ec.marshalNLabel2ágithubácomágitábugágitábugáentitiesácommonáLabelá(ctx, field.Selections, res)
1038}
1039
1040func (ec *executionContext) fieldContext_BugLabelChangeOperation_added(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1041 fc = &graphql.FieldContext{
1042 Object: "BugLabelChangeOperation",
1043 Field: field,
1044 IsMethod: false,
1045 IsResolver: false,
1046 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1047 switch field.Name {
1048 case "name":
1049 return ec.fieldContext_Label_name(ctx, field)
1050 case "color":
1051 return ec.fieldContext_Label_color(ctx, field)
1052 }
1053 return nil, fmt.Errorf("no field named %q was found under type Label", field.Name)
1054 },
1055 }
1056 return fc, nil
1057}
1058
1059func (ec *executionContext) _BugLabelChangeOperation_removed(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) (ret graphql.Marshaler) {
1060 fc, err := ec.fieldContext_BugLabelChangeOperation_removed(ctx, field)
1061 if err != nil {
1062 return graphql.Null
1063 }
1064 ctx = graphql.WithFieldContext(ctx, fc)
1065 defer func() {
1066 if r := recover(); r != nil {
1067 ec.Error(ctx, ec.Recover(ctx, r))
1068 ret = graphql.Null
1069 }
1070 }()
1071 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1072 ctx = rctx // use context from middleware stack in children
1073 return obj.Removed, nil
1074 })
1075 if err != nil {
1076 ec.Error(ctx, err)
1077 return graphql.Null
1078 }
1079 if resTmp == nil {
1080 if !graphql.HasFieldError(ctx, fc) {
1081 ec.Errorf(ctx, "must not be null")
1082 }
1083 return graphql.Null
1084 }
1085 res := resTmp.([]common.Label)
1086 fc.Result = res
1087 return ec.marshalNLabel2ágithubácomágitábugágitábugáentitiesácommonáLabelá(ctx, field.Selections, res)
1088}
1089
1090func (ec *executionContext) fieldContext_BugLabelChangeOperation_removed(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1091 fc = &graphql.FieldContext{
1092 Object: "BugLabelChangeOperation",
1093 Field: field,
1094 IsMethod: false,
1095 IsResolver: false,
1096 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1097 switch field.Name {
1098 case "name":
1099 return ec.fieldContext_Label_name(ctx, field)
1100 case "color":
1101 return ec.fieldContext_Label_color(ctx, field)
1102 }
1103 return nil, fmt.Errorf("no field named %q was found under type Label", field.Name)
1104 },
1105 }
1106 return fc, nil
1107}
1108
1109func (ec *executionContext) _BugSetStatusOperation_id(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) (ret graphql.Marshaler) {
1110 fc, err := ec.fieldContext_BugSetStatusOperation_id(ctx, field)
1111 if err != nil {
1112 return graphql.Null
1113 }
1114 ctx = graphql.WithFieldContext(ctx, fc)
1115 defer func() {
1116 if r := recover(); r != nil {
1117 ec.Error(ctx, ec.Recover(ctx, r))
1118 ret = graphql.Null
1119 }
1120 }()
1121 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1122 ctx = rctx // use context from middleware stack in children
1123 return obj.Id(), nil
1124 })
1125 if err != nil {
1126 ec.Error(ctx, err)
1127 return graphql.Null
1128 }
1129 if resTmp == nil {
1130 if !graphql.HasFieldError(ctx, fc) {
1131 ec.Errorf(ctx, "must not be null")
1132 }
1133 return graphql.Null
1134 }
1135 res := resTmp.(entity.Id)
1136 fc.Result = res
1137 return ec.marshalNID2githubácomágitábugágitábugáentityáId(ctx, field.Selections, res)
1138}
1139
1140func (ec *executionContext) fieldContext_BugSetStatusOperation_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1141 fc = &graphql.FieldContext{
1142 Object: "BugSetStatusOperation",
1143 Field: field,
1144 IsMethod: true,
1145 IsResolver: false,
1146 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1147 return nil, errors.New("field of type ID does not have child fields")
1148 },
1149 }
1150 return fc, nil
1151}
1152
1153func (ec *executionContext) _BugSetStatusOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) (ret graphql.Marshaler) {
1154 fc, err := ec.fieldContext_BugSetStatusOperation_author(ctx, field)
1155 if err != nil {
1156 return graphql.Null
1157 }
1158 ctx = graphql.WithFieldContext(ctx, fc)
1159 defer func() {
1160 if r := recover(); r != nil {
1161 ec.Error(ctx, ec.Recover(ctx, r))
1162 ret = graphql.Null
1163 }
1164 }()
1165 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1166 ctx = rctx // use context from middleware stack in children
1167 return ec.resolvers.BugSetStatusOperation().Author(rctx, obj)
1168 })
1169 if err != nil {
1170 ec.Error(ctx, err)
1171 return graphql.Null
1172 }
1173 if resTmp == nil {
1174 if !graphql.HasFieldError(ctx, fc) {
1175 ec.Errorf(ctx, "must not be null")
1176 }
1177 return graphql.Null
1178 }
1179 res := resTmp.(models.IdentityWrapper)
1180 fc.Result = res
1181 return ec.marshalNIdentity2githubácomágitábugágitábugáapiágraphqlámodelsáIdentityWrapper(ctx, field.Selections, res)
1182}
1183
1184func (ec *executionContext) fieldContext_BugSetStatusOperation_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1185 fc = &graphql.FieldContext{
1186 Object: "BugSetStatusOperation",
1187 Field: field,
1188 IsMethod: true,
1189 IsResolver: true,
1190 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1191 switch field.Name {
1192 case "id":
1193 return ec.fieldContext_Identity_id(ctx, field)
1194 case "humanId":
1195 return ec.fieldContext_Identity_humanId(ctx, field)
1196 case "name":
1197 return ec.fieldContext_Identity_name(ctx, field)
1198 case "email":
1199 return ec.fieldContext_Identity_email(ctx, field)
1200 case "login":
1201 return ec.fieldContext_Identity_login(ctx, field)
1202 case "displayName":
1203 return ec.fieldContext_Identity_displayName(ctx, field)
1204 case "avatarUrl":
1205 return ec.fieldContext_Identity_avatarUrl(ctx, field)
1206 case "isProtected":
1207 return ec.fieldContext_Identity_isProtected(ctx, field)
1208 }
1209 return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
1210 },
1211 }
1212 return fc, nil
1213}
1214
1215func (ec *executionContext) _BugSetStatusOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) (ret graphql.Marshaler) {
1216 fc, err := ec.fieldContext_BugSetStatusOperation_date(ctx, field)
1217 if err != nil {
1218 return graphql.Null
1219 }
1220 ctx = graphql.WithFieldContext(ctx, fc)
1221 defer func() {
1222 if r := recover(); r != nil {
1223 ec.Error(ctx, ec.Recover(ctx, r))
1224 ret = graphql.Null
1225 }
1226 }()
1227 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1228 ctx = rctx // use context from middleware stack in children
1229 return obj.Time(), nil
1230 })
1231 if err != nil {
1232 ec.Error(ctx, err)
1233 return graphql.Null
1234 }
1235 if resTmp == nil {
1236 if !graphql.HasFieldError(ctx, fc) {
1237 ec.Errorf(ctx, "must not be null")
1238 }
1239 return graphql.Null
1240 }
1241 res := resTmp.(time.Time)
1242 fc.Result = res
1243 return ec.marshalNTime2timeáTime(ctx, field.Selections, res)
1244}
1245
1246func (ec *executionContext) fieldContext_BugSetStatusOperation_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1247 fc = &graphql.FieldContext{
1248 Object: "BugSetStatusOperation",
1249 Field: field,
1250 IsMethod: true,
1251 IsResolver: false,
1252 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1253 return nil, errors.New("field of type Time does not have child fields")
1254 },
1255 }
1256 return fc, nil
1257}
1258
1259func (ec *executionContext) _BugSetStatusOperation_status(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) (ret graphql.Marshaler) {
1260 fc, err := ec.fieldContext_BugSetStatusOperation_status(ctx, field)
1261 if err != nil {
1262 return graphql.Null
1263 }
1264 ctx = graphql.WithFieldContext(ctx, fc)
1265 defer func() {
1266 if r := recover(); r != nil {
1267 ec.Error(ctx, ec.Recover(ctx, r))
1268 ret = graphql.Null
1269 }
1270 }()
1271 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1272 ctx = rctx // use context from middleware stack in children
1273 return obj.Status, nil
1274 })
1275 if err != nil {
1276 ec.Error(ctx, err)
1277 return graphql.Null
1278 }
1279 if resTmp == nil {
1280 if !graphql.HasFieldError(ctx, fc) {
1281 ec.Errorf(ctx, "must not be null")
1282 }
1283 return graphql.Null
1284 }
1285 res := resTmp.(common.Status)
1286 fc.Result = res
1287 return ec.marshalNStatus2githubácomágitábugágitábugáentitiesácommonáStatus(ctx, field.Selections, res)
1288}
1289
1290func (ec *executionContext) fieldContext_BugSetStatusOperation_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1291 fc = &graphql.FieldContext{
1292 Object: "BugSetStatusOperation",
1293 Field: field,
1294 IsMethod: false,
1295 IsResolver: false,
1296 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1297 return nil, errors.New("field of type Status does not have child fields")
1298 },
1299 }
1300 return fc, nil
1301}
1302
1303func (ec *executionContext) _BugSetTitleOperation_id(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) (ret graphql.Marshaler) {
1304 fc, err := ec.fieldContext_BugSetTitleOperation_id(ctx, field)
1305 if err != nil {
1306 return graphql.Null
1307 }
1308 ctx = graphql.WithFieldContext(ctx, fc)
1309 defer func() {
1310 if r := recover(); r != nil {
1311 ec.Error(ctx, ec.Recover(ctx, r))
1312 ret = graphql.Null
1313 }
1314 }()
1315 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1316 ctx = rctx // use context from middleware stack in children
1317 return obj.Id(), nil
1318 })
1319 if err != nil {
1320 ec.Error(ctx, err)
1321 return graphql.Null
1322 }
1323 if resTmp == nil {
1324 if !graphql.HasFieldError(ctx, fc) {
1325 ec.Errorf(ctx, "must not be null")
1326 }
1327 return graphql.Null
1328 }
1329 res := resTmp.(entity.Id)
1330 fc.Result = res
1331 return ec.marshalNID2githubácomágitábugágitábugáentityáId(ctx, field.Selections, res)
1332}
1333
1334func (ec *executionContext) fieldContext_BugSetTitleOperation_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1335 fc = &graphql.FieldContext{
1336 Object: "BugSetTitleOperation",
1337 Field: field,
1338 IsMethod: true,
1339 IsResolver: false,
1340 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1341 return nil, errors.New("field of type ID does not have child fields")
1342 },
1343 }
1344 return fc, nil
1345}
1346
1347func (ec *executionContext) _BugSetTitleOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) (ret graphql.Marshaler) {
1348 fc, err := ec.fieldContext_BugSetTitleOperation_author(ctx, field)
1349 if err != nil {
1350 return graphql.Null
1351 }
1352 ctx = graphql.WithFieldContext(ctx, fc)
1353 defer func() {
1354 if r := recover(); r != nil {
1355 ec.Error(ctx, ec.Recover(ctx, r))
1356 ret = graphql.Null
1357 }
1358 }()
1359 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1360 ctx = rctx // use context from middleware stack in children
1361 return ec.resolvers.BugSetTitleOperation().Author(rctx, obj)
1362 })
1363 if err != nil {
1364 ec.Error(ctx, err)
1365 return graphql.Null
1366 }
1367 if resTmp == nil {
1368 if !graphql.HasFieldError(ctx, fc) {
1369 ec.Errorf(ctx, "must not be null")
1370 }
1371 return graphql.Null
1372 }
1373 res := resTmp.(models.IdentityWrapper)
1374 fc.Result = res
1375 return ec.marshalNIdentity2githubácomágitábugágitábugáapiágraphqlámodelsáIdentityWrapper(ctx, field.Selections, res)
1376}
1377
1378func (ec *executionContext) fieldContext_BugSetTitleOperation_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1379 fc = &graphql.FieldContext{
1380 Object: "BugSetTitleOperation",
1381 Field: field,
1382 IsMethod: true,
1383 IsResolver: true,
1384 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1385 switch field.Name {
1386 case "id":
1387 return ec.fieldContext_Identity_id(ctx, field)
1388 case "humanId":
1389 return ec.fieldContext_Identity_humanId(ctx, field)
1390 case "name":
1391 return ec.fieldContext_Identity_name(ctx, field)
1392 case "email":
1393 return ec.fieldContext_Identity_email(ctx, field)
1394 case "login":
1395 return ec.fieldContext_Identity_login(ctx, field)
1396 case "displayName":
1397 return ec.fieldContext_Identity_displayName(ctx, field)
1398 case "avatarUrl":
1399 return ec.fieldContext_Identity_avatarUrl(ctx, field)
1400 case "isProtected":
1401 return ec.fieldContext_Identity_isProtected(ctx, field)
1402 }
1403 return nil, fmt.Errorf("no field named %q was found under type Identity", field.Name)
1404 },
1405 }
1406 return fc, nil
1407}
1408
1409func (ec *executionContext) _BugSetTitleOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) (ret graphql.Marshaler) {
1410 fc, err := ec.fieldContext_BugSetTitleOperation_date(ctx, field)
1411 if err != nil {
1412 return graphql.Null
1413 }
1414 ctx = graphql.WithFieldContext(ctx, fc)
1415 defer func() {
1416 if r := recover(); r != nil {
1417 ec.Error(ctx, ec.Recover(ctx, r))
1418 ret = graphql.Null
1419 }
1420 }()
1421 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1422 ctx = rctx // use context from middleware stack in children
1423 return obj.Time(), nil
1424 })
1425 if err != nil {
1426 ec.Error(ctx, err)
1427 return graphql.Null
1428 }
1429 if resTmp == nil {
1430 if !graphql.HasFieldError(ctx, fc) {
1431 ec.Errorf(ctx, "must not be null")
1432 }
1433 return graphql.Null
1434 }
1435 res := resTmp.(time.Time)
1436 fc.Result = res
1437 return ec.marshalNTime2timeáTime(ctx, field.Selections, res)
1438}
1439
1440func (ec *executionContext) fieldContext_BugSetTitleOperation_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1441 fc = &graphql.FieldContext{
1442 Object: "BugSetTitleOperation",
1443 Field: field,
1444 IsMethod: true,
1445 IsResolver: false,
1446 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1447 return nil, errors.New("field of type Time does not have child fields")
1448 },
1449 }
1450 return fc, nil
1451}
1452
1453func (ec *executionContext) _BugSetTitleOperation_title(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) (ret graphql.Marshaler) {
1454 fc, err := ec.fieldContext_BugSetTitleOperation_title(ctx, field)
1455 if err != nil {
1456 return graphql.Null
1457 }
1458 ctx = graphql.WithFieldContext(ctx, fc)
1459 defer func() {
1460 if r := recover(); r != nil {
1461 ec.Error(ctx, ec.Recover(ctx, r))
1462 ret = graphql.Null
1463 }
1464 }()
1465 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1466 ctx = rctx // use context from middleware stack in children
1467 return obj.Title, nil
1468 })
1469 if err != nil {
1470 ec.Error(ctx, err)
1471 return graphql.Null
1472 }
1473 if resTmp == nil {
1474 if !graphql.HasFieldError(ctx, fc) {
1475 ec.Errorf(ctx, "must not be null")
1476 }
1477 return graphql.Null
1478 }
1479 res := resTmp.(string)
1480 fc.Result = res
1481 return ec.marshalNString2string(ctx, field.Selections, res)
1482}
1483
1484func (ec *executionContext) fieldContext_BugSetTitleOperation_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1485 fc = &graphql.FieldContext{
1486 Object: "BugSetTitleOperation",
1487 Field: field,
1488 IsMethod: false,
1489 IsResolver: false,
1490 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1491 return nil, errors.New("field of type String does not have child fields")
1492 },
1493 }
1494 return fc, nil
1495}
1496
1497func (ec *executionContext) _BugSetTitleOperation_was(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) (ret graphql.Marshaler) {
1498 fc, err := ec.fieldContext_BugSetTitleOperation_was(ctx, field)
1499 if err != nil {
1500 return graphql.Null
1501 }
1502 ctx = graphql.WithFieldContext(ctx, fc)
1503 defer func() {
1504 if r := recover(); r != nil {
1505 ec.Error(ctx, ec.Recover(ctx, r))
1506 ret = graphql.Null
1507 }
1508 }()
1509 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
1510 ctx = rctx // use context from middleware stack in children
1511 return obj.Was, nil
1512 })
1513 if err != nil {
1514 ec.Error(ctx, err)
1515 return graphql.Null
1516 }
1517 if resTmp == nil {
1518 if !graphql.HasFieldError(ctx, fc) {
1519 ec.Errorf(ctx, "must not be null")
1520 }
1521 return graphql.Null
1522 }
1523 res := resTmp.(string)
1524 fc.Result = res
1525 return ec.marshalNString2string(ctx, field.Selections, res)
1526}
1527
1528func (ec *executionContext) fieldContext_BugSetTitleOperation_was(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1529 fc = &graphql.FieldContext{
1530 Object: "BugSetTitleOperation",
1531 Field: field,
1532 IsMethod: false,
1533 IsResolver: false,
1534 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1535 return nil, errors.New("field of type String does not have child fields")
1536 },
1537 }
1538 return fc, nil
1539}
1540
1541// endregion **************************** field.gotpl *****************************
1542
1543// region **************************** input.gotpl *****************************
1544
1545// endregion **************************** input.gotpl *****************************
1546
1547// region ************************** interface.gotpl ***************************
1548
1549// endregion ************************** interface.gotpl ***************************
1550
1551// region **************************** object.gotpl ****************************
1552
1553var bugAddCommentOperationImplementors = []string{"BugAddCommentOperation", "Operation", "Authored"}
1554
1555func (ec *executionContext) _BugAddCommentOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.AddCommentOperation) graphql.Marshaler {
1556 fields := graphql.CollectFields(ec.OperationContext, sel, bugAddCommentOperationImplementors)
1557
1558 out := graphql.NewFieldSet(fields)
1559 deferred := make(map[string]*graphql.FieldSet)
1560 for i, field := range fields {
1561 switch field.Name {
1562 case "__typename":
1563 out.Values[i] = graphql.MarshalString("BugAddCommentOperation")
1564 case "id":
1565 out.Values[i] = ec._BugAddCommentOperation_id(ctx, field, obj)
1566 if out.Values[i] == graphql.Null {
1567 atomic.AddUint32(&out.Invalids, 1)
1568 }
1569 case "author":
1570 field := field
1571
1572 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
1573 defer func() {
1574 if r := recover(); r != nil {
1575 ec.Error(ctx, ec.Recover(ctx, r))
1576 }
1577 }()
1578 res = ec._BugAddCommentOperation_author(ctx, field, obj)
1579 if res == graphql.Null {
1580 atomic.AddUint32(&fs.Invalids, 1)
1581 }
1582 return res
1583 }
1584
1585 if field.Deferrable != nil {
1586 dfs, ok := deferred[field.Deferrable.Label]
1587 di := 0
1588 if ok {
1589 dfs.AddField(field)
1590 di = len(dfs.Values) - 1
1591 } else {
1592 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
1593 deferred[field.Deferrable.Label] = dfs
1594 }
1595 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
1596 return innerFunc(ctx, dfs)
1597 })
1598
1599 // don't run the out.Concurrently() call below
1600 out.Values[i] = graphql.Null
1601 continue
1602 }
1603
1604 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
1605 case "date":
1606 out.Values[i] = ec._BugAddCommentOperation_date(ctx, field, obj)
1607 if out.Values[i] == graphql.Null {
1608 atomic.AddUint32(&out.Invalids, 1)
1609 }
1610 case "message":
1611 out.Values[i] = ec._BugAddCommentOperation_message(ctx, field, obj)
1612 if out.Values[i] == graphql.Null {
1613 atomic.AddUint32(&out.Invalids, 1)
1614 }
1615 case "files":
1616 out.Values[i] = ec._BugAddCommentOperation_files(ctx, field, obj)
1617 if out.Values[i] == graphql.Null {
1618 atomic.AddUint32(&out.Invalids, 1)
1619 }
1620 default:
1621 panic("unknown field " + strconv.Quote(field.Name))
1622 }
1623 }
1624 out.Dispatch(ctx)
1625 if out.Invalids > 0 {
1626 return graphql.Null
1627 }
1628
1629 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
1630
1631 for label, dfs := range deferred {
1632 ec.processDeferredGroup(graphql.DeferredGroup{
1633 Label: label,
1634 Path: graphql.GetPath(ctx),
1635 FieldSet: dfs,
1636 Context: ctx,
1637 })
1638 }
1639
1640 return out
1641}
1642
1643var bugCreateOperationImplementors = []string{"BugCreateOperation", "Operation", "Authored"}
1644
1645func (ec *executionContext) _BugCreateOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.CreateOperation) graphql.Marshaler {
1646 fields := graphql.CollectFields(ec.OperationContext, sel, bugCreateOperationImplementors)
1647
1648 out := graphql.NewFieldSet(fields)
1649 deferred := make(map[string]*graphql.FieldSet)
1650 for i, field := range fields {
1651 switch field.Name {
1652 case "__typename":
1653 out.Values[i] = graphql.MarshalString("BugCreateOperation")
1654 case "id":
1655 out.Values[i] = ec._BugCreateOperation_id(ctx, field, obj)
1656 if out.Values[i] == graphql.Null {
1657 atomic.AddUint32(&out.Invalids, 1)
1658 }
1659 case "author":
1660 field := field
1661
1662 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
1663 defer func() {
1664 if r := recover(); r != nil {
1665 ec.Error(ctx, ec.Recover(ctx, r))
1666 }
1667 }()
1668 res = ec._BugCreateOperation_author(ctx, field, obj)
1669 if res == graphql.Null {
1670 atomic.AddUint32(&fs.Invalids, 1)
1671 }
1672 return res
1673 }
1674
1675 if field.Deferrable != nil {
1676 dfs, ok := deferred[field.Deferrable.Label]
1677 di := 0
1678 if ok {
1679 dfs.AddField(field)
1680 di = len(dfs.Values) - 1
1681 } else {
1682 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
1683 deferred[field.Deferrable.Label] = dfs
1684 }
1685 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
1686 return innerFunc(ctx, dfs)
1687 })
1688
1689 // don't run the out.Concurrently() call below
1690 out.Values[i] = graphql.Null
1691 continue
1692 }
1693
1694 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
1695 case "date":
1696 out.Values[i] = ec._BugCreateOperation_date(ctx, field, obj)
1697 if out.Values[i] == graphql.Null {
1698 atomic.AddUint32(&out.Invalids, 1)
1699 }
1700 case "title":
1701 out.Values[i] = ec._BugCreateOperation_title(ctx, field, obj)
1702 if out.Values[i] == graphql.Null {
1703 atomic.AddUint32(&out.Invalids, 1)
1704 }
1705 case "message":
1706 out.Values[i] = ec._BugCreateOperation_message(ctx, field, obj)
1707 if out.Values[i] == graphql.Null {
1708 atomic.AddUint32(&out.Invalids, 1)
1709 }
1710 case "files":
1711 out.Values[i] = ec._BugCreateOperation_files(ctx, field, obj)
1712 if out.Values[i] == graphql.Null {
1713 atomic.AddUint32(&out.Invalids, 1)
1714 }
1715 default:
1716 panic("unknown field " + strconv.Quote(field.Name))
1717 }
1718 }
1719 out.Dispatch(ctx)
1720 if out.Invalids > 0 {
1721 return graphql.Null
1722 }
1723
1724 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
1725
1726 for label, dfs := range deferred {
1727 ec.processDeferredGroup(graphql.DeferredGroup{
1728 Label: label,
1729 Path: graphql.GetPath(ctx),
1730 FieldSet: dfs,
1731 Context: ctx,
1732 })
1733 }
1734
1735 return out
1736}
1737
1738var bugEditCommentOperationImplementors = []string{"BugEditCommentOperation", "Operation", "Authored"}
1739
1740func (ec *executionContext) _BugEditCommentOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.EditCommentOperation) graphql.Marshaler {
1741 fields := graphql.CollectFields(ec.OperationContext, sel, bugEditCommentOperationImplementors)
1742
1743 out := graphql.NewFieldSet(fields)
1744 deferred := make(map[string]*graphql.FieldSet)
1745 for i, field := range fields {
1746 switch field.Name {
1747 case "__typename":
1748 out.Values[i] = graphql.MarshalString("BugEditCommentOperation")
1749 case "id":
1750 out.Values[i] = ec._BugEditCommentOperation_id(ctx, field, obj)
1751 if out.Values[i] == graphql.Null {
1752 atomic.AddUint32(&out.Invalids, 1)
1753 }
1754 case "author":
1755 field := field
1756
1757 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
1758 defer func() {
1759 if r := recover(); r != nil {
1760 ec.Error(ctx, ec.Recover(ctx, r))
1761 }
1762 }()
1763 res = ec._BugEditCommentOperation_author(ctx, field, obj)
1764 if res == graphql.Null {
1765 atomic.AddUint32(&fs.Invalids, 1)
1766 }
1767 return res
1768 }
1769
1770 if field.Deferrable != nil {
1771 dfs, ok := deferred[field.Deferrable.Label]
1772 di := 0
1773 if ok {
1774 dfs.AddField(field)
1775 di = len(dfs.Values) - 1
1776 } else {
1777 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
1778 deferred[field.Deferrable.Label] = dfs
1779 }
1780 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
1781 return innerFunc(ctx, dfs)
1782 })
1783
1784 // don't run the out.Concurrently() call below
1785 out.Values[i] = graphql.Null
1786 continue
1787 }
1788
1789 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
1790 case "date":
1791 out.Values[i] = ec._BugEditCommentOperation_date(ctx, field, obj)
1792 if out.Values[i] == graphql.Null {
1793 atomic.AddUint32(&out.Invalids, 1)
1794 }
1795 case "target":
1796 field := field
1797
1798 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
1799 defer func() {
1800 if r := recover(); r != nil {
1801 ec.Error(ctx, ec.Recover(ctx, r))
1802 }
1803 }()
1804 res = ec._BugEditCommentOperation_target(ctx, field, obj)
1805 if res == graphql.Null {
1806 atomic.AddUint32(&fs.Invalids, 1)
1807 }
1808 return res
1809 }
1810
1811 if field.Deferrable != nil {
1812 dfs, ok := deferred[field.Deferrable.Label]
1813 di := 0
1814 if ok {
1815 dfs.AddField(field)
1816 di = len(dfs.Values) - 1
1817 } else {
1818 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
1819 deferred[field.Deferrable.Label] = dfs
1820 }
1821 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
1822 return innerFunc(ctx, dfs)
1823 })
1824
1825 // don't run the out.Concurrently() call below
1826 out.Values[i] = graphql.Null
1827 continue
1828 }
1829
1830 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
1831 case "message":
1832 out.Values[i] = ec._BugEditCommentOperation_message(ctx, field, obj)
1833 if out.Values[i] == graphql.Null {
1834 atomic.AddUint32(&out.Invalids, 1)
1835 }
1836 case "files":
1837 out.Values[i] = ec._BugEditCommentOperation_files(ctx, field, obj)
1838 if out.Values[i] == graphql.Null {
1839 atomic.AddUint32(&out.Invalids, 1)
1840 }
1841 default:
1842 panic("unknown field " + strconv.Quote(field.Name))
1843 }
1844 }
1845 out.Dispatch(ctx)
1846 if out.Invalids > 0 {
1847 return graphql.Null
1848 }
1849
1850 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
1851
1852 for label, dfs := range deferred {
1853 ec.processDeferredGroup(graphql.DeferredGroup{
1854 Label: label,
1855 Path: graphql.GetPath(ctx),
1856 FieldSet: dfs,
1857 Context: ctx,
1858 })
1859 }
1860
1861 return out
1862}
1863
1864var bugLabelChangeOperationImplementors = []string{"BugLabelChangeOperation", "Operation", "Authored"}
1865
1866func (ec *executionContext) _BugLabelChangeOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.LabelChangeOperation) graphql.Marshaler {
1867 fields := graphql.CollectFields(ec.OperationContext, sel, bugLabelChangeOperationImplementors)
1868
1869 out := graphql.NewFieldSet(fields)
1870 deferred := make(map[string]*graphql.FieldSet)
1871 for i, field := range fields {
1872 switch field.Name {
1873 case "__typename":
1874 out.Values[i] = graphql.MarshalString("BugLabelChangeOperation")
1875 case "id":
1876 out.Values[i] = ec._BugLabelChangeOperation_id(ctx, field, obj)
1877 if out.Values[i] == graphql.Null {
1878 atomic.AddUint32(&out.Invalids, 1)
1879 }
1880 case "author":
1881 field := field
1882
1883 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
1884 defer func() {
1885 if r := recover(); r != nil {
1886 ec.Error(ctx, ec.Recover(ctx, r))
1887 }
1888 }()
1889 res = ec._BugLabelChangeOperation_author(ctx, field, obj)
1890 if res == graphql.Null {
1891 atomic.AddUint32(&fs.Invalids, 1)
1892 }
1893 return res
1894 }
1895
1896 if field.Deferrable != nil {
1897 dfs, ok := deferred[field.Deferrable.Label]
1898 di := 0
1899 if ok {
1900 dfs.AddField(field)
1901 di = len(dfs.Values) - 1
1902 } else {
1903 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
1904 deferred[field.Deferrable.Label] = dfs
1905 }
1906 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
1907 return innerFunc(ctx, dfs)
1908 })
1909
1910 // don't run the out.Concurrently() call below
1911 out.Values[i] = graphql.Null
1912 continue
1913 }
1914
1915 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
1916 case "date":
1917 out.Values[i] = ec._BugLabelChangeOperation_date(ctx, field, obj)
1918 if out.Values[i] == graphql.Null {
1919 atomic.AddUint32(&out.Invalids, 1)
1920 }
1921 case "added":
1922 out.Values[i] = ec._BugLabelChangeOperation_added(ctx, field, obj)
1923 if out.Values[i] == graphql.Null {
1924 atomic.AddUint32(&out.Invalids, 1)
1925 }
1926 case "removed":
1927 out.Values[i] = ec._BugLabelChangeOperation_removed(ctx, field, obj)
1928 if out.Values[i] == graphql.Null {
1929 atomic.AddUint32(&out.Invalids, 1)
1930 }
1931 default:
1932 panic("unknown field " + strconv.Quote(field.Name))
1933 }
1934 }
1935 out.Dispatch(ctx)
1936 if out.Invalids > 0 {
1937 return graphql.Null
1938 }
1939
1940 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
1941
1942 for label, dfs := range deferred {
1943 ec.processDeferredGroup(graphql.DeferredGroup{
1944 Label: label,
1945 Path: graphql.GetPath(ctx),
1946 FieldSet: dfs,
1947 Context: ctx,
1948 })
1949 }
1950
1951 return out
1952}
1953
1954var bugSetStatusOperationImplementors = []string{"BugSetStatusOperation", "Operation", "Authored"}
1955
1956func (ec *executionContext) _BugSetStatusOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.SetStatusOperation) graphql.Marshaler {
1957 fields := graphql.CollectFields(ec.OperationContext, sel, bugSetStatusOperationImplementors)
1958
1959 out := graphql.NewFieldSet(fields)
1960 deferred := make(map[string]*graphql.FieldSet)
1961 for i, field := range fields {
1962 switch field.Name {
1963 case "__typename":
1964 out.Values[i] = graphql.MarshalString("BugSetStatusOperation")
1965 case "id":
1966 out.Values[i] = ec._BugSetStatusOperation_id(ctx, field, obj)
1967 if out.Values[i] == graphql.Null {
1968 atomic.AddUint32(&out.Invalids, 1)
1969 }
1970 case "author":
1971 field := field
1972
1973 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
1974 defer func() {
1975 if r := recover(); r != nil {
1976 ec.Error(ctx, ec.Recover(ctx, r))
1977 }
1978 }()
1979 res = ec._BugSetStatusOperation_author(ctx, field, obj)
1980 if res == graphql.Null {
1981 atomic.AddUint32(&fs.Invalids, 1)
1982 }
1983 return res
1984 }
1985
1986 if field.Deferrable != nil {
1987 dfs, ok := deferred[field.Deferrable.Label]
1988 di := 0
1989 if ok {
1990 dfs.AddField(field)
1991 di = len(dfs.Values) - 1
1992 } else {
1993 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
1994 deferred[field.Deferrable.Label] = dfs
1995 }
1996 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
1997 return innerFunc(ctx, dfs)
1998 })
1999
2000 // don't run the out.Concurrently() call below
2001 out.Values[i] = graphql.Null
2002 continue
2003 }
2004
2005 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2006 case "date":
2007 out.Values[i] = ec._BugSetStatusOperation_date(ctx, field, obj)
2008 if out.Values[i] == graphql.Null {
2009 atomic.AddUint32(&out.Invalids, 1)
2010 }
2011 case "status":
2012 out.Values[i] = ec._BugSetStatusOperation_status(ctx, field, obj)
2013 if out.Values[i] == graphql.Null {
2014 atomic.AddUint32(&out.Invalids, 1)
2015 }
2016 default:
2017 panic("unknown field " + strconv.Quote(field.Name))
2018 }
2019 }
2020 out.Dispatch(ctx)
2021 if out.Invalids > 0 {
2022 return graphql.Null
2023 }
2024
2025 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
2026
2027 for label, dfs := range deferred {
2028 ec.processDeferredGroup(graphql.DeferredGroup{
2029 Label: label,
2030 Path: graphql.GetPath(ctx),
2031 FieldSet: dfs,
2032 Context: ctx,
2033 })
2034 }
2035
2036 return out
2037}
2038
2039var bugSetTitleOperationImplementors = []string{"BugSetTitleOperation", "Operation", "Authored"}
2040
2041func (ec *executionContext) _BugSetTitleOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.SetTitleOperation) graphql.Marshaler {
2042 fields := graphql.CollectFields(ec.OperationContext, sel, bugSetTitleOperationImplementors)
2043
2044 out := graphql.NewFieldSet(fields)
2045 deferred := make(map[string]*graphql.FieldSet)
2046 for i, field := range fields {
2047 switch field.Name {
2048 case "__typename":
2049 out.Values[i] = graphql.MarshalString("BugSetTitleOperation")
2050 case "id":
2051 out.Values[i] = ec._BugSetTitleOperation_id(ctx, field, obj)
2052 if out.Values[i] == graphql.Null {
2053 atomic.AddUint32(&out.Invalids, 1)
2054 }
2055 case "author":
2056 field := field
2057
2058 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
2059 defer func() {
2060 if r := recover(); r != nil {
2061 ec.Error(ctx, ec.Recover(ctx, r))
2062 }
2063 }()
2064 res = ec._BugSetTitleOperation_author(ctx, field, obj)
2065 if res == graphql.Null {
2066 atomic.AddUint32(&fs.Invalids, 1)
2067 }
2068 return res
2069 }
2070
2071 if field.Deferrable != nil {
2072 dfs, ok := deferred[field.Deferrable.Label]
2073 di := 0
2074 if ok {
2075 dfs.AddField(field)
2076 di = len(dfs.Values) - 1
2077 } else {
2078 dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
2079 deferred[field.Deferrable.Label] = dfs
2080 }
2081 dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
2082 return innerFunc(ctx, dfs)
2083 })
2084
2085 // don't run the out.Concurrently() call below
2086 out.Values[i] = graphql.Null
2087 continue
2088 }
2089
2090 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
2091 case "date":
2092 out.Values[i] = ec._BugSetTitleOperation_date(ctx, field, obj)
2093 if out.Values[i] == graphql.Null {
2094 atomic.AddUint32(&out.Invalids, 1)
2095 }
2096 case "title":
2097 out.Values[i] = ec._BugSetTitleOperation_title(ctx, field, obj)
2098 if out.Values[i] == graphql.Null {
2099 atomic.AddUint32(&out.Invalids, 1)
2100 }
2101 case "was":
2102 out.Values[i] = ec._BugSetTitleOperation_was(ctx, field, obj)
2103 if out.Values[i] == graphql.Null {
2104 atomic.AddUint32(&out.Invalids, 1)
2105 }
2106 default:
2107 panic("unknown field " + strconv.Quote(field.Name))
2108 }
2109 }
2110 out.Dispatch(ctx)
2111 if out.Invalids > 0 {
2112 return graphql.Null
2113 }
2114
2115 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
2116
2117 for label, dfs := range deferred {
2118 ec.processDeferredGroup(graphql.DeferredGroup{
2119 Label: label,
2120 Path: graphql.GetPath(ctx),
2121 FieldSet: dfs,
2122 Context: ctx,
2123 })
2124 }
2125
2126 return out
2127}
2128
2129// endregion **************************** object.gotpl ****************************
2130
2131// region ***************************** type.gotpl *****************************
2132
2133func (ec *executionContext) marshalNBugAddCommentOperation2ágithubácomágitábugágitábugáentitiesábugáAddCommentOperation(ctx context.Context, sel ast.SelectionSet, v *bug.AddCommentOperation) graphql.Marshaler {
2134 if v == nil {
2135 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
2136 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2137 }
2138 return graphql.Null
2139 }
2140 return ec._BugAddCommentOperation(ctx, sel, v)
2141}
2142
2143func (ec *executionContext) marshalNBugCreateOperation2ágithubácomágitábugágitábugáentitiesábugáCreateOperation(ctx context.Context, sel ast.SelectionSet, v *bug.CreateOperation) graphql.Marshaler {
2144 if v == nil {
2145 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
2146 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2147 }
2148 return graphql.Null
2149 }
2150 return ec._BugCreateOperation(ctx, sel, v)
2151}
2152
2153func (ec *executionContext) marshalNBugEditCommentOperation2ágithubácomágitábugágitábugáentitiesábugáEditCommentOperation(ctx context.Context, sel ast.SelectionSet, v *bug.EditCommentOperation) graphql.Marshaler {
2154 if v == nil {
2155 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
2156 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2157 }
2158 return graphql.Null
2159 }
2160 return ec._BugEditCommentOperation(ctx, sel, v)
2161}
2162
2163func (ec *executionContext) marshalNBugLabelChangeOperation2ágithubácomágitábugágitábugáentitiesábugáLabelChangeOperation(ctx context.Context, sel ast.SelectionSet, v *bug.LabelChangeOperation) graphql.Marshaler {
2164 if v == nil {
2165 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
2166 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2167 }
2168 return graphql.Null
2169 }
2170 return ec._BugLabelChangeOperation(ctx, sel, v)
2171}
2172
2173func (ec *executionContext) marshalNBugSetStatusOperation2ágithubácomágitábugágitábugáentitiesábugáSetStatusOperation(ctx context.Context, sel ast.SelectionSet, v *bug.SetStatusOperation) graphql.Marshaler {
2174 if v == nil {
2175 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
2176 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2177 }
2178 return graphql.Null
2179 }
2180 return ec._BugSetStatusOperation(ctx, sel, v)
2181}
2182
2183func (ec *executionContext) marshalNBugSetTitleOperation2ágithubácomágitábugágitábugáentitiesábugáSetTitleOperation(ctx context.Context, sel ast.SelectionSet, v *bug.SetTitleOperation) graphql.Marshaler {
2184 if v == nil {
2185 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
2186 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
2187 }
2188 return graphql.Null
2189 }
2190 return ec._BugSetTitleOperation(ctx, sel, v)
2191}
2192
2193// endregion ***************************** type.gotpl *****************************