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