1// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
2
3package graph
4
5import (
6 "context"
7 "errors"
8 "fmt"
9 "strconv"
10 "sync/atomic"
11
12 "github.com/99designs/gqlgen/graphql"
13 "github.com/99designs/gqlgen/graphql/introspection"
14 "github.com/git-bug/git-bug/api/graphql/models"
15 "github.com/vektah/gqlparser/v2/ast"
16)
17
18// region ************************** generated!.gotpl **************************
19
20type MutationResolver interface {
21 BugCreate(ctx context.Context, input models.BugCreateInput) (*models.BugCreatePayload, error)
22 BugAddComment(ctx context.Context, input models.BugAddCommentInput) (*models.BugAddCommentPayload, error)
23 BugAddCommentAndClose(ctx context.Context, input models.BugAddCommentAndCloseInput) (*models.BugAddCommentAndClosePayload, error)
24 BugAddCommentAndReopen(ctx context.Context, input models.BugAddCommentAndReopenInput) (*models.BugAddCommentAndReopenPayload, error)
25 BugEditComment(ctx context.Context, input models.BugEditCommentInput) (*models.BugEditCommentPayload, error)
26 BugChangeLabels(ctx context.Context, input *models.BugChangeLabelInput) (*models.BugChangeLabelPayload, error)
27 BugStatusOpen(ctx context.Context, input models.BugStatusOpenInput) (*models.BugStatusOpenPayload, error)
28 BugStatusClose(ctx context.Context, input models.BugStatusCloseInput) (*models.BugStatusClosePayload, error)
29 BugSetTitle(ctx context.Context, input models.BugSetTitleInput) (*models.BugSetTitlePayload, error)
30}
31type QueryResolver interface {
32 ServerConfig(ctx context.Context) (*models.ServerConfig, error)
33 Repository(ctx context.Context, ref *string) (*models.Repository, error)
34 Repositories(ctx context.Context, after *string, before *string, first *int, last *int) (*models.RepositoryConnection, error)
35}
36
37// endregion ************************** generated!.gotpl **************************
38
39// region ***************************** args.gotpl *****************************
40
41func (ec *executionContext) field_Mutation_bugAddCommentAndClose_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
42 var err error
43 args := map[string]any{}
44 arg0, err := ec.field_Mutation_bugAddCommentAndClose_argsInput(ctx, rawArgs)
45 if err != nil {
46 return nil, err
47 }
48 args["input"] = arg0
49 return args, nil
50}
51func (ec *executionContext) field_Mutation_bugAddCommentAndClose_argsInput(
52 ctx context.Context,
53 rawArgs map[string]any,
54) (models.BugAddCommentAndCloseInput, error) {
55 if _, ok := rawArgs["input"]; !ok {
56 var zeroVal models.BugAddCommentAndCloseInput
57 return zeroVal, nil
58 }
59
60 ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
61 if tmp, ok := rawArgs["input"]; ok {
62 return ec.unmarshalNBugAddCommentAndCloseInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugAddCommentAndCloseInput(ctx, tmp)
63 }
64
65 var zeroVal models.BugAddCommentAndCloseInput
66 return zeroVal, nil
67}
68
69func (ec *executionContext) field_Mutation_bugAddCommentAndReopen_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
70 var err error
71 args := map[string]any{}
72 arg0, err := ec.field_Mutation_bugAddCommentAndReopen_argsInput(ctx, rawArgs)
73 if err != nil {
74 return nil, err
75 }
76 args["input"] = arg0
77 return args, nil
78}
79func (ec *executionContext) field_Mutation_bugAddCommentAndReopen_argsInput(
80 ctx context.Context,
81 rawArgs map[string]any,
82) (models.BugAddCommentAndReopenInput, error) {
83 if _, ok := rawArgs["input"]; !ok {
84 var zeroVal models.BugAddCommentAndReopenInput
85 return zeroVal, nil
86 }
87
88 ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
89 if tmp, ok := rawArgs["input"]; ok {
90 return ec.unmarshalNBugAddCommentAndReopenInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugAddCommentAndReopenInput(ctx, tmp)
91 }
92
93 var zeroVal models.BugAddCommentAndReopenInput
94 return zeroVal, nil
95}
96
97func (ec *executionContext) field_Mutation_bugAddComment_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
98 var err error
99 args := map[string]any{}
100 arg0, err := ec.field_Mutation_bugAddComment_argsInput(ctx, rawArgs)
101 if err != nil {
102 return nil, err
103 }
104 args["input"] = arg0
105 return args, nil
106}
107func (ec *executionContext) field_Mutation_bugAddComment_argsInput(
108 ctx context.Context,
109 rawArgs map[string]any,
110) (models.BugAddCommentInput, error) {
111 if _, ok := rawArgs["input"]; !ok {
112 var zeroVal models.BugAddCommentInput
113 return zeroVal, nil
114 }
115
116 ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
117 if tmp, ok := rawArgs["input"]; ok {
118 return ec.unmarshalNBugAddCommentInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugAddCommentInput(ctx, tmp)
119 }
120
121 var zeroVal models.BugAddCommentInput
122 return zeroVal, nil
123}
124
125func (ec *executionContext) field_Mutation_bugChangeLabels_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
126 var err error
127 args := map[string]any{}
128 arg0, err := ec.field_Mutation_bugChangeLabels_argsInput(ctx, rawArgs)
129 if err != nil {
130 return nil, err
131 }
132 args["input"] = arg0
133 return args, nil
134}
135func (ec *executionContext) field_Mutation_bugChangeLabels_argsInput(
136 ctx context.Context,
137 rawArgs map[string]any,
138) (*models.BugChangeLabelInput, error) {
139 if _, ok := rawArgs["input"]; !ok {
140 var zeroVal *models.BugChangeLabelInput
141 return zeroVal, nil
142 }
143
144 ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
145 if tmp, ok := rawArgs["input"]; ok {
146 return ec.unmarshalOBugChangeLabelInput2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugChangeLabelInput(ctx, tmp)
147 }
148
149 var zeroVal *models.BugChangeLabelInput
150 return zeroVal, nil
151}
152
153func (ec *executionContext) field_Mutation_bugCreate_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
154 var err error
155 args := map[string]any{}
156 arg0, err := ec.field_Mutation_bugCreate_argsInput(ctx, rawArgs)
157 if err != nil {
158 return nil, err
159 }
160 args["input"] = arg0
161 return args, nil
162}
163func (ec *executionContext) field_Mutation_bugCreate_argsInput(
164 ctx context.Context,
165 rawArgs map[string]any,
166) (models.BugCreateInput, error) {
167 if _, ok := rawArgs["input"]; !ok {
168 var zeroVal models.BugCreateInput
169 return zeroVal, nil
170 }
171
172 ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
173 if tmp, ok := rawArgs["input"]; ok {
174 return ec.unmarshalNBugCreateInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugCreateInput(ctx, tmp)
175 }
176
177 var zeroVal models.BugCreateInput
178 return zeroVal, nil
179}
180
181func (ec *executionContext) field_Mutation_bugEditComment_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
182 var err error
183 args := map[string]any{}
184 arg0, err := ec.field_Mutation_bugEditComment_argsInput(ctx, rawArgs)
185 if err != nil {
186 return nil, err
187 }
188 args["input"] = arg0
189 return args, nil
190}
191func (ec *executionContext) field_Mutation_bugEditComment_argsInput(
192 ctx context.Context,
193 rawArgs map[string]any,
194) (models.BugEditCommentInput, error) {
195 if _, ok := rawArgs["input"]; !ok {
196 var zeroVal models.BugEditCommentInput
197 return zeroVal, nil
198 }
199
200 ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
201 if tmp, ok := rawArgs["input"]; ok {
202 return ec.unmarshalNBugEditCommentInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEditCommentInput(ctx, tmp)
203 }
204
205 var zeroVal models.BugEditCommentInput
206 return zeroVal, nil
207}
208
209func (ec *executionContext) field_Mutation_bugSetTitle_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
210 var err error
211 args := map[string]any{}
212 arg0, err := ec.field_Mutation_bugSetTitle_argsInput(ctx, rawArgs)
213 if err != nil {
214 return nil, err
215 }
216 args["input"] = arg0
217 return args, nil
218}
219func (ec *executionContext) field_Mutation_bugSetTitle_argsInput(
220 ctx context.Context,
221 rawArgs map[string]any,
222) (models.BugSetTitleInput, error) {
223 if _, ok := rawArgs["input"]; !ok {
224 var zeroVal models.BugSetTitleInput
225 return zeroVal, nil
226 }
227
228 ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
229 if tmp, ok := rawArgs["input"]; ok {
230 return ec.unmarshalNBugSetTitleInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugSetTitleInput(ctx, tmp)
231 }
232
233 var zeroVal models.BugSetTitleInput
234 return zeroVal, nil
235}
236
237func (ec *executionContext) field_Mutation_bugStatusClose_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
238 var err error
239 args := map[string]any{}
240 arg0, err := ec.field_Mutation_bugStatusClose_argsInput(ctx, rawArgs)
241 if err != nil {
242 return nil, err
243 }
244 args["input"] = arg0
245 return args, nil
246}
247func (ec *executionContext) field_Mutation_bugStatusClose_argsInput(
248 ctx context.Context,
249 rawArgs map[string]any,
250) (models.BugStatusCloseInput, error) {
251 if _, ok := rawArgs["input"]; !ok {
252 var zeroVal models.BugStatusCloseInput
253 return zeroVal, nil
254 }
255
256 ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
257 if tmp, ok := rawArgs["input"]; ok {
258 return ec.unmarshalNBugStatusCloseInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugStatusCloseInput(ctx, tmp)
259 }
260
261 var zeroVal models.BugStatusCloseInput
262 return zeroVal, nil
263}
264
265func (ec *executionContext) field_Mutation_bugStatusOpen_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
266 var err error
267 args := map[string]any{}
268 arg0, err := ec.field_Mutation_bugStatusOpen_argsInput(ctx, rawArgs)
269 if err != nil {
270 return nil, err
271 }
272 args["input"] = arg0
273 return args, nil
274}
275func (ec *executionContext) field_Mutation_bugStatusOpen_argsInput(
276 ctx context.Context,
277 rawArgs map[string]any,
278) (models.BugStatusOpenInput, error) {
279 if _, ok := rawArgs["input"]; !ok {
280 var zeroVal models.BugStatusOpenInput
281 return zeroVal, nil
282 }
283
284 ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input"))
285 if tmp, ok := rawArgs["input"]; ok {
286 return ec.unmarshalNBugStatusOpenInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugStatusOpenInput(ctx, tmp)
287 }
288
289 var zeroVal models.BugStatusOpenInput
290 return zeroVal, nil
291}
292
293func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
294 var err error
295 args := map[string]any{}
296 arg0, err := ec.field_Query___type_argsName(ctx, rawArgs)
297 if err != nil {
298 return nil, err
299 }
300 args["name"] = arg0
301 return args, nil
302}
303func (ec *executionContext) field_Query___type_argsName(
304 ctx context.Context,
305 rawArgs map[string]any,
306) (string, error) {
307 if _, ok := rawArgs["name"]; !ok {
308 var zeroVal string
309 return zeroVal, nil
310 }
311
312 ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
313 if tmp, ok := rawArgs["name"]; ok {
314 return ec.unmarshalNString2string(ctx, tmp)
315 }
316
317 var zeroVal string
318 return zeroVal, nil
319}
320
321func (ec *executionContext) field_Query_repositories_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
322 var err error
323 args := map[string]any{}
324 arg0, err := ec.field_Query_repositories_argsAfter(ctx, rawArgs)
325 if err != nil {
326 return nil, err
327 }
328 args["after"] = arg0
329 arg1, err := ec.field_Query_repositories_argsBefore(ctx, rawArgs)
330 if err != nil {
331 return nil, err
332 }
333 args["before"] = arg1
334 arg2, err := ec.field_Query_repositories_argsFirst(ctx, rawArgs)
335 if err != nil {
336 return nil, err
337 }
338 args["first"] = arg2
339 arg3, err := ec.field_Query_repositories_argsLast(ctx, rawArgs)
340 if err != nil {
341 return nil, err
342 }
343 args["last"] = arg3
344 return args, nil
345}
346func (ec *executionContext) field_Query_repositories_argsAfter(
347 ctx context.Context,
348 rawArgs map[string]any,
349) (*string, error) {
350 if _, ok := rawArgs["after"]; !ok {
351 var zeroVal *string
352 return zeroVal, nil
353 }
354
355 ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("after"))
356 if tmp, ok := rawArgs["after"]; ok {
357 return ec.unmarshalOString2ᚖstring(ctx, tmp)
358 }
359
360 var zeroVal *string
361 return zeroVal, nil
362}
363
364func (ec *executionContext) field_Query_repositories_argsBefore(
365 ctx context.Context,
366 rawArgs map[string]any,
367) (*string, error) {
368 if _, ok := rawArgs["before"]; !ok {
369 var zeroVal *string
370 return zeroVal, nil
371 }
372
373 ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("before"))
374 if tmp, ok := rawArgs["before"]; ok {
375 return ec.unmarshalOString2ᚖstring(ctx, tmp)
376 }
377
378 var zeroVal *string
379 return zeroVal, nil
380}
381
382func (ec *executionContext) field_Query_repositories_argsFirst(
383 ctx context.Context,
384 rawArgs map[string]any,
385) (*int, error) {
386 if _, ok := rawArgs["first"]; !ok {
387 var zeroVal *int
388 return zeroVal, nil
389 }
390
391 ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("first"))
392 if tmp, ok := rawArgs["first"]; ok {
393 return ec.unmarshalOInt2ᚖint(ctx, tmp)
394 }
395
396 var zeroVal *int
397 return zeroVal, nil
398}
399
400func (ec *executionContext) field_Query_repositories_argsLast(
401 ctx context.Context,
402 rawArgs map[string]any,
403) (*int, error) {
404 if _, ok := rawArgs["last"]; !ok {
405 var zeroVal *int
406 return zeroVal, nil
407 }
408
409 ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("last"))
410 if tmp, ok := rawArgs["last"]; ok {
411 return ec.unmarshalOInt2ᚖint(ctx, tmp)
412 }
413
414 var zeroVal *int
415 return zeroVal, nil
416}
417
418func (ec *executionContext) field_Query_repository_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) {
419 var err error
420 args := map[string]any{}
421 arg0, err := ec.field_Query_repository_argsRef(ctx, rawArgs)
422 if err != nil {
423 return nil, err
424 }
425 args["ref"] = arg0
426 return args, nil
427}
428func (ec *executionContext) field_Query_repository_argsRef(
429 ctx context.Context,
430 rawArgs map[string]any,
431) (*string, error) {
432 if _, ok := rawArgs["ref"]; !ok {
433 var zeroVal *string
434 return zeroVal, nil
435 }
436
437 ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("ref"))
438 if tmp, ok := rawArgs["ref"]; ok {
439 return ec.unmarshalOString2ᚖstring(ctx, tmp)
440 }
441
442 var zeroVal *string
443 return zeroVal, nil
444}
445
446// endregion ***************************** args.gotpl *****************************
447
448// region ************************** directives.gotpl **************************
449
450// endregion ************************** directives.gotpl **************************
451
452// region **************************** field.gotpl *****************************
453
454func (ec *executionContext) _Mutation_bugCreate(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
455 fc, err := ec.fieldContext_Mutation_bugCreate(ctx, field)
456 if err != nil {
457 return graphql.Null
458 }
459 ctx = graphql.WithFieldContext(ctx, fc)
460 defer func() {
461 if r := recover(); r != nil {
462 ec.Error(ctx, ec.Recover(ctx, r))
463 ret = graphql.Null
464 }
465 }()
466 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
467 ctx = rctx // use context from middleware stack in children
468 return ec.resolvers.Mutation().BugCreate(rctx, fc.Args["input"].(models.BugCreateInput))
469 })
470 if err != nil {
471 ec.Error(ctx, err)
472 return graphql.Null
473 }
474 if resTmp == nil {
475 if !graphql.HasFieldError(ctx, fc) {
476 ec.Errorf(ctx, "must not be null")
477 }
478 return graphql.Null
479 }
480 res := resTmp.(*models.BugCreatePayload)
481 fc.Result = res
482 return ec.marshalNBugCreatePayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugCreatePayload(ctx, field.Selections, res)
483}
484
485func (ec *executionContext) fieldContext_Mutation_bugCreate(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
486 fc = &graphql.FieldContext{
487 Object: "Mutation",
488 Field: field,
489 IsMethod: true,
490 IsResolver: true,
491 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
492 switch field.Name {
493 case "clientMutationId":
494 return ec.fieldContext_BugCreatePayload_clientMutationId(ctx, field)
495 case "bug":
496 return ec.fieldContext_BugCreatePayload_bug(ctx, field)
497 case "operation":
498 return ec.fieldContext_BugCreatePayload_operation(ctx, field)
499 }
500 return nil, fmt.Errorf("no field named %q was found under type BugCreatePayload", field.Name)
501 },
502 }
503 defer func() {
504 if r := recover(); r != nil {
505 err = ec.Recover(ctx, r)
506 ec.Error(ctx, err)
507 }
508 }()
509 ctx = graphql.WithFieldContext(ctx, fc)
510 if fc.Args, err = ec.field_Mutation_bugCreate_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
511 ec.Error(ctx, err)
512 return fc, err
513 }
514 return fc, nil
515}
516
517func (ec *executionContext) _Mutation_bugAddComment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
518 fc, err := ec.fieldContext_Mutation_bugAddComment(ctx, field)
519 if err != nil {
520 return graphql.Null
521 }
522 ctx = graphql.WithFieldContext(ctx, fc)
523 defer func() {
524 if r := recover(); r != nil {
525 ec.Error(ctx, ec.Recover(ctx, r))
526 ret = graphql.Null
527 }
528 }()
529 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
530 ctx = rctx // use context from middleware stack in children
531 return ec.resolvers.Mutation().BugAddComment(rctx, fc.Args["input"].(models.BugAddCommentInput))
532 })
533 if err != nil {
534 ec.Error(ctx, err)
535 return graphql.Null
536 }
537 if resTmp == nil {
538 if !graphql.HasFieldError(ctx, fc) {
539 ec.Errorf(ctx, "must not be null")
540 }
541 return graphql.Null
542 }
543 res := resTmp.(*models.BugAddCommentPayload)
544 fc.Result = res
545 return ec.marshalNBugAddCommentPayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugAddCommentPayload(ctx, field.Selections, res)
546}
547
548func (ec *executionContext) fieldContext_Mutation_bugAddComment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
549 fc = &graphql.FieldContext{
550 Object: "Mutation",
551 Field: field,
552 IsMethod: true,
553 IsResolver: true,
554 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
555 switch field.Name {
556 case "clientMutationId":
557 return ec.fieldContext_BugAddCommentPayload_clientMutationId(ctx, field)
558 case "bug":
559 return ec.fieldContext_BugAddCommentPayload_bug(ctx, field)
560 case "operation":
561 return ec.fieldContext_BugAddCommentPayload_operation(ctx, field)
562 }
563 return nil, fmt.Errorf("no field named %q was found under type BugAddCommentPayload", field.Name)
564 },
565 }
566 defer func() {
567 if r := recover(); r != nil {
568 err = ec.Recover(ctx, r)
569 ec.Error(ctx, err)
570 }
571 }()
572 ctx = graphql.WithFieldContext(ctx, fc)
573 if fc.Args, err = ec.field_Mutation_bugAddComment_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
574 ec.Error(ctx, err)
575 return fc, err
576 }
577 return fc, nil
578}
579
580func (ec *executionContext) _Mutation_bugAddCommentAndClose(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
581 fc, err := ec.fieldContext_Mutation_bugAddCommentAndClose(ctx, field)
582 if err != nil {
583 return graphql.Null
584 }
585 ctx = graphql.WithFieldContext(ctx, fc)
586 defer func() {
587 if r := recover(); r != nil {
588 ec.Error(ctx, ec.Recover(ctx, r))
589 ret = graphql.Null
590 }
591 }()
592 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
593 ctx = rctx // use context from middleware stack in children
594 return ec.resolvers.Mutation().BugAddCommentAndClose(rctx, fc.Args["input"].(models.BugAddCommentAndCloseInput))
595 })
596 if err != nil {
597 ec.Error(ctx, err)
598 return graphql.Null
599 }
600 if resTmp == nil {
601 if !graphql.HasFieldError(ctx, fc) {
602 ec.Errorf(ctx, "must not be null")
603 }
604 return graphql.Null
605 }
606 res := resTmp.(*models.BugAddCommentAndClosePayload)
607 fc.Result = res
608 return ec.marshalNBugAddCommentAndClosePayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugAddCommentAndClosePayload(ctx, field.Selections, res)
609}
610
611func (ec *executionContext) fieldContext_Mutation_bugAddCommentAndClose(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
612 fc = &graphql.FieldContext{
613 Object: "Mutation",
614 Field: field,
615 IsMethod: true,
616 IsResolver: true,
617 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
618 switch field.Name {
619 case "clientMutationId":
620 return ec.fieldContext_BugAddCommentAndClosePayload_clientMutationId(ctx, field)
621 case "bug":
622 return ec.fieldContext_BugAddCommentAndClosePayload_bug(ctx, field)
623 case "commentOperation":
624 return ec.fieldContext_BugAddCommentAndClosePayload_commentOperation(ctx, field)
625 case "statusOperation":
626 return ec.fieldContext_BugAddCommentAndClosePayload_statusOperation(ctx, field)
627 }
628 return nil, fmt.Errorf("no field named %q was found under type BugAddCommentAndClosePayload", field.Name)
629 },
630 }
631 defer func() {
632 if r := recover(); r != nil {
633 err = ec.Recover(ctx, r)
634 ec.Error(ctx, err)
635 }
636 }()
637 ctx = graphql.WithFieldContext(ctx, fc)
638 if fc.Args, err = ec.field_Mutation_bugAddCommentAndClose_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
639 ec.Error(ctx, err)
640 return fc, err
641 }
642 return fc, nil
643}
644
645func (ec *executionContext) _Mutation_bugAddCommentAndReopen(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
646 fc, err := ec.fieldContext_Mutation_bugAddCommentAndReopen(ctx, field)
647 if err != nil {
648 return graphql.Null
649 }
650 ctx = graphql.WithFieldContext(ctx, fc)
651 defer func() {
652 if r := recover(); r != nil {
653 ec.Error(ctx, ec.Recover(ctx, r))
654 ret = graphql.Null
655 }
656 }()
657 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
658 ctx = rctx // use context from middleware stack in children
659 return ec.resolvers.Mutation().BugAddCommentAndReopen(rctx, fc.Args["input"].(models.BugAddCommentAndReopenInput))
660 })
661 if err != nil {
662 ec.Error(ctx, err)
663 return graphql.Null
664 }
665 if resTmp == nil {
666 if !graphql.HasFieldError(ctx, fc) {
667 ec.Errorf(ctx, "must not be null")
668 }
669 return graphql.Null
670 }
671 res := resTmp.(*models.BugAddCommentAndReopenPayload)
672 fc.Result = res
673 return ec.marshalNBugAddCommentAndReopenPayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugAddCommentAndReopenPayload(ctx, field.Selections, res)
674}
675
676func (ec *executionContext) fieldContext_Mutation_bugAddCommentAndReopen(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
677 fc = &graphql.FieldContext{
678 Object: "Mutation",
679 Field: field,
680 IsMethod: true,
681 IsResolver: true,
682 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
683 switch field.Name {
684 case "clientMutationId":
685 return ec.fieldContext_BugAddCommentAndReopenPayload_clientMutationId(ctx, field)
686 case "bug":
687 return ec.fieldContext_BugAddCommentAndReopenPayload_bug(ctx, field)
688 case "commentOperation":
689 return ec.fieldContext_BugAddCommentAndReopenPayload_commentOperation(ctx, field)
690 case "statusOperation":
691 return ec.fieldContext_BugAddCommentAndReopenPayload_statusOperation(ctx, field)
692 }
693 return nil, fmt.Errorf("no field named %q was found under type BugAddCommentAndReopenPayload", field.Name)
694 },
695 }
696 defer func() {
697 if r := recover(); r != nil {
698 err = ec.Recover(ctx, r)
699 ec.Error(ctx, err)
700 }
701 }()
702 ctx = graphql.WithFieldContext(ctx, fc)
703 if fc.Args, err = ec.field_Mutation_bugAddCommentAndReopen_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
704 ec.Error(ctx, err)
705 return fc, err
706 }
707 return fc, nil
708}
709
710func (ec *executionContext) _Mutation_bugEditComment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
711 fc, err := ec.fieldContext_Mutation_bugEditComment(ctx, field)
712 if err != nil {
713 return graphql.Null
714 }
715 ctx = graphql.WithFieldContext(ctx, fc)
716 defer func() {
717 if r := recover(); r != nil {
718 ec.Error(ctx, ec.Recover(ctx, r))
719 ret = graphql.Null
720 }
721 }()
722 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
723 ctx = rctx // use context from middleware stack in children
724 return ec.resolvers.Mutation().BugEditComment(rctx, fc.Args["input"].(models.BugEditCommentInput))
725 })
726 if err != nil {
727 ec.Error(ctx, err)
728 return graphql.Null
729 }
730 if resTmp == nil {
731 if !graphql.HasFieldError(ctx, fc) {
732 ec.Errorf(ctx, "must not be null")
733 }
734 return graphql.Null
735 }
736 res := resTmp.(*models.BugEditCommentPayload)
737 fc.Result = res
738 return ec.marshalNBugEditCommentPayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEditCommentPayload(ctx, field.Selections, res)
739}
740
741func (ec *executionContext) fieldContext_Mutation_bugEditComment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
742 fc = &graphql.FieldContext{
743 Object: "Mutation",
744 Field: field,
745 IsMethod: true,
746 IsResolver: true,
747 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
748 switch field.Name {
749 case "clientMutationId":
750 return ec.fieldContext_BugEditCommentPayload_clientMutationId(ctx, field)
751 case "bug":
752 return ec.fieldContext_BugEditCommentPayload_bug(ctx, field)
753 case "operation":
754 return ec.fieldContext_BugEditCommentPayload_operation(ctx, field)
755 }
756 return nil, fmt.Errorf("no field named %q was found under type BugEditCommentPayload", field.Name)
757 },
758 }
759 defer func() {
760 if r := recover(); r != nil {
761 err = ec.Recover(ctx, r)
762 ec.Error(ctx, err)
763 }
764 }()
765 ctx = graphql.WithFieldContext(ctx, fc)
766 if fc.Args, err = ec.field_Mutation_bugEditComment_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
767 ec.Error(ctx, err)
768 return fc, err
769 }
770 return fc, nil
771}
772
773func (ec *executionContext) _Mutation_bugChangeLabels(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
774 fc, err := ec.fieldContext_Mutation_bugChangeLabels(ctx, field)
775 if err != nil {
776 return graphql.Null
777 }
778 ctx = graphql.WithFieldContext(ctx, fc)
779 defer func() {
780 if r := recover(); r != nil {
781 ec.Error(ctx, ec.Recover(ctx, r))
782 ret = graphql.Null
783 }
784 }()
785 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
786 ctx = rctx // use context from middleware stack in children
787 return ec.resolvers.Mutation().BugChangeLabels(rctx, fc.Args["input"].(*models.BugChangeLabelInput))
788 })
789 if err != nil {
790 ec.Error(ctx, err)
791 return graphql.Null
792 }
793 if resTmp == nil {
794 if !graphql.HasFieldError(ctx, fc) {
795 ec.Errorf(ctx, "must not be null")
796 }
797 return graphql.Null
798 }
799 res := resTmp.(*models.BugChangeLabelPayload)
800 fc.Result = res
801 return ec.marshalNBugChangeLabelPayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugChangeLabelPayload(ctx, field.Selections, res)
802}
803
804func (ec *executionContext) fieldContext_Mutation_bugChangeLabels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
805 fc = &graphql.FieldContext{
806 Object: "Mutation",
807 Field: field,
808 IsMethod: true,
809 IsResolver: true,
810 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
811 switch field.Name {
812 case "clientMutationId":
813 return ec.fieldContext_BugChangeLabelPayload_clientMutationId(ctx, field)
814 case "bug":
815 return ec.fieldContext_BugChangeLabelPayload_bug(ctx, field)
816 case "operation":
817 return ec.fieldContext_BugChangeLabelPayload_operation(ctx, field)
818 case "results":
819 return ec.fieldContext_BugChangeLabelPayload_results(ctx, field)
820 }
821 return nil, fmt.Errorf("no field named %q was found under type BugChangeLabelPayload", field.Name)
822 },
823 }
824 defer func() {
825 if r := recover(); r != nil {
826 err = ec.Recover(ctx, r)
827 ec.Error(ctx, err)
828 }
829 }()
830 ctx = graphql.WithFieldContext(ctx, fc)
831 if fc.Args, err = ec.field_Mutation_bugChangeLabels_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
832 ec.Error(ctx, err)
833 return fc, err
834 }
835 return fc, nil
836}
837
838func (ec *executionContext) _Mutation_bugStatusOpen(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
839 fc, err := ec.fieldContext_Mutation_bugStatusOpen(ctx, field)
840 if err != nil {
841 return graphql.Null
842 }
843 ctx = graphql.WithFieldContext(ctx, fc)
844 defer func() {
845 if r := recover(); r != nil {
846 ec.Error(ctx, ec.Recover(ctx, r))
847 ret = graphql.Null
848 }
849 }()
850 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
851 ctx = rctx // use context from middleware stack in children
852 return ec.resolvers.Mutation().BugStatusOpen(rctx, fc.Args["input"].(models.BugStatusOpenInput))
853 })
854 if err != nil {
855 ec.Error(ctx, err)
856 return graphql.Null
857 }
858 if resTmp == nil {
859 if !graphql.HasFieldError(ctx, fc) {
860 ec.Errorf(ctx, "must not be null")
861 }
862 return graphql.Null
863 }
864 res := resTmp.(*models.BugStatusOpenPayload)
865 fc.Result = res
866 return ec.marshalNBugStatusOpenPayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugStatusOpenPayload(ctx, field.Selections, res)
867}
868
869func (ec *executionContext) fieldContext_Mutation_bugStatusOpen(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
870 fc = &graphql.FieldContext{
871 Object: "Mutation",
872 Field: field,
873 IsMethod: true,
874 IsResolver: true,
875 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
876 switch field.Name {
877 case "clientMutationId":
878 return ec.fieldContext_BugStatusOpenPayload_clientMutationId(ctx, field)
879 case "bug":
880 return ec.fieldContext_BugStatusOpenPayload_bug(ctx, field)
881 case "operation":
882 return ec.fieldContext_BugStatusOpenPayload_operation(ctx, field)
883 }
884 return nil, fmt.Errorf("no field named %q was found under type BugStatusOpenPayload", field.Name)
885 },
886 }
887 defer func() {
888 if r := recover(); r != nil {
889 err = ec.Recover(ctx, r)
890 ec.Error(ctx, err)
891 }
892 }()
893 ctx = graphql.WithFieldContext(ctx, fc)
894 if fc.Args, err = ec.field_Mutation_bugStatusOpen_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
895 ec.Error(ctx, err)
896 return fc, err
897 }
898 return fc, nil
899}
900
901func (ec *executionContext) _Mutation_bugStatusClose(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
902 fc, err := ec.fieldContext_Mutation_bugStatusClose(ctx, field)
903 if err != nil {
904 return graphql.Null
905 }
906 ctx = graphql.WithFieldContext(ctx, fc)
907 defer func() {
908 if r := recover(); r != nil {
909 ec.Error(ctx, ec.Recover(ctx, r))
910 ret = graphql.Null
911 }
912 }()
913 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
914 ctx = rctx // use context from middleware stack in children
915 return ec.resolvers.Mutation().BugStatusClose(rctx, fc.Args["input"].(models.BugStatusCloseInput))
916 })
917 if err != nil {
918 ec.Error(ctx, err)
919 return graphql.Null
920 }
921 if resTmp == nil {
922 if !graphql.HasFieldError(ctx, fc) {
923 ec.Errorf(ctx, "must not be null")
924 }
925 return graphql.Null
926 }
927 res := resTmp.(*models.BugStatusClosePayload)
928 fc.Result = res
929 return ec.marshalNBugStatusClosePayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugStatusClosePayload(ctx, field.Selections, res)
930}
931
932func (ec *executionContext) fieldContext_Mutation_bugStatusClose(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
933 fc = &graphql.FieldContext{
934 Object: "Mutation",
935 Field: field,
936 IsMethod: true,
937 IsResolver: true,
938 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
939 switch field.Name {
940 case "clientMutationId":
941 return ec.fieldContext_BugStatusClosePayload_clientMutationId(ctx, field)
942 case "bug":
943 return ec.fieldContext_BugStatusClosePayload_bug(ctx, field)
944 case "operation":
945 return ec.fieldContext_BugStatusClosePayload_operation(ctx, field)
946 }
947 return nil, fmt.Errorf("no field named %q was found under type BugStatusClosePayload", field.Name)
948 },
949 }
950 defer func() {
951 if r := recover(); r != nil {
952 err = ec.Recover(ctx, r)
953 ec.Error(ctx, err)
954 }
955 }()
956 ctx = graphql.WithFieldContext(ctx, fc)
957 if fc.Args, err = ec.field_Mutation_bugStatusClose_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
958 ec.Error(ctx, err)
959 return fc, err
960 }
961 return fc, nil
962}
963
964func (ec *executionContext) _Mutation_bugSetTitle(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
965 fc, err := ec.fieldContext_Mutation_bugSetTitle(ctx, field)
966 if err != nil {
967 return graphql.Null
968 }
969 ctx = graphql.WithFieldContext(ctx, fc)
970 defer func() {
971 if r := recover(); r != nil {
972 ec.Error(ctx, ec.Recover(ctx, r))
973 ret = graphql.Null
974 }
975 }()
976 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
977 ctx = rctx // use context from middleware stack in children
978 return ec.resolvers.Mutation().BugSetTitle(rctx, fc.Args["input"].(models.BugSetTitleInput))
979 })
980 if err != nil {
981 ec.Error(ctx, err)
982 return graphql.Null
983 }
984 if resTmp == nil {
985 if !graphql.HasFieldError(ctx, fc) {
986 ec.Errorf(ctx, "must not be null")
987 }
988 return graphql.Null
989 }
990 res := resTmp.(*models.BugSetTitlePayload)
991 fc.Result = res
992 return ec.marshalNBugSetTitlePayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugSetTitlePayload(ctx, field.Selections, res)
993}
994
995func (ec *executionContext) fieldContext_Mutation_bugSetTitle(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
996 fc = &graphql.FieldContext{
997 Object: "Mutation",
998 Field: field,
999 IsMethod: true,
1000 IsResolver: true,
1001 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1002 switch field.Name {
1003 case "clientMutationId":
1004 return ec.fieldContext_BugSetTitlePayload_clientMutationId(ctx, field)
1005 case "bug":
1006 return ec.fieldContext_BugSetTitlePayload_bug(ctx, field)
1007 case "operation":
1008 return ec.fieldContext_BugSetTitlePayload_operation(ctx, field)
1009 }
1010 return nil, fmt.Errorf("no field named %q was found under type BugSetTitlePayload", field.Name)
1011 },
1012 }
1013 defer func() {
1014 if r := recover(); r != nil {
1015 err = ec.Recover(ctx, r)
1016 ec.Error(ctx, err)
1017 }
1018 }()
1019 ctx = graphql.WithFieldContext(ctx, fc)
1020 if fc.Args, err = ec.field_Mutation_bugSetTitle_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
1021 ec.Error(ctx, err)
1022 return fc, err
1023 }
1024 return fc, nil
1025}
1026
1027func (ec *executionContext) _Query_serverConfig(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
1028 fc, err := ec.fieldContext_Query_serverConfig(ctx, field)
1029 if err != nil {
1030 return graphql.Null
1031 }
1032 ctx = graphql.WithFieldContext(ctx, fc)
1033 defer func() {
1034 if r := recover(); r != nil {
1035 ec.Error(ctx, ec.Recover(ctx, r))
1036 ret = graphql.Null
1037 }
1038 }()
1039 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
1040 ctx = rctx // use context from middleware stack in children
1041 return ec.resolvers.Query().ServerConfig(rctx)
1042 })
1043 if err != nil {
1044 ec.Error(ctx, err)
1045 return graphql.Null
1046 }
1047 if resTmp == nil {
1048 if !graphql.HasFieldError(ctx, fc) {
1049 ec.Errorf(ctx, "must not be null")
1050 }
1051 return graphql.Null
1052 }
1053 res := resTmp.(*models.ServerConfig)
1054 fc.Result = res
1055 return ec.marshalNServerConfig2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐServerConfig(ctx, field.Selections, res)
1056}
1057
1058func (ec *executionContext) fieldContext_Query_serverConfig(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1059 fc = &graphql.FieldContext{
1060 Object: "Query",
1061 Field: field,
1062 IsMethod: true,
1063 IsResolver: true,
1064 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1065 switch field.Name {
1066 case "authMode":
1067 return ec.fieldContext_ServerConfig_authMode(ctx, field)
1068 case "oauthProviders":
1069 return ec.fieldContext_ServerConfig_oauthProviders(ctx, field)
1070 }
1071 return nil, fmt.Errorf("no field named %q was found under type ServerConfig", field.Name)
1072 },
1073 }
1074 return fc, nil
1075}
1076
1077func (ec *executionContext) _Query_repository(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
1078 fc, err := ec.fieldContext_Query_repository(ctx, field)
1079 if err != nil {
1080 return graphql.Null
1081 }
1082 ctx = graphql.WithFieldContext(ctx, fc)
1083 defer func() {
1084 if r := recover(); r != nil {
1085 ec.Error(ctx, ec.Recover(ctx, r))
1086 ret = graphql.Null
1087 }
1088 }()
1089 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
1090 ctx = rctx // use context from middleware stack in children
1091 return ec.resolvers.Query().Repository(rctx, fc.Args["ref"].(*string))
1092 })
1093 if err != nil {
1094 ec.Error(ctx, err)
1095 return graphql.Null
1096 }
1097 if resTmp == nil {
1098 return graphql.Null
1099 }
1100 res := resTmp.(*models.Repository)
1101 fc.Result = res
1102 return ec.marshalORepository2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐRepository(ctx, field.Selections, res)
1103}
1104
1105func (ec *executionContext) fieldContext_Query_repository(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1106 fc = &graphql.FieldContext{
1107 Object: "Query",
1108 Field: field,
1109 IsMethod: true,
1110 IsResolver: true,
1111 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1112 switch field.Name {
1113 case "name":
1114 return ec.fieldContext_Repository_name(ctx, field)
1115 case "allBugs":
1116 return ec.fieldContext_Repository_allBugs(ctx, field)
1117 case "bug":
1118 return ec.fieldContext_Repository_bug(ctx, field)
1119 case "allIdentities":
1120 return ec.fieldContext_Repository_allIdentities(ctx, field)
1121 case "identity":
1122 return ec.fieldContext_Repository_identity(ctx, field)
1123 case "userIdentity":
1124 return ec.fieldContext_Repository_userIdentity(ctx, field)
1125 case "validLabels":
1126 return ec.fieldContext_Repository_validLabels(ctx, field)
1127 }
1128 return nil, fmt.Errorf("no field named %q was found under type Repository", field.Name)
1129 },
1130 }
1131 defer func() {
1132 if r := recover(); r != nil {
1133 err = ec.Recover(ctx, r)
1134 ec.Error(ctx, err)
1135 }
1136 }()
1137 ctx = graphql.WithFieldContext(ctx, fc)
1138 if fc.Args, err = ec.field_Query_repository_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
1139 ec.Error(ctx, err)
1140 return fc, err
1141 }
1142 return fc, nil
1143}
1144
1145func (ec *executionContext) _Query_repositories(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
1146 fc, err := ec.fieldContext_Query_repositories(ctx, field)
1147 if err != nil {
1148 return graphql.Null
1149 }
1150 ctx = graphql.WithFieldContext(ctx, fc)
1151 defer func() {
1152 if r := recover(); r != nil {
1153 ec.Error(ctx, ec.Recover(ctx, r))
1154 ret = graphql.Null
1155 }
1156 }()
1157 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
1158 ctx = rctx // use context from middleware stack in children
1159 return ec.resolvers.Query().Repositories(rctx, fc.Args["after"].(*string), fc.Args["before"].(*string), fc.Args["first"].(*int), fc.Args["last"].(*int))
1160 })
1161 if err != nil {
1162 ec.Error(ctx, err)
1163 return graphql.Null
1164 }
1165 if resTmp == nil {
1166 if !graphql.HasFieldError(ctx, fc) {
1167 ec.Errorf(ctx, "must not be null")
1168 }
1169 return graphql.Null
1170 }
1171 res := resTmp.(*models.RepositoryConnection)
1172 fc.Result = res
1173 return ec.marshalNRepositoryConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐRepositoryConnection(ctx, field.Selections, res)
1174}
1175
1176func (ec *executionContext) fieldContext_Query_repositories(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1177 fc = &graphql.FieldContext{
1178 Object: "Query",
1179 Field: field,
1180 IsMethod: true,
1181 IsResolver: true,
1182 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1183 switch field.Name {
1184 case "edges":
1185 return ec.fieldContext_RepositoryConnection_edges(ctx, field)
1186 case "nodes":
1187 return ec.fieldContext_RepositoryConnection_nodes(ctx, field)
1188 case "pageInfo":
1189 return ec.fieldContext_RepositoryConnection_pageInfo(ctx, field)
1190 case "totalCount":
1191 return ec.fieldContext_RepositoryConnection_totalCount(ctx, field)
1192 }
1193 return nil, fmt.Errorf("no field named %q was found under type RepositoryConnection", field.Name)
1194 },
1195 }
1196 defer func() {
1197 if r := recover(); r != nil {
1198 err = ec.Recover(ctx, r)
1199 ec.Error(ctx, err)
1200 }
1201 }()
1202 ctx = graphql.WithFieldContext(ctx, fc)
1203 if fc.Args, err = ec.field_Query_repositories_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
1204 ec.Error(ctx, err)
1205 return fc, err
1206 }
1207 return fc, nil
1208}
1209
1210func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
1211 fc, err := ec.fieldContext_Query___type(ctx, field)
1212 if err != nil {
1213 return graphql.Null
1214 }
1215 ctx = graphql.WithFieldContext(ctx, fc)
1216 defer func() {
1217 if r := recover(); r != nil {
1218 ec.Error(ctx, ec.Recover(ctx, r))
1219 ret = graphql.Null
1220 }
1221 }()
1222 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
1223 ctx = rctx // use context from middleware stack in children
1224 return ec.introspectType(fc.Args["name"].(string))
1225 })
1226 if err != nil {
1227 ec.Error(ctx, err)
1228 return graphql.Null
1229 }
1230 if resTmp == nil {
1231 return graphql.Null
1232 }
1233 res := resTmp.(*introspection.Type)
1234 fc.Result = res
1235 return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
1236}
1237
1238func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1239 fc = &graphql.FieldContext{
1240 Object: "Query",
1241 Field: field,
1242 IsMethod: true,
1243 IsResolver: false,
1244 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1245 switch field.Name {
1246 case "kind":
1247 return ec.fieldContext___Type_kind(ctx, field)
1248 case "name":
1249 return ec.fieldContext___Type_name(ctx, field)
1250 case "description":
1251 return ec.fieldContext___Type_description(ctx, field)
1252 case "specifiedByURL":
1253 return ec.fieldContext___Type_specifiedByURL(ctx, field)
1254 case "fields":
1255 return ec.fieldContext___Type_fields(ctx, field)
1256 case "interfaces":
1257 return ec.fieldContext___Type_interfaces(ctx, field)
1258 case "possibleTypes":
1259 return ec.fieldContext___Type_possibleTypes(ctx, field)
1260 case "enumValues":
1261 return ec.fieldContext___Type_enumValues(ctx, field)
1262 case "inputFields":
1263 return ec.fieldContext___Type_inputFields(ctx, field)
1264 case "ofType":
1265 return ec.fieldContext___Type_ofType(ctx, field)
1266 case "isOneOf":
1267 return ec.fieldContext___Type_isOneOf(ctx, field)
1268 }
1269 return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
1270 },
1271 }
1272 defer func() {
1273 if r := recover(); r != nil {
1274 err = ec.Recover(ctx, r)
1275 ec.Error(ctx, err)
1276 }
1277 }()
1278 ctx = graphql.WithFieldContext(ctx, fc)
1279 if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
1280 ec.Error(ctx, err)
1281 return fc, err
1282 }
1283 return fc, nil
1284}
1285
1286func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
1287 fc, err := ec.fieldContext_Query___schema(ctx, field)
1288 if err != nil {
1289 return graphql.Null
1290 }
1291 ctx = graphql.WithFieldContext(ctx, fc)
1292 defer func() {
1293 if r := recover(); r != nil {
1294 ec.Error(ctx, ec.Recover(ctx, r))
1295 ret = graphql.Null
1296 }
1297 }()
1298 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
1299 ctx = rctx // use context from middleware stack in children
1300 return ec.introspectSchema()
1301 })
1302 if err != nil {
1303 ec.Error(ctx, err)
1304 return graphql.Null
1305 }
1306 if resTmp == nil {
1307 return graphql.Null
1308 }
1309 res := resTmp.(*introspection.Schema)
1310 fc.Result = res
1311 return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res)
1312}
1313
1314func (ec *executionContext) fieldContext_Query___schema(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1315 fc = &graphql.FieldContext{
1316 Object: "Query",
1317 Field: field,
1318 IsMethod: true,
1319 IsResolver: false,
1320 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1321 switch field.Name {
1322 case "description":
1323 return ec.fieldContext___Schema_description(ctx, field)
1324 case "types":
1325 return ec.fieldContext___Schema_types(ctx, field)
1326 case "queryType":
1327 return ec.fieldContext___Schema_queryType(ctx, field)
1328 case "mutationType":
1329 return ec.fieldContext___Schema_mutationType(ctx, field)
1330 case "subscriptionType":
1331 return ec.fieldContext___Schema_subscriptionType(ctx, field)
1332 case "directives":
1333 return ec.fieldContext___Schema_directives(ctx, field)
1334 }
1335 return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name)
1336 },
1337 }
1338 return fc, nil
1339}
1340
1341func (ec *executionContext) _ServerConfig_authMode(ctx context.Context, field graphql.CollectedField, obj *models.ServerConfig) (ret graphql.Marshaler) {
1342 fc, err := ec.fieldContext_ServerConfig_authMode(ctx, field)
1343 if err != nil {
1344 return graphql.Null
1345 }
1346 ctx = graphql.WithFieldContext(ctx, fc)
1347 defer func() {
1348 if r := recover(); r != nil {
1349 ec.Error(ctx, ec.Recover(ctx, r))
1350 ret = graphql.Null
1351 }
1352 }()
1353 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
1354 ctx = rctx // use context from middleware stack in children
1355 return obj.AuthMode, nil
1356 })
1357 if err != nil {
1358 ec.Error(ctx, err)
1359 return graphql.Null
1360 }
1361 if resTmp == nil {
1362 if !graphql.HasFieldError(ctx, fc) {
1363 ec.Errorf(ctx, "must not be null")
1364 }
1365 return graphql.Null
1366 }
1367 res := resTmp.(string)
1368 fc.Result = res
1369 return ec.marshalNString2string(ctx, field.Selections, res)
1370}
1371
1372func (ec *executionContext) fieldContext_ServerConfig_authMode(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1373 fc = &graphql.FieldContext{
1374 Object: "ServerConfig",
1375 Field: field,
1376 IsMethod: false,
1377 IsResolver: false,
1378 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1379 return nil, errors.New("field of type String does not have child fields")
1380 },
1381 }
1382 return fc, nil
1383}
1384
1385func (ec *executionContext) _ServerConfig_oauthProviders(ctx context.Context, field graphql.CollectedField, obj *models.ServerConfig) (ret graphql.Marshaler) {
1386 fc, err := ec.fieldContext_ServerConfig_oauthProviders(ctx, field)
1387 if err != nil {
1388 return graphql.Null
1389 }
1390 ctx = graphql.WithFieldContext(ctx, fc)
1391 defer func() {
1392 if r := recover(); r != nil {
1393 ec.Error(ctx, ec.Recover(ctx, r))
1394 ret = graphql.Null
1395 }
1396 }()
1397 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) {
1398 ctx = rctx // use context from middleware stack in children
1399 return obj.OauthProviders, nil
1400 })
1401 if err != nil {
1402 ec.Error(ctx, err)
1403 return graphql.Null
1404 }
1405 if resTmp == nil {
1406 if !graphql.HasFieldError(ctx, fc) {
1407 ec.Errorf(ctx, "must not be null")
1408 }
1409 return graphql.Null
1410 }
1411 res := resTmp.([]string)
1412 fc.Result = res
1413 return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res)
1414}
1415
1416func (ec *executionContext) fieldContext_ServerConfig_oauthProviders(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
1417 fc = &graphql.FieldContext{
1418 Object: "ServerConfig",
1419 Field: field,
1420 IsMethod: false,
1421 IsResolver: false,
1422 Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
1423 return nil, errors.New("field of type String does not have child fields")
1424 },
1425 }
1426 return fc, nil
1427}
1428
1429// endregion **************************** field.gotpl *****************************
1430
1431// region **************************** input.gotpl *****************************
1432
1433// endregion **************************** input.gotpl *****************************
1434
1435// region ************************** interface.gotpl ***************************
1436
1437// endregion ************************** interface.gotpl ***************************
1438
1439// region **************************** object.gotpl ****************************
1440
1441var mutationImplementors = []string{"Mutation"}
1442
1443func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
1444 fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors)
1445 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
1446 Object: "Mutation",
1447 })
1448
1449 out := graphql.NewFieldSet(fields)
1450 deferred := make(map[string]*graphql.FieldSet)
1451 for i, field := range fields {
1452 innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
1453 Object: field.Name,
1454 Field: field,
1455 })
1456
1457 switch field.Name {
1458 case "__typename":
1459 out.Values[i] = graphql.MarshalString("Mutation")
1460 case "bugCreate":
1461 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
1462 return ec._Mutation_bugCreate(ctx, field)
1463 })
1464 if out.Values[i] == graphql.Null {
1465 out.Invalids++
1466 }
1467 case "bugAddComment":
1468 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
1469 return ec._Mutation_bugAddComment(ctx, field)
1470 })
1471 if out.Values[i] == graphql.Null {
1472 out.Invalids++
1473 }
1474 case "bugAddCommentAndClose":
1475 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
1476 return ec._Mutation_bugAddCommentAndClose(ctx, field)
1477 })
1478 if out.Values[i] == graphql.Null {
1479 out.Invalids++
1480 }
1481 case "bugAddCommentAndReopen":
1482 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
1483 return ec._Mutation_bugAddCommentAndReopen(ctx, field)
1484 })
1485 if out.Values[i] == graphql.Null {
1486 out.Invalids++
1487 }
1488 case "bugEditComment":
1489 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
1490 return ec._Mutation_bugEditComment(ctx, field)
1491 })
1492 if out.Values[i] == graphql.Null {
1493 out.Invalids++
1494 }
1495 case "bugChangeLabels":
1496 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
1497 return ec._Mutation_bugChangeLabels(ctx, field)
1498 })
1499 if out.Values[i] == graphql.Null {
1500 out.Invalids++
1501 }
1502 case "bugStatusOpen":
1503 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
1504 return ec._Mutation_bugStatusOpen(ctx, field)
1505 })
1506 if out.Values[i] == graphql.Null {
1507 out.Invalids++
1508 }
1509 case "bugStatusClose":
1510 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
1511 return ec._Mutation_bugStatusClose(ctx, field)
1512 })
1513 if out.Values[i] == graphql.Null {
1514 out.Invalids++
1515 }
1516 case "bugSetTitle":
1517 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
1518 return ec._Mutation_bugSetTitle(ctx, field)
1519 })
1520 if out.Values[i] == graphql.Null {
1521 out.Invalids++
1522 }
1523 default:
1524 panic("unknown field " + strconv.Quote(field.Name))
1525 }
1526 }
1527 out.Dispatch(ctx)
1528 if out.Invalids > 0 {
1529 return graphql.Null
1530 }
1531
1532 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
1533
1534 for label, dfs := range deferred {
1535 ec.processDeferredGroup(graphql.DeferredGroup{
1536 Label: label,
1537 Path: graphql.GetPath(ctx),
1538 FieldSet: dfs,
1539 Context: ctx,
1540 })
1541 }
1542
1543 return out
1544}
1545
1546var queryImplementors = []string{"Query"}
1547
1548func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
1549 fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
1550 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
1551 Object: "Query",
1552 })
1553
1554 out := graphql.NewFieldSet(fields)
1555 deferred := make(map[string]*graphql.FieldSet)
1556 for i, field := range fields {
1557 innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
1558 Object: field.Name,
1559 Field: field,
1560 })
1561
1562 switch field.Name {
1563 case "__typename":
1564 out.Values[i] = graphql.MarshalString("Query")
1565 case "serverConfig":
1566 field := field
1567
1568 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
1569 defer func() {
1570 if r := recover(); r != nil {
1571 ec.Error(ctx, ec.Recover(ctx, r))
1572 }
1573 }()
1574 res = ec._Query_serverConfig(ctx, field)
1575 if res == graphql.Null {
1576 atomic.AddUint32(&fs.Invalids, 1)
1577 }
1578 return res
1579 }
1580
1581 rrm := func(ctx context.Context) graphql.Marshaler {
1582 return ec.OperationContext.RootResolverMiddleware(ctx,
1583 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
1584 }
1585
1586 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
1587 case "repository":
1588 field := field
1589
1590 innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) {
1591 defer func() {
1592 if r := recover(); r != nil {
1593 ec.Error(ctx, ec.Recover(ctx, r))
1594 }
1595 }()
1596 res = ec._Query_repository(ctx, field)
1597 return res
1598 }
1599
1600 rrm := func(ctx context.Context) graphql.Marshaler {
1601 return ec.OperationContext.RootResolverMiddleware(ctx,
1602 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
1603 }
1604
1605 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
1606 case "repositories":
1607 field := field
1608
1609 innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
1610 defer func() {
1611 if r := recover(); r != nil {
1612 ec.Error(ctx, ec.Recover(ctx, r))
1613 }
1614 }()
1615 res = ec._Query_repositories(ctx, field)
1616 if res == graphql.Null {
1617 atomic.AddUint32(&fs.Invalids, 1)
1618 }
1619 return res
1620 }
1621
1622 rrm := func(ctx context.Context) graphql.Marshaler {
1623 return ec.OperationContext.RootResolverMiddleware(ctx,
1624 func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
1625 }
1626
1627 out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
1628 case "__type":
1629 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
1630 return ec._Query___type(ctx, field)
1631 })
1632 case "__schema":
1633 out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
1634 return ec._Query___schema(ctx, field)
1635 })
1636 default:
1637 panic("unknown field " + strconv.Quote(field.Name))
1638 }
1639 }
1640 out.Dispatch(ctx)
1641 if out.Invalids > 0 {
1642 return graphql.Null
1643 }
1644
1645 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
1646
1647 for label, dfs := range deferred {
1648 ec.processDeferredGroup(graphql.DeferredGroup{
1649 Label: label,
1650 Path: graphql.GetPath(ctx),
1651 FieldSet: dfs,
1652 Context: ctx,
1653 })
1654 }
1655
1656 return out
1657}
1658
1659var serverConfigImplementors = []string{"ServerConfig"}
1660
1661func (ec *executionContext) _ServerConfig(ctx context.Context, sel ast.SelectionSet, obj *models.ServerConfig) graphql.Marshaler {
1662 fields := graphql.CollectFields(ec.OperationContext, sel, serverConfigImplementors)
1663
1664 out := graphql.NewFieldSet(fields)
1665 deferred := make(map[string]*graphql.FieldSet)
1666 for i, field := range fields {
1667 switch field.Name {
1668 case "__typename":
1669 out.Values[i] = graphql.MarshalString("ServerConfig")
1670 case "authMode":
1671 out.Values[i] = ec._ServerConfig_authMode(ctx, field, obj)
1672 if out.Values[i] == graphql.Null {
1673 out.Invalids++
1674 }
1675 case "oauthProviders":
1676 out.Values[i] = ec._ServerConfig_oauthProviders(ctx, field, obj)
1677 if out.Values[i] == graphql.Null {
1678 out.Invalids++
1679 }
1680 default:
1681 panic("unknown field " + strconv.Quote(field.Name))
1682 }
1683 }
1684 out.Dispatch(ctx)
1685 if out.Invalids > 0 {
1686 return graphql.Null
1687 }
1688
1689 atomic.AddInt32(&ec.deferred, int32(len(deferred)))
1690
1691 for label, dfs := range deferred {
1692 ec.processDeferredGroup(graphql.DeferredGroup{
1693 Label: label,
1694 Path: graphql.GetPath(ctx),
1695 FieldSet: dfs,
1696 Context: ctx,
1697 })
1698 }
1699
1700 return out
1701}
1702
1703// endregion **************************** object.gotpl ****************************
1704
1705// region ***************************** type.gotpl *****************************
1706
1707func (ec *executionContext) marshalNServerConfig2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐServerConfig(ctx context.Context, sel ast.SelectionSet, v models.ServerConfig) graphql.Marshaler {
1708 return ec._ServerConfig(ctx, sel, &v)
1709}
1710
1711func (ec *executionContext) marshalNServerConfig2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐServerConfig(ctx context.Context, sel ast.SelectionSet, v *models.ServerConfig) graphql.Marshaler {
1712 if v == nil {
1713 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
1714 ec.Errorf(ctx, "the requested element is null which the schema does not allow")
1715 }
1716 return graphql.Null
1717 }
1718 return ec._ServerConfig(ctx, sel, v)
1719}
1720
1721// endregion ***************************** type.gotpl *****************************