@@ -36,17 +36,20 @@ type Config struct {
type ResolverRoot interface {
AddCommentOperation() AddCommentOperationResolver
+ AddCommentTimelineItem() AddCommentTimelineItemResolver
Bug() BugResolver
CommentHistoryStep() CommentHistoryStepResolver
- CommentTimelineItem() CommentTimelineItemResolver
CreateOperation() CreateOperationResolver
CreateTimelineItem() CreateTimelineItemResolver
LabelChangeOperation() LabelChangeOperationResolver
+ LabelChangeTimelineItem() LabelChangeTimelineItemResolver
Mutation() MutationResolver
Query() QueryResolver
Repository() RepositoryResolver
SetStatusOperation() SetStatusOperationResolver
+ SetStatusTimelineItem() SetStatusTimelineItemResolver
SetTitleOperation() SetTitleOperationResolver
+ SetTitleTimelineItem() SetTitleTimelineItemResolver
}
type DirectiveRoot struct {
@@ -60,6 +63,17 @@ type ComplexityRoot struct {
Files func(childComplexity int) int
}
+ AddCommentTimelineItem struct {
+ Hash func(childComplexity int) int
+ Author func(childComplexity int) int
+ Message func(childComplexity int) int
+ Files func(childComplexity int) int
+ CreatedAt func(childComplexity int) int
+ LastEdit func(childComplexity int) int
+ Edited func(childComplexity int) int
+ History func(childComplexity int) int
+ }
+
Bug struct {
Id func(childComplexity int) int
HumanId func(childComplexity int) int
@@ -109,17 +123,6 @@ type ComplexityRoot struct {
Date func(childComplexity int) int
}
- CommentTimelineItem struct {
- Hash func(childComplexity int) int
- Author func(childComplexity int) int
- Message func(childComplexity int) int
- Files func(childComplexity int) int
- CreatedAt func(childComplexity int) int
- LastEdit func(childComplexity int) int
- Edited func(childComplexity int) int
- History func(childComplexity int) int
- }
-
CreateOperation struct {
Author func(childComplexity int) int
Date func(childComplexity int) int
@@ -147,6 +150,14 @@ type ComplexityRoot struct {
Removed func(childComplexity int) int
}
+ LabelChangeTimelineItem struct {
+ Hash func(childComplexity int) int
+ Author func(childComplexity int) int
+ Date func(childComplexity int) int
+ Added func(childComplexity int) int
+ Removed func(childComplexity int) int
+ }
+
Mutation struct {
NewBug func(childComplexity int, repoRef *string, title string, message string, files []git.Hash) int
AddComment func(childComplexity int, repoRef *string, prefix string, message string, files []git.Hash) int
@@ -199,6 +210,13 @@ type ComplexityRoot struct {
Status func(childComplexity int) int
}
+ SetStatusTimelineItem struct {
+ Hash func(childComplexity int) int
+ Author func(childComplexity int) int
+ Date func(childComplexity int) int
+ Status func(childComplexity int) int
+ }
+
SetTitleOperation struct {
Hash func(childComplexity int) int
Author func(childComplexity int) int
@@ -207,6 +225,14 @@ type ComplexityRoot struct {
Was func(childComplexity int) int
}
+ SetTitleTimelineItem struct {
+ Hash func(childComplexity int) int
+ Author func(childComplexity int) int
+ Date func(childComplexity int) int
+ Title func(childComplexity int) int
+ Was func(childComplexity int) int
+ }
+
TimelineItemConnection struct {
Edges func(childComplexity int) int
Nodes func(childComplexity int) int
@@ -224,6 +250,10 @@ type AddCommentOperationResolver interface {
Author(ctx context.Context, obj *bug.AddCommentOperation) (bug.Person, error)
Date(ctx context.Context, obj *bug.AddCommentOperation) (time.Time, error)
}
+type AddCommentTimelineItemResolver interface {
+ CreatedAt(ctx context.Context, obj *bug.AddCommentTimelineItem) (time.Time, error)
+ LastEdit(ctx context.Context, obj *bug.AddCommentTimelineItem) (time.Time, error)
+}
type BugResolver interface {
Status(ctx context.Context, obj *bug.Snapshot) (models.Status, error)
@@ -235,10 +265,6 @@ type BugResolver interface {
type CommentHistoryStepResolver interface {
Date(ctx context.Context, obj *bug.CommentHistoryStep) (time.Time, error)
}
-type CommentTimelineItemResolver interface {
- CreatedAt(ctx context.Context, obj *bug.CommentTimelineItem) (time.Time, error)
- LastEdit(ctx context.Context, obj *bug.CommentTimelineItem) (time.Time, error)
-}
type CreateOperationResolver interface {
Author(ctx context.Context, obj *bug.CreateOperation) (bug.Person, error)
Date(ctx context.Context, obj *bug.CreateOperation) (time.Time, error)
@@ -251,6 +277,9 @@ type LabelChangeOperationResolver interface {
Author(ctx context.Context, obj *bug.LabelChangeOperation) (bug.Person, error)
Date(ctx context.Context, obj *bug.LabelChangeOperation) (time.Time, error)
}
+type LabelChangeTimelineItemResolver interface {
+ Date(ctx context.Context, obj *bug.LabelChangeTimelineItem) (time.Time, error)
+}
type MutationResolver interface {
NewBug(ctx context.Context, repoRef *string, title string, message string, files []git.Hash) (bug.Snapshot, error)
AddComment(ctx context.Context, repoRef *string, prefix string, message string, files []git.Hash) (bug.Snapshot, error)
@@ -273,10 +302,17 @@ type SetStatusOperationResolver interface {
Date(ctx context.Context, obj *bug.SetStatusOperation) (time.Time, error)
Status(ctx context.Context, obj *bug.SetStatusOperation) (models.Status, error)
}
+type SetStatusTimelineItemResolver interface {
+ Date(ctx context.Context, obj *bug.SetStatusTimelineItem) (time.Time, error)
+ Status(ctx context.Context, obj *bug.SetStatusTimelineItem) (models.Status, error)
+}
type SetTitleOperationResolver interface {
Author(ctx context.Context, obj *bug.SetTitleOperation) (bug.Person, error)
Date(ctx context.Context, obj *bug.SetTitleOperation) (time.Time, error)
}
+type SetTitleTimelineItemResolver interface {
+ Date(ctx context.Context, obj *bug.SetTitleTimelineItem) (time.Time, error)
+}
func field_Bug_comments_args(rawArgs map[string]interface{}) (map[string]interface{}, error) {
args := map[string]interface{}{}
@@ -966,6 +1002,62 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.AddCommentOperation.Files(childComplexity), true
+ case "AddCommentTimelineItem.hash":
+ if e.complexity.AddCommentTimelineItem.Hash == nil {
+ break
+ }
+
+ return e.complexity.AddCommentTimelineItem.Hash(childComplexity), true
+
+ case "AddCommentTimelineItem.author":
+ if e.complexity.AddCommentTimelineItem.Author == nil {
+ break
+ }
+
+ return e.complexity.AddCommentTimelineItem.Author(childComplexity), true
+
+ case "AddCommentTimelineItem.message":
+ if e.complexity.AddCommentTimelineItem.Message == nil {
+ break
+ }
+
+ return e.complexity.AddCommentTimelineItem.Message(childComplexity), true
+
+ case "AddCommentTimelineItem.files":
+ if e.complexity.AddCommentTimelineItem.Files == nil {
+ break
+ }
+
+ return e.complexity.AddCommentTimelineItem.Files(childComplexity), true
+
+ case "AddCommentTimelineItem.createdAt":
+ if e.complexity.AddCommentTimelineItem.CreatedAt == nil {
+ break
+ }
+
+ return e.complexity.AddCommentTimelineItem.CreatedAt(childComplexity), true
+
+ case "AddCommentTimelineItem.lastEdit":
+ if e.complexity.AddCommentTimelineItem.LastEdit == nil {
+ break
+ }
+
+ return e.complexity.AddCommentTimelineItem.LastEdit(childComplexity), true
+
+ case "AddCommentTimelineItem.edited":
+ if e.complexity.AddCommentTimelineItem.Edited == nil {
+ break
+ }
+
+ return e.complexity.AddCommentTimelineItem.Edited(childComplexity), true
+
+ case "AddCommentTimelineItem.history":
+ if e.complexity.AddCommentTimelineItem.History == nil {
+ break
+ }
+
+ return e.complexity.AddCommentTimelineItem.History(childComplexity), true
+
case "Bug.id":
if e.complexity.Bug.Id == nil {
break
@@ -1177,62 +1269,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.CommentHistoryStep.Date(childComplexity), true
- case "CommentTimelineItem.hash":
- if e.complexity.CommentTimelineItem.Hash == nil {
- break
- }
-
- return e.complexity.CommentTimelineItem.Hash(childComplexity), true
-
- case "CommentTimelineItem.author":
- if e.complexity.CommentTimelineItem.Author == nil {
- break
- }
-
- return e.complexity.CommentTimelineItem.Author(childComplexity), true
-
- case "CommentTimelineItem.message":
- if e.complexity.CommentTimelineItem.Message == nil {
- break
- }
-
- return e.complexity.CommentTimelineItem.Message(childComplexity), true
-
- case "CommentTimelineItem.files":
- if e.complexity.CommentTimelineItem.Files == nil {
- break
- }
-
- return e.complexity.CommentTimelineItem.Files(childComplexity), true
-
- case "CommentTimelineItem.createdAt":
- if e.complexity.CommentTimelineItem.CreatedAt == nil {
- break
- }
-
- return e.complexity.CommentTimelineItem.CreatedAt(childComplexity), true
-
- case "CommentTimelineItem.lastEdit":
- if e.complexity.CommentTimelineItem.LastEdit == nil {
- break
- }
-
- return e.complexity.CommentTimelineItem.LastEdit(childComplexity), true
-
- case "CommentTimelineItem.edited":
- if e.complexity.CommentTimelineItem.Edited == nil {
- break
- }
-
- return e.complexity.CommentTimelineItem.Edited(childComplexity), true
-
- case "CommentTimelineItem.history":
- if e.complexity.CommentTimelineItem.History == nil {
- break
- }
-
- return e.complexity.CommentTimelineItem.History(childComplexity), true
-
case "CreateOperation.author":
if e.complexity.CreateOperation.Author == nil {
break
@@ -1359,6 +1395,41 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.LabelChangeOperation.Removed(childComplexity), true
+ case "LabelChangeTimelineItem.hash":
+ if e.complexity.LabelChangeTimelineItem.Hash == nil {
+ break
+ }
+
+ return e.complexity.LabelChangeTimelineItem.Hash(childComplexity), true
+
+ case "LabelChangeTimelineItem.author":
+ if e.complexity.LabelChangeTimelineItem.Author == nil {
+ break
+ }
+
+ return e.complexity.LabelChangeTimelineItem.Author(childComplexity), true
+
+ case "LabelChangeTimelineItem.date":
+ if e.complexity.LabelChangeTimelineItem.Date == nil {
+ break
+ }
+
+ return e.complexity.LabelChangeTimelineItem.Date(childComplexity), true
+
+ case "LabelChangeTimelineItem.added":
+ if e.complexity.LabelChangeTimelineItem.Added == nil {
+ break
+ }
+
+ return e.complexity.LabelChangeTimelineItem.Added(childComplexity), true
+
+ case "LabelChangeTimelineItem.removed":
+ if e.complexity.LabelChangeTimelineItem.Removed == nil {
+ break
+ }
+
+ return e.complexity.LabelChangeTimelineItem.Removed(childComplexity), true
+
case "Mutation.newBug":
if e.complexity.Mutation.NewBug == nil {
break
@@ -1605,6 +1676,34 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.SetStatusOperation.Status(childComplexity), true
+ case "SetStatusTimelineItem.hash":
+ if e.complexity.SetStatusTimelineItem.Hash == nil {
+ break
+ }
+
+ return e.complexity.SetStatusTimelineItem.Hash(childComplexity), true
+
+ case "SetStatusTimelineItem.author":
+ if e.complexity.SetStatusTimelineItem.Author == nil {
+ break
+ }
+
+ return e.complexity.SetStatusTimelineItem.Author(childComplexity), true
+
+ case "SetStatusTimelineItem.date":
+ if e.complexity.SetStatusTimelineItem.Date == nil {
+ break
+ }
+
+ return e.complexity.SetStatusTimelineItem.Date(childComplexity), true
+
+ case "SetStatusTimelineItem.status":
+ if e.complexity.SetStatusTimelineItem.Status == nil {
+ break
+ }
+
+ return e.complexity.SetStatusTimelineItem.Status(childComplexity), true
+
case "SetTitleOperation.hash":
if e.complexity.SetTitleOperation.Hash == nil {
break
@@ -1640,6 +1739,41 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.SetTitleOperation.Was(childComplexity), true
+ case "SetTitleTimelineItem.hash":
+ if e.complexity.SetTitleTimelineItem.Hash == nil {
+ break
+ }
+
+ return e.complexity.SetTitleTimelineItem.Hash(childComplexity), true
+
+ case "SetTitleTimelineItem.author":
+ if e.complexity.SetTitleTimelineItem.Author == nil {
+ break
+ }
+
+ return e.complexity.SetTitleTimelineItem.Author(childComplexity), true
+
+ case "SetTitleTimelineItem.date":
+ if e.complexity.SetTitleTimelineItem.Date == nil {
+ break
+ }
+
+ return e.complexity.SetTitleTimelineItem.Date(childComplexity), true
+
+ case "SetTitleTimelineItem.title":
+ if e.complexity.SetTitleTimelineItem.Title == nil {
+ break
+ }
+
+ return e.complexity.SetTitleTimelineItem.Title(childComplexity), true
+
+ case "SetTitleTimelineItem.was":
+ if e.complexity.SetTitleTimelineItem.Was == nil {
+ break
+ }
+
+ return e.complexity.SetTitleTimelineItem.Was(childComplexity), true
+
case "TimelineItemConnection.edges":
if e.complexity.TimelineItemConnection.Edges == nil {
break
@@ -1879,11 +2013,11 @@ func (ec *executionContext) _AddCommentOperation_files(ctx context.Context, fiel
return arr1
}
-var bugImplementors = []string{"Bug"}
+var addCommentTimelineItemImplementors = []string{"AddCommentTimelineItem", "TimelineItem"}
// nolint: gocyclo, errcheck, gas, goconst
-func (ec *executionContext) _Bug(ctx context.Context, sel ast.SelectionSet, obj *bug.Snapshot) graphql.Marshaler {
- fields := graphql.CollectFields(ctx, sel, bugImplementors)
+func (ec *executionContext) _AddCommentTimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
+ fields := graphql.CollectFields(ctx, sel, addCommentTimelineItemImplementors)
var wg sync.WaitGroup
out := graphql.NewOrderedMap(len(fields))
@@ -1893,82 +2027,55 @@ func (ec *executionContext) _Bug(ctx context.Context, sel ast.SelectionSet, obj
switch field.Name {
case "__typename":
- out.Values[i] = graphql.MarshalString("Bug")
- case "id":
- out.Values[i] = ec._Bug_id(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalid = true
- }
- case "humanId":
- out.Values[i] = ec._Bug_humanId(ctx, field, obj)
+ out.Values[i] = graphql.MarshalString("AddCommentTimelineItem")
+ case "hash":
+ out.Values[i] = ec._AddCommentTimelineItem_hash(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalid = true
}
- case "status":
- wg.Add(1)
- go func(i int, field graphql.CollectedField) {
- out.Values[i] = ec._Bug_status(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalid = true
- }
- wg.Done()
- }(i, field)
- case "title":
- out.Values[i] = ec._Bug_title(ctx, field, obj)
+ case "author":
+ out.Values[i] = ec._AddCommentTimelineItem_author(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalid = true
}
- case "labels":
- out.Values[i] = ec._Bug_labels(ctx, field, obj)
+ case "message":
+ out.Values[i] = ec._AddCommentTimelineItem_message(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalid = true
}
- case "author":
- out.Values[i] = ec._Bug_author(ctx, field, obj)
+ case "files":
+ out.Values[i] = ec._AddCommentTimelineItem_files(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalid = true
}
case "createdAt":
- out.Values[i] = ec._Bug_createdAt(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalid = true
- }
- case "lastEdit":
- wg.Add(1)
- go func(i int, field graphql.CollectedField) {
- out.Values[i] = ec._Bug_lastEdit(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalid = true
- }
- wg.Done()
- }(i, field)
- case "comments":
- wg.Add(1)
- go func(i int, field graphql.CollectedField) {
- out.Values[i] = ec._Bug_comments(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalid = true
- }
- wg.Done()
- }(i, field)
- case "timeline":
wg.Add(1)
go func(i int, field graphql.CollectedField) {
- out.Values[i] = ec._Bug_timeline(ctx, field, obj)
+ out.Values[i] = ec._AddCommentTimelineItem_createdAt(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalid = true
}
wg.Done()
}(i, field)
- case "operations":
+ case "lastEdit":
wg.Add(1)
go func(i int, field graphql.CollectedField) {
- out.Values[i] = ec._Bug_operations(ctx, field, obj)
+ out.Values[i] = ec._AddCommentTimelineItem_lastEdit(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalid = true
}
wg.Done()
}(i, field)
+ case "edited":
+ out.Values[i] = ec._AddCommentTimelineItem_edited(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalid = true
+ }
+ case "history":
+ out.Values[i] = ec._AddCommentTimelineItem_history(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalid = true
+ }
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -1981,15 +2088,15 @@ func (ec *executionContext) _Bug(ctx context.Context, sel ast.SelectionSet, obj
}
// nolint: vetshadow
-func (ec *executionContext) _Bug_id(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
+func (ec *executionContext) _AddCommentTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
rctx := &graphql.ResolverContext{
- Object: "Bug",
+ Object: "AddCommentTimelineItem",
Args: nil,
Field: field,
}
ctx = graphql.WithResolverContext(ctx, rctx)
resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
- return obj.Id(), nil
+ return obj.Hash(), nil
})
if resTmp == nil {
if !ec.HasError(rctx) {
@@ -1997,21 +2104,21 @@ func (ec *executionContext) _Bug_id(ctx context.Context, field graphql.Collected
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(git.Hash)
rctx.Result = res
- return graphql.MarshalString(res)
+ return res
}
// nolint: vetshadow
-func (ec *executionContext) _Bug_humanId(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
+func (ec *executionContext) _AddCommentTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
rctx := &graphql.ResolverContext{
- Object: "Bug",
+ Object: "AddCommentTimelineItem",
Args: nil,
Field: field,
}
ctx = graphql.WithResolverContext(ctx, rctx)
resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
- return obj.HumanId(), nil
+ return obj.Author, nil
})
if resTmp == nil {
if !ec.HasError(rctx) {
@@ -2019,21 +2126,22 @@ func (ec *executionContext) _Bug_humanId(ctx context.Context, field graphql.Coll
}
return graphql.Null
}
- res := resTmp.(string)
+ res := resTmp.(bug.Person)
rctx.Result = res
- return graphql.MarshalString(res)
+
+ return ec._Person(ctx, field.Selections, &res)
}
// nolint: vetshadow
-func (ec *executionContext) _Bug_status(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
+func (ec *executionContext) _AddCommentTimelineItem_message(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
rctx := &graphql.ResolverContext{
- Object: "Bug",
+ Object: "AddCommentTimelineItem",
Args: nil,
Field: field,
}
ctx = graphql.WithResolverContext(ctx, rctx)
resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
- return ec.resolvers.Bug().Status(ctx, obj)
+ return obj.Message, nil
})
if resTmp == nil {
if !ec.HasError(rctx) {
@@ -2041,15 +2149,334 @@ func (ec *executionContext) _Bug_status(ctx context.Context, field graphql.Colle
}
return graphql.Null
}
- res := resTmp.(models.Status)
+ res := resTmp.(string)
rctx.Result = res
- return res
+ return graphql.MarshalString(res)
}
// nolint: vetshadow
-func (ec *executionContext) _Bug_title(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
+func (ec *executionContext) _AddCommentTimelineItem_files(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
rctx := &graphql.ResolverContext{
- Object: "Bug",
+ Object: "AddCommentTimelineItem",
+ Args: nil,
+ Field: field,
+ }
+ ctx = graphql.WithResolverContext(ctx, rctx)
+ resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
+ return obj.Files, nil
+ })
+ if resTmp == nil {
+ if !ec.HasError(rctx) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]git.Hash)
+ rctx.Result = res
+
+ arr1 := make(graphql.Array, len(res))
+
+ for idx1 := range res {
+ arr1[idx1] = func() graphql.Marshaler {
+ return res[idx1]
+ }()
+ }
+
+ return arr1
+}
+
+// nolint: vetshadow
+func (ec *executionContext) _AddCommentTimelineItem_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
+ rctx := &graphql.ResolverContext{
+ Object: "AddCommentTimelineItem",
+ Args: nil,
+ Field: field,
+ }
+ ctx = graphql.WithResolverContext(ctx, rctx)
+ resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
+ return ec.resolvers.AddCommentTimelineItem().CreatedAt(ctx, obj)
+ })
+ if resTmp == nil {
+ if !ec.HasError(rctx) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(time.Time)
+ rctx.Result = res
+ return graphql.MarshalTime(res)
+}
+
+// nolint: vetshadow
+func (ec *executionContext) _AddCommentTimelineItem_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
+ rctx := &graphql.ResolverContext{
+ Object: "AddCommentTimelineItem",
+ Args: nil,
+ Field: field,
+ }
+ ctx = graphql.WithResolverContext(ctx, rctx)
+ resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
+ return ec.resolvers.AddCommentTimelineItem().LastEdit(ctx, obj)
+ })
+ if resTmp == nil {
+ if !ec.HasError(rctx) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(time.Time)
+ rctx.Result = res
+ return graphql.MarshalTime(res)
+}
+
+// nolint: vetshadow
+func (ec *executionContext) _AddCommentTimelineItem_edited(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
+ rctx := &graphql.ResolverContext{
+ Object: "AddCommentTimelineItem",
+ Args: nil,
+ Field: field,
+ }
+ ctx = graphql.WithResolverContext(ctx, rctx)
+ resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
+ return obj.Edited(), nil
+ })
+ if resTmp == nil {
+ if !ec.HasError(rctx) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(bool)
+ rctx.Result = res
+ return graphql.MarshalBoolean(res)
+}
+
+// nolint: vetshadow
+func (ec *executionContext) _AddCommentTimelineItem_history(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
+ rctx := &graphql.ResolverContext{
+ Object: "AddCommentTimelineItem",
+ Args: nil,
+ Field: field,
+ }
+ ctx = graphql.WithResolverContext(ctx, rctx)
+ resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
+ return obj.History, nil
+ })
+ if resTmp == nil {
+ if !ec.HasError(rctx) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.([]bug.CommentHistoryStep)
+ rctx.Result = res
+
+ arr1 := make(graphql.Array, len(res))
+ var wg sync.WaitGroup
+
+ isLen1 := len(res) == 1
+ if !isLen1 {
+ wg.Add(len(res))
+ }
+
+ for idx1 := range res {
+ idx1 := idx1
+ rctx := &graphql.ResolverContext{
+ Index: &idx1,
+ Result: &res[idx1],
+ }
+ ctx := graphql.WithResolverContext(ctx, rctx)
+ f := func(idx1 int) {
+ if !isLen1 {
+ defer wg.Done()
+ }
+ arr1[idx1] = func() graphql.Marshaler {
+
+ return ec._CommentHistoryStep(ctx, field.Selections, &res[idx1])
+ }()
+ }
+ if isLen1 {
+ f(idx1)
+ } else {
+ go f(idx1)
+ }
+
+ }
+ wg.Wait()
+ return arr1
+}
+
+var bugImplementors = []string{"Bug"}
+
+// nolint: gocyclo, errcheck, gas, goconst
+func (ec *executionContext) _Bug(ctx context.Context, sel ast.SelectionSet, obj *bug.Snapshot) graphql.Marshaler {
+ fields := graphql.CollectFields(ctx, sel, bugImplementors)
+
+ var wg sync.WaitGroup
+ out := graphql.NewOrderedMap(len(fields))
+ invalid := false
+ for i, field := range fields {
+ out.Keys[i] = field.Alias
+
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("Bug")
+ case "id":
+ out.Values[i] = ec._Bug_id(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalid = true
+ }
+ case "humanId":
+ out.Values[i] = ec._Bug_humanId(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalid = true
+ }
+ case "status":
+ wg.Add(1)
+ go func(i int, field graphql.CollectedField) {
+ out.Values[i] = ec._Bug_status(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalid = true
+ }
+ wg.Done()
+ }(i, field)
+ case "title":
+ out.Values[i] = ec._Bug_title(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalid = true
+ }
+ case "labels":
+ out.Values[i] = ec._Bug_labels(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalid = true
+ }
+ case "author":
+ out.Values[i] = ec._Bug_author(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalid = true
+ }
+ case "createdAt":
+ out.Values[i] = ec._Bug_createdAt(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalid = true
+ }
+ case "lastEdit":
+ wg.Add(1)
+ go func(i int, field graphql.CollectedField) {
+ out.Values[i] = ec._Bug_lastEdit(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalid = true
+ }
+ wg.Done()
+ }(i, field)
+ case "comments":
+ wg.Add(1)
+ go func(i int, field graphql.CollectedField) {
+ out.Values[i] = ec._Bug_comments(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalid = true
+ }
+ wg.Done()
+ }(i, field)
+ case "timeline":
+ wg.Add(1)
+ go func(i int, field graphql.CollectedField) {
+ out.Values[i] = ec._Bug_timeline(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalid = true
+ }
+ wg.Done()
+ }(i, field)
+ case "operations":
+ wg.Add(1)
+ go func(i int, field graphql.CollectedField) {
+ out.Values[i] = ec._Bug_operations(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalid = true
+ }
+ wg.Done()
+ }(i, field)
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ wg.Wait()
+ if invalid {
+ return graphql.Null
+ }
+ return out
+}
+
+// nolint: vetshadow
+func (ec *executionContext) _Bug_id(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
+ rctx := &graphql.ResolverContext{
+ Object: "Bug",
+ Args: nil,
+ Field: field,
+ }
+ ctx = graphql.WithResolverContext(ctx, rctx)
+ resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
+ return obj.Id(), nil
+ })
+ if resTmp == nil {
+ if !ec.HasError(rctx) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ rctx.Result = res
+ return graphql.MarshalString(res)
+}
+
+// nolint: vetshadow
+func (ec *executionContext) _Bug_humanId(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
+ rctx := &graphql.ResolverContext{
+ Object: "Bug",
+ Args: nil,
+ Field: field,
+ }
+ ctx = graphql.WithResolverContext(ctx, rctx)
+ resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
+ return obj.HumanId(), nil
+ })
+ if resTmp == nil {
+ if !ec.HasError(rctx) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ rctx.Result = res
+ return graphql.MarshalString(res)
+}
+
+// nolint: vetshadow
+func (ec *executionContext) _Bug_status(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
+ rctx := &graphql.ResolverContext{
+ Object: "Bug",
+ Args: nil,
+ Field: field,
+ }
+ ctx = graphql.WithResolverContext(ctx, rctx)
+ resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
+ return ec.resolvers.Bug().Status(ctx, obj)
+ })
+ if resTmp == nil {
+ if !ec.HasError(rctx) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(models.Status)
+ rctx.Result = res
+ return res
+}
+
+// nolint: vetshadow
+func (ec *executionContext) _Bug_title(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
+ rctx := &graphql.ResolverContext{
+ Object: "Bug",
Args: nil,
Field: field,
}
@@ -2939,306 +3366,46 @@ func (ec *executionContext) _CommentHistoryStep(ctx context.Context, sel ast.Sel
out := graphql.NewOrderedMap(len(fields))
invalid := false
for i, field := range fields {
- out.Keys[i] = field.Alias
-
- switch field.Name {
- case "__typename":
- out.Values[i] = graphql.MarshalString("CommentHistoryStep")
- case "message":
- out.Values[i] = ec._CommentHistoryStep_message(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalid = true
- }
- case "date":
- wg.Add(1)
- go func(i int, field graphql.CollectedField) {
- out.Values[i] = ec._CommentHistoryStep_date(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalid = true
- }
- wg.Done()
- }(i, field)
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- wg.Wait()
- if invalid {
- return graphql.Null
- }
- return out
-}
-
-// nolint: vetshadow
-func (ec *executionContext) _CommentHistoryStep_message(ctx context.Context, field graphql.CollectedField, obj *bug.CommentHistoryStep) graphql.Marshaler {
- rctx := &graphql.ResolverContext{
- Object: "CommentHistoryStep",
- Args: nil,
- Field: field,
- }
- ctx = graphql.WithResolverContext(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
- return obj.Message, nil
- })
- if resTmp == nil {
- if !ec.HasError(rctx) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- res := resTmp.(string)
- rctx.Result = res
- return graphql.MarshalString(res)
-}
-
-// nolint: vetshadow
-func (ec *executionContext) _CommentHistoryStep_date(ctx context.Context, field graphql.CollectedField, obj *bug.CommentHistoryStep) graphql.Marshaler {
- rctx := &graphql.ResolverContext{
- Object: "CommentHistoryStep",
- Args: nil,
- Field: field,
- }
- ctx = graphql.WithResolverContext(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
- return ec.resolvers.CommentHistoryStep().Date(ctx, obj)
- })
- if resTmp == nil {
- if !ec.HasError(rctx) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- res := resTmp.(time.Time)
- rctx.Result = res
- return graphql.MarshalTime(res)
-}
-
-var commentTimelineItemImplementors = []string{"CommentTimelineItem", "TimelineItem"}
-
-// nolint: gocyclo, errcheck, gas, goconst
-func (ec *executionContext) _CommentTimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.CommentTimelineItem) graphql.Marshaler {
- fields := graphql.CollectFields(ctx, sel, commentTimelineItemImplementors)
-
- var wg sync.WaitGroup
- out := graphql.NewOrderedMap(len(fields))
- invalid := false
- for i, field := range fields {
- out.Keys[i] = field.Alias
-
- switch field.Name {
- case "__typename":
- out.Values[i] = graphql.MarshalString("CommentTimelineItem")
- case "hash":
- out.Values[i] = ec._CommentTimelineItem_hash(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalid = true
- }
- case "author":
- out.Values[i] = ec._CommentTimelineItem_author(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalid = true
- }
- case "message":
- out.Values[i] = ec._CommentTimelineItem_message(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalid = true
- }
- case "files":
- out.Values[i] = ec._CommentTimelineItem_files(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalid = true
- }
- case "createdAt":
- wg.Add(1)
- go func(i int, field graphql.CollectedField) {
- out.Values[i] = ec._CommentTimelineItem_createdAt(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalid = true
- }
- wg.Done()
- }(i, field)
- case "lastEdit":
- wg.Add(1)
- go func(i int, field graphql.CollectedField) {
- out.Values[i] = ec._CommentTimelineItem_lastEdit(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalid = true
- }
- wg.Done()
- }(i, field)
- case "edited":
- out.Values[i] = ec._CommentTimelineItem_edited(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalid = true
- }
- case "history":
- out.Values[i] = ec._CommentTimelineItem_history(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- invalid = true
- }
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- wg.Wait()
- if invalid {
- return graphql.Null
- }
- return out
-}
-
-// nolint: vetshadow
-func (ec *executionContext) _CommentTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.CommentTimelineItem) graphql.Marshaler {
- rctx := &graphql.ResolverContext{
- Object: "CommentTimelineItem",
- Args: nil,
- Field: field,
- }
- ctx = graphql.WithResolverContext(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
- return obj.Hash()
- })
- if resTmp == nil {
- if !ec.HasError(rctx) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- res := resTmp.(git.Hash)
- rctx.Result = res
- return res
-}
-
-// nolint: vetshadow
-func (ec *executionContext) _CommentTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.CommentTimelineItem) graphql.Marshaler {
- rctx := &graphql.ResolverContext{
- Object: "CommentTimelineItem",
- Args: nil,
- Field: field,
- }
- ctx = graphql.WithResolverContext(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
- return obj.Author, nil
- })
- if resTmp == nil {
- if !ec.HasError(rctx) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- res := resTmp.(bug.Person)
- rctx.Result = res
-
- return ec._Person(ctx, field.Selections, &res)
-}
-
-// nolint: vetshadow
-func (ec *executionContext) _CommentTimelineItem_message(ctx context.Context, field graphql.CollectedField, obj *bug.CommentTimelineItem) graphql.Marshaler {
- rctx := &graphql.ResolverContext{
- Object: "CommentTimelineItem",
- Args: nil,
- Field: field,
- }
- ctx = graphql.WithResolverContext(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
- return obj.Message, nil
- })
- if resTmp == nil {
- if !ec.HasError(rctx) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- res := resTmp.(string)
- rctx.Result = res
- return graphql.MarshalString(res)
-}
-
-// nolint: vetshadow
-func (ec *executionContext) _CommentTimelineItem_files(ctx context.Context, field graphql.CollectedField, obj *bug.CommentTimelineItem) graphql.Marshaler {
- rctx := &graphql.ResolverContext{
- Object: "CommentTimelineItem",
- Args: nil,
- Field: field,
- }
- ctx = graphql.WithResolverContext(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
- return obj.Files, nil
- })
- if resTmp == nil {
- if !ec.HasError(rctx) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- res := resTmp.([]git.Hash)
- rctx.Result = res
-
- arr1 := make(graphql.Array, len(res))
-
- for idx1 := range res {
- arr1[idx1] = func() graphql.Marshaler {
- return res[idx1]
- }()
- }
-
- return arr1
-}
-
-// nolint: vetshadow
-func (ec *executionContext) _CommentTimelineItem_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.CommentTimelineItem) graphql.Marshaler {
- rctx := &graphql.ResolverContext{
- Object: "CommentTimelineItem",
- Args: nil,
- Field: field,
- }
- ctx = graphql.WithResolverContext(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
- return ec.resolvers.CommentTimelineItem().CreatedAt(ctx, obj)
- })
- if resTmp == nil {
- if !ec.HasError(rctx) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- res := resTmp.(time.Time)
- rctx.Result = res
- return graphql.MarshalTime(res)
-}
+ out.Keys[i] = field.Alias
-// nolint: vetshadow
-func (ec *executionContext) _CommentTimelineItem_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.CommentTimelineItem) graphql.Marshaler {
- rctx := &graphql.ResolverContext{
- Object: "CommentTimelineItem",
- Args: nil,
- Field: field,
- }
- ctx = graphql.WithResolverContext(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
- return ec.resolvers.CommentTimelineItem().LastEdit(ctx, obj)
- })
- if resTmp == nil {
- if !ec.HasError(rctx) {
- ec.Errorf(ctx, "must not be null")
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("CommentHistoryStep")
+ case "message":
+ out.Values[i] = ec._CommentHistoryStep_message(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalid = true
+ }
+ case "date":
+ wg.Add(1)
+ go func(i int, field graphql.CollectedField) {
+ out.Values[i] = ec._CommentHistoryStep_date(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ invalid = true
+ }
+ wg.Done()
+ }(i, field)
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
}
+ }
+ wg.Wait()
+ if invalid {
return graphql.Null
}
- res := resTmp.(time.Time)
- rctx.Result = res
- return graphql.MarshalTime(res)
+ return out
}
// nolint: vetshadow
-func (ec *executionContext) _CommentTimelineItem_edited(ctx context.Context, field graphql.CollectedField, obj *bug.CommentTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _CommentHistoryStep_message(ctx context.Context, field graphql.CollectedField, obj *bug.CommentHistoryStep) graphql.Marshaler {
rctx := &graphql.ResolverContext{
- Object: "CommentTimelineItem",
+ Object: "CommentHistoryStep",
Args: nil,
Field: field,
}
ctx = graphql.WithResolverContext(ctx, rctx)
resTmp := ec.FieldMiddleware(ctx, obj, func(ctx context.Context) (interface{}, error) {
- return obj.Edited(), nil
+ return obj.Message, nil
})
if resTmp == nil {
if !ec.HasError(rctx) {