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