From 6e8496f4c1767ca8a8b95716a04f1b492bef7397 Mon Sep 17 00:00:00 2001 From: Amine Hilaly Date: Tue, 9 Apr 2019 17:43:17 +0200 Subject: Support gqlgen v0.8.3 --- graphql/graph/gen_graph.go | 13601 ++++++++++++++++++++++--------------------- 1 file changed, 6864 insertions(+), 6737 deletions(-) (limited to 'graphql/graph/gen_graph.go') diff --git a/graphql/graph/gen_graph.go b/graphql/graph/gen_graph.go index 9c0003f2..516a474b 100644 --- a/graphql/graph/gen_graph.go +++ b/graphql/graph/gen_graph.go @@ -21,6 +21,8 @@ import ( "github.com/vektah/gqlparser/ast" ) +// region ************************** generated!.gotpl ************************** + // NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface. func NewExecutableSchema(cfg Config) graphql.ExecutableSchema { return &executableSchema{ @@ -61,39 +63,39 @@ type DirectiveRoot struct { type ComplexityRoot struct { AddCommentOperation struct { - Hash func(childComplexity int) int Author func(childComplexity int) int Date func(childComplexity int) int - Message func(childComplexity int) int Files func(childComplexity int) int + Hash func(childComplexity int) int + Message func(childComplexity int) int } AddCommentTimelineItem struct { - Hash func(childComplexity int) int Author func(childComplexity int) int - Message func(childComplexity int) int - MessageIsEmpty func(childComplexity int) int - Files func(childComplexity int) int CreatedAt func(childComplexity int) int - LastEdit func(childComplexity int) int Edited func(childComplexity int) int + Files func(childComplexity int) int + Hash func(childComplexity int) int History func(childComplexity int) int + LastEdit func(childComplexity int) int + Message func(childComplexity int) int + MessageIsEmpty func(childComplexity int) int } Bug struct { - Id func(childComplexity int) int - HumanId func(childComplexity int) int - Status func(childComplexity int) int - Title func(childComplexity int) int - Labels func(childComplexity int) int + Actors func(childComplexity int, after *string, before *string, first *int, last *int) int Author func(childComplexity int) int + Comments func(childComplexity int, after *string, before *string, first *int, last *int) int CreatedAt func(childComplexity int) int + HumanId func(childComplexity int) int + Id func(childComplexity int) int + Labels func(childComplexity int) int LastEdit func(childComplexity int) int - Actors func(childComplexity int, after *string, before *string, first *int, last *int) int + Operations func(childComplexity int, after *string, before *string, first *int, last *int) int Participants func(childComplexity int, after *string, before *string, first *int, last *int) int - Comments func(childComplexity int, after *string, before *string, first *int, last *int) int + Status func(childComplexity int) int Timeline func(childComplexity int, after *string, before *string, first *int, last *int) int - Operations func(childComplexity int, after *string, before *string, first *int, last *int) int + Title func(childComplexity int) int } BugConnection struct { @@ -110,8 +112,8 @@ type ComplexityRoot struct { Comment struct { Author func(childComplexity int) int - Message func(childComplexity int) int Files func(childComplexity int) int + Message func(childComplexity int) int } CommentConnection struct { @@ -127,49 +129,49 @@ type ComplexityRoot struct { } CommentHistoryStep struct { - Message func(childComplexity int) int Date func(childComplexity int) int + Message func(childComplexity int) int } CreateOperation struct { - Hash func(childComplexity int) int Author func(childComplexity int) int Date func(childComplexity int) int - Title func(childComplexity int) int - Message func(childComplexity int) int Files func(childComplexity int) int + Hash func(childComplexity int) int + Message func(childComplexity int) int + Title func(childComplexity int) int } CreateTimelineItem struct { - Hash func(childComplexity int) int Author func(childComplexity int) int - Message func(childComplexity int) int - MessageIsEmpty func(childComplexity int) int - Files func(childComplexity int) int CreatedAt func(childComplexity int) int - LastEdit func(childComplexity int) int Edited func(childComplexity int) int + Files func(childComplexity int) int + Hash func(childComplexity int) int History func(childComplexity int) int + LastEdit func(childComplexity int) int + Message func(childComplexity int) int + MessageIsEmpty func(childComplexity int) int } EditCommentOperation struct { - Hash func(childComplexity int) int Author func(childComplexity int) int Date func(childComplexity int) int - Target func(childComplexity int) int - Message func(childComplexity int) int Files func(childComplexity int) int + Hash func(childComplexity int) int + Message func(childComplexity int) int + Target func(childComplexity int) int } Identity struct { - Id func(childComplexity int) int - HumanId func(childComplexity int) int - Name func(childComplexity int) int - Email func(childComplexity int) int - Login func(childComplexity int) int + AvatarURL func(childComplexity int) int DisplayName func(childComplexity int) int - AvatarUrl func(childComplexity int) int + Email func(childComplexity int) int + HumanID func(childComplexity int) int + ID func(childComplexity int) int IsProtected func(childComplexity int) int + Login func(childComplexity int) int + Name func(childComplexity int) int } IdentityConnection struct { @@ -185,29 +187,29 @@ type ComplexityRoot struct { } LabelChangeOperation struct { - Hash func(childComplexity int) int + Added func(childComplexity int) int Author func(childComplexity int) int Date func(childComplexity int) int - Added func(childComplexity int) int + Hash func(childComplexity int) int Removed func(childComplexity int) int } LabelChangeTimelineItem struct { - Hash func(childComplexity int) int + Added func(childComplexity int) int Author func(childComplexity int) int Date func(childComplexity int) int - Added func(childComplexity int) int + Hash 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 ChangeLabels func(childComplexity int, repoRef *string, prefix string, added []string, removed []string) int - Open func(childComplexity int, repoRef *string, prefix string) int Close func(childComplexity int, repoRef *string, prefix string) int - SetTitle func(childComplexity int, repoRef *string, prefix string, title string) int Commit func(childComplexity int, repoRef *string, prefix string) int + NewBug func(childComplexity int, repoRef *string, title string, message string, files []git.Hash) int + Open func(childComplexity int, repoRef *string, prefix string) int + SetTitle func(childComplexity int, repoRef *string, prefix string, title string) int } OperationConnection struct { @@ -223,10 +225,10 @@ type ComplexityRoot struct { } PageInfo struct { + EndCursor func(childComplexity int) int HasNextPage func(childComplexity int) int HasPreviousPage func(childComplexity int) int StartCursor func(childComplexity int) int - EndCursor func(childComplexity int) int } Query struct { @@ -236,38 +238,38 @@ type ComplexityRoot struct { Repository struct { AllBugs func(childComplexity int, after *string, before *string, first *int, last *int, query *string) int - Bug func(childComplexity int, prefix string) int AllIdentities func(childComplexity int, after *string, before *string, first *int, last *int) int + Bug func(childComplexity int, prefix string) int Identity func(childComplexity int, prefix string) int UserIdentity func(childComplexity int) int } SetStatusOperation struct { - Hash func(childComplexity int) int Author func(childComplexity int) int Date func(childComplexity int) int + Hash func(childComplexity int) int Status func(childComplexity int) int } SetStatusTimelineItem struct { - Hash func(childComplexity int) int Author func(childComplexity int) int Date func(childComplexity int) int + Hash func(childComplexity int) int Status func(childComplexity int) int } SetTitleOperation struct { - Hash func(childComplexity int) int Author func(childComplexity int) int Date func(childComplexity int) int + Hash func(childComplexity int) int Title func(childComplexity int) int Was func(childComplexity int) int } SetTitleTimelineItem struct { - Hash func(childComplexity int) int Author func(childComplexity int) int Date func(childComplexity int) int + Hash func(childComplexity int) int Title func(childComplexity int) int Was func(childComplexity int) int } @@ -286,34 +288,34 @@ type ComplexityRoot struct { } type AddCommentOperationResolver interface { - Date(ctx context.Context, obj *bug.AddCommentOperation) (time.Time, 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) + 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) - LastEdit(ctx context.Context, obj *bug.Snapshot) (time.Time, error) - Actors(ctx context.Context, obj *bug.Snapshot, after *string, before *string, first *int, last *int) (models.IdentityConnection, error) - Participants(ctx context.Context, obj *bug.Snapshot, after *string, before *string, first *int, last *int) (models.IdentityConnection, error) - Comments(ctx context.Context, obj *bug.Snapshot, after *string, before *string, first *int, last *int) (models.CommentConnection, error) - Timeline(ctx context.Context, obj *bug.Snapshot, after *string, before *string, first *int, last *int) (models.TimelineItemConnection, error) - Operations(ctx context.Context, obj *bug.Snapshot, after *string, before *string, first *int, last *int) (models.OperationConnection, error) + LastEdit(ctx context.Context, obj *bug.Snapshot) (*time.Time, error) + Actors(ctx context.Context, obj *bug.Snapshot, after *string, before *string, first *int, last *int) (*models.IdentityConnection, error) + Participants(ctx context.Context, obj *bug.Snapshot, after *string, before *string, first *int, last *int) (*models.IdentityConnection, error) + Comments(ctx context.Context, obj *bug.Snapshot, after *string, before *string, first *int, last *int) (*models.CommentConnection, error) + Timeline(ctx context.Context, obj *bug.Snapshot, after *string, before *string, first *int, last *int) (*models.TimelineItemConnection, error) + Operations(ctx context.Context, obj *bug.Snapshot, after *string, before *string, first *int, last *int) (*models.OperationConnection, error) } type CommentHistoryStepResolver interface { - Date(ctx context.Context, obj *bug.CommentHistoryStep) (time.Time, error) + Date(ctx context.Context, obj *bug.CommentHistoryStep) (*time.Time, error) } type CreateOperationResolver interface { - Date(ctx context.Context, obj *bug.CreateOperation) (time.Time, error) + Date(ctx context.Context, obj *bug.CreateOperation) (*time.Time, error) } type CreateTimelineItemResolver interface { - CreatedAt(ctx context.Context, obj *bug.CreateTimelineItem) (time.Time, error) - LastEdit(ctx context.Context, obj *bug.CreateTimelineItem) (time.Time, error) + CreatedAt(ctx context.Context, obj *bug.CreateTimelineItem) (*time.Time, error) + LastEdit(ctx context.Context, obj *bug.CreateTimelineItem) (*time.Time, error) } type EditCommentOperationResolver interface { - Date(ctx context.Context, obj *bug.EditCommentOperation) (time.Time, error) + Date(ctx context.Context, obj *bug.EditCommentOperation) (*time.Time, error) } type IdentityResolver interface { ID(ctx context.Context, obj *identity.Interface) (string, error) @@ -326,2060 +328,3809 @@ type IdentityResolver interface { IsProtected(ctx context.Context, obj *identity.Interface) (bool, error) } type LabelChangeOperationResolver interface { - Date(ctx context.Context, obj *bug.LabelChangeOperation) (time.Time, error) + Date(ctx context.Context, obj *bug.LabelChangeOperation) (*time.Time, error) } type LabelChangeTimelineItemResolver interface { - Date(ctx context.Context, obj *bug.LabelChangeTimelineItem) (time.Time, error) + 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) - ChangeLabels(ctx context.Context, repoRef *string, prefix string, added []string, removed []string) (bug.Snapshot, error) - Open(ctx context.Context, repoRef *string, prefix string) (bug.Snapshot, error) - Close(ctx context.Context, repoRef *string, prefix string) (bug.Snapshot, error) - SetTitle(ctx context.Context, repoRef *string, prefix string, title string) (bug.Snapshot, error) - Commit(ctx context.Context, repoRef *string, prefix string) (bug.Snapshot, error) + 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) + ChangeLabels(ctx context.Context, repoRef *string, prefix string, added []string, removed []string) (*bug.Snapshot, error) + Open(ctx context.Context, repoRef *string, prefix string) (*bug.Snapshot, error) + Close(ctx context.Context, repoRef *string, prefix string) (*bug.Snapshot, error) + SetTitle(ctx context.Context, repoRef *string, prefix string, title string) (*bug.Snapshot, error) + Commit(ctx context.Context, repoRef *string, prefix string) (*bug.Snapshot, error) } type QueryResolver interface { DefaultRepository(ctx context.Context) (*models.Repository, error) Repository(ctx context.Context, id string) (*models.Repository, error) } type RepositoryResolver interface { - AllBugs(ctx context.Context, obj *models.Repository, after *string, before *string, first *int, last *int, query *string) (models.BugConnection, error) + AllBugs(ctx context.Context, obj *models.Repository, after *string, before *string, first *int, last *int, query *string) (*models.BugConnection, error) Bug(ctx context.Context, obj *models.Repository, prefix string) (*bug.Snapshot, error) - AllIdentities(ctx context.Context, obj *models.Repository, after *string, before *string, first *int, last *int) (models.IdentityConnection, error) - Identity(ctx context.Context, obj *models.Repository, prefix string) (*identity.Interface, error) - UserIdentity(ctx context.Context, obj *models.Repository) (*identity.Interface, error) + AllIdentities(ctx context.Context, obj *models.Repository, after *string, before *string, first *int, last *int) (*models.IdentityConnection, error) + Identity(ctx context.Context, obj *models.Repository, prefix string) (identity.Interface, error) + UserIdentity(ctx context.Context, obj *models.Repository) (identity.Interface, error) } type SetStatusOperationResolver interface { - Date(ctx context.Context, obj *bug.SetStatusOperation) (time.Time, error) + 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) + Date(ctx context.Context, obj *bug.SetStatusTimelineItem) (*time.Time, error) Status(ctx context.Context, obj *bug.SetStatusTimelineItem) (models.Status, error) } type SetTitleOperationResolver interface { - Date(ctx context.Context, obj *bug.SetTitleOperation) (time.Time, error) + Date(ctx context.Context, obj *bug.SetTitleOperation) (*time.Time, error) } type SetTitleTimelineItemResolver interface { - Date(ctx context.Context, obj *bug.SetTitleTimelineItem) (time.Time, error) + Date(ctx context.Context, obj *bug.SetTitleTimelineItem) (*time.Time, error) } -func field_Bug_actors_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["after"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg0 = &ptr1 - } +type executableSchema struct { + resolvers ResolverRoot + directives DirectiveRoot + complexity ComplexityRoot +} - if err != nil { - return nil, err - } - } - args["after"] = arg0 - var arg1 *string - if tmp, ok := rawArgs["before"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg1 = &ptr1 - } +func (e *executableSchema) Schema() *ast.Schema { + return parsedSchema +} - if err != nil { - return nil, err - } - } - args["before"] = arg1 - var arg2 *int - if tmp, ok := rawArgs["first"]; ok { - var err error - var ptr1 int - if tmp != nil { - ptr1, err = graphql.UnmarshalInt(tmp) - arg2 = &ptr1 +func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) { + ec := executionContext{nil, e} + _ = ec + switch typeName + "." + field { + + case "AddCommentOperation.Author": + if e.complexity.AddCommentOperation.Author == nil { + break } - if err != nil { - return nil, err + return e.complexity.AddCommentOperation.Author(childComplexity), true + + case "AddCommentOperation.Date": + if e.complexity.AddCommentOperation.Date == nil { + break } - } - args["first"] = arg2 - var arg3 *int - if tmp, ok := rawArgs["last"]; ok { - var err error - var ptr1 int - if tmp != nil { - ptr1, err = graphql.UnmarshalInt(tmp) - arg3 = &ptr1 + + return e.complexity.AddCommentOperation.Date(childComplexity), true + + case "AddCommentOperation.Files": + if e.complexity.AddCommentOperation.Files == nil { + break } - if err != nil { - return nil, err + return e.complexity.AddCommentOperation.Files(childComplexity), true + + case "AddCommentOperation.Hash": + if e.complexity.AddCommentOperation.Hash == nil { + break } - } - args["last"] = arg3 - return args, nil -} + return e.complexity.AddCommentOperation.Hash(childComplexity), true -func field_Bug_participants_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["after"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg0 = &ptr1 + case "AddCommentOperation.Message": + if e.complexity.AddCommentOperation.Message == nil { + break } - if err != nil { - return nil, err + return e.complexity.AddCommentOperation.Message(childComplexity), true + + case "AddCommentTimelineItem.Author": + if e.complexity.AddCommentTimelineItem.Author == nil { + break } - } - args["after"] = arg0 - var arg1 *string - if tmp, ok := rawArgs["before"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg1 = &ptr1 + + return e.complexity.AddCommentTimelineItem.Author(childComplexity), true + + case "AddCommentTimelineItem.CreatedAt": + if e.complexity.AddCommentTimelineItem.CreatedAt == nil { + break } - if err != nil { - return nil, err + return e.complexity.AddCommentTimelineItem.CreatedAt(childComplexity), true + + case "AddCommentTimelineItem.Edited": + if e.complexity.AddCommentTimelineItem.Edited == nil { + break } - } - args["before"] = arg1 - var arg2 *int - if tmp, ok := rawArgs["first"]; ok { - var err error - var ptr1 int - if tmp != nil { - ptr1, err = graphql.UnmarshalInt(tmp) - arg2 = &ptr1 + + return e.complexity.AddCommentTimelineItem.Edited(childComplexity), true + + case "AddCommentTimelineItem.Files": + if e.complexity.AddCommentTimelineItem.Files == nil { + break } - if err != nil { - return nil, err + return e.complexity.AddCommentTimelineItem.Files(childComplexity), true + + case "AddCommentTimelineItem.Hash": + if e.complexity.AddCommentTimelineItem.Hash == nil { + break } - } - args["first"] = arg2 - var arg3 *int - if tmp, ok := rawArgs["last"]; ok { - var err error - var ptr1 int - if tmp != nil { - ptr1, err = graphql.UnmarshalInt(tmp) - arg3 = &ptr1 + + return e.complexity.AddCommentTimelineItem.Hash(childComplexity), true + + case "AddCommentTimelineItem.History": + if e.complexity.AddCommentTimelineItem.History == nil { + break } - if err != nil { - return nil, err + return e.complexity.AddCommentTimelineItem.History(childComplexity), true + + case "AddCommentTimelineItem.LastEdit": + if e.complexity.AddCommentTimelineItem.LastEdit == nil { + break } - } - args["last"] = arg3 - return args, nil -} + return e.complexity.AddCommentTimelineItem.LastEdit(childComplexity), true -func field_Bug_comments_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["after"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg0 = &ptr1 + case "AddCommentTimelineItem.Message": + if e.complexity.AddCommentTimelineItem.Message == nil { + break } - if err != nil { - return nil, err + return e.complexity.AddCommentTimelineItem.Message(childComplexity), true + + case "AddCommentTimelineItem.MessageIsEmpty": + if e.complexity.AddCommentTimelineItem.MessageIsEmpty == nil { + break } - } - args["after"] = arg0 - var arg1 *string - if tmp, ok := rawArgs["before"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg1 = &ptr1 + + return e.complexity.AddCommentTimelineItem.MessageIsEmpty(childComplexity), true + + case "Bug.Actors": + if e.complexity.Bug.Actors == nil { + break } + args, err := ec.field_Bug_actors_args(context.TODO(), rawArgs) if err != nil { - return nil, err - } - } - args["before"] = arg1 - var arg2 *int - if tmp, ok := rawArgs["first"]; ok { - var err error - var ptr1 int - if tmp != nil { - ptr1, err = graphql.UnmarshalInt(tmp) - arg2 = &ptr1 + return 0, false } - if err != nil { - return nil, err + return e.complexity.Bug.Actors(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)), true + + case "Bug.Author": + if e.complexity.Bug.Author == nil { + break } - } - args["first"] = arg2 - var arg3 *int - if tmp, ok := rawArgs["last"]; ok { - var err error - var ptr1 int - if tmp != nil { - ptr1, err = graphql.UnmarshalInt(tmp) - arg3 = &ptr1 + + return e.complexity.Bug.Author(childComplexity), true + + case "Bug.Comments": + if e.complexity.Bug.Comments == nil { + break } + args, err := ec.field_Bug_comments_args(context.TODO(), rawArgs) if err != nil { - return nil, err + return 0, false } - } - args["last"] = arg3 - return args, nil -} + return e.complexity.Bug.Comments(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)), true -func field_Bug_timeline_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["after"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg0 = &ptr1 + case "Bug.CreatedAt": + if e.complexity.Bug.CreatedAt == nil { + break } - if err != nil { - return nil, err - } - } - args["after"] = arg0 - var arg1 *string - if tmp, ok := rawArgs["before"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg1 = &ptr1 + return e.complexity.Bug.CreatedAt(childComplexity), true + + case "Bug.HumanId": + if e.complexity.Bug.HumanId == nil { + break } - if err != nil { - return nil, err + return e.complexity.Bug.HumanId(childComplexity), true + + case "Bug.Id": + if e.complexity.Bug.Id == nil { + break } - } - args["before"] = arg1 - var arg2 *int - if tmp, ok := rawArgs["first"]; ok { - var err error - var ptr1 int - if tmp != nil { - ptr1, err = graphql.UnmarshalInt(tmp) - arg2 = &ptr1 + + return e.complexity.Bug.Id(childComplexity), true + + case "Bug.Labels": + if e.complexity.Bug.Labels == nil { + break } - if err != nil { - return nil, err + return e.complexity.Bug.Labels(childComplexity), true + + case "Bug.LastEdit": + if e.complexity.Bug.LastEdit == nil { + break } - } - args["first"] = arg2 - var arg3 *int - if tmp, ok := rawArgs["last"]; ok { - var err error - var ptr1 int - if tmp != nil { - ptr1, err = graphql.UnmarshalInt(tmp) - arg3 = &ptr1 + + return e.complexity.Bug.LastEdit(childComplexity), true + + case "Bug.Operations": + if e.complexity.Bug.Operations == nil { + break } + args, err := ec.field_Bug_operations_args(context.TODO(), rawArgs) if err != nil { - return nil, err + return 0, false } - } - args["last"] = arg3 - return args, nil -} + return e.complexity.Bug.Operations(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)), true -func field_Bug_operations_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["after"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg0 = &ptr1 + case "Bug.Participants": + if e.complexity.Bug.Participants == nil { + break } + args, err := ec.field_Bug_participants_args(context.TODO(), rawArgs) if err != nil { - return nil, err - } - } - args["after"] = arg0 - var arg1 *string - if tmp, ok := rawArgs["before"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg1 = &ptr1 + return 0, false } - if err != nil { - return nil, err + return e.complexity.Bug.Participants(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)), true + + case "Bug.Status": + if e.complexity.Bug.Status == nil { + break } - } - args["before"] = arg1 - var arg2 *int - if tmp, ok := rawArgs["first"]; ok { - var err error - var ptr1 int - if tmp != nil { - ptr1, err = graphql.UnmarshalInt(tmp) - arg2 = &ptr1 + + return e.complexity.Bug.Status(childComplexity), true + + case "Bug.Timeline": + if e.complexity.Bug.Timeline == nil { + break } + args, err := ec.field_Bug_timeline_args(context.TODO(), rawArgs) if err != nil { - return nil, err - } - } - args["first"] = arg2 - var arg3 *int - if tmp, ok := rawArgs["last"]; ok { - var err error - var ptr1 int - if tmp != nil { - ptr1, err = graphql.UnmarshalInt(tmp) - arg3 = &ptr1 + return 0, false } - if err != nil { - return nil, err + return e.complexity.Bug.Timeline(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)), true + + case "Bug.Title": + if e.complexity.Bug.Title == nil { + break } - } - args["last"] = arg3 - return args, nil -} + return e.complexity.Bug.Title(childComplexity), true -func field_Mutation_newBug_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["repoRef"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg0 = &ptr1 + case "BugConnection.Edges": + if e.complexity.BugConnection.Edges == nil { + break } - if err != nil { - return nil, err + return e.complexity.BugConnection.Edges(childComplexity), true + + case "BugConnection.Nodes": + if e.complexity.BugConnection.Nodes == nil { + break } - } - args["repoRef"] = arg0 - var arg1 string - if tmp, ok := rawArgs["title"]; ok { - var err error - arg1, err = graphql.UnmarshalString(tmp) - if err != nil { - return nil, err + + return e.complexity.BugConnection.Nodes(childComplexity), true + + case "BugConnection.PageInfo": + if e.complexity.BugConnection.PageInfo == nil { + break } - } - args["title"] = arg1 - var arg2 string - if tmp, ok := rawArgs["message"]; ok { - var err error - arg2, err = graphql.UnmarshalString(tmp) - if err != nil { - return nil, err + + return e.complexity.BugConnection.PageInfo(childComplexity), true + + case "BugConnection.TotalCount": + if e.complexity.BugConnection.TotalCount == nil { + break } - } - args["message"] = arg2 - var arg3 []git.Hash - if tmp, ok := rawArgs["files"]; ok { - var err error - var rawIf1 []interface{} - if tmp != nil { - if tmp1, ok := tmp.([]interface{}); ok { - rawIf1 = tmp1 - } else { - rawIf1 = []interface{}{tmp} - } + + return e.complexity.BugConnection.TotalCount(childComplexity), true + + case "BugEdge.Cursor": + if e.complexity.BugEdge.Cursor == nil { + break } - arg3 = make([]git.Hash, len(rawIf1)) - for idx1 := range rawIf1 { - err = (&arg3[idx1]).UnmarshalGQL(rawIf1[idx1]) + + return e.complexity.BugEdge.Cursor(childComplexity), true + + case "BugEdge.Node": + if e.complexity.BugEdge.Node == nil { + break } - if err != nil { - return nil, err + + return e.complexity.BugEdge.Node(childComplexity), true + + case "Comment.Author": + if e.complexity.Comment.Author == nil { + break } - } - args["files"] = arg3 - return args, nil -} + return e.complexity.Comment.Author(childComplexity), true -func field_Mutation_addComment_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["repoRef"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg0 = &ptr1 + case "Comment.Files": + if e.complexity.Comment.Files == nil { + break } - if err != nil { - return nil, err + return e.complexity.Comment.Files(childComplexity), true + + case "Comment.Message": + if e.complexity.Comment.Message == nil { + break } - } - args["repoRef"] = arg0 - var arg1 string - if tmp, ok := rawArgs["prefix"]; ok { - var err error - arg1, err = graphql.UnmarshalString(tmp) - if err != nil { - return nil, err + + return e.complexity.Comment.Message(childComplexity), true + + case "CommentConnection.Edges": + if e.complexity.CommentConnection.Edges == nil { + break } - } - args["prefix"] = arg1 - var arg2 string - if tmp, ok := rawArgs["message"]; ok { - var err error - arg2, err = graphql.UnmarshalString(tmp) - if err != nil { - return nil, err + + return e.complexity.CommentConnection.Edges(childComplexity), true + + case "CommentConnection.Nodes": + if e.complexity.CommentConnection.Nodes == nil { + break } - } - args["message"] = arg2 - var arg3 []git.Hash - if tmp, ok := rawArgs["files"]; ok { - var err error - var rawIf1 []interface{} - if tmp != nil { - if tmp1, ok := tmp.([]interface{}); ok { - rawIf1 = tmp1 - } else { - rawIf1 = []interface{}{tmp} - } + + return e.complexity.CommentConnection.Nodes(childComplexity), true + + case "CommentConnection.PageInfo": + if e.complexity.CommentConnection.PageInfo == nil { + break } - arg3 = make([]git.Hash, len(rawIf1)) - for idx1 := range rawIf1 { - err = (&arg3[idx1]).UnmarshalGQL(rawIf1[idx1]) + + return e.complexity.CommentConnection.PageInfo(childComplexity), true + + case "CommentConnection.TotalCount": + if e.complexity.CommentConnection.TotalCount == nil { + break } - if err != nil { - return nil, err + + return e.complexity.CommentConnection.TotalCount(childComplexity), true + + case "CommentEdge.Cursor": + if e.complexity.CommentEdge.Cursor == nil { + break } - } - args["files"] = arg3 - return args, nil -} + return e.complexity.CommentEdge.Cursor(childComplexity), true -func field_Mutation_changeLabels_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["repoRef"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg0 = &ptr1 + case "CommentEdge.Node": + if e.complexity.CommentEdge.Node == nil { + break } - if err != nil { - return nil, err + return e.complexity.CommentEdge.Node(childComplexity), true + + case "CommentHistoryStep.Date": + if e.complexity.CommentHistoryStep.Date == nil { + break } - } - args["repoRef"] = arg0 - var arg1 string - if tmp, ok := rawArgs["prefix"]; ok { - var err error - arg1, err = graphql.UnmarshalString(tmp) - if err != nil { - return nil, err + + return e.complexity.CommentHistoryStep.Date(childComplexity), true + + case "CommentHistoryStep.Message": + if e.complexity.CommentHistoryStep.Message == nil { + break } - } - args["prefix"] = arg1 - var arg2 []string - if tmp, ok := rawArgs["added"]; ok { - var err error - var rawIf1 []interface{} - if tmp != nil { - if tmp1, ok := tmp.([]interface{}); ok { - rawIf1 = tmp1 - } else { - rawIf1 = []interface{}{tmp} - } + + return e.complexity.CommentHistoryStep.Message(childComplexity), true + + case "CreateOperation.Author": + if e.complexity.CreateOperation.Author == nil { + break } - arg2 = make([]string, len(rawIf1)) - for idx1 := range rawIf1 { - arg2[idx1], err = graphql.UnmarshalString(rawIf1[idx1]) + + return e.complexity.CreateOperation.Author(childComplexity), true + + case "CreateOperation.Date": + if e.complexity.CreateOperation.Date == nil { + break } - if err != nil { - return nil, err - } - } - args["added"] = arg2 - var arg3 []string - if tmp, ok := rawArgs["removed"]; ok { - var err error - var rawIf1 []interface{} - if tmp != nil { - if tmp1, ok := tmp.([]interface{}); ok { - rawIf1 = tmp1 - } else { - rawIf1 = []interface{}{tmp} - } - } - arg3 = make([]string, len(rawIf1)) - for idx1 := range rawIf1 { - arg3[idx1], err = graphql.UnmarshalString(rawIf1[idx1]) + + return e.complexity.CreateOperation.Date(childComplexity), true + + case "CreateOperation.Files": + if e.complexity.CreateOperation.Files == nil { + break } - if err != nil { - return nil, err + + return e.complexity.CreateOperation.Files(childComplexity), true + + case "CreateOperation.Hash": + if e.complexity.CreateOperation.Hash == nil { + break } - } - args["removed"] = arg3 - return args, nil -} + return e.complexity.CreateOperation.Hash(childComplexity), true -func field_Mutation_open_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["repoRef"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg0 = &ptr1 + case "CreateOperation.Message": + if e.complexity.CreateOperation.Message == nil { + break } - if err != nil { - return nil, err + return e.complexity.CreateOperation.Message(childComplexity), true + + case "CreateOperation.Title": + if e.complexity.CreateOperation.Title == nil { + break } - } - args["repoRef"] = arg0 - var arg1 string - if tmp, ok := rawArgs["prefix"]; ok { - var err error - arg1, err = graphql.UnmarshalString(tmp) - if err != nil { - return nil, err + + return e.complexity.CreateOperation.Title(childComplexity), true + + case "CreateTimelineItem.Author": + if e.complexity.CreateTimelineItem.Author == nil { + break } - } - args["prefix"] = arg1 - return args, nil -} + return e.complexity.CreateTimelineItem.Author(childComplexity), true -func field_Mutation_close_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["repoRef"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg0 = &ptr1 + case "CreateTimelineItem.CreatedAt": + if e.complexity.CreateTimelineItem.CreatedAt == nil { + break } - if err != nil { - return nil, err + return e.complexity.CreateTimelineItem.CreatedAt(childComplexity), true + + case "CreateTimelineItem.Edited": + if e.complexity.CreateTimelineItem.Edited == nil { + break } - } - args["repoRef"] = arg0 - var arg1 string - if tmp, ok := rawArgs["prefix"]; ok { - var err error - arg1, err = graphql.UnmarshalString(tmp) - if err != nil { - return nil, err + + return e.complexity.CreateTimelineItem.Edited(childComplexity), true + + case "CreateTimelineItem.Files": + if e.complexity.CreateTimelineItem.Files == nil { + break } - } - args["prefix"] = arg1 - return args, nil -} + return e.complexity.CreateTimelineItem.Files(childComplexity), true -func field_Mutation_setTitle_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["repoRef"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg0 = &ptr1 + case "CreateTimelineItem.Hash": + if e.complexity.CreateTimelineItem.Hash == nil { + break } - if err != nil { - return nil, err + return e.complexity.CreateTimelineItem.Hash(childComplexity), true + + case "CreateTimelineItem.History": + if e.complexity.CreateTimelineItem.History == nil { + break } - } - args["repoRef"] = arg0 - var arg1 string - if tmp, ok := rawArgs["prefix"]; ok { - var err error - arg1, err = graphql.UnmarshalString(tmp) - if err != nil { - return nil, err + + return e.complexity.CreateTimelineItem.History(childComplexity), true + + case "CreateTimelineItem.LastEdit": + if e.complexity.CreateTimelineItem.LastEdit == nil { + break } - } - args["prefix"] = arg1 - var arg2 string - if tmp, ok := rawArgs["title"]; ok { - var err error - arg2, err = graphql.UnmarshalString(tmp) - if err != nil { - return nil, err + + return e.complexity.CreateTimelineItem.LastEdit(childComplexity), true + + case "CreateTimelineItem.Message": + if e.complexity.CreateTimelineItem.Message == nil { + break } - } - args["title"] = arg2 - return args, nil -} + return e.complexity.CreateTimelineItem.Message(childComplexity), true -func field_Mutation_commit_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["repoRef"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg0 = &ptr1 + case "CreateTimelineItem.MessageIsEmpty": + if e.complexity.CreateTimelineItem.MessageIsEmpty == nil { + break } - if err != nil { - return nil, err + return e.complexity.CreateTimelineItem.MessageIsEmpty(childComplexity), true + + case "EditCommentOperation.Author": + if e.complexity.EditCommentOperation.Author == nil { + break } - } - args["repoRef"] = arg0 - var arg1 string - if tmp, ok := rawArgs["prefix"]; ok { - var err error - arg1, err = graphql.UnmarshalString(tmp) - if err != nil { - return nil, err + + return e.complexity.EditCommentOperation.Author(childComplexity), true + + case "EditCommentOperation.Date": + if e.complexity.EditCommentOperation.Date == nil { + break } - } - args["prefix"] = arg1 - return args, nil -} + return e.complexity.EditCommentOperation.Date(childComplexity), true -func field_Query_repository_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["id"]; ok { - var err error - arg0, err = graphql.UnmarshalString(tmp) - if err != nil { - return nil, err + case "EditCommentOperation.Files": + if e.complexity.EditCommentOperation.Files == nil { + break } - } - args["id"] = arg0 - return args, nil -} + return e.complexity.EditCommentOperation.Files(childComplexity), true -func field_Query___type_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["name"]; ok { - var err error - arg0, err = graphql.UnmarshalString(tmp) - if err != nil { - return nil, err + case "EditCommentOperation.Hash": + if e.complexity.EditCommentOperation.Hash == nil { + break } - } - args["name"] = arg0 - return args, nil -} + return e.complexity.EditCommentOperation.Hash(childComplexity), true -func field_Repository_allBugs_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["after"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg0 = &ptr1 + case "EditCommentOperation.Message": + if e.complexity.EditCommentOperation.Message == nil { + break } - if err != nil { - return nil, err + return e.complexity.EditCommentOperation.Message(childComplexity), true + + case "EditCommentOperation.Target": + if e.complexity.EditCommentOperation.Target == nil { + break } - } - args["after"] = arg0 - var arg1 *string - if tmp, ok := rawArgs["before"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg1 = &ptr1 + + return e.complexity.EditCommentOperation.Target(childComplexity), true + + case "Identity.AvatarURL": + if e.complexity.Identity.AvatarURL == nil { + break } - if err != nil { - return nil, err + return e.complexity.Identity.AvatarURL(childComplexity), true + + case "Identity.DisplayName": + if e.complexity.Identity.DisplayName == nil { + break } - } - args["before"] = arg1 - var arg2 *int - if tmp, ok := rawArgs["first"]; ok { - var err error - var ptr1 int - if tmp != nil { - ptr1, err = graphql.UnmarshalInt(tmp) - arg2 = &ptr1 + + return e.complexity.Identity.DisplayName(childComplexity), true + + case "Identity.Email": + if e.complexity.Identity.Email == nil { + break } - if err != nil { - return nil, err + return e.complexity.Identity.Email(childComplexity), true + + case "Identity.HumanID": + if e.complexity.Identity.HumanID == nil { + break } - } - args["first"] = arg2 - var arg3 *int - if tmp, ok := rawArgs["last"]; ok { - var err error - var ptr1 int - if tmp != nil { - ptr1, err = graphql.UnmarshalInt(tmp) - arg3 = &ptr1 + + return e.complexity.Identity.HumanID(childComplexity), true + + case "Identity.ID": + if e.complexity.Identity.ID == nil { + break } - if err != nil { - return nil, err + return e.complexity.Identity.ID(childComplexity), true + + case "Identity.IsProtected": + if e.complexity.Identity.IsProtected == nil { + break } - } - args["last"] = arg3 - var arg4 *string - if tmp, ok := rawArgs["query"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg4 = &ptr1 + + return e.complexity.Identity.IsProtected(childComplexity), true + + case "Identity.Login": + if e.complexity.Identity.Login == nil { + break } - if err != nil { - return nil, err + return e.complexity.Identity.Login(childComplexity), true + + case "Identity.Name": + if e.complexity.Identity.Name == nil { + break } - } - args["query"] = arg4 - return args, nil -} + return e.complexity.Identity.Name(childComplexity), true -func field_Repository_bug_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["prefix"]; ok { - var err error - arg0, err = graphql.UnmarshalString(tmp) - if err != nil { - return nil, err + case "IdentityConnection.Edges": + if e.complexity.IdentityConnection.Edges == nil { + break } - } - args["prefix"] = arg0 - return args, nil -} + return e.complexity.IdentityConnection.Edges(childComplexity), true -func field_Repository_allIdentities_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 *string - if tmp, ok := rawArgs["after"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg0 = &ptr1 + case "IdentityConnection.Nodes": + if e.complexity.IdentityConnection.Nodes == nil { + break } - if err != nil { - return nil, err - } - } - args["after"] = arg0 - var arg1 *string - if tmp, ok := rawArgs["before"]; ok { - var err error - var ptr1 string - if tmp != nil { - ptr1, err = graphql.UnmarshalString(tmp) - arg1 = &ptr1 - } + return e.complexity.IdentityConnection.Nodes(childComplexity), true - if err != nil { - return nil, err + case "IdentityConnection.PageInfo": + if e.complexity.IdentityConnection.PageInfo == nil { + break } - } - args["before"] = arg1 - var arg2 *int - if tmp, ok := rawArgs["first"]; ok { - var err error - var ptr1 int - if tmp != nil { - ptr1, err = graphql.UnmarshalInt(tmp) - arg2 = &ptr1 + + return e.complexity.IdentityConnection.PageInfo(childComplexity), true + + case "IdentityConnection.TotalCount": + if e.complexity.IdentityConnection.TotalCount == nil { + break } - if err != nil { - return nil, err + return e.complexity.IdentityConnection.TotalCount(childComplexity), true + + case "IdentityEdge.Cursor": + if e.complexity.IdentityEdge.Cursor == nil { + break } - } - args["first"] = arg2 - var arg3 *int - if tmp, ok := rawArgs["last"]; ok { - var err error - var ptr1 int - if tmp != nil { - ptr1, err = graphql.UnmarshalInt(tmp) - arg3 = &ptr1 + + return e.complexity.IdentityEdge.Cursor(childComplexity), true + + case "IdentityEdge.Node": + if e.complexity.IdentityEdge.Node == nil { + break } - if err != nil { - return nil, err + return e.complexity.IdentityEdge.Node(childComplexity), true + + case "LabelChangeOperation.Added": + if e.complexity.LabelChangeOperation.Added == nil { + break } - } - args["last"] = arg3 - return args, nil -} + return e.complexity.LabelChangeOperation.Added(childComplexity), true -func field_Repository_identity_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 string - if tmp, ok := rawArgs["prefix"]; ok { - var err error - arg0, err = graphql.UnmarshalString(tmp) - if err != nil { - return nil, err + case "LabelChangeOperation.Author": + if e.complexity.LabelChangeOperation.Author == nil { + break } - } - args["prefix"] = arg0 - return args, nil -} + return e.complexity.LabelChangeOperation.Author(childComplexity), true -func field___Type_fields_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 bool - if tmp, ok := rawArgs["includeDeprecated"]; ok { - var err error - arg0, err = graphql.UnmarshalBoolean(tmp) - if err != nil { - return nil, err + case "LabelChangeOperation.Date": + if e.complexity.LabelChangeOperation.Date == nil { + break } - } - args["includeDeprecated"] = arg0 - return args, nil -} + return e.complexity.LabelChangeOperation.Date(childComplexity), true -func field___Type_enumValues_args(rawArgs map[string]interface{}) (map[string]interface{}, error) { - args := map[string]interface{}{} - var arg0 bool - if tmp, ok := rawArgs["includeDeprecated"]; ok { - var err error - arg0, err = graphql.UnmarshalBoolean(tmp) - if err != nil { - return nil, err + case "LabelChangeOperation.Hash": + if e.complexity.LabelChangeOperation.Hash == nil { + break } - } - args["includeDeprecated"] = arg0 - return args, nil -} + return e.complexity.LabelChangeOperation.Hash(childComplexity), true -type executableSchema struct { - resolvers ResolverRoot - directives DirectiveRoot - complexity ComplexityRoot -} + case "LabelChangeOperation.Removed": + if e.complexity.LabelChangeOperation.Removed == nil { + break + } -func (e *executableSchema) Schema() *ast.Schema { - return parsedSchema -} + return e.complexity.LabelChangeOperation.Removed(childComplexity), true -func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) { - switch typeName + "." + field { + case "LabelChangeTimelineItem.Added": + if e.complexity.LabelChangeTimelineItem.Added == nil { + break + } - case "AddCommentOperation.hash": - if e.complexity.AddCommentOperation.Hash == nil { + return e.complexity.LabelChangeTimelineItem.Added(childComplexity), true + + case "LabelChangeTimelineItem.Author": + if e.complexity.LabelChangeTimelineItem.Author == nil { break } - return e.complexity.AddCommentOperation.Hash(childComplexity), true + return e.complexity.LabelChangeTimelineItem.Author(childComplexity), true - case "AddCommentOperation.author": - if e.complexity.AddCommentOperation.Author == nil { + case "LabelChangeTimelineItem.Date": + if e.complexity.LabelChangeTimelineItem.Date == nil { break } - return e.complexity.AddCommentOperation.Author(childComplexity), true + return e.complexity.LabelChangeTimelineItem.Date(childComplexity), true - case "AddCommentOperation.date": - if e.complexity.AddCommentOperation.Date == nil { + case "LabelChangeTimelineItem.Hash": + if e.complexity.LabelChangeTimelineItem.Hash == nil { break } - return e.complexity.AddCommentOperation.Date(childComplexity), true + return e.complexity.LabelChangeTimelineItem.Hash(childComplexity), true - case "AddCommentOperation.message": - if e.complexity.AddCommentOperation.Message == nil { + case "LabelChangeTimelineItem.Removed": + if e.complexity.LabelChangeTimelineItem.Removed == nil { break } - return e.complexity.AddCommentOperation.Message(childComplexity), true + return e.complexity.LabelChangeTimelineItem.Removed(childComplexity), true - case "AddCommentOperation.files": - if e.complexity.AddCommentOperation.Files == nil { + case "Mutation.AddComment": + if e.complexity.Mutation.AddComment == nil { break } - return e.complexity.AddCommentOperation.Files(childComplexity), true + args, err := ec.field_Mutation_addComment_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } - case "AddCommentTimelineItem.hash": - if e.complexity.AddCommentTimelineItem.Hash == nil { + return e.complexity.Mutation.AddComment(childComplexity, args["repoRef"].(*string), args["prefix"].(string), args["message"].(string), args["files"].([]git.Hash)), true + + case "Mutation.ChangeLabels": + if e.complexity.Mutation.ChangeLabels == nil { break } - return e.complexity.AddCommentTimelineItem.Hash(childComplexity), true + args, err := ec.field_Mutation_changeLabels_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } - case "AddCommentTimelineItem.author": - if e.complexity.AddCommentTimelineItem.Author == nil { + return e.complexity.Mutation.ChangeLabels(childComplexity, args["repoRef"].(*string), args["prefix"].(string), args["added"].([]string), args["removed"].([]string)), true + + case "Mutation.Close": + if e.complexity.Mutation.Close == nil { break } - return e.complexity.AddCommentTimelineItem.Author(childComplexity), true + args, err := ec.field_Mutation_close_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } - case "AddCommentTimelineItem.message": - if e.complexity.AddCommentTimelineItem.Message == nil { + return e.complexity.Mutation.Close(childComplexity, args["repoRef"].(*string), args["prefix"].(string)), true + + case "Mutation.Commit": + if e.complexity.Mutation.Commit == nil { break } - return e.complexity.AddCommentTimelineItem.Message(childComplexity), true + args, err := ec.field_Mutation_commit_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } - case "AddCommentTimelineItem.messageIsEmpty": - if e.complexity.AddCommentTimelineItem.MessageIsEmpty == nil { + return e.complexity.Mutation.Commit(childComplexity, args["repoRef"].(*string), args["prefix"].(string)), true + + case "Mutation.NewBug": + if e.complexity.Mutation.NewBug == nil { break } - return e.complexity.AddCommentTimelineItem.MessageIsEmpty(childComplexity), true + args, err := ec.field_Mutation_newBug_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } - case "AddCommentTimelineItem.files": - if e.complexity.AddCommentTimelineItem.Files == nil { + return e.complexity.Mutation.NewBug(childComplexity, args["repoRef"].(*string), args["title"].(string), args["message"].(string), args["files"].([]git.Hash)), true + + case "Mutation.Open": + if e.complexity.Mutation.Open == nil { break } - return e.complexity.AddCommentTimelineItem.Files(childComplexity), true + args, err := ec.field_Mutation_open_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } - case "AddCommentTimelineItem.createdAt": - if e.complexity.AddCommentTimelineItem.CreatedAt == nil { + return e.complexity.Mutation.Open(childComplexity, args["repoRef"].(*string), args["prefix"].(string)), true + + case "Mutation.SetTitle": + if e.complexity.Mutation.SetTitle == nil { break } - return e.complexity.AddCommentTimelineItem.CreatedAt(childComplexity), true + args, err := ec.field_Mutation_setTitle_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } - case "AddCommentTimelineItem.lastEdit": - if e.complexity.AddCommentTimelineItem.LastEdit == nil { + return e.complexity.Mutation.SetTitle(childComplexity, args["repoRef"].(*string), args["prefix"].(string), args["title"].(string)), true + + case "OperationConnection.Edges": + if e.complexity.OperationConnection.Edges == nil { break } - return e.complexity.AddCommentTimelineItem.LastEdit(childComplexity), true + return e.complexity.OperationConnection.Edges(childComplexity), true - case "AddCommentTimelineItem.edited": - if e.complexity.AddCommentTimelineItem.Edited == nil { + case "OperationConnection.Nodes": + if e.complexity.OperationConnection.Nodes == nil { break } - return e.complexity.AddCommentTimelineItem.Edited(childComplexity), true + return e.complexity.OperationConnection.Nodes(childComplexity), true - case "AddCommentTimelineItem.history": - if e.complexity.AddCommentTimelineItem.History == nil { + case "OperationConnection.PageInfo": + if e.complexity.OperationConnection.PageInfo == nil { break } - return e.complexity.AddCommentTimelineItem.History(childComplexity), true + return e.complexity.OperationConnection.PageInfo(childComplexity), true - case "Bug.id": - if e.complexity.Bug.Id == nil { + case "OperationConnection.TotalCount": + if e.complexity.OperationConnection.TotalCount == nil { break } - return e.complexity.Bug.Id(childComplexity), true + return e.complexity.OperationConnection.TotalCount(childComplexity), true - case "Bug.humanId": - if e.complexity.Bug.HumanId == nil { + case "OperationEdge.Cursor": + if e.complexity.OperationEdge.Cursor == nil { break } - return e.complexity.Bug.HumanId(childComplexity), true + return e.complexity.OperationEdge.Cursor(childComplexity), true - case "Bug.status": - if e.complexity.Bug.Status == nil { + case "OperationEdge.Node": + if e.complexity.OperationEdge.Node == nil { break } - return e.complexity.Bug.Status(childComplexity), true + return e.complexity.OperationEdge.Node(childComplexity), true - case "Bug.title": - if e.complexity.Bug.Title == nil { + case "PageInfo.EndCursor": + if e.complexity.PageInfo.EndCursor == nil { break } - return e.complexity.Bug.Title(childComplexity), true + return e.complexity.PageInfo.EndCursor(childComplexity), true - case "Bug.labels": - if e.complexity.Bug.Labels == nil { + case "PageInfo.HasNextPage": + if e.complexity.PageInfo.HasNextPage == nil { break } - return e.complexity.Bug.Labels(childComplexity), true + return e.complexity.PageInfo.HasNextPage(childComplexity), true - case "Bug.author": - if e.complexity.Bug.Author == nil { + case "PageInfo.HasPreviousPage": + if e.complexity.PageInfo.HasPreviousPage == nil { break } - return e.complexity.Bug.Author(childComplexity), true + return e.complexity.PageInfo.HasPreviousPage(childComplexity), true - case "Bug.createdAt": - if e.complexity.Bug.CreatedAt == nil { + case "PageInfo.StartCursor": + if e.complexity.PageInfo.StartCursor == nil { break } - return e.complexity.Bug.CreatedAt(childComplexity), true + return e.complexity.PageInfo.StartCursor(childComplexity), true - case "Bug.lastEdit": - if e.complexity.Bug.LastEdit == nil { + case "Query.DefaultRepository": + if e.complexity.Query.DefaultRepository == nil { break } - return e.complexity.Bug.LastEdit(childComplexity), true + return e.complexity.Query.DefaultRepository(childComplexity), true - case "Bug.actors": - if e.complexity.Bug.Actors == nil { + case "Query.Repository": + if e.complexity.Query.Repository == nil { break } - args, err := field_Bug_actors_args(rawArgs) + args, err := ec.field_Query_repository_args(context.TODO(), rawArgs) if err != nil { return 0, false } - return e.complexity.Bug.Actors(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)), true + return e.complexity.Query.Repository(childComplexity, args["id"].(string)), true - case "Bug.participants": - if e.complexity.Bug.Participants == nil { + case "Repository.AllBugs": + if e.complexity.Repository.AllBugs == nil { break } - args, err := field_Bug_participants_args(rawArgs) + args, err := ec.field_Repository_allBugs_args(context.TODO(), rawArgs) if err != nil { return 0, false } - return e.complexity.Bug.Participants(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)), true + return e.complexity.Repository.AllBugs(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int), args["query"].(*string)), true - case "Bug.comments": - if e.complexity.Bug.Comments == nil { + case "Repository.AllIdentities": + if e.complexity.Repository.AllIdentities == nil { break } - args, err := field_Bug_comments_args(rawArgs) + args, err := ec.field_Repository_allIdentities_args(context.TODO(), rawArgs) if err != nil { return 0, false } - return e.complexity.Bug.Comments(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)), true + return e.complexity.Repository.AllIdentities(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)), true - case "Bug.timeline": - if e.complexity.Bug.Timeline == nil { + case "Repository.Bug": + if e.complexity.Repository.Bug == nil { break } - args, err := field_Bug_timeline_args(rawArgs) + args, err := ec.field_Repository_bug_args(context.TODO(), rawArgs) if err != nil { return 0, false } - return e.complexity.Bug.Timeline(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)), true + return e.complexity.Repository.Bug(childComplexity, args["prefix"].(string)), true - case "Bug.operations": - if e.complexity.Bug.Operations == nil { + case "Repository.Identity": + if e.complexity.Repository.Identity == nil { break } - args, err := field_Bug_operations_args(rawArgs) + args, err := ec.field_Repository_identity_args(context.TODO(), rawArgs) if err != nil { return 0, false } - return e.complexity.Bug.Operations(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)), true + return e.complexity.Repository.Identity(childComplexity, args["prefix"].(string)), true - case "BugConnection.edges": - if e.complexity.BugConnection.Edges == nil { + case "Repository.UserIdentity": + if e.complexity.Repository.UserIdentity == nil { break } - return e.complexity.BugConnection.Edges(childComplexity), true + return e.complexity.Repository.UserIdentity(childComplexity), true - case "BugConnection.nodes": - if e.complexity.BugConnection.Nodes == nil { + case "SetStatusOperation.Author": + if e.complexity.SetStatusOperation.Author == nil { break } - return e.complexity.BugConnection.Nodes(childComplexity), true + return e.complexity.SetStatusOperation.Author(childComplexity), true - case "BugConnection.pageInfo": - if e.complexity.BugConnection.PageInfo == nil { + case "SetStatusOperation.Date": + if e.complexity.SetStatusOperation.Date == nil { break } - return e.complexity.BugConnection.PageInfo(childComplexity), true + return e.complexity.SetStatusOperation.Date(childComplexity), true - case "BugConnection.totalCount": - if e.complexity.BugConnection.TotalCount == nil { + case "SetStatusOperation.Hash": + if e.complexity.SetStatusOperation.Hash == nil { break } - return e.complexity.BugConnection.TotalCount(childComplexity), true + return e.complexity.SetStatusOperation.Hash(childComplexity), true - case "BugEdge.cursor": - if e.complexity.BugEdge.Cursor == nil { - break - } - - return e.complexity.BugEdge.Cursor(childComplexity), true - - case "BugEdge.node": - if e.complexity.BugEdge.Node == nil { + case "SetStatusOperation.Status": + if e.complexity.SetStatusOperation.Status == nil { break } - return e.complexity.BugEdge.Node(childComplexity), true + return e.complexity.SetStatusOperation.Status(childComplexity), true - case "Comment.author": - if e.complexity.Comment.Author == nil { + case "SetStatusTimelineItem.Author": + if e.complexity.SetStatusTimelineItem.Author == nil { break } - return e.complexity.Comment.Author(childComplexity), true + return e.complexity.SetStatusTimelineItem.Author(childComplexity), true - case "Comment.message": - if e.complexity.Comment.Message == nil { + case "SetStatusTimelineItem.Date": + if e.complexity.SetStatusTimelineItem.Date == nil { break } - return e.complexity.Comment.Message(childComplexity), true + return e.complexity.SetStatusTimelineItem.Date(childComplexity), true - case "Comment.files": - if e.complexity.Comment.Files == nil { + case "SetStatusTimelineItem.Hash": + if e.complexity.SetStatusTimelineItem.Hash == nil { break } - return e.complexity.Comment.Files(childComplexity), true + return e.complexity.SetStatusTimelineItem.Hash(childComplexity), true - case "CommentConnection.edges": - if e.complexity.CommentConnection.Edges == nil { + case "SetStatusTimelineItem.Status": + if e.complexity.SetStatusTimelineItem.Status == nil { break } - return e.complexity.CommentConnection.Edges(childComplexity), true + return e.complexity.SetStatusTimelineItem.Status(childComplexity), true - case "CommentConnection.nodes": - if e.complexity.CommentConnection.Nodes == nil { + case "SetTitleOperation.Author": + if e.complexity.SetTitleOperation.Author == nil { break } - return e.complexity.CommentConnection.Nodes(childComplexity), true + return e.complexity.SetTitleOperation.Author(childComplexity), true - case "CommentConnection.pageInfo": - if e.complexity.CommentConnection.PageInfo == nil { + case "SetTitleOperation.Date": + if e.complexity.SetTitleOperation.Date == nil { break } - return e.complexity.CommentConnection.PageInfo(childComplexity), true + return e.complexity.SetTitleOperation.Date(childComplexity), true - case "CommentConnection.totalCount": - if e.complexity.CommentConnection.TotalCount == nil { + case "SetTitleOperation.Hash": + if e.complexity.SetTitleOperation.Hash == nil { break } - return e.complexity.CommentConnection.TotalCount(childComplexity), true + return e.complexity.SetTitleOperation.Hash(childComplexity), true - case "CommentEdge.cursor": - if e.complexity.CommentEdge.Cursor == nil { + case "SetTitleOperation.Title": + if e.complexity.SetTitleOperation.Title == nil { break } - return e.complexity.CommentEdge.Cursor(childComplexity), true + return e.complexity.SetTitleOperation.Title(childComplexity), true - case "CommentEdge.node": - if e.complexity.CommentEdge.Node == nil { + case "SetTitleOperation.Was": + if e.complexity.SetTitleOperation.Was == nil { break } - return e.complexity.CommentEdge.Node(childComplexity), true + return e.complexity.SetTitleOperation.Was(childComplexity), true - case "CommentHistoryStep.message": - if e.complexity.CommentHistoryStep.Message == nil { + case "SetTitleTimelineItem.Author": + if e.complexity.SetTitleTimelineItem.Author == nil { break } - return e.complexity.CommentHistoryStep.Message(childComplexity), true + return e.complexity.SetTitleTimelineItem.Author(childComplexity), true - case "CommentHistoryStep.date": - if e.complexity.CommentHistoryStep.Date == nil { + case "SetTitleTimelineItem.Date": + if e.complexity.SetTitleTimelineItem.Date == nil { break } - return e.complexity.CommentHistoryStep.Date(childComplexity), true + return e.complexity.SetTitleTimelineItem.Date(childComplexity), true - case "CreateOperation.hash": - if e.complexity.CreateOperation.Hash == nil { + case "SetTitleTimelineItem.Hash": + if e.complexity.SetTitleTimelineItem.Hash == nil { break } - return e.complexity.CreateOperation.Hash(childComplexity), true + return e.complexity.SetTitleTimelineItem.Hash(childComplexity), true - case "CreateOperation.author": - if e.complexity.CreateOperation.Author == nil { + case "SetTitleTimelineItem.Title": + if e.complexity.SetTitleTimelineItem.Title == nil { break } - return e.complexity.CreateOperation.Author(childComplexity), true + return e.complexity.SetTitleTimelineItem.Title(childComplexity), true - case "CreateOperation.date": - if e.complexity.CreateOperation.Date == nil { + case "SetTitleTimelineItem.Was": + if e.complexity.SetTitleTimelineItem.Was == nil { break } - return e.complexity.CreateOperation.Date(childComplexity), true + return e.complexity.SetTitleTimelineItem.Was(childComplexity), true - case "CreateOperation.title": - if e.complexity.CreateOperation.Title == nil { + case "TimelineItemConnection.Edges": + if e.complexity.TimelineItemConnection.Edges == nil { break } - return e.complexity.CreateOperation.Title(childComplexity), true + return e.complexity.TimelineItemConnection.Edges(childComplexity), true - case "CreateOperation.message": - if e.complexity.CreateOperation.Message == nil { + case "TimelineItemConnection.Nodes": + if e.complexity.TimelineItemConnection.Nodes == nil { break } - return e.complexity.CreateOperation.Message(childComplexity), true + return e.complexity.TimelineItemConnection.Nodes(childComplexity), true - case "CreateOperation.files": - if e.complexity.CreateOperation.Files == nil { + case "TimelineItemConnection.PageInfo": + if e.complexity.TimelineItemConnection.PageInfo == nil { break } - return e.complexity.CreateOperation.Files(childComplexity), true + return e.complexity.TimelineItemConnection.PageInfo(childComplexity), true - case "CreateTimelineItem.hash": - if e.complexity.CreateTimelineItem.Hash == nil { + case "TimelineItemConnection.TotalCount": + if e.complexity.TimelineItemConnection.TotalCount == nil { break } - return e.complexity.CreateTimelineItem.Hash(childComplexity), true + return e.complexity.TimelineItemConnection.TotalCount(childComplexity), true - case "CreateTimelineItem.author": - if e.complexity.CreateTimelineItem.Author == nil { + case "TimelineItemEdge.Cursor": + if e.complexity.TimelineItemEdge.Cursor == nil { break } - return e.complexity.CreateTimelineItem.Author(childComplexity), true + return e.complexity.TimelineItemEdge.Cursor(childComplexity), true - case "CreateTimelineItem.message": - if e.complexity.CreateTimelineItem.Message == nil { + case "TimelineItemEdge.Node": + if e.complexity.TimelineItemEdge.Node == nil { break } - return e.complexity.CreateTimelineItem.Message(childComplexity), true - - case "CreateTimelineItem.messageIsEmpty": - if e.complexity.CreateTimelineItem.MessageIsEmpty == nil { - break - } + return e.complexity.TimelineItemEdge.Node(childComplexity), true - return e.complexity.CreateTimelineItem.MessageIsEmpty(childComplexity), true + } + return 0, false +} - case "CreateTimelineItem.files": - if e.complexity.CreateTimelineItem.Files == nil { - break - } +func (e *executableSchema) Query(ctx context.Context, op *ast.OperationDefinition) *graphql.Response { + ec := executionContext{graphql.GetRequestContext(ctx), e} - return e.complexity.CreateTimelineItem.Files(childComplexity), true + buf := ec.RequestMiddleware(ctx, func(ctx context.Context) []byte { + data := ec._Query(ctx, op.SelectionSet) + var buf bytes.Buffer + data.MarshalGQL(&buf) + return buf.Bytes() + }) - case "CreateTimelineItem.createdAt": - if e.complexity.CreateTimelineItem.CreatedAt == nil { - break - } + return &graphql.Response{ + Data: buf, + Errors: ec.Errors, + Extensions: ec.Extensions, + } +} - return e.complexity.CreateTimelineItem.CreatedAt(childComplexity), true +func (e *executableSchema) Mutation(ctx context.Context, op *ast.OperationDefinition) *graphql.Response { + ec := executionContext{graphql.GetRequestContext(ctx), e} - case "CreateTimelineItem.lastEdit": - if e.complexity.CreateTimelineItem.LastEdit == nil { - break - } + buf := ec.RequestMiddleware(ctx, func(ctx context.Context) []byte { + data := ec._Mutation(ctx, op.SelectionSet) + var buf bytes.Buffer + data.MarshalGQL(&buf) + return buf.Bytes() + }) - return e.complexity.CreateTimelineItem.LastEdit(childComplexity), true + return &graphql.Response{ + Data: buf, + Errors: ec.Errors, + Extensions: ec.Extensions, + } +} - case "CreateTimelineItem.edited": - if e.complexity.CreateTimelineItem.Edited == nil { - break - } +func (e *executableSchema) Subscription(ctx context.Context, op *ast.OperationDefinition) func() *graphql.Response { + return graphql.OneShot(graphql.ErrorResponse(ctx, "subscriptions are not supported")) +} - return e.complexity.CreateTimelineItem.Edited(childComplexity), true +type executionContext struct { + *graphql.RequestContext + *executableSchema +} - case "CreateTimelineItem.history": - if e.complexity.CreateTimelineItem.History == nil { - break +func (ec *executionContext) FieldMiddleware(ctx context.Context, obj interface{}, next graphql.Resolver) (ret interface{}) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil } + }() + res, err := ec.ResolverMiddleware(ctx, next) + if err != nil { + ec.Error(ctx, err) + return nil + } + return res +} - return e.complexity.CreateTimelineItem.History(childComplexity), true +func (ec *executionContext) introspectSchema() (*introspection.Schema, error) { + if ec.DisableIntrospection { + return nil, errors.New("introspection disabled") + } + return introspection.WrapSchema(parsedSchema), nil +} - case "EditCommentOperation.hash": - if e.complexity.EditCommentOperation.Hash == nil { - break - } +func (ec *executionContext) introspectType(name string) (*introspection.Type, error) { + if ec.DisableIntrospection { + return nil, errors.New("introspection disabled") + } + return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil +} - return e.complexity.EditCommentOperation.Hash(childComplexity), true +var parsedSchema = gqlparser.MustLoadSchema( + &ast.Source{Name: "schema/bug.graphql", Input: `"""Represents a comment on a bug.""" +type Comment implements Authored { + """The author of this comment.""" + author: Identity! - case "EditCommentOperation.author": - if e.complexity.EditCommentOperation.Author == nil { - break - } + """The message of this comment.""" + message: String! - return e.complexity.EditCommentOperation.Author(childComplexity), true + """All media's hash referenced in this comment""" + files: [Hash!]! +} - case "EditCommentOperation.date": - if e.complexity.EditCommentOperation.Date == nil { - break - } +type CommentConnection { + edges: [CommentEdge!]! + nodes: [Comment!]! + pageInfo: PageInfo! + totalCount: Int! +} - return e.complexity.EditCommentOperation.Date(childComplexity), true +type CommentEdge { + cursor: String! + node: Comment! +} - case "EditCommentOperation.target": - if e.complexity.EditCommentOperation.Target == nil { - break - } +enum Status { + OPEN + CLOSED +} - return e.complexity.EditCommentOperation.Target(childComplexity), true +type Bug { + """The identifier for this bug""" + id: String! + """The human version (truncated) identifier for this bug""" + humanId: String! + status: Status! + title: String! + labels: [Label!]! + author: Identity! + createdAt: Time! + lastEdit: Time! - case "EditCommentOperation.message": - if e.complexity.EditCommentOperation.Message == nil { - break - } + """The actors of the bug. Actors are Identity that have interacted with the bug.""" + actors( + """Returns the elements in the list that come after the specified cursor.""" + after: String + """Returns the elements in the list that come before the specified cursor.""" + before: String + """Returns the first _n_ elements from the list.""" + first: Int + """Returns the last _n_ elements from the list.""" + last: Int + ): IdentityConnection! - return e.complexity.EditCommentOperation.Message(childComplexity), true + """The participants of the bug. Participants are Identity that have created or + added a comment on the bug.""" + participants( + """Returns the elements in the list that come after the specified cursor.""" + after: String + """Returns the elements in the list that come before the specified cursor.""" + before: String + """Returns the first _n_ elements from the list.""" + first: Int + """Returns the last _n_ elements from the list.""" + last: Int + ): IdentityConnection! - case "EditCommentOperation.files": - if e.complexity.EditCommentOperation.Files == nil { - break - } - - return e.complexity.EditCommentOperation.Files(childComplexity), true + comments( + """Returns the elements in the list that come after the specified cursor.""" + after: String + """Returns the elements in the list that come before the specified cursor.""" + before: String + """Returns the first _n_ elements from the list.""" + first: Int + """Returns the last _n_ elements from the list.""" + last: Int + ): CommentConnection! - case "Identity.id": - if e.complexity.Identity.Id == nil { - break - } + timeline( + """Returns the elements in the list that come after the specified cursor.""" + after: String + """Returns the elements in the list that come before the specified cursor.""" + before: String + """Returns the first _n_ elements from the list.""" + first: Int + """Returns the last _n_ elements from the list.""" + last: Int + ): TimelineItemConnection! - return e.complexity.Identity.Id(childComplexity), true + operations( + """Returns the elements in the list that come after the specified cursor.""" + after: String + """Returns the elements in the list that come before the specified cursor.""" + before: String + """Returns the first _n_ elements from the list.""" + first: Int + """Returns the last _n_ elements from the list.""" + last: Int + ): OperationConnection! +} - case "Identity.humanId": - if e.complexity.Identity.HumanId == nil { - break - } +"""The connection type for Bug.""" +type BugConnection { + """A list of edges.""" + edges: [BugEdge!]! + nodes: [Bug!]! + """Information to aid in pagination.""" + pageInfo: PageInfo! + """Identifies the total count of items in the connection.""" + totalCount: Int! +} - return e.complexity.Identity.HumanId(childComplexity), true +"""An edge in a connection.""" +type BugEdge { + """A cursor for use in pagination.""" + cursor: String! + """The item at the end of the edge.""" + node: Bug! +} - case "Identity.name": - if e.complexity.Identity.Name == nil { - break - } +`}, + &ast.Source{Name: "schema/identity.graphql", Input: `"""Represents an identity""" +type Identity { + """The identifier for this identity""" + id: String! + """The human version (truncated) identifier for this identity""" + humanId: String! + """The name of the person, if known.""" + name: String + """The email of the person, if known.""" + email: String + """The login of the person, if known.""" + login: String + """A string containing the either the name of the person, its login or both""" + displayName: String! + """An url to an avatar""" + avatarUrl: String + """isProtected is true if the chain of git commits started to be signed. + If that's the case, only signed commit with a valid key for this identity can be added.""" + isProtected: Boolean! +} - return e.complexity.Identity.Name(childComplexity), true +type IdentityConnection { + edges: [IdentityEdge!]! + nodes: [Identity!]! + pageInfo: PageInfo! + totalCount: Int! +} - case "Identity.email": - if e.complexity.Identity.Email == nil { - break - } +type IdentityEdge { + cursor: String! + node: Identity! +}`}, + &ast.Source{Name: "schema/operations.graphql", Input: `"""An operation applied to a bug.""" +interface Operation { + """The hash of the operation""" + hash: Hash! + """The operations author.""" + author: Identity! + """The datetime when this operation was issued.""" + date: Time! +} - return e.complexity.Identity.Email(childComplexity), true +# Connection - case "Identity.login": - if e.complexity.Identity.Login == nil { - break - } +"""The connection type for an Operation""" +type OperationConnection { + edges: [OperationEdge!]! + nodes: [Operation!]! + pageInfo: PageInfo! + totalCount: Int! +} - return e.complexity.Identity.Login(childComplexity), true +"""Represent an Operation""" +type OperationEdge { + cursor: String! + node: Operation! +} - case "Identity.displayName": - if e.complexity.Identity.DisplayName == nil { - break - } +# Operations - return e.complexity.Identity.DisplayName(childComplexity), true +type CreateOperation implements Operation & Authored { + """The hash of the operation""" + hash: Hash! + """The author of this object.""" + author: Identity! + """The datetime when this operation was issued.""" + date: Time! - case "Identity.avatarUrl": - if e.complexity.Identity.AvatarUrl == nil { - break - } + title: String! + message: String! + files: [Hash!]! +} - return e.complexity.Identity.AvatarUrl(childComplexity), true +type SetTitleOperation implements Operation & Authored { + """The hash of the operation""" + hash: Hash! + """The author of this object.""" + author: Identity! + """The datetime when this operation was issued.""" + date: Time! - case "Identity.isProtected": - if e.complexity.Identity.IsProtected == nil { - break - } + title: String! + was: String! +} - return e.complexity.Identity.IsProtected(childComplexity), true +type AddCommentOperation implements Operation & Authored { + """The hash of the operation""" + hash: Hash! + """The author of this object.""" + author: Identity! + """The datetime when this operation was issued.""" + date: Time! - case "IdentityConnection.edges": - if e.complexity.IdentityConnection.Edges == nil { - break - } + message: String! + files: [Hash!]! +} - return e.complexity.IdentityConnection.Edges(childComplexity), true +type EditCommentOperation implements Operation & Authored { + """The hash of the operation""" + hash: Hash! + """The author of this object.""" + author: Identity! + """The datetime when this operation was issued.""" + date: Time! - case "IdentityConnection.nodes": - if e.complexity.IdentityConnection.Nodes == nil { - break - } + target: Hash! + message: String! + files: [Hash!]! +} - return e.complexity.IdentityConnection.Nodes(childComplexity), true +type SetStatusOperation implements Operation & Authored { + """The hash of the operation""" + hash: Hash! + """The author of this object.""" + author: Identity! + """The datetime when this operation was issued.""" + date: Time! - case "IdentityConnection.pageInfo": - if e.complexity.IdentityConnection.PageInfo == nil { - break - } + status: Status! +} - return e.complexity.IdentityConnection.PageInfo(childComplexity), true +type LabelChangeOperation implements Operation & Authored { + """The hash of the operation""" + hash: Hash! + """The author of this object.""" + author: Identity! + """The datetime when this operation was issued.""" + date: Time! - case "IdentityConnection.totalCount": - if e.complexity.IdentityConnection.TotalCount == nil { - break - } + added: [Label!]! + removed: [Label!]! +} +`}, + &ast.Source{Name: "schema/repository.graphql", Input: ` +type Repository { + """All the bugs""" + allBugs( + """Returns the elements in the list that come after the specified cursor.""" + after: String + """Returns the elements in the list that come before the specified cursor.""" + before: String + """Returns the first _n_ elements from the list.""" + first: Int + """Returns the last _n_ elements from the list.""" + last: Int + """A query to select and order bugs""" + query: String + ): BugConnection! - return e.complexity.IdentityConnection.TotalCount(childComplexity), true + bug(prefix: String!): Bug - case "IdentityEdge.cursor": - if e.complexity.IdentityEdge.Cursor == nil { - break - } + """All the identities""" + allIdentities( + """Returns the elements in the list that come after the specified cursor.""" + after: String + """Returns the elements in the list that come before the specified cursor.""" + before: String + """Returns the first _n_ elements from the list.""" + first: Int + """Returns the last _n_ elements from the list.""" + last: Int + ): IdentityConnection! - return e.complexity.IdentityEdge.Cursor(childComplexity), true + identity(prefix: String!):Identity - case "IdentityEdge.node": - if e.complexity.IdentityEdge.Node == nil { - break - } + """The identity created or selected by the user as its own""" + userIdentity:Identity +}`}, + &ast.Source{Name: "schema/root.graphql", Input: `type Query { + defaultRepository: Repository + repository(id: String!): Repository +} - return e.complexity.IdentityEdge.Node(childComplexity), true +type Mutation { + newBug(repoRef: String, title: String!, message: String!, files: [Hash!]): Bug! - case "LabelChangeOperation.hash": - if e.complexity.LabelChangeOperation.Hash == nil { - break - } - - return e.complexity.LabelChangeOperation.Hash(childComplexity), true - - case "LabelChangeOperation.author": - if e.complexity.LabelChangeOperation.Author == nil { - break - } - - return e.complexity.LabelChangeOperation.Author(childComplexity), true - - case "LabelChangeOperation.date": - if e.complexity.LabelChangeOperation.Date == nil { - break - } + addComment(repoRef: String, prefix: String!, message: String!, files: [Hash!]): Bug! + changeLabels(repoRef: String, prefix: String!, added: [String!], removed: [String!]): Bug! + open(repoRef: String, prefix: String!): Bug! + close(repoRef: String, prefix: String!): Bug! + setTitle(repoRef: String, prefix: String!, title: String!): Bug! - return e.complexity.LabelChangeOperation.Date(childComplexity), true + commit(repoRef: String, prefix: String!): Bug! +} +`}, + &ast.Source{Name: "schema/timeline.graphql", Input: `"""An item in the timeline of events""" +interface TimelineItem { + """The hash of the source operation""" + hash: Hash! +} - case "LabelChangeOperation.added": - if e.complexity.LabelChangeOperation.Added == nil { - break - } +"""CommentHistoryStep hold one version of a message in the history""" +type CommentHistoryStep { + message: String! + date: Time! +} - return e.complexity.LabelChangeOperation.Added(childComplexity), true +# Connection - case "LabelChangeOperation.removed": - if e.complexity.LabelChangeOperation.Removed == nil { - break - } +"""The connection type for TimelineItem""" +type TimelineItemConnection { + edges: [TimelineItemEdge!]! + nodes: [TimelineItem!]! + pageInfo: PageInfo! + totalCount: Int! +} - return e.complexity.LabelChangeOperation.Removed(childComplexity), true +"""Represent a TimelineItem""" +type TimelineItemEdge { + cursor: String! + node: TimelineItem! +} - case "LabelChangeTimelineItem.hash": - if e.complexity.LabelChangeTimelineItem.Hash == nil { - break - } +# Items - return e.complexity.LabelChangeTimelineItem.Hash(childComplexity), true +"""CreateTimelineItem is a TimelineItem that represent the creation of a bug and its message edition history""" +type CreateTimelineItem implements TimelineItem { + """The hash of the source operation""" + hash: Hash! + author: Identity! + message: String! + messageIsEmpty: Boolean! + files: [Hash!]! + createdAt: Time! + lastEdit: Time! + edited: Boolean! + history: [CommentHistoryStep!]! +} - case "LabelChangeTimelineItem.author": - if e.complexity.LabelChangeTimelineItem.Author == nil { - break - } +"""AddCommentTimelineItem is a TimelineItem that represent a Comment and its edition history""" +type AddCommentTimelineItem implements TimelineItem { + """The hash of the source operation""" + hash: Hash! + author: Identity! + message: String! + messageIsEmpty: Boolean! + files: [Hash!]! + createdAt: Time! + lastEdit: Time! + edited: Boolean! + history: [CommentHistoryStep!]! +} - return e.complexity.LabelChangeTimelineItem.Author(childComplexity), true +"""LabelChangeTimelineItem is a TimelineItem that represent a change in the labels of a bug""" +type LabelChangeTimelineItem implements TimelineItem { + """The hash of the source operation""" + hash: Hash! + author: Identity! + date: Time! + added: [Label!]! + removed: [Label!]! +} - case "LabelChangeTimelineItem.date": - if e.complexity.LabelChangeTimelineItem.Date == nil { - break - } +"""SetStatusTimelineItem is a TimelineItem that represent a change in the status of a bug""" +type SetStatusTimelineItem implements TimelineItem { + """The hash of the source operation""" + hash: Hash! + author: Identity! + date: Time! + status: Status! +} - return e.complexity.LabelChangeTimelineItem.Date(childComplexity), true +"""LabelChangeTimelineItem is a TimelineItem that represent a change in the title of a bug""" +type SetTitleTimelineItem implements TimelineItem { + """The hash of the source operation""" + hash: Hash! + author: Identity! + date: Time! + title: String! + was: String! +} +`}, + &ast.Source{Name: "schema/types.graphql", Input: `scalar Time +scalar Label +scalar Hash - case "LabelChangeTimelineItem.added": - if e.complexity.LabelChangeTimelineItem.Added == nil { - break - } +"""Information about pagination in a connection.""" +type PageInfo { + """When paginating forwards, are there more items?""" + hasNextPage: Boolean! + """When paginating backwards, are there more items?""" + hasPreviousPage: Boolean! + """When paginating backwards, the cursor to continue.""" + startCursor: String! + """When paginating forwards, the cursor to continue.""" + endCursor: String! +} - return e.complexity.LabelChangeTimelineItem.Added(childComplexity), true +"""An object that has an author.""" +interface Authored { + """The author of this object.""" + author: Identity! +}`}, +) - case "LabelChangeTimelineItem.removed": - if e.complexity.LabelChangeTimelineItem.Removed == nil { - break - } +// endregion ************************** generated!.gotpl ************************** - return e.complexity.LabelChangeTimelineItem.Removed(childComplexity), true +// region ***************************** args.gotpl ***************************** - case "Mutation.newBug": - if e.complexity.Mutation.NewBug == nil { - break +func (ec *executionContext) field_Bug_actors_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *string + if tmp, ok := rawArgs["after"]; ok { + arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + if err != nil { + return nil, err } - - args, err := field_Mutation_newBug_args(rawArgs) + } + args["after"] = arg0 + var arg1 *string + if tmp, ok := rawArgs["before"]; ok { + arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp) if err != nil { - return 0, false + return nil, err } - - return e.complexity.Mutation.NewBug(childComplexity, args["repoRef"].(*string), args["title"].(string), args["message"].(string), args["files"].([]git.Hash)), true - - case "Mutation.addComment": - if e.complexity.Mutation.AddComment == nil { - break + } + args["before"] = arg1 + var arg2 *int + if tmp, ok := rawArgs["first"]; ok { + arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err } - - args, err := field_Mutation_addComment_args(rawArgs) + } + args["first"] = arg2 + var arg3 *int + if tmp, ok := rawArgs["last"]; ok { + arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp) if err != nil { - return 0, false + return nil, err } + } + args["last"] = arg3 + return args, nil +} - return e.complexity.Mutation.AddComment(childComplexity, args["repoRef"].(*string), args["prefix"].(string), args["message"].(string), args["files"].([]git.Hash)), true - - case "Mutation.changeLabels": - if e.complexity.Mutation.ChangeLabels == nil { - break +func (ec *executionContext) field_Bug_comments_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *string + if tmp, ok := rawArgs["after"]; ok { + arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + if err != nil { + return nil, err } - - args, err := field_Mutation_changeLabels_args(rawArgs) + } + args["after"] = arg0 + var arg1 *string + if tmp, ok := rawArgs["before"]; ok { + arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp) if err != nil { - return 0, false + return nil, err } - - return e.complexity.Mutation.ChangeLabels(childComplexity, args["repoRef"].(*string), args["prefix"].(string), args["added"].([]string), args["removed"].([]string)), true - - case "Mutation.open": - if e.complexity.Mutation.Open == nil { - break + } + args["before"] = arg1 + var arg2 *int + if tmp, ok := rawArgs["first"]; ok { + arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err } - - args, err := field_Mutation_open_args(rawArgs) + } + args["first"] = arg2 + var arg3 *int + if tmp, ok := rawArgs["last"]; ok { + arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp) if err != nil { - return 0, false + return nil, err } + } + args["last"] = arg3 + return args, nil +} - return e.complexity.Mutation.Open(childComplexity, args["repoRef"].(*string), args["prefix"].(string)), true - - case "Mutation.close": - if e.complexity.Mutation.Close == nil { - break +func (ec *executionContext) field_Bug_operations_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *string + if tmp, ok := rawArgs["after"]; ok { + arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + if err != nil { + return nil, err } - - args, err := field_Mutation_close_args(rawArgs) + } + args["after"] = arg0 + var arg1 *string + if tmp, ok := rawArgs["before"]; ok { + arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp) if err != nil { - return 0, false + return nil, err } - - return e.complexity.Mutation.Close(childComplexity, args["repoRef"].(*string), args["prefix"].(string)), true - - case "Mutation.setTitle": - if e.complexity.Mutation.SetTitle == nil { - break + } + args["before"] = arg1 + var arg2 *int + if tmp, ok := rawArgs["first"]; ok { + arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err } - - args, err := field_Mutation_setTitle_args(rawArgs) + } + args["first"] = arg2 + var arg3 *int + if tmp, ok := rawArgs["last"]; ok { + arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp) if err != nil { - return 0, false + return nil, err } + } + args["last"] = arg3 + return args, nil +} - return e.complexity.Mutation.SetTitle(childComplexity, args["repoRef"].(*string), args["prefix"].(string), args["title"].(string)), true - - case "Mutation.commit": - if e.complexity.Mutation.Commit == nil { - break +func (ec *executionContext) field_Bug_participants_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *string + if tmp, ok := rawArgs["after"]; ok { + arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + if err != nil { + return nil, err } - - args, err := field_Mutation_commit_args(rawArgs) + } + args["after"] = arg0 + var arg1 *string + if tmp, ok := rawArgs["before"]; ok { + arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp) if err != nil { - return 0, false + return nil, err } - - return e.complexity.Mutation.Commit(childComplexity, args["repoRef"].(*string), args["prefix"].(string)), true - - case "OperationConnection.edges": - if e.complexity.OperationConnection.Edges == nil { - break + } + args["before"] = arg1 + var arg2 *int + if tmp, ok := rawArgs["first"]; ok { + arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err } - - return e.complexity.OperationConnection.Edges(childComplexity), true - - case "OperationConnection.nodes": - if e.complexity.OperationConnection.Nodes == nil { - break + } + args["first"] = arg2 + var arg3 *int + if tmp, ok := rawArgs["last"]; ok { + arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err } + } + args["last"] = arg3 + return args, nil +} - return e.complexity.OperationConnection.Nodes(childComplexity), true - - case "OperationConnection.pageInfo": - if e.complexity.OperationConnection.PageInfo == nil { - break +func (ec *executionContext) field_Bug_timeline_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *string + if tmp, ok := rawArgs["after"]; ok { + arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + if err != nil { + return nil, err } - - return e.complexity.OperationConnection.PageInfo(childComplexity), true - - case "OperationConnection.totalCount": - if e.complexity.OperationConnection.TotalCount == nil { - break + } + args["after"] = arg0 + var arg1 *string + if tmp, ok := rawArgs["before"]; ok { + arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + if err != nil { + return nil, err } - - return e.complexity.OperationConnection.TotalCount(childComplexity), true - - case "OperationEdge.cursor": - if e.complexity.OperationEdge.Cursor == nil { - break + } + args["before"] = arg1 + var arg2 *int + if tmp, ok := rawArgs["first"]; ok { + arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err } - - return e.complexity.OperationEdge.Cursor(childComplexity), true - - case "OperationEdge.node": - if e.complexity.OperationEdge.Node == nil { - break + } + args["first"] = arg2 + var arg3 *int + if tmp, ok := rawArgs["last"]; ok { + arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err } + } + args["last"] = arg3 + return args, nil +} - return e.complexity.OperationEdge.Node(childComplexity), true - - case "PageInfo.hasNextPage": - if e.complexity.PageInfo.HasNextPage == nil { - break +func (ec *executionContext) field_Mutation_addComment_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *string + if tmp, ok := rawArgs["repoRef"]; ok { + arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + if err != nil { + return nil, err } - - return e.complexity.PageInfo.HasNextPage(childComplexity), true - - case "PageInfo.hasPreviousPage": - if e.complexity.PageInfo.HasPreviousPage == nil { - break + } + args["repoRef"] = arg0 + var arg1 string + if tmp, ok := rawArgs["prefix"]; ok { + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err } - - return e.complexity.PageInfo.HasPreviousPage(childComplexity), true - - case "PageInfo.startCursor": - if e.complexity.PageInfo.StartCursor == nil { - break + } + args["prefix"] = arg1 + var arg2 string + if tmp, ok := rawArgs["message"]; ok { + arg2, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err } - - return e.complexity.PageInfo.StartCursor(childComplexity), true - - case "PageInfo.endCursor": - if e.complexity.PageInfo.EndCursor == nil { - break + } + args["message"] = arg2 + var arg3 []git.Hash + if tmp, ok := rawArgs["files"]; ok { + arg3, err = ec.unmarshalOHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, tmp) + if err != nil { + return nil, err } + } + args["files"] = arg3 + return args, nil +} - return e.complexity.PageInfo.EndCursor(childComplexity), true - - case "Query.defaultRepository": - if e.complexity.Query.DefaultRepository == nil { - break +func (ec *executionContext) field_Mutation_changeLabels_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *string + if tmp, ok := rawArgs["repoRef"]; ok { + arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + if err != nil { + return nil, err } - - return e.complexity.Query.DefaultRepository(childComplexity), true - - case "Query.repository": - if e.complexity.Query.Repository == nil { - break + } + args["repoRef"] = arg0 + var arg1 string + if tmp, ok := rawArgs["prefix"]; ok { + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err } - - args, err := field_Query_repository_args(rawArgs) + } + args["prefix"] = arg1 + var arg2 []string + if tmp, ok := rawArgs["added"]; ok { + arg2, err = ec.unmarshalOString2ᚕstring(ctx, tmp) if err != nil { - return 0, false + return nil, err } - - return e.complexity.Query.Repository(childComplexity, args["id"].(string)), true - - case "Repository.allBugs": - if e.complexity.Repository.AllBugs == nil { - break + } + args["added"] = arg2 + var arg3 []string + if tmp, ok := rawArgs["removed"]; ok { + arg3, err = ec.unmarshalOString2ᚕstring(ctx, tmp) + if err != nil { + return nil, err } + } + args["removed"] = arg3 + return args, nil +} - args, err := field_Repository_allBugs_args(rawArgs) +func (ec *executionContext) field_Mutation_close_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *string + if tmp, ok := rawArgs["repoRef"]; ok { + arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) if err != nil { - return 0, false + return nil, err } - - return e.complexity.Repository.AllBugs(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int), args["query"].(*string)), true - - case "Repository.bug": - if e.complexity.Repository.Bug == nil { - break + } + args["repoRef"] = arg0 + var arg1 string + if tmp, ok := rawArgs["prefix"]; ok { + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err } + } + args["prefix"] = arg1 + return args, nil +} - args, err := field_Repository_bug_args(rawArgs) +func (ec *executionContext) field_Mutation_commit_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *string + if tmp, ok := rawArgs["repoRef"]; ok { + arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) if err != nil { - return 0, false + return nil, err } - - return e.complexity.Repository.Bug(childComplexity, args["prefix"].(string)), true - - case "Repository.allIdentities": - if e.complexity.Repository.AllIdentities == nil { - break + } + args["repoRef"] = arg0 + var arg1 string + if tmp, ok := rawArgs["prefix"]; ok { + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err } + } + args["prefix"] = arg1 + return args, nil +} - args, err := field_Repository_allIdentities_args(rawArgs) +func (ec *executionContext) field_Mutation_newBug_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *string + if tmp, ok := rawArgs["repoRef"]; ok { + arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) if err != nil { - return 0, false + return nil, err } - - return e.complexity.Repository.AllIdentities(childComplexity, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)), true - - case "Repository.identity": - if e.complexity.Repository.Identity == nil { - break + } + args["repoRef"] = arg0 + var arg1 string + if tmp, ok := rawArgs["title"]; ok { + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err } - - args, err := field_Repository_identity_args(rawArgs) + } + args["title"] = arg1 + var arg2 string + if tmp, ok := rawArgs["message"]; ok { + arg2, err = ec.unmarshalNString2string(ctx, tmp) if err != nil { - return 0, false + return nil, err } - - return e.complexity.Repository.Identity(childComplexity, args["prefix"].(string)), true - - case "Repository.userIdentity": - if e.complexity.Repository.UserIdentity == nil { - break + } + args["message"] = arg2 + var arg3 []git.Hash + if tmp, ok := rawArgs["files"]; ok { + arg3, err = ec.unmarshalOHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, tmp) + if err != nil { + return nil, err } + } + args["files"] = arg3 + return args, nil +} - return e.complexity.Repository.UserIdentity(childComplexity), true - - case "SetStatusOperation.hash": - if e.complexity.SetStatusOperation.Hash == nil { - break - } - - return e.complexity.SetStatusOperation.Hash(childComplexity), true - - case "SetStatusOperation.author": - if e.complexity.SetStatusOperation.Author == nil { - break +func (ec *executionContext) field_Mutation_open_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *string + if tmp, ok := rawArgs["repoRef"]; ok { + arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + if err != nil { + return nil, err } - - return e.complexity.SetStatusOperation.Author(childComplexity), true - - case "SetStatusOperation.date": - if e.complexity.SetStatusOperation.Date == nil { - break + } + args["repoRef"] = arg0 + var arg1 string + if tmp, ok := rawArgs["prefix"]; ok { + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err } + } + args["prefix"] = arg1 + return args, nil +} - return e.complexity.SetStatusOperation.Date(childComplexity), true - - case "SetStatusOperation.status": - if e.complexity.SetStatusOperation.Status == nil { - break +func (ec *executionContext) field_Mutation_setTitle_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *string + if tmp, ok := rawArgs["repoRef"]; ok { + arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + if err != nil { + return nil, err } - - return e.complexity.SetStatusOperation.Status(childComplexity), true - - case "SetStatusTimelineItem.hash": - if e.complexity.SetStatusTimelineItem.Hash == nil { - break + } + args["repoRef"] = arg0 + var arg1 string + if tmp, ok := rawArgs["prefix"]; ok { + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err } - - return e.complexity.SetStatusTimelineItem.Hash(childComplexity), true - - case "SetStatusTimelineItem.author": - if e.complexity.SetStatusTimelineItem.Author == nil { - break + } + args["prefix"] = arg1 + var arg2 string + if tmp, ok := rawArgs["title"]; ok { + arg2, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err } + } + args["title"] = arg2 + return args, nil +} - return e.complexity.SetStatusTimelineItem.Author(childComplexity), true - - case "SetStatusTimelineItem.date": - if e.complexity.SetStatusTimelineItem.Date == nil { - break +func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["name"]; ok { + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err } + } + args["name"] = arg0 + return args, nil +} - return e.complexity.SetStatusTimelineItem.Date(childComplexity), true - - case "SetStatusTimelineItem.status": - if e.complexity.SetStatusTimelineItem.Status == nil { - break +func (ec *executionContext) field_Query_repository_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["id"]; ok { + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err } + } + args["id"] = arg0 + return args, nil +} - return e.complexity.SetStatusTimelineItem.Status(childComplexity), true - - case "SetTitleOperation.hash": - if e.complexity.SetTitleOperation.Hash == nil { - break +func (ec *executionContext) field_Repository_allBugs_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *string + if tmp, ok := rawArgs["after"]; ok { + arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + if err != nil { + return nil, err } - - return e.complexity.SetTitleOperation.Hash(childComplexity), true - - case "SetTitleOperation.author": - if e.complexity.SetTitleOperation.Author == nil { - break + } + args["after"] = arg0 + var arg1 *string + if tmp, ok := rawArgs["before"]; ok { + arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + if err != nil { + return nil, err } - - return e.complexity.SetTitleOperation.Author(childComplexity), true - - case "SetTitleOperation.date": - if e.complexity.SetTitleOperation.Date == nil { - break + } + args["before"] = arg1 + var arg2 *int + if tmp, ok := rawArgs["first"]; ok { + arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err } - - return e.complexity.SetTitleOperation.Date(childComplexity), true - - case "SetTitleOperation.title": - if e.complexity.SetTitleOperation.Title == nil { - break + } + args["first"] = arg2 + var arg3 *int + if tmp, ok := rawArgs["last"]; ok { + arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err } - - return e.complexity.SetTitleOperation.Title(childComplexity), true - - case "SetTitleOperation.was": - if e.complexity.SetTitleOperation.Was == nil { - break + } + args["last"] = arg3 + var arg4 *string + if tmp, ok := rawArgs["query"]; ok { + arg4, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + if err != nil { + return nil, err } + } + args["query"] = arg4 + return args, nil +} - return e.complexity.SetTitleOperation.Was(childComplexity), true - - case "SetTitleTimelineItem.hash": - if e.complexity.SetTitleTimelineItem.Hash == nil { - break +func (ec *executionContext) field_Repository_allIdentities_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *string + if tmp, ok := rawArgs["after"]; ok { + arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + if err != nil { + return nil, err } - - return e.complexity.SetTitleTimelineItem.Hash(childComplexity), true - - case "SetTitleTimelineItem.author": - if e.complexity.SetTitleTimelineItem.Author == nil { - break + } + args["after"] = arg0 + var arg1 *string + if tmp, ok := rawArgs["before"]; ok { + arg1, err = ec.unmarshalOString2ᚖstring(ctx, tmp) + if err != nil { + return nil, err } - - return e.complexity.SetTitleTimelineItem.Author(childComplexity), true - - case "SetTitleTimelineItem.date": - if e.complexity.SetTitleTimelineItem.Date == nil { - break + } + args["before"] = arg1 + var arg2 *int + if tmp, ok := rawArgs["first"]; ok { + arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err } - - return e.complexity.SetTitleTimelineItem.Date(childComplexity), true - - case "SetTitleTimelineItem.title": - if e.complexity.SetTitleTimelineItem.Title == nil { - break + } + args["first"] = arg2 + var arg3 *int + if tmp, ok := rawArgs["last"]; ok { + arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err } + } + args["last"] = arg3 + return args, nil +} - return e.complexity.SetTitleTimelineItem.Title(childComplexity), true - - case "SetTitleTimelineItem.was": - if e.complexity.SetTitleTimelineItem.Was == nil { - break +func (ec *executionContext) field_Repository_bug_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["prefix"]; ok { + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err } + } + args["prefix"] = arg0 + return args, nil +} - return e.complexity.SetTitleTimelineItem.Was(childComplexity), true - - case "TimelineItemConnection.edges": - if e.complexity.TimelineItemConnection.Edges == nil { - break +func (ec *executionContext) field_Repository_identity_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["prefix"]; ok { + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err } + } + args["prefix"] = arg0 + return args, nil +} - return e.complexity.TimelineItemConnection.Edges(childComplexity), true - - case "TimelineItemConnection.nodes": - if e.complexity.TimelineItemConnection.Nodes == nil { - break +func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 bool + if tmp, ok := rawArgs["includeDeprecated"]; ok { + arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) + if err != nil { + return nil, err } + } + args["includeDeprecated"] = arg0 + return args, nil +} - return e.complexity.TimelineItemConnection.Nodes(childComplexity), true - - case "TimelineItemConnection.pageInfo": - if e.complexity.TimelineItemConnection.PageInfo == nil { - break +func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 bool + if tmp, ok := rawArgs["includeDeprecated"]; ok { + arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) + if err != nil { + return nil, err } + } + args["includeDeprecated"] = arg0 + return args, nil +} - return e.complexity.TimelineItemConnection.PageInfo(childComplexity), true +// endregion ***************************** args.gotpl ***************************** - case "TimelineItemConnection.totalCount": - if e.complexity.TimelineItemConnection.TotalCount == nil { - break +// region **************************** field.gotpl ***************************** + +func (ec *executionContext) _AddCommentOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "AddCommentOperation", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res) +} + +func (ec *executionContext) _AddCommentOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "AddCommentOperation", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Author, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(identity.Interface) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res) +} + +func (ec *executionContext) _AddCommentOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "AddCommentOperation", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.AddCommentOperation().Date(rctx, 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) +} + +func (ec *executionContext) _AddCommentOperation_message(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "AddCommentOperation", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _AddCommentOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "AddCommentOperation", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res) +} + +func (ec *executionContext) _AddCommentTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "AddCommentTimelineItem", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Hash(), 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res) +} + +func (ec *executionContext) _AddCommentTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "AddCommentTimelineItem", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Author, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(identity.Interface) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res) +} + +func (ec *executionContext) _AddCommentTimelineItem_message(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "AddCommentTimelineItem", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _AddCommentTimelineItem_messageIsEmpty(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "AddCommentTimelineItem", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MessageIsEmpty(), nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) _AddCommentTimelineItem_files(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "AddCommentTimelineItem", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res) +} + +func (ec *executionContext) _AddCommentTimelineItem_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "AddCommentTimelineItem", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.AddCommentTimelineItem().CreatedAt(rctx, 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) +} + +func (ec *executionContext) _AddCommentTimelineItem_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "AddCommentTimelineItem", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.AddCommentTimelineItem().LastEdit(rctx, 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) +} + +func (ec *executionContext) _AddCommentTimelineItem_edited(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "AddCommentTimelineItem", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) _AddCommentTimelineItem_history(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "AddCommentTimelineItem", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNCommentHistoryStep2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐCommentHistoryStep(ctx, field.Selections, res) +} + +func (ec *executionContext) _Bug_id(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "Bug", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Bug_humanId(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "Bug", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Bug_status(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "Bug", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Bug().Status(rctx, 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐStatus(ctx, field.Selections, res) +} + +func (ec *executionContext) _Bug_title(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "Bug", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Title, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Bug_labels(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "Bug", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Labels, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]bug.Label) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabel(ctx, field.Selections, res) +} + +func (ec *executionContext) _Bug_author(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "Bug", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Author, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(identity.Interface) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res) +} + +func (ec *executionContext) _Bug_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "Bug", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.CreatedAt, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(time.Time) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) +} + +func (ec *executionContext) _Bug_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "Bug", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Bug().LastEdit(rctx, 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) +} + +func (ec *executionContext) _Bug_actors(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "Bug", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Bug_actors_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + rctx.Args = args + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Bug().Actors(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)) + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*models.IdentityConnection) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res) +} + +func (ec *executionContext) _Bug_participants(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "Bug", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Bug_participants_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + rctx.Args = args + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Bug().Participants(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)) + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*models.IdentityConnection) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res) +} + +func (ec *executionContext) _Bug_comments(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "Bug", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Bug_comments_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + rctx.Args = args + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Bug().Comments(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)) + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*models.CommentConnection) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNCommentConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCommentConnection(ctx, field.Selections, res) +} + +func (ec *executionContext) _Bug_timeline(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "Bug", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Bug_timeline_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + rctx.Args = args + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Bug().Timeline(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)) + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*models.TimelineItemConnection) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNTimelineItemConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐTimelineItemConnection(ctx, field.Selections, res) +} + +func (ec *executionContext) _Bug_operations(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "Bug", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Bug_operations_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + rctx.Args = args + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Bug().Operations(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)) + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*models.OperationConnection) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNOperationConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐOperationConnection(ctx, field.Selections, res) +} + +func (ec *executionContext) _BugConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "BugConnection", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Edges, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]models.BugEdge) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNBugEdge2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugEdge(ctx, field.Selections, res) +} + +func (ec *executionContext) _BugConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "BugConnection", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Nodes, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]bug.Snapshot) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNBug2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, field.Selections, res) +} + +func (ec *executionContext) _BugConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "BugConnection", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PageInfo, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(models.PageInfo) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNPageInfo2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) _BugConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "BugConnection", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TotalCount, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) _BugEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.BugEdge) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "BugEdge", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Cursor, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _BugEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.BugEdge) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "BugEdge", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Node, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bug.Snapshot) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, field.Selections, res) +} + +func (ec *executionContext) _Comment_author(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "Comment", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Author, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(identity.Interface) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res) +} + +func (ec *executionContext) _Comment_message(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "Comment", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Comment_files(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "Comment", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res) +} + +func (ec *executionContext) _CommentConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CommentConnection", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Edges, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]models.CommentEdge) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNCommentEdge2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCommentEdge(ctx, field.Selections, res) +} + +func (ec *executionContext) _CommentConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CommentConnection", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Nodes, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]bug.Comment) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNComment2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐComment(ctx, field.Selections, res) +} + +func (ec *executionContext) _CommentConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CommentConnection", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PageInfo, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(models.PageInfo) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNPageInfo2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) _CommentConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CommentConnection", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TotalCount, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) _CommentEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.CommentEdge) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CommentEdge", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Cursor, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _CommentEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.CommentEdge) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CommentEdge", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Node, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bug.Comment) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNComment2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐComment(ctx, field.Selections, res) +} + +func (ec *executionContext) _CommentHistoryStep_message(ctx context.Context, field graphql.CollectedField, obj *bug.CommentHistoryStep) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CommentHistoryStep", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _CommentHistoryStep_date(ctx context.Context, field graphql.CollectedField, obj *bug.CommentHistoryStep) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CommentHistoryStep", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.CommentHistoryStep().Date(rctx, 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) +} + +func (ec *executionContext) _CreateOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CreateOperation", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res) +} + +func (ec *executionContext) _CreateOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CreateOperation", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Author, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(identity.Interface) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res) +} + +func (ec *executionContext) _CreateOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CreateOperation", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.CreateOperation().Date(rctx, 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) +} + +func (ec *executionContext) _CreateOperation_title(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CreateOperation", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Title, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _CreateOperation_message(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CreateOperation", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _CreateOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CreateOperation", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res) +} + +func (ec *executionContext) _CreateTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CreateTimelineItem", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Hash(), 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res) +} + +func (ec *executionContext) _CreateTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CreateTimelineItem", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Author, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") } + return graphql.Null + } + res := resTmp.(identity.Interface) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res) +} - return e.complexity.TimelineItemConnection.TotalCount(childComplexity), true - - case "TimelineItemEdge.cursor": - if e.complexity.TimelineItemEdge.Cursor == nil { - break +func (ec *executionContext) _CreateTimelineItem_message(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CreateTimelineItem", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNString2string(ctx, field.Selections, res) +} - return e.complexity.TimelineItemEdge.Cursor(childComplexity), true - - case "TimelineItemEdge.node": - if e.complexity.TimelineItemEdge.Node == nil { - break +func (ec *executionContext) _CreateTimelineItem_messageIsEmpty(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CreateTimelineItem", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MessageIsEmpty(), nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") } - - return e.complexity.TimelineItemEdge.Node(childComplexity), true - + return graphql.Null } - return 0, false + res := resTmp.(bool) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (e *executableSchema) Query(ctx context.Context, op *ast.OperationDefinition) *graphql.Response { - ec := executionContext{graphql.GetRequestContext(ctx), e} - - buf := ec.RequestMiddleware(ctx, func(ctx context.Context) []byte { - data := ec._Query(ctx, op.SelectionSet) - var buf bytes.Buffer - data.MarshalGQL(&buf) - return buf.Bytes() +func (ec *executionContext) _CreateTimelineItem_files(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CreateTimelineItem", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Files, nil }) - - return &graphql.Response{ - Data: buf, - Errors: ec.Errors, - Extensions: ec.Extensions} + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]git.Hash) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res) } -func (e *executableSchema) Mutation(ctx context.Context, op *ast.OperationDefinition) *graphql.Response { - ec := executionContext{graphql.GetRequestContext(ctx), e} - - buf := ec.RequestMiddleware(ctx, func(ctx context.Context) []byte { - data := ec._Mutation(ctx, op.SelectionSet) - var buf bytes.Buffer - data.MarshalGQL(&buf) - return buf.Bytes() +func (ec *executionContext) _CreateTimelineItem_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CreateTimelineItem", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.CreateTimelineItem().CreatedAt(rctx, obj) }) - - return &graphql.Response{ - Data: buf, - Errors: ec.Errors, - Extensions: ec.Extensions, + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null } + res := resTmp.(*time.Time) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (e *executableSchema) Subscription(ctx context.Context, op *ast.OperationDefinition) func() *graphql.Response { - return graphql.OneShot(graphql.ErrorResponse(ctx, "subscriptions are not supported")) +func (ec *executionContext) _CreateTimelineItem_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CreateTimelineItem", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.CreateTimelineItem().LastEdit(rctx, 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -type executionContext struct { - *graphql.RequestContext - *executableSchema +func (ec *executionContext) _CreateTimelineItem_edited(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CreateTimelineItem", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -var addCommentOperationImplementors = []string{"AddCommentOperation", "Operation", "Authored"} - -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _AddCommentOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.AddCommentOperation) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, addCommentOperationImplementors) - - 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("AddCommentOperation") - case "hash": - out.Values[i] = ec._AddCommentOperation_hash(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "author": - out.Values[i] = ec._AddCommentOperation_author(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._AddCommentOperation_date(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - wg.Done() - }(i, field) - case "message": - out.Values[i] = ec._AddCommentOperation_message(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "files": - out.Values[i] = ec._AddCommentOperation_files(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - default: - panic("unknown field " + strconv.Quote(field.Name)) - } +func (ec *executionContext) _CreateTimelineItem_history(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "CreateTimelineItem", + Field: field, + Args: nil, + IsMethod: false, } - wg.Wait() - if invalid { + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.History, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - return out + res := resTmp.([]bug.CommentHistoryStep) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNCommentHistoryStep2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐCommentHistoryStep(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _AddCommentOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) graphql.Marshaler { +func (ec *executionContext) _EditCommentOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "AddCommentOperation", - Args: nil, - Field: field, + Object: "EditCommentOperation", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) @@ -2396,17 +4147,17 @@ func (ec *executionContext) _AddCommentOperation_hash(ctx context.Context, field res := resTmp.(git.Hash) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return res + return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _AddCommentOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) graphql.Marshaler { +func (ec *executionContext) _EditCommentOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "AddCommentOperation", - Args: nil, - Field: field, + Object: "EditCommentOperation", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) @@ -2423,24 +4174,50 @@ func (ec *executionContext) _AddCommentOperation_author(ctx context.Context, fie res := resTmp.(identity.Interface) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res) +} - return ec._Identity(ctx, field.Selections, &res) +func (ec *executionContext) _EditCommentOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "EditCommentOperation", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.EditCommentOperation().Date(rctx, 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 + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _AddCommentOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) graphql.Marshaler { +func (ec *executionContext) _EditCommentOperation_target(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "AddCommentOperation", - Args: nil, - Field: field, + Object: "EditCommentOperation", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.AddCommentOperation().Date(rctx, obj) + return obj.Target, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -2448,20 +4225,20 @@ func (ec *executionContext) _AddCommentOperation_date(ctx context.Context, field } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(git.Hash) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalTime(res) + return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _AddCommentOperation_message(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) graphql.Marshaler { +func (ec *executionContext) _EditCommentOperation_message(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "AddCommentOperation", - Args: nil, - Field: field, + Object: "EditCommentOperation", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) @@ -2478,17 +4255,17 @@ func (ec *executionContext) _AddCommentOperation_message(ctx context.Context, fi res := resTmp.(string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + return ec.marshalNString2string(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _AddCommentOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) graphql.Marshaler { +func (ec *executionContext) _EditCommentOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "AddCommentOperation", - Args: nil, - Field: field, + Object: "EditCommentOperation", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) @@ -2505,111 +4282,23 @@ func (ec *executionContext) _AddCommentOperation_files(ctx context.Context, fiel res := resTmp.([]git.Hash) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - arr1 := make(graphql.Array, len(res)) - - for idx1 := range res { - arr1[idx1] = func() graphql.Marshaler { - return res[idx1] - }() - } - - return arr1 -} - -var addCommentTimelineItemImplementors = []string{"AddCommentTimelineItem", "TimelineItem"} - -// nolint: gocyclo, errcheck, gas, goconst -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)) - invalid := false - for i, field := range fields { - out.Keys[i] = field.Alias - - switch field.Name { - case "__typename": - 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 "author": - out.Values[i] = ec._AddCommentTimelineItem_author(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "message": - out.Values[i] = ec._AddCommentTimelineItem_message(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "messageIsEmpty": - out.Values[i] = ec._AddCommentTimelineItem_messageIsEmpty(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "files": - out.Values[i] = ec._AddCommentTimelineItem_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._AddCommentTimelineItem_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._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)) - } - } - wg.Wait() - if invalid { - return graphql.Null - } - return out + return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _AddCommentTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler { +func (ec *executionContext) _Identity_id(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "AddCommentTimelineItem", - Args: nil, - Field: field, + Object: "Identity", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Hash(), nil + return ec.resolvers.Identity().ID(rctx, obj) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -2617,26 +4306,26 @@ func (ec *executionContext) _AddCommentTimelineItem_hash(ctx context.Context, fi } return graphql.Null } - res := resTmp.(git.Hash) + res := resTmp.(string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return res + return ec.marshalNString2string(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _AddCommentTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler { +func (ec *executionContext) _Identity_humanId(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "AddCommentTimelineItem", - Args: nil, - Field: field, + Object: "Identity", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Author, nil + return ec.resolvers.Identity().HumanID(rctx, obj) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -2644,117 +4333,98 @@ func (ec *executionContext) _AddCommentTimelineItem_author(ctx context.Context, } return graphql.Null } - res := resTmp.(identity.Interface) + res := resTmp.(string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._Identity(ctx, field.Selections, &res) + return ec.marshalNString2string(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _AddCommentTimelineItem_message(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler { +func (ec *executionContext) _Identity_name(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "AddCommentTimelineItem", - Args: nil, - Field: field, + Object: "Identity", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Message, nil + return ec.resolvers.Identity().Name(rctx, obj) }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _AddCommentTimelineItem_messageIsEmpty(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler { +func (ec *executionContext) _Identity_email(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "AddCommentTimelineItem", - Args: nil, - Field: field, + Object: "Identity", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MessageIsEmpty(), nil + return ec.resolvers.Identity().Email(rctx, obj) }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(*string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalBoolean(res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _AddCommentTimelineItem_files(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler { +func (ec *executionContext) _Identity_login(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "AddCommentTimelineItem", - Args: nil, - Field: field, + Object: "Identity", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Files, nil + return ec.resolvers.Identity().Login(rctx, obj) }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.([]git.Hash) + res := resTmp.(*string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - arr1 := make(graphql.Array, len(res)) - - for idx1 := range res { - arr1[idx1] = func() graphql.Marshaler { - return res[idx1] - }() - } - - return arr1 + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _AddCommentTimelineItem_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler { +func (ec *executionContext) _Identity_displayName(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "AddCommentTimelineItem", - Args: nil, - Field: field, + Object: "Identity", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.AddCommentTimelineItem().CreatedAt(rctx, obj) + return ec.resolvers.Identity().DisplayName(rctx, obj) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -2762,53 +4432,50 @@ func (ec *executionContext) _AddCommentTimelineItem_createdAt(ctx context.Contex } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalTime(res) + return ec.marshalNString2string(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _AddCommentTimelineItem_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler { +func (ec *executionContext) _Identity_avatarUrl(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "AddCommentTimelineItem", - Args: nil, - Field: field, + Object: "Identity", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.AddCommentTimelineItem().LastEdit(rctx, obj) + return ec.resolvers.Identity().AvatarURL(rctx, obj) }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(*string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalTime(res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _AddCommentTimelineItem_edited(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler { +func (ec *executionContext) _Identity_isProtected(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "AddCommentTimelineItem", - Args: nil, - Field: field, + Object: "Identity", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edited(), nil + return ec.resolvers.Identity().IsProtected(rctx, obj) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -2819,23 +4486,23 @@ func (ec *executionContext) _AddCommentTimelineItem_edited(ctx context.Context, res := resTmp.(bool) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalBoolean(res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _AddCommentTimelineItem_history(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler { +func (ec *executionContext) _IdentityConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "AddCommentTimelineItem", - Args: nil, - Field: field, + Object: "IdentityConnection", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.History, nil + return obj.Edges, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -2843,178 +4510,53 @@ func (ec *executionContext) _AddCommentTimelineItem_history(ctx context.Context, } return graphql.Null } - res := resTmp.([]bug.CommentHistoryStep) + res := resTmp.([]models.IdentityEdge) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - 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 + return ec.marshalNIdentityEdge2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityEdge(ctx, field.Selections, res) } -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 "actors": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._Bug_actors(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - wg.Done() - }(i, field) - case "participants": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._Bug_participants(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)) - } +func (ec *executionContext) _IdentityConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "IdentityConnection", + Field: field, + Args: nil, + IsMethod: false, } - wg.Wait() - if invalid { + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Nodes, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - return out + res := resTmp.([]identity.Interface) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNIdentity2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Bug_id(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { +func (ec *executionContext) _IdentityConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Bug", - Args: nil, - Field: field, + Object: "IdentityConnection", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Id(), nil + return obj.PageInfo, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3022,26 +4564,26 @@ func (ec *executionContext) _Bug_id(ctx context.Context, field graphql.Collected } return graphql.Null } - res := resTmp.(string) + res := resTmp.(models.PageInfo) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + return ec.marshalNPageInfo2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Bug_humanId(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { +func (ec *executionContext) _IdentityConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Bug", - Args: nil, - Field: field, + Object: "IdentityConnection", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.HumanId(), nil + return obj.TotalCount, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3049,26 +4591,26 @@ func (ec *executionContext) _Bug_humanId(ctx context.Context, field graphql.Coll } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + return ec.marshalNInt2int(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) _IdentityEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.IdentityEdge) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Bug", - Args: nil, - Field: field, + Object: "IdentityEdge", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Bug().Status(rctx, obj) + return obj.Cursor, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3076,26 +4618,26 @@ func (ec *executionContext) _Bug_status(ctx context.Context, field graphql.Colle } return graphql.Null } - res := resTmp.(models.Status) + res := resTmp.(string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return res + return ec.marshalNString2string(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Bug_title(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { +func (ec *executionContext) _IdentityEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.IdentityEdge) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Bug", - Args: nil, - Field: field, + Object: "IdentityEdge", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Title, nil + return obj.Node, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3103,26 +4645,26 @@ func (ec *executionContext) _Bug_title(ctx context.Context, field graphql.Collec } return graphql.Null } - res := resTmp.(string) + res := resTmp.(identity.Interface) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Bug_labels(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { +func (ec *executionContext) _LabelChangeOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Bug", - Args: nil, - Field: field, + Object: "LabelChangeOperation", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Labels, nil + return obj.Hash() }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3130,29 +4672,20 @@ func (ec *executionContext) _Bug_labels(ctx context.Context, field graphql.Colle } return graphql.Null } - res := resTmp.([]bug.Label) + res := resTmp.(git.Hash) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - arr1 := make(graphql.Array, len(res)) - - for idx1 := range res { - arr1[idx1] = func() graphql.Marshaler { - return res[idx1] - }() - } - - return arr1 + return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Bug_author(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { +func (ec *executionContext) _LabelChangeOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Bug", - Args: nil, - Field: field, + Object: "LabelChangeOperation", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) @@ -3169,24 +4702,23 @@ func (ec *executionContext) _Bug_author(ctx context.Context, field graphql.Colle res := resTmp.(identity.Interface) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._Identity(ctx, field.Selections, &res) + return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Bug_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { +func (ec *executionContext) _LabelChangeOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Bug", - Args: nil, - Field: field, + Object: "LabelChangeOperation", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CreatedAt, nil + return ec.resolvers.LabelChangeOperation().Date(rctx, obj) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3194,26 +4726,26 @@ func (ec *executionContext) _Bug_createdAt(ctx context.Context, field graphql.Co } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(*time.Time) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalTime(res) + return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Bug_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { +func (ec *executionContext) _LabelChangeOperation_added(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Bug", - Args: nil, - Field: field, + Object: "LabelChangeOperation", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Bug().LastEdit(rctx, obj) + return obj.Added, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3221,32 +4753,26 @@ func (ec *executionContext) _Bug_lastEdit(ctx context.Context, field graphql.Col } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.([]bug.Label) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalTime(res) + return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabel(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Bug_actors(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { +func (ec *executionContext) _LabelChangeOperation_removed(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rawArgs := field.ArgumentMap(ec.Variables) - args, err := field_Bug_actors_args(rawArgs) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } rctx := &graphql.ResolverContext{ - Object: "Bug", - Args: args, - Field: field, + Object: "LabelChangeOperation", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Bug().Actors(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)) + return obj.Removed, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3254,33 +4780,26 @@ func (ec *executionContext) _Bug_actors(ctx context.Context, field graphql.Colle } return graphql.Null } - res := resTmp.(models.IdentityConnection) + res := resTmp.([]bug.Label) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._IdentityConnection(ctx, field.Selections, &res) + return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabel(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Bug_participants(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { +func (ec *executionContext) _LabelChangeTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rawArgs := field.ArgumentMap(ec.Variables) - args, err := field_Bug_participants_args(rawArgs) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } rctx := &graphql.ResolverContext{ - Object: "Bug", - Args: args, - Field: field, + Object: "LabelChangeTimelineItem", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Bug().Participants(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)) + return obj.Hash(), nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3288,33 +4807,26 @@ func (ec *executionContext) _Bug_participants(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(models.IdentityConnection) + res := resTmp.(git.Hash) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._IdentityConnection(ctx, field.Selections, &res) + return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Bug_comments(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { +func (ec *executionContext) _LabelChangeTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rawArgs := field.ArgumentMap(ec.Variables) - args, err := field_Bug_comments_args(rawArgs) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } rctx := &graphql.ResolverContext{ - Object: "Bug", - Args: args, - Field: field, + Object: "LabelChangeTimelineItem", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Bug().Comments(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)) + return obj.Author, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3322,33 +4834,26 @@ func (ec *executionContext) _Bug_comments(ctx context.Context, field graphql.Col } return graphql.Null } - res := resTmp.(models.CommentConnection) + res := resTmp.(identity.Interface) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._CommentConnection(ctx, field.Selections, &res) + return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Bug_timeline(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { +func (ec *executionContext) _LabelChangeTimelineItem_date(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rawArgs := field.ArgumentMap(ec.Variables) - args, err := field_Bug_timeline_args(rawArgs) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } rctx := &graphql.ResolverContext{ - Object: "Bug", - Args: args, - Field: field, + Object: "LabelChangeTimelineItem", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Bug().Timeline(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)) + return ec.resolvers.LabelChangeTimelineItem().Date(rctx, obj) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3356,33 +4861,26 @@ func (ec *executionContext) _Bug_timeline(ctx context.Context, field graphql.Col } return graphql.Null } - res := resTmp.(models.TimelineItemConnection) + res := resTmp.(*time.Time) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._TimelineItemConnection(ctx, field.Selections, &res) + return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Bug_operations(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler { +func (ec *executionContext) _LabelChangeTimelineItem_added(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rawArgs := field.ArgumentMap(ec.Variables) - args, err := field_Bug_operations_args(rawArgs) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } rctx := &graphql.ResolverContext{ - Object: "Bug", - Args: args, - Field: field, + Object: "LabelChangeTimelineItem", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Bug().Operations(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)) + return obj.Added, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3390,72 +4888,26 @@ func (ec *executionContext) _Bug_operations(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.(models.OperationConnection) + res := resTmp.([]bug.Label) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._OperationConnection(ctx, field.Selections, &res) -} - -var bugConnectionImplementors = []string{"BugConnection"} - -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _BugConnection(ctx context.Context, sel ast.SelectionSet, obj *models.BugConnection) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, bugConnectionImplementors) - - 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("BugConnection") - case "edges": - out.Values[i] = ec._BugConnection_edges(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "nodes": - out.Values[i] = ec._BugConnection_nodes(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "pageInfo": - out.Values[i] = ec._BugConnection_pageInfo(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "totalCount": - out.Values[i] = ec._BugConnection_totalCount(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - default: - panic("unknown field " + strconv.Quote(field.Name)) - } - } - - if invalid { - return graphql.Null - } - return out + return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabel(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _BugConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler { +func (ec *executionContext) _LabelChangeTimelineItem_removed(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "BugConnection", - Args: nil, - Field: field, + Object: "LabelChangeTimelineItem", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.Removed, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3463,59 +4915,33 @@ func (ec *executionContext) _BugConnection_edges(ctx context.Context, field grap } return graphql.Null } - res := resTmp.([]models.BugEdge) + res := resTmp.([]bug.Label) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - 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._BugEdge(ctx, field.Selections, &res[idx1]) - }() - } - if isLen1 { - f(idx1) - } else { - go f(idx1) - } - - } - wg.Wait() - return arr1 + return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabel(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _BugConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler { +func (ec *executionContext) _Mutation_newBug(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "BugConnection", - Args: nil, - Field: field, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Mutation_newBug_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Nodes, nil + return ec.resolvers.Mutation().NewBug(rctx, args["repoRef"].(*string), args["title"].(string), args["message"].(string), args["files"].([]git.Hash)) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3523,59 +4949,33 @@ func (ec *executionContext) _BugConnection_nodes(ctx context.Context, field grap } return graphql.Null } - res := resTmp.([]bug.Snapshot) + res := resTmp.(*bug.Snapshot) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - 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._Bug(ctx, field.Selections, &res[idx1]) - }() - } - if isLen1 { - f(idx1) - } else { - go f(idx1) - } - - } - wg.Wait() - return arr1 + return ec.marshalNBug2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _BugConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler { +func (ec *executionContext) _Mutation_addComment(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "BugConnection", - Args: nil, - Field: field, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Mutation_addComment_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return ec.resolvers.Mutation().AddComment(rctx, args["repoRef"].(*string), args["prefix"].(string), args["message"].(string), args["files"].([]git.Hash)) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3583,27 +4983,33 @@ func (ec *executionContext) _BugConnection_pageInfo(ctx context.Context, field g } return graphql.Null } - res := resTmp.(models.PageInfo) + res := resTmp.(*bug.Snapshot) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._PageInfo(ctx, field.Selections, &res) + return ec.marshalNBug2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _BugConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler { +func (ec *executionContext) _Mutation_changeLabels(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "BugConnection", - Args: nil, - Field: field, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Mutation_changeLabels_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalCount, nil + return ec.resolvers.Mutation().ChangeLabels(rctx, args["repoRef"].(*string), args["prefix"].(string), args["added"].([]string), args["removed"].([]string)) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3611,61 +5017,33 @@ func (ec *executionContext) _BugConnection_totalCount(ctx context.Context, field } return graphql.Null } - res := resTmp.(int) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalInt(res) -} - -var bugEdgeImplementors = []string{"BugEdge"} - -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _BugEdge(ctx context.Context, sel ast.SelectionSet, obj *models.BugEdge) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, bugEdgeImplementors) - - 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("BugEdge") - case "cursor": - out.Values[i] = ec._BugEdge_cursor(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "node": - out.Values[i] = ec._BugEdge_node(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - default: - panic("unknown field " + strconv.Quote(field.Name)) - } - } - - if invalid { - return graphql.Null - } - return out + res := resTmp.(*bug.Snapshot) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNBug2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _BugEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.BugEdge) graphql.Marshaler { +func (ec *executionContext) _Mutation_open(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "BugEdge", - Args: nil, - Field: field, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Mutation_open_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return ec.resolvers.Mutation().Open(rctx, args["repoRef"].(*string), args["prefix"].(string)) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3673,26 +5051,33 @@ func (ec *executionContext) _BugEdge_cursor(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*bug.Snapshot) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + return ec.marshalNBug2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _BugEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.BugEdge) graphql.Marshaler { +func (ec *executionContext) _Mutation_close(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "BugEdge", - Args: nil, - Field: field, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Mutation_close_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.Mutation().Close(rctx, args["repoRef"].(*string), args["prefix"].(string)) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3700,67 +5085,33 @@ func (ec *executionContext) _BugEdge_node(ctx context.Context, field graphql.Col } return graphql.Null } - res := resTmp.(bug.Snapshot) + res := resTmp.(*bug.Snapshot) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._Bug(ctx, field.Selections, &res) -} - -var commentImplementors = []string{"Comment", "Authored"} - -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _Comment(ctx context.Context, sel ast.SelectionSet, obj *bug.Comment) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, commentImplementors) - - 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("Comment") - case "author": - out.Values[i] = ec._Comment_author(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "message": - out.Values[i] = ec._Comment_message(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "files": - out.Values[i] = ec._Comment_files(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - default: - panic("unknown field " + strconv.Quote(field.Name)) - } - } - - if invalid { - return graphql.Null - } - return out + return ec.marshalNBug2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Comment_author(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) graphql.Marshaler { +func (ec *executionContext) _Mutation_setTitle(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Comment", - Args: nil, - Field: field, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Mutation_setTitle_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Author, nil + return ec.resolvers.Mutation().SetTitle(rctx, args["repoRef"].(*string), args["prefix"].(string), args["title"].(string)) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3768,27 +5119,33 @@ func (ec *executionContext) _Comment_author(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.(identity.Interface) + res := resTmp.(*bug.Snapshot) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._Identity(ctx, field.Selections, &res) + return ec.marshalNBug2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Comment_message(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) graphql.Marshaler { +func (ec *executionContext) _Mutation_commit(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Comment", - Args: nil, - Field: field, + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Mutation_commit_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Message, nil + return ec.resolvers.Mutation().Commit(rctx, args["repoRef"].(*string), args["prefix"].(string)) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3796,26 +5153,26 @@ func (ec *executionContext) _Comment_message(ctx context.Context, field graphql. } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*bug.Snapshot) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + return ec.marshalNBug2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Comment_files(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) graphql.Marshaler { +func (ec *executionContext) _OperationConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Comment", - Args: nil, - Field: field, + Object: "OperationConnection", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Files, nil + return obj.Edges, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3823,80 +5180,26 @@ func (ec *executionContext) _Comment_files(ctx context.Context, field graphql.Co } return graphql.Null } - res := resTmp.([]git.Hash) + res := resTmp.([]models.OperationEdge) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - arr1 := make(graphql.Array, len(res)) - - for idx1 := range res { - arr1[idx1] = func() graphql.Marshaler { - return res[idx1] - }() - } - - return arr1 -} - -var commentConnectionImplementors = []string{"CommentConnection"} - -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _CommentConnection(ctx context.Context, sel ast.SelectionSet, obj *models.CommentConnection) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, commentConnectionImplementors) - - 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("CommentConnection") - case "edges": - out.Values[i] = ec._CommentConnection_edges(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "nodes": - out.Values[i] = ec._CommentConnection_nodes(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "pageInfo": - out.Values[i] = ec._CommentConnection_pageInfo(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "totalCount": - out.Values[i] = ec._CommentConnection_totalCount(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - default: - panic("unknown field " + strconv.Quote(field.Name)) - } - } - - if invalid { - return graphql.Null - } - return out + return ec.marshalNOperationEdge2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐOperationEdge(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CommentConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler { +func (ec *executionContext) _OperationConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CommentConnection", - Args: nil, - Field: field, + Object: "OperationConnection", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.Nodes, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3904,59 +5207,26 @@ func (ec *executionContext) _CommentConnection_edges(ctx context.Context, field } return graphql.Null } - res := resTmp.([]models.CommentEdge) + res := resTmp.([]bug.Operation) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - 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._CommentEdge(ctx, field.Selections, &res[idx1]) - }() - } - if isLen1 { - f(idx1) - } else { - go f(idx1) - } - - } - wg.Wait() - return arr1 + return ec.marshalNOperation2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐOperation(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CommentConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler { +func (ec *executionContext) _OperationConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CommentConnection", - Args: nil, - Field: field, + Object: "OperationConnection", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Nodes, nil + return obj.PageInfo, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -3964,59 +5234,26 @@ func (ec *executionContext) _CommentConnection_nodes(ctx context.Context, field } return graphql.Null } - res := resTmp.([]bug.Comment) + res := resTmp.(models.PageInfo) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - 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._Comment(ctx, field.Selections, &res[idx1]) - }() - } - if isLen1 { - f(idx1) - } else { - go f(idx1) - } - - } - wg.Wait() - return arr1 + return ec.marshalNPageInfo2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CommentConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler { +func (ec *executionContext) _OperationConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CommentConnection", - Args: nil, - Field: field, + Object: "OperationConnection", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.TotalCount, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -4024,27 +5261,26 @@ func (ec *executionContext) _CommentConnection_pageInfo(ctx context.Context, fie } return graphql.Null } - res := resTmp.(models.PageInfo) + res := resTmp.(int) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._PageInfo(ctx, field.Selections, &res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CommentConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler { +func (ec *executionContext) _OperationEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.OperationEdge) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CommentConnection", - Args: nil, - Field: field, + Object: "OperationEdge", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalCount, nil + return obj.Cursor, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -4052,61 +5288,53 @@ func (ec *executionContext) _CommentConnection_totalCount(ctx context.Context, f } return graphql.Null } - res := resTmp.(int) + res := resTmp.(string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalInt(res) + return ec.marshalNString2string(ctx, field.Selections, res) } -var commentEdgeImplementors = []string{"CommentEdge"} - -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _CommentEdge(ctx context.Context, sel ast.SelectionSet, obj *models.CommentEdge) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, commentEdgeImplementors) - - 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("CommentEdge") - case "cursor": - out.Values[i] = ec._CommentEdge_cursor(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "node": - out.Values[i] = ec._CommentEdge_node(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - default: - panic("unknown field " + strconv.Quote(field.Name)) - } +func (ec *executionContext) _OperationEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.OperationEdge) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "OperationEdge", + Field: field, + Args: nil, + IsMethod: false, } - - if invalid { + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Node, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - return out + res := resTmp.(bug.Operation) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNOperation2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐOperation(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CommentEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.CommentEdge) graphql.Marshaler { +func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CommentEdge", - Args: nil, - Field: field, + Object: "PageInfo", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.HasNextPage, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -4114,26 +5342,26 @@ func (ec *executionContext) _CommentEdge_cursor(ctx context.Context, field graph } return graphql.Null } - res := resTmp.(string) + res := resTmp.(bool) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CommentEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.CommentEdge) graphql.Marshaler { +func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CommentEdge", - Args: nil, - Field: field, + Object: "PageInfo", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.HasPreviousPage, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -4141,67 +5369,26 @@ func (ec *executionContext) _CommentEdge_node(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(bug.Comment) + res := resTmp.(bool) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._Comment(ctx, field.Selections, &res) -} - -var commentHistoryStepImplementors = []string{"CommentHistoryStep"} - -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _CommentHistoryStep(ctx context.Context, sel ast.SelectionSet, obj *bug.CommentHistoryStep) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, commentHistoryStepImplementors) - - 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("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 + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CommentHistoryStep_message(ctx context.Context, field graphql.CollectedField, obj *bug.CommentHistoryStep) graphql.Marshaler { +func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CommentHistoryStep", - Args: nil, - Field: field, + Object: "PageInfo", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Message, nil + return obj.StartCursor, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -4212,23 +5399,23 @@ func (ec *executionContext) _CommentHistoryStep_message(ctx context.Context, fie res := resTmp.(string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + return ec.marshalNString2string(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CommentHistoryStep_date(ctx context.Context, field graphql.CollectedField, obj *bug.CommentHistoryStep) graphql.Marshaler { +func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CommentHistoryStep", - Args: nil, - Field: field, + Object: "PageInfo", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.CommentHistoryStep().Date(rctx, obj) + return obj.EndCursor, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -4236,168 +5423,143 @@ func (ec *executionContext) _CommentHistoryStep_date(ctx context.Context, field } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalTime(res) + return ec.marshalNString2string(ctx, field.Selections, res) } -var createOperationImplementors = []string{"CreateOperation", "Operation", "Authored"} - -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _CreateOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.CreateOperation) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, createOperationImplementors) - - 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("CreateOperation") - case "hash": - out.Values[i] = ec._CreateOperation_hash(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "author": - out.Values[i] = ec._CreateOperation_author(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._CreateOperation_date(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - wg.Done() - }(i, field) - case "title": - out.Values[i] = ec._CreateOperation_title(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "message": - out.Values[i] = ec._CreateOperation_message(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "files": - out.Values[i] = ec._CreateOperation_files(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - default: - panic("unknown field " + strconv.Quote(field.Name)) - } +func (ec *executionContext) _Query_defaultRepository(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, } - wg.Wait() - if invalid { + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().DefaultRepository(rctx) + }) + if resTmp == nil { return graphql.Null } - return out + res := resTmp.(*models.Repository) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalORepository2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐRepository(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CreateOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler { +func (ec *executionContext) _Query_repository(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CreateOperation", - Args: nil, - Field: field, + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Query_repository_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Hash() + return ec.resolvers.Query().Repository(rctx, args["id"].(string)) }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(git.Hash) + res := resTmp.(*models.Repository) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return res + return ec.marshalORepository2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐRepository(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CreateOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler { +func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CreateOperation", - Args: nil, - Field: field, + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Query___type_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Author, nil + return ec.introspectType(args["name"].(string)) }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(identity.Interface) + res := resTmp.(*introspection.Type) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._Identity(ctx, field.Selections, &res) + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CreateOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler { +func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CreateOperation", - Args: nil, - Field: field, + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.CreateOperation().Date(rctx, obj) + return ec.introspectSchema() }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(*introspection.Schema) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalTime(res) + return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CreateOperation_title(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler { +func (ec *executionContext) _Repository_allBugs(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CreateOperation", - Args: nil, - Field: field, + Object: "Repository", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Repository_allBugs_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Title, nil + return ec.resolvers.Repository().AllBugs(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int), args["query"].(*string)) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -4405,53 +5567,64 @@ func (ec *executionContext) _CreateOperation_title(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*models.BugConnection) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + return ec.marshalNBugConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugConnection(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CreateOperation_message(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler { +func (ec *executionContext) _Repository_bug(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CreateOperation", - Args: nil, - Field: field, + Object: "Repository", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Repository_bug_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Message, nil + return ec.resolvers.Repository().Bug(rctx, obj, args["prefix"].(string)) }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*bug.Snapshot) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + return ec.marshalOBug2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CreateOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler { +func (ec *executionContext) _Repository_allIdentities(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CreateOperation", - Args: nil, - Field: field, + Object: "Repository", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Repository_allIdentities_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + rctx.Args = args ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Files, nil + return ec.resolvers.Repository().AllIdentities(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -4459,114 +5632,81 @@ func (ec *executionContext) _CreateOperation_files(ctx context.Context, field gr } return graphql.Null } - res := resTmp.([]git.Hash) + res := resTmp.(*models.IdentityConnection) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - arr1 := make(graphql.Array, len(res)) - - for idx1 := range res { - arr1[idx1] = func() graphql.Marshaler { - return res[idx1] - }() - } - - return arr1 + return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res) } - -var createTimelineItemImplementors = []string{"CreateTimelineItem", "TimelineItem"} - -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _CreateTimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.CreateTimelineItem) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, createTimelineItemImplementors) - - 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("CreateTimelineItem") - case "hash": - out.Values[i] = ec._CreateTimelineItem_hash(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "author": - out.Values[i] = ec._CreateTimelineItem_author(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "message": - out.Values[i] = ec._CreateTimelineItem_message(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "messageIsEmpty": - out.Values[i] = ec._CreateTimelineItem_messageIsEmpty(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "files": - out.Values[i] = ec._CreateTimelineItem_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._CreateTimelineItem_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._CreateTimelineItem_lastEdit(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - wg.Done() - }(i, field) - case "edited": - out.Values[i] = ec._CreateTimelineItem_edited(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "history": - out.Values[i] = ec._CreateTimelineItem_history(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - default: - panic("unknown field " + strconv.Quote(field.Name)) - } + +func (ec *executionContext) _Repository_identity(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "Repository", + Field: field, + Args: nil, + IsMethod: true, } - wg.Wait() - if invalid { + ctx = graphql.WithResolverContext(ctx, rctx) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Repository_identity_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) return graphql.Null } - return out + rctx.Args = args + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Repository().Identity(rctx, obj, args["prefix"].(string)) + }) + if resTmp == nil { + return graphql.Null + } + res := resTmp.(identity.Interface) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalOIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CreateTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler { +func (ec *executionContext) _Repository_userIdentity(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CreateTimelineItem", - Args: nil, - Field: field, + Object: "Repository", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Hash(), nil + return ec.resolvers.Repository().UserIdentity(rctx, obj) + }) + if resTmp == nil { + return graphql.Null + } + res := resTmp.(identity.Interface) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalOIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res) +} + +func (ec *executionContext) _SetStatusOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "SetStatusOperation", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Hash() }) if resTmp == nil { if !ec.HasError(rctx) { @@ -4577,17 +5717,17 @@ func (ec *executionContext) _CreateTimelineItem_hash(ctx context.Context, field res := resTmp.(git.Hash) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return res + return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CreateTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler { +func (ec *executionContext) _SetStatusOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CreateTimelineItem", - Args: nil, - Field: field, + Object: "SetStatusOperation", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) @@ -4604,24 +5744,23 @@ func (ec *executionContext) _CreateTimelineItem_author(ctx context.Context, fiel res := resTmp.(identity.Interface) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._Identity(ctx, field.Selections, &res) + return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CreateTimelineItem_message(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler { +func (ec *executionContext) _SetStatusOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CreateTimelineItem", - Args: nil, - Field: field, + Object: "SetStatusOperation", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Message, nil + return ec.resolvers.SetStatusOperation().Date(rctx, obj) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -4629,26 +5768,26 @@ func (ec *executionContext) _CreateTimelineItem_message(ctx context.Context, fie } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*time.Time) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CreateTimelineItem_messageIsEmpty(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler { +func (ec *executionContext) _SetStatusOperation_status(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CreateTimelineItem", - Args: nil, - Field: field, + Object: "SetStatusOperation", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MessageIsEmpty(), nil + return ec.resolvers.SetStatusOperation().Status(rctx, obj) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -4656,26 +5795,26 @@ func (ec *executionContext) _CreateTimelineItem_messageIsEmpty(ctx context.Conte } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(models.Status) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalBoolean(res) + return ec.marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐStatus(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CreateTimelineItem_files(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler { +func (ec *executionContext) _SetStatusTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CreateTimelineItem", - Args: nil, - Field: field, + Object: "SetStatusTimelineItem", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Files, nil + return obj.Hash(), nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -4683,35 +5822,26 @@ func (ec *executionContext) _CreateTimelineItem_files(ctx context.Context, field } return graphql.Null } - res := resTmp.([]git.Hash) + res := resTmp.(git.Hash) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - arr1 := make(graphql.Array, len(res)) - - for idx1 := range res { - arr1[idx1] = func() graphql.Marshaler { - return res[idx1] - }() - } - - return arr1 + return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CreateTimelineItem_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler { +func (ec *executionContext) _SetStatusTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CreateTimelineItem", - Args: nil, - Field: field, + Object: "SetStatusTimelineItem", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.CreateTimelineItem().CreatedAt(rctx, obj) + return obj.Author, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -4719,26 +5849,26 @@ func (ec *executionContext) _CreateTimelineItem_createdAt(ctx context.Context, f } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(identity.Interface) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalTime(res) + return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CreateTimelineItem_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler { +func (ec *executionContext) _SetStatusTimelineItem_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CreateTimelineItem", - Args: nil, - Field: field, + Object: "SetStatusTimelineItem", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.CreateTimelineItem().LastEdit(rctx, obj) + return ec.resolvers.SetStatusTimelineItem().Date(rctx, obj) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -4746,26 +5876,26 @@ func (ec *executionContext) _CreateTimelineItem_lastEdit(ctx context.Context, fi } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(*time.Time) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalTime(res) + return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CreateTimelineItem_edited(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler { +func (ec *executionContext) _SetStatusTimelineItem_status(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CreateTimelineItem", - Args: nil, - Field: field, + Object: "SetStatusTimelineItem", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edited(), nil + return ec.resolvers.SetStatusTimelineItem().Status(rctx, obj) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -4773,26 +5903,26 @@ func (ec *executionContext) _CreateTimelineItem_edited(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(models.Status) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalBoolean(res) + return ec.marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐStatus(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _CreateTimelineItem_history(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler { +func (ec *executionContext) _SetTitleOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "CreateTimelineItem", - Args: nil, - Field: field, + Object: "SetTitleOperation", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.History, nil + return obj.Hash() }) if resTmp == nil { if !ec.HasError(rctx) { @@ -4800,119 +5930,53 @@ func (ec *executionContext) _CreateTimelineItem_history(ctx context.Context, fie } return graphql.Null } - res := resTmp.([]bug.CommentHistoryStep) + res := resTmp.(git.Hash) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - 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 + return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res) } -var editCommentOperationImplementors = []string{"EditCommentOperation", "Operation", "Authored"} - -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _EditCommentOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.EditCommentOperation) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, editCommentOperationImplementors) - - 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("EditCommentOperation") - case "hash": - out.Values[i] = ec._EditCommentOperation_hash(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "author": - out.Values[i] = ec._EditCommentOperation_author(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._EditCommentOperation_date(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - wg.Done() - }(i, field) - case "target": - out.Values[i] = ec._EditCommentOperation_target(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "message": - out.Values[i] = ec._EditCommentOperation_message(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "files": - out.Values[i] = ec._EditCommentOperation_files(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - default: - panic("unknown field " + strconv.Quote(field.Name)) - } +func (ec *executionContext) _SetTitleOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "SetTitleOperation", + Field: field, + Args: nil, + IsMethod: false, } - wg.Wait() - if invalid { + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Author, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - return out + res := resTmp.(identity.Interface) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _EditCommentOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) graphql.Marshaler { +func (ec *executionContext) _SetTitleOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "EditCommentOperation", - Args: nil, - Field: field, + Object: "SetTitleOperation", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Hash() + return ec.resolvers.SetTitleOperation().Date(rctx, obj) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -4920,26 +5984,26 @@ func (ec *executionContext) _EditCommentOperation_hash(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(git.Hash) + res := resTmp.(*time.Time) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return res + return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _EditCommentOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) graphql.Marshaler { +func (ec *executionContext) _SetTitleOperation_title(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "EditCommentOperation", - Args: nil, - Field: field, + Object: "SetTitleOperation", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Author, nil + return obj.Title, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -4947,27 +6011,26 @@ func (ec *executionContext) _EditCommentOperation_author(ctx context.Context, fi } return graphql.Null } - res := resTmp.(identity.Interface) + res := resTmp.(string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._Identity(ctx, field.Selections, &res) + return ec.marshalNString2string(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _EditCommentOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) graphql.Marshaler { +func (ec *executionContext) _SetTitleOperation_was(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "EditCommentOperation", - Args: nil, - Field: field, + Object: "SetTitleOperation", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.EditCommentOperation().Date(rctx, obj) + return obj.Was, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -4975,26 +6038,26 @@ func (ec *executionContext) _EditCommentOperation_date(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalTime(res) + return ec.marshalNString2string(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _EditCommentOperation_target(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) graphql.Marshaler { +func (ec *executionContext) _SetTitleTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "EditCommentOperation", - Args: nil, - Field: field, + Object: "SetTitleTimelineItem", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Target, nil + return obj.Hash(), nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -5005,23 +6068,23 @@ func (ec *executionContext) _EditCommentOperation_target(ctx context.Context, fi res := resTmp.(git.Hash) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return res + return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _EditCommentOperation_message(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) graphql.Marshaler { +func (ec *executionContext) _SetTitleTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "EditCommentOperation", - Args: nil, - Field: field, + Object: "SetTitleTimelineItem", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Message, nil + return obj.Author, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -5029,26 +6092,26 @@ func (ec *executionContext) _EditCommentOperation_message(ctx context.Context, f } return graphql.Null } - res := resTmp.(string) + res := resTmp.(identity.Interface) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _EditCommentOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) graphql.Marshaler { +func (ec *executionContext) _SetTitleTimelineItem_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "EditCommentOperation", - Args: nil, - Field: field, + Object: "SetTitleTimelineItem", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Files, nil + return ec.resolvers.SetTitleTimelineItem().Date(rctx, obj) }) if resTmp == nil { if !ec.HasError(rctx) { @@ -5056,121 +6119,53 @@ func (ec *executionContext) _EditCommentOperation_files(ctx context.Context, fie } return graphql.Null } - res := resTmp.([]git.Hash) + res := resTmp.(*time.Time) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - arr1 := make(graphql.Array, len(res)) - - for idx1 := range res { - arr1[idx1] = func() graphql.Marshaler { - return res[idx1] - }() - } - - return arr1 + return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -var identityImplementors = []string{"Identity"} - -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _Identity(ctx context.Context, sel ast.SelectionSet, obj *identity.Interface) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, identityImplementors) - - 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("Identity") - case "id": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._Identity_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - wg.Done() - }(i, field) - case "humanId": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._Identity_humanId(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - wg.Done() - }(i, field) - case "name": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._Identity_name(ctx, field, obj) - wg.Done() - }(i, field) - case "email": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._Identity_email(ctx, field, obj) - wg.Done() - }(i, field) - case "login": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._Identity_login(ctx, field, obj) - wg.Done() - }(i, field) - case "displayName": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._Identity_displayName(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - wg.Done() - }(i, field) - case "avatarUrl": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._Identity_avatarUrl(ctx, field, obj) - wg.Done() - }(i, field) - case "isProtected": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._Identity_isProtected(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - wg.Done() - }(i, field) - default: - panic("unknown field " + strconv.Quote(field.Name)) +func (ec *executionContext) _SetTitleTimelineItem_title(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "SetTitleTimelineItem", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Title, nil + }) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") } - } - wg.Wait() - if invalid { return graphql.Null } - return out + res := resTmp.(string) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNString2string(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Identity_id(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler { +func (ec *executionContext) _SetTitleTimelineItem_was(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Identity", - Args: nil, - Field: field, + Object: "SetTitleTimelineItem", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Identity().ID(rctx, obj) + return obj.Was, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -5181,23 +6176,23 @@ func (ec *executionContext) _Identity_id(ctx context.Context, field graphql.Coll res := resTmp.(string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + return ec.marshalNString2string(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Identity_humanId(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler { +func (ec *executionContext) _TimelineItemConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Identity", - Args: nil, - Field: field, + Object: "TimelineItemConnection", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Identity().HumanID(rctx, obj) + return obj.Edges, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -5205,110 +6200,107 @@ func (ec *executionContext) _Identity_humanId(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(string) + res := resTmp.([]models.TimelineItemEdge) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + return ec.marshalNTimelineItemEdge2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐTimelineItemEdge(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Identity_name(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler { +func (ec *executionContext) _TimelineItemConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Identity", - Args: nil, - Field: field, + Object: "TimelineItemConnection", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Identity().Name(rctx, obj) + return obj.Nodes, nil }) if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.([]bug.TimelineItem) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - if res == nil { - return graphql.Null - } - return graphql.MarshalString(*res) + return ec.marshalNTimelineItem2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐTimelineItem(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Identity_email(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler { +func (ec *executionContext) _TimelineItemConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Identity", - Args: nil, - Field: field, + Object: "TimelineItemConnection", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Identity().Email(rctx, obj) + return obj.PageInfo, nil }) if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(models.PageInfo) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - if res == nil { - return graphql.Null - } - return graphql.MarshalString(*res) + return ec.marshalNPageInfo2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Identity_login(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler { +func (ec *executionContext) _TimelineItemConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Identity", - Args: nil, - Field: field, + Object: "TimelineItemConnection", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Identity().Login(rctx, obj) + return obj.TotalCount, nil }) if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(int) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - if res == nil { - return graphql.Null - } - return graphql.MarshalString(*res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Identity_displayName(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler { +func (ec *executionContext) _TimelineItemEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemEdge) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Identity", - Args: nil, - Field: field, + Object: "TimelineItemEdge", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Identity().DisplayName(rctx, obj) + return obj.Cursor, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -5319,51 +6311,50 @@ func (ec *executionContext) _Identity_displayName(ctx context.Context, field gra res := resTmp.(string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + return ec.marshalNString2string(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Identity_avatarUrl(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler { +func (ec *executionContext) _TimelineItemEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemEdge) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Identity", - Args: nil, - Field: field, + Object: "TimelineItemEdge", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Identity().AvatarURL(rctx, obj) + return obj.Node, nil }) if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(bug.TimelineItem) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - if res == nil { - return graphql.Null - } - return graphql.MarshalString(*res) + return ec.marshalNTimelineItem2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐTimelineItem(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Identity_isProtected(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler { +func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Identity", - Args: nil, - Field: field, + Object: "__Directive", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Identity().IsProtected(rctx, obj) + return obj.Name, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -5371,71 +6362,50 @@ func (ec *executionContext) _Identity_isProtected(ctx context.Context, field gra } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalBoolean(res) + return ec.marshalNString2string(ctx, field.Selections, res) } -var identityConnectionImplementors = []string{"IdentityConnection"} - -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _IdentityConnection(ctx context.Context, sel ast.SelectionSet, obj *models.IdentityConnection) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, identityConnectionImplementors) - - 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("IdentityConnection") - case "edges": - out.Values[i] = ec._IdentityConnection_edges(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "nodes": - out.Values[i] = ec._IdentityConnection_nodes(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "pageInfo": - out.Values[i] = ec._IdentityConnection_pageInfo(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "totalCount": - out.Values[i] = ec._IdentityConnection_totalCount(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - default: - panic("unknown field " + strconv.Quote(field.Name)) - } +func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "__Directive", + Field: field, + Args: nil, + IsMethod: false, } - - if invalid { + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description, nil + }) + if resTmp == nil { return graphql.Null } - return out + res := resTmp.(string) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalOString2string(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _IdentityConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) graphql.Marshaler { +func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "IdentityConnection", - Args: nil, - Field: field, + Object: "__Directive", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.Locations, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -5443,59 +6413,26 @@ func (ec *executionContext) _IdentityConnection_edges(ctx context.Context, field } return graphql.Null } - res := resTmp.([]models.IdentityEdge) + res := resTmp.([]string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - 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._IdentityEdge(ctx, field.Selections, &res[idx1]) - }() - } - if isLen1 { - f(idx1) - } else { - go f(idx1) - } - - } - wg.Wait() - return arr1 + return ec.marshalN__DirectiveLocation2ᚕstring(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _IdentityConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) graphql.Marshaler { +func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "IdentityConnection", - Args: nil, - Field: field, + Object: "__Directive", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Nodes, nil + return obj.Args, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -5503,59 +6440,26 @@ func (ec *executionContext) _IdentityConnection_nodes(ctx context.Context, field } return graphql.Null } - res := resTmp.([]identity.Interface) + res := resTmp.([]introspection.InputValue) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - 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._Identity(ctx, field.Selections, &res[idx1]) - }() - } - if isLen1 { - f(idx1) - } else { - go f(idx1) - } - - } - wg.Wait() - return arr1 + return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _IdentityConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) graphql.Marshaler { +func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "IdentityConnection", - Args: nil, - Field: field, + Object: "__EnumValue", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.Name, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -5563,27 +6467,50 @@ func (ec *executionContext) _IdentityConnection_pageInfo(ctx context.Context, fi } return graphql.Null } - res := resTmp.(models.PageInfo) + res := resTmp.(string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNString2string(ctx, field.Selections, res) +} - return ec._PageInfo(ctx, field.Selections, &res) +func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "__EnumValue", + Field: field, + Args: nil, + IsMethod: false, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description, nil + }) + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalOString2string(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _IdentityConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) graphql.Marshaler { +func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "IdentityConnection", - Args: nil, - Field: field, + Object: "__EnumValue", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalCount, nil + return obj.IsDeprecated(), nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -5591,61 +6518,50 @@ func (ec *executionContext) _IdentityConnection_totalCount(ctx context.Context, } return graphql.Null } - res := resTmp.(int) + res := resTmp.(bool) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalInt(res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -var identityEdgeImplementors = []string{"IdentityEdge"} - -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _IdentityEdge(ctx context.Context, sel ast.SelectionSet, obj *models.IdentityEdge) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, identityEdgeImplementors) - - 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("IdentityEdge") - case "cursor": - out.Values[i] = ec._IdentityEdge_cursor(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "node": - out.Values[i] = ec._IdentityEdge_node(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - default: - panic("unknown field " + strconv.Quote(field.Name)) - } +func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "__EnumValue", + Field: field, + Args: nil, + IsMethod: true, } - - if invalid { + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DeprecationReason(), nil + }) + if resTmp == nil { return graphql.Null } - return out + res := resTmp.(*string) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _IdentityEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.IdentityEdge) graphql.Marshaler { +func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "IdentityEdge", - Args: nil, - Field: field, + Object: "__Field", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.Name, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -5656,106 +6572,47 @@ func (ec *executionContext) _IdentityEdge_cursor(ctx context.Context, field grap res := resTmp.(string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + return ec.marshalNString2string(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _IdentityEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.IdentityEdge) graphql.Marshaler { +func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "IdentityEdge", - Args: nil, - Field: field, + Object: "__Field", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.Description, nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(identity.Interface) + res := resTmp.(string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._Identity(ctx, field.Selections, &res) -} - -var labelChangeOperationImplementors = []string{"LabelChangeOperation", "Operation", "Authored"} - -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _LabelChangeOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.LabelChangeOperation) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, labelChangeOperationImplementors) - - 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("LabelChangeOperation") - case "hash": - out.Values[i] = ec._LabelChangeOperation_hash(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "author": - out.Values[i] = ec._LabelChangeOperation_author(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._LabelChangeOperation_date(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - wg.Done() - }(i, field) - case "added": - out.Values[i] = ec._LabelChangeOperation_added(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "removed": - out.Values[i] = ec._LabelChangeOperation_removed(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 + return ec.marshalOString2string(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _LabelChangeOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) graphql.Marshaler { +func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "LabelChangeOperation", - Args: nil, - Field: field, + Object: "__Field", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Hash() + return obj.Args, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -5763,26 +6620,26 @@ func (ec *executionContext) _LabelChangeOperation_hash(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(git.Hash) + res := resTmp.([]introspection.InputValue) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return res + return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _LabelChangeOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) graphql.Marshaler { +func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "LabelChangeOperation", - Args: nil, - Field: field, + Object: "__Field", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Author, nil + return obj.Type, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -5790,27 +6647,26 @@ func (ec *executionContext) _LabelChangeOperation_author(ctx context.Context, fi } return graphql.Null } - res := resTmp.(identity.Interface) + res := resTmp.(*introspection.Type) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._Identity(ctx, field.Selections, &res) + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _LabelChangeOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) graphql.Marshaler { +func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "LabelChangeOperation", - Args: nil, - Field: field, + Object: "__Field", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.LabelChangeOperation().Date(rctx, obj) + return obj.IsDeprecated(), nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -5818,62 +6674,50 @@ func (ec *executionContext) _LabelChangeOperation_date(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(bool) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalTime(res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _LabelChangeOperation_added(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) graphql.Marshaler { +func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "LabelChangeOperation", - Args: nil, - Field: field, + Object: "__Field", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Added, nil + return obj.DeprecationReason(), nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.([]bug.Label) + res := resTmp.(*string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - arr1 := make(graphql.Array, len(res)) - - for idx1 := range res { - arr1[idx1] = func() graphql.Marshaler { - return res[idx1] - }() - } - - return arr1 + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _LabelChangeOperation_removed(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) graphql.Marshaler { +func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "LabelChangeOperation", - Args: nil, - Field: field, + Object: "__InputValue", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Removed, nil + return obj.Name, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -5881,117 +6725,50 @@ func (ec *executionContext) _LabelChangeOperation_removed(ctx context.Context, f } return graphql.Null } - res := resTmp.([]bug.Label) + res := resTmp.(string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - arr1 := make(graphql.Array, len(res)) - - for idx1 := range res { - arr1[idx1] = func() graphql.Marshaler { - return res[idx1] - }() - } - - return arr1 -} - -var labelChangeTimelineItemImplementors = []string{"LabelChangeTimelineItem", "TimelineItem"} - -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _LabelChangeTimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.LabelChangeTimelineItem) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, labelChangeTimelineItemImplementors) - - 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("LabelChangeTimelineItem") - case "hash": - out.Values[i] = ec._LabelChangeTimelineItem_hash(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "author": - out.Values[i] = ec._LabelChangeTimelineItem_author(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._LabelChangeTimelineItem_date(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - wg.Done() - }(i, field) - case "added": - out.Values[i] = ec._LabelChangeTimelineItem_added(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "removed": - out.Values[i] = ec._LabelChangeTimelineItem_removed(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 + return ec.marshalNString2string(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _LabelChangeTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) graphql.Marshaler { +func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "LabelChangeTimelineItem", - Args: nil, - Field: field, + Object: "__InputValue", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Hash(), nil + return obj.Description, nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(git.Hash) + res := resTmp.(string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return res + return ec.marshalOString2string(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _LabelChangeTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) graphql.Marshaler { +func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "LabelChangeTimelineItem", - Args: nil, - Field: field, + Object: "__InputValue", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Author, nil + return obj.Type, nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -5999,54 +6776,50 @@ func (ec *executionContext) _LabelChangeTimelineItem_author(ctx context.Context, } return graphql.Null } - res := resTmp.(identity.Interface) + res := resTmp.(*introspection.Type) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._Identity(ctx, field.Selections, &res) + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _LabelChangeTimelineItem_date(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) graphql.Marshaler { +func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "LabelChangeTimelineItem", - Args: nil, - Field: field, + Object: "__InputValue", + Field: field, + Args: nil, + IsMethod: false, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.LabelChangeTimelineItem().Date(rctx, obj) + return obj.DefaultValue, nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(*string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalTime(res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _LabelChangeTimelineItem_added(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) graphql.Marshaler { +func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "LabelChangeTimelineItem", - Args: nil, - Field: field, + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Added, nil + return obj.Types(), nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -6054,141 +6827,101 @@ func (ec *executionContext) _LabelChangeTimelineItem_added(ctx context.Context, } return graphql.Null } - res := resTmp.([]bug.Label) + res := resTmp.([]introspection.Type) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - arr1 := make(graphql.Array, len(res)) - - for idx1 := range res { - arr1[idx1] = func() graphql.Marshaler { - return res[idx1] - }() - } - - return arr1 + return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _LabelChangeTimelineItem_removed(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) graphql.Marshaler { +func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "LabelChangeTimelineItem", - Args: nil, - Field: field, + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Removed, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]bug.Label) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - arr1 := make(graphql.Array, len(res)) - - for idx1 := range res { - arr1[idx1] = func() graphql.Marshaler { - return res[idx1] - }() - } - - return arr1 -} - -var mutationImplementors = []string{"Mutation"} - -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, mutationImplementors) - - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ - Object: "Mutation", + return obj.QueryType(), nil }) - - 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("Mutation") - case "newBug": - out.Values[i] = ec._Mutation_newBug(ctx, field) - if out.Values[i] == graphql.Null { - invalid = true - } - case "addComment": - out.Values[i] = ec._Mutation_addComment(ctx, field) - if out.Values[i] == graphql.Null { - invalid = true - } - case "changeLabels": - out.Values[i] = ec._Mutation_changeLabels(ctx, field) - if out.Values[i] == graphql.Null { - invalid = true - } - case "open": - out.Values[i] = ec._Mutation_open(ctx, field) - if out.Values[i] == graphql.Null { - invalid = true - } - case "close": - out.Values[i] = ec._Mutation_close(ctx, field) - if out.Values[i] == graphql.Null { - invalid = true - } - case "setTitle": - out.Values[i] = ec._Mutation_setTitle(ctx, field) - if out.Values[i] == graphql.Null { - invalid = true - } - case "commit": - out.Values[i] = ec._Mutation_commit(ctx, field) - if out.Values[i] == graphql.Null { - invalid = true - } - default: - panic("unknown field " + strconv.Quote(field.Name)) + if resTmp == nil { + if !ec.HasError(rctx) { + ec.Errorf(ctx, "must not be null") } + return graphql.Null } + res := resTmp.(*introspection.Type) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} - if invalid { +func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MutationType(), nil + }) + if resTmp == nil { return graphql.Null } - return out + res := resTmp.(*introspection.Type) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Mutation_newBug(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rawArgs := field.ArgumentMap(ec.Variables) - args, err := field_Mutation_newBug_args(rawArgs) - if err != nil { - ec.Error(ctx, err) + rctx := &graphql.ResolverContext{ + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.SubscriptionType(), nil + }) + if resTmp == nil { return graphql.Null } + res := resTmp.(*introspection.Type) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Mutation", - Args: args, - Field: field, + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().NewBug(rctx, args["repoRef"].(*string), args["title"].(string), args["message"].(string), args["files"].([]git.Hash)) + return obj.Directives(), nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -6196,33 +6929,26 @@ func (ec *executionContext) _Mutation_newBug(ctx context.Context, field graphql. } return graphql.Null } - res := resTmp.(bug.Snapshot) + res := resTmp.([]introspection.Directive) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._Bug(ctx, field.Selections, &res) + return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Mutation_addComment(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rawArgs := field.ArgumentMap(ec.Variables) - args, err := field_Mutation_addComment_args(rawArgs) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } rctx := &graphql.ResolverContext{ - Object: "Mutation", - Args: args, - Field: field, + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().AddComment(rctx, args["repoRef"].(*string), args["prefix"].(string), args["message"].(string), args["files"].([]git.Hash)) + return obj.Kind(), nil }) if resTmp == nil { if !ec.HasError(rctx) { @@ -6230,214 +6956,343 @@ func (ec *executionContext) _Mutation_addComment(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(bug.Snapshot) + res := resTmp.(string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._Bug(ctx, field.Selections, &res) + return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Mutation_changeLabels(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rawArgs := field.ArgumentMap(ec.Variables) - args, err := field_Mutation_changeLabels_args(rawArgs) - if err != nil { - ec.Error(ctx, err) + rctx := &graphql.ResolverContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name(), nil + }) + if resTmp == nil { return graphql.Null } + res := resTmp.(*string) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Mutation", - Args: args, - Field: field, + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().ChangeLabels(rctx, args["repoRef"].(*string), args["prefix"].(string), args["added"].([]string), args["removed"].([]string)) + return obj.Description(), nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(bug.Snapshot) + res := resTmp.(string) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._Bug(ctx, field.Selections, &res) + return ec.marshalOString2string(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Mutation_open(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) rawArgs := field.ArgumentMap(ec.Variables) - args, err := field_Mutation_open_args(rawArgs) + args, err := ec.field___Type_fields_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } + rctx.Args = args + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Fields(args["includeDeprecated"].(bool)), nil + }) + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Field) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Mutation", - Args: args, - Field: field, + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().Open(rctx, args["repoRef"].(*string), args["prefix"].(string)) + return obj.Interfaces(), nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(bug.Snapshot) + res := resTmp.([]introspection.Type) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._Bug(ctx, field.Selections, &res) + return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Mutation_close(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rawArgs := field.ArgumentMap(ec.Variables) - args, err := field_Mutation_close_args(rawArgs) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } rctx := &graphql.ResolverContext{ - Object: "Mutation", - Args: args, - Field: field, + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().Close(rctx, args["repoRef"].(*string), args["prefix"].(string)) + return obj.PossibleTypes(), nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(bug.Snapshot) + res := resTmp.([]introspection.Type) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._Bug(ctx, field.Selections, &res) + return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Mutation_setTitle(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() + rctx := &graphql.ResolverContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + } + ctx = graphql.WithResolverContext(ctx, rctx) rawArgs := field.ArgumentMap(ec.Variables) - args, err := field_Mutation_setTitle_args(rawArgs) + args, err := ec.field___Type_enumValues_args(ctx, rawArgs) if err != nil { ec.Error(ctx, err) return graphql.Null } + rctx.Args = args + ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.EnumValues(args["includeDeprecated"].(bool)), nil + }) + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.EnumValue) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { + ctx = ec.Tracer.StartFieldExecution(ctx, field) + defer func() { ec.Tracer.EndFieldExecution(ctx) }() rctx := &graphql.ResolverContext{ - Object: "Mutation", - Args: args, - Field: field, + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().SetTitle(rctx, args["repoRef"].(*string), args["prefix"].(string), args["title"].(string)) + return obj.InputFields(), nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(bug.Snapshot) + res := resTmp.([]introspection.InputValue) rctx.Result = res ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._Bug(ctx, field.Selections, &res) + return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res) } -// nolint: vetshadow -func (ec *executionContext) _Mutation_commit(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { +func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { ctx = ec.Tracer.StartFieldExecution(ctx, field) defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rawArgs := field.ArgumentMap(ec.Variables) - args, err := field_Mutation_commit_args(rawArgs) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } rctx := &graphql.ResolverContext{ - Object: "Mutation", - Args: args, - Field: field, + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, } ctx = graphql.WithResolverContext(ctx, rctx) ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { + resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().Commit(rctx, args["repoRef"].(*string), args["prefix"].(string)) + return obj.OfType(), nil }) if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(bug.Snapshot) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._Bug(ctx, field.Selections, &res) + res := resTmp.(*introspection.Type) + rctx.Result = res + ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +// endregion **************************** field.gotpl ***************************** + +// region **************************** input.gotpl ***************************** + +// endregion **************************** input.gotpl ***************************** + +// region ************************** interface.gotpl *************************** + +func (ec *executionContext) _Authored(ctx context.Context, sel ast.SelectionSet, obj *models.Authored) graphql.Marshaler { + switch obj := (*obj).(type) { + case nil: + return graphql.Null + case bug.Comment: + return ec._Comment(ctx, sel, &obj) + case *bug.Comment: + return ec._Comment(ctx, sel, obj) + case *bug.CreateOperation: + return ec._CreateOperation(ctx, sel, obj) + case *bug.SetTitleOperation: + return ec._SetTitleOperation(ctx, sel, obj) + case *bug.AddCommentOperation: + return ec._AddCommentOperation(ctx, sel, obj) + case *bug.EditCommentOperation: + return ec._EditCommentOperation(ctx, sel, obj) + case *bug.SetStatusOperation: + return ec._SetStatusOperation(ctx, sel, obj) + case *bug.LabelChangeOperation: + return ec._LabelChangeOperation(ctx, sel, obj) + default: + panic(fmt.Errorf("unexpected type %T", obj)) + } +} + +func (ec *executionContext) _Operation(ctx context.Context, sel ast.SelectionSet, obj *bug.Operation) graphql.Marshaler { + switch obj := (*obj).(type) { + case nil: + return graphql.Null + case *bug.CreateOperation: + return ec._CreateOperation(ctx, sel, obj) + case *bug.SetTitleOperation: + return ec._SetTitleOperation(ctx, sel, obj) + case *bug.AddCommentOperation: + return ec._AddCommentOperation(ctx, sel, obj) + case *bug.EditCommentOperation: + return ec._EditCommentOperation(ctx, sel, obj) + case *bug.SetStatusOperation: + return ec._SetStatusOperation(ctx, sel, obj) + case *bug.LabelChangeOperation: + return ec._LabelChangeOperation(ctx, sel, obj) + default: + panic(fmt.Errorf("unexpected type %T", obj)) + } +} + +func (ec *executionContext) _TimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.TimelineItem) graphql.Marshaler { + switch obj := (*obj).(type) { + case nil: + return graphql.Null + case *bug.CreateTimelineItem: + return ec._CreateTimelineItem(ctx, sel, obj) + case *bug.AddCommentTimelineItem: + return ec._AddCommentTimelineItem(ctx, sel, obj) + case bug.LabelChangeTimelineItem: + return ec._LabelChangeTimelineItem(ctx, sel, &obj) + case *bug.LabelChangeTimelineItem: + return ec._LabelChangeTimelineItem(ctx, sel, obj) + case bug.SetStatusTimelineItem: + return ec._SetStatusTimelineItem(ctx, sel, &obj) + case *bug.SetStatusTimelineItem: + return ec._SetStatusTimelineItem(ctx, sel, obj) + case bug.SetTitleTimelineItem: + return ec._SetTitleTimelineItem(ctx, sel, &obj) + case *bug.SetTitleTimelineItem: + return ec._SetTitleTimelineItem(ctx, sel, obj) + default: + panic(fmt.Errorf("unexpected type %T", obj)) + } } -var operationConnectionImplementors = []string{"OperationConnection"} +// endregion ************************** interface.gotpl *************************** -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _OperationConnection(ctx context.Context, sel ast.SelectionSet, obj *models.OperationConnection) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, operationConnectionImplementors) +// region **************************** object.gotpl **************************** + +var addCommentOperationImplementors = []string{"AddCommentOperation", "Operation", "Authored"} + +func (ec *executionContext) _AddCommentOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.AddCommentOperation) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, addCommentOperationImplementors) - out := graphql.NewOrderedMap(len(fields)) + out := graphql.NewFieldSet(fields) invalid := false for i, field := range fields { - out.Keys[i] = field.Alias - switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("OperationConnection") - case "edges": - out.Values[i] = ec._OperationConnection_edges(ctx, field, obj) + out.Values[i] = graphql.MarshalString("AddCommentOperation") + case "hash": + out.Values[i] = ec._AddCommentOperation_hash(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } - case "nodes": - out.Values[i] = ec._OperationConnection_nodes(ctx, field, obj) + case "author": + out.Values[i] = ec._AddCommentOperation_author(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } - case "pageInfo": - out.Values[i] = ec._OperationConnection_pageInfo(ctx, field, obj) + case "date": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._AddCommentOperation_date(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + case "message": + out.Values[i] = ec._AddCommentOperation_message(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } - case "totalCount": - out.Values[i] = ec._OperationConnection_totalCount(ctx, field, obj) + case "files": + out.Values[i] = ec._AddCommentOperation_files(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } @@ -6445,209 +7300,276 @@ func (ec *executionContext) _OperationConnection(ctx context.Context, sel ast.Se panic("unknown field " + strconv.Quote(field.Name)) } } - + out.Dispatch() if invalid { return graphql.Null } return out } -// nolint: vetshadow -func (ec *executionContext) _OperationConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "OperationConnection", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Edges, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]models.OperationEdge) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - arr1 := make(graphql.Array, len(res)) - var wg sync.WaitGroup +var addCommentTimelineItemImplementors = []string{"AddCommentTimelineItem", "TimelineItem"} - isLen1 := len(res) == 1 - if !isLen1 { - wg.Add(len(res)) - } +func (ec *executionContext) _AddCommentTimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.AddCommentTimelineItem) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, addCommentTimelineItemImplementors) - 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() + out := graphql.NewFieldSet(fields) + invalid := false + for i, field := range fields { + switch field.Name { + case "__typename": + 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 } - arr1[idx1] = func() graphql.Marshaler { - - return ec._OperationEdge(ctx, field.Selections, &res[idx1]) - }() - } - if isLen1 { - f(idx1) - } else { - go f(idx1) + case "author": + out.Values[i] = ec._AddCommentTimelineItem_author(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "message": + out.Values[i] = ec._AddCommentTimelineItem_message(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "messageIsEmpty": + out.Values[i] = ec._AddCommentTimelineItem_messageIsEmpty(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "files": + out.Values[i] = ec._AddCommentTimelineItem_files(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "createdAt": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._AddCommentTimelineItem_createdAt(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + case "lastEdit": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._AddCommentTimelineItem_lastEdit(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + 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)) } - - } - wg.Wait() - return arr1 -} - -// nolint: vetshadow -func (ec *executionContext) _OperationConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "OperationConnection", - Args: nil, - Field: field, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Nodes, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } + out.Dispatch() + if invalid { return graphql.Null } - res := resTmp.([]bug.Operation) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + return out +} - arr1 := make(graphql.Array, len(res)) - var wg sync.WaitGroup +var bugImplementors = []string{"Bug"} - isLen1 := len(res) == 1 - if !isLen1 { - wg.Add(len(res)) - } +func (ec *executionContext) _Bug(ctx context.Context, sel ast.SelectionSet, obj *bug.Snapshot) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, bugImplementors) - 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() + out := graphql.NewFieldSet(fields) + invalid := false + for i, field := range fields { + 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 } - arr1[idx1] = func() graphql.Marshaler { - - return ec._Operation(ctx, field.Selections, &res[idx1]) - }() - } - if isLen1 { - f(idx1) - } else { - go f(idx1) - } - - } - wg.Wait() - return arr1 -} - -// nolint: vetshadow -func (ec *executionContext) _OperationConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "OperationConnection", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") + case "humanId": + out.Values[i] = ec._Bug_humanId(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "status": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Bug_status(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + 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": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Bug_lastEdit(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + case "actors": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Bug_actors(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + case "participants": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Bug_participants(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + case "comments": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Bug_comments(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + case "timeline": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Bug_timeline(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + case "operations": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Bug_operations(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + default: + panic("unknown field " + strconv.Quote(field.Name)) } - return graphql.Null - } - res := resTmp.(models.PageInfo) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._PageInfo(ctx, field.Selections, &res) -} - -// nolint: vetshadow -func (ec *executionContext) _OperationConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "OperationConnection", - Args: nil, - Field: field, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.TotalCount, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } + out.Dispatch() + if invalid { return graphql.Null } - res := resTmp.(int) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalInt(res) + return out } -var operationEdgeImplementors = []string{"OperationEdge"} +var bugConnectionImplementors = []string{"BugConnection"} -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _OperationEdge(ctx context.Context, sel ast.SelectionSet, obj *models.OperationEdge) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, operationEdgeImplementors) +func (ec *executionContext) _BugConnection(ctx context.Context, sel ast.SelectionSet, obj *models.BugConnection) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, bugConnectionImplementors) - out := graphql.NewOrderedMap(len(fields)) + out := graphql.NewFieldSet(fields) invalid := false for i, field := range fields { - out.Keys[i] = field.Alias - switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("OperationEdge") - case "cursor": - out.Values[i] = ec._OperationEdge_cursor(ctx, field, obj) + out.Values[i] = graphql.MarshalString("BugConnection") + case "edges": + out.Values[i] = ec._BugConnection_edges(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } - case "node": - out.Values[i] = ec._OperationEdge_node(ctx, field, obj) + case "nodes": + out.Values[i] = ec._BugConnection_nodes(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "pageInfo": + out.Values[i] = ec._BugConnection_pageInfo(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "totalCount": + out.Values[i] = ec._BugConnection_totalCount(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } @@ -6655,99 +7577,68 @@ func (ec *executionContext) _OperationEdge(ctx context.Context, sel ast.Selectio panic("unknown field " + strconv.Quote(field.Name)) } } - + out.Dispatch() if invalid { return graphql.Null } return out } -// nolint: vetshadow -func (ec *executionContext) _OperationEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.OperationEdge) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "OperationEdge", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) -} +var bugEdgeImplementors = []string{"BugEdge"} -// nolint: vetshadow -func (ec *executionContext) _OperationEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.OperationEdge) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "OperationEdge", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Node, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") +func (ec *executionContext) _BugEdge(ctx context.Context, sel ast.SelectionSet, obj *models.BugEdge) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, bugEdgeImplementors) + + out := graphql.NewFieldSet(fields) + invalid := false + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("BugEdge") + case "cursor": + out.Values[i] = ec._BugEdge_cursor(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "node": + out.Values[i] = ec._BugEdge_node(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + default: + panic("unknown field " + strconv.Quote(field.Name)) } + } + out.Dispatch() + if invalid { return graphql.Null } - res := resTmp.(bug.Operation) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._Operation(ctx, field.Selections, &res) + return out } -var pageInfoImplementors = []string{"PageInfo"} +var commentImplementors = []string{"Comment", "Authored"} -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, obj *models.PageInfo) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, pageInfoImplementors) +func (ec *executionContext) _Comment(ctx context.Context, sel ast.SelectionSet, obj *bug.Comment) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, commentImplementors) - out := graphql.NewOrderedMap(len(fields)) + out := graphql.NewFieldSet(fields) invalid := false for i, field := range fields { - out.Keys[i] = field.Alias - switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("PageInfo") - case "hasNextPage": - out.Values[i] = ec._PageInfo_hasNextPage(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "hasPreviousPage": - out.Values[i] = ec._PageInfo_hasPreviousPage(ctx, field, obj) + out.Values[i] = graphql.MarshalString("Comment") + case "author": + out.Values[i] = ec._Comment_author(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } - case "startCursor": - out.Values[i] = ec._PageInfo_startCursor(ctx, field, obj) + case "message": + out.Values[i] = ec._Comment_message(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } - case "endCursor": - out.Values[i] = ec._PageInfo_endCursor(ctx, field, obj) + case "files": + out.Values[i] = ec._Comment_files(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } @@ -6755,891 +7646,806 @@ func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, panic("unknown field " + strconv.Quote(field.Name)) } } - + out.Dispatch() if invalid { return graphql.Null } return out } -// nolint: vetshadow -func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "PageInfo", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.HasNextPage, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(bool) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalBoolean(res) -} - -// nolint: vetshadow -func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "PageInfo", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.HasPreviousPage, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(bool) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalBoolean(res) -} +var commentConnectionImplementors = []string{"CommentConnection"} -// nolint: vetshadow -func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "PageInfo", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.StartCursor, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) -} +func (ec *executionContext) _CommentConnection(ctx context.Context, sel ast.SelectionSet, obj *models.CommentConnection) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, commentConnectionImplementors) -// nolint: vetshadow -func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "PageInfo", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.EndCursor, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") + out := graphql.NewFieldSet(fields) + invalid := false + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("CommentConnection") + case "edges": + out.Values[i] = ec._CommentConnection_edges(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "nodes": + out.Values[i] = ec._CommentConnection_nodes(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "pageInfo": + out.Values[i] = ec._CommentConnection_pageInfo(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "totalCount": + out.Values[i] = ec._CommentConnection_totalCount(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + default: + panic("unknown field " + strconv.Quote(field.Name)) } + } + out.Dispatch() + if invalid { return graphql.Null } - res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + return out } -var queryImplementors = []string{"Query"} - -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, queryImplementors) +var commentEdgeImplementors = []string{"CommentEdge"} - ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ - Object: "Query", - }) +func (ec *executionContext) _CommentEdge(ctx context.Context, sel ast.SelectionSet, obj *models.CommentEdge) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, commentEdgeImplementors) - var wg sync.WaitGroup - out := graphql.NewOrderedMap(len(fields)) + out := graphql.NewFieldSet(fields) invalid := false for i, field := range fields { - out.Keys[i] = field.Alias - switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("Query") - case "defaultRepository": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._Query_defaultRepository(ctx, field) - wg.Done() - }(i, field) - case "repository": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._Query_repository(ctx, field) - wg.Done() - }(i, field) - case "__type": - out.Values[i] = ec._Query___type(ctx, field) - case "__schema": - out.Values[i] = ec._Query___schema(ctx, field) + out.Values[i] = graphql.MarshalString("CommentEdge") + case "cursor": + out.Values[i] = ec._CommentEdge_cursor(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "node": + out.Values[i] = ec._CommentEdge_node(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } default: panic("unknown field " + strconv.Quote(field.Name)) } } - wg.Wait() + out.Dispatch() if invalid { return graphql.Null } return out } -// nolint: vetshadow -func (ec *executionContext) _Query_defaultRepository(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "Query", - Args: nil, - Field: field, +var commentHistoryStepImplementors = []string{"CommentHistoryStep"} + +func (ec *executionContext) _CommentHistoryStep(ctx context.Context, sel ast.SelectionSet, obj *bug.CommentHistoryStep) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, commentHistoryStepImplementors) + + out := graphql.NewFieldSet(fields) + invalid := false + for i, field := range fields { + 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": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._CommentHistoryStep_date(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().DefaultRepository(rctx) - }) - if resTmp == nil { + out.Dispatch() + if invalid { return graphql.Null } - res := resTmp.(*models.Repository) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + return out +} - if res == nil { - return graphql.Null - } +var createOperationImplementors = []string{"CreateOperation", "Operation", "Authored"} - return ec._Repository(ctx, field.Selections, res) -} +func (ec *executionContext) _CreateOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.CreateOperation) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, createOperationImplementors) -// nolint: vetshadow -func (ec *executionContext) _Query_repository(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rawArgs := field.ArgumentMap(ec.Variables) - args, err := field_Query_repository_args(rawArgs) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - rctx := &graphql.ResolverContext{ - Object: "Query", - Args: args, - Field: field, + out := graphql.NewFieldSet(fields) + invalid := false + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("CreateOperation") + case "hash": + out.Values[i] = ec._CreateOperation_hash(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "author": + out.Values[i] = ec._CreateOperation_author(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "date": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._CreateOperation_date(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + case "title": + out.Values[i] = ec._CreateOperation_title(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "message": + out.Values[i] = ec._CreateOperation_message(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "files": + out.Values[i] = ec._CreateOperation_files(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Repository(rctx, args["id"].(string)) - }) - if resTmp == nil { + out.Dispatch() + if invalid { return graphql.Null } - res := resTmp.(*models.Repository) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + return out +} - if res == nil { - return graphql.Null - } +var createTimelineItemImplementors = []string{"CreateTimelineItem", "TimelineItem"} - return ec._Repository(ctx, field.Selections, res) -} +func (ec *executionContext) _CreateTimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.CreateTimelineItem) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, createTimelineItemImplementors) -// nolint: vetshadow -func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rawArgs := field.ArgumentMap(ec.Variables) - args, err := field_Query___type_args(rawArgs) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - rctx := &graphql.ResolverContext{ - Object: "Query", - Args: args, - Field: field, + out := graphql.NewFieldSet(fields) + invalid := false + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("CreateTimelineItem") + case "hash": + out.Values[i] = ec._CreateTimelineItem_hash(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "author": + out.Values[i] = ec._CreateTimelineItem_author(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "message": + out.Values[i] = ec._CreateTimelineItem_message(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "messageIsEmpty": + out.Values[i] = ec._CreateTimelineItem_messageIsEmpty(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "files": + out.Values[i] = ec._CreateTimelineItem_files(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "createdAt": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._CreateTimelineItem_createdAt(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + case "lastEdit": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._CreateTimelineItem_lastEdit(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + case "edited": + out.Values[i] = ec._CreateTimelineItem_edited(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "history": + out.Values[i] = ec._CreateTimelineItem_history(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.introspectType(args["name"].(string)) - }) - if resTmp == nil { + out.Dispatch() + if invalid { return graphql.Null } - res := resTmp.(*introspection.Type) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + return out +} - if res == nil { - return graphql.Null - } +var editCommentOperationImplementors = []string{"EditCommentOperation", "Operation", "Authored"} - return ec.___Type(ctx, field.Selections, res) -} +func (ec *executionContext) _EditCommentOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.EditCommentOperation) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, editCommentOperationImplementors) -// nolint: vetshadow -func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "Query", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.introspectSchema() - }) - if resTmp == nil { - return graphql.Null + out := graphql.NewFieldSet(fields) + invalid := false + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("EditCommentOperation") + case "hash": + out.Values[i] = ec._EditCommentOperation_hash(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "author": + out.Values[i] = ec._EditCommentOperation_author(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "date": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._EditCommentOperation_date(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + case "target": + out.Values[i] = ec._EditCommentOperation_target(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "message": + out.Values[i] = ec._EditCommentOperation_message(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "files": + out.Values[i] = ec._EditCommentOperation_files(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } } - res := resTmp.(*introspection.Schema) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - if res == nil { + out.Dispatch() + if invalid { return graphql.Null } - - return ec.___Schema(ctx, field.Selections, res) + return out } -var repositoryImplementors = []string{"Repository"} +var identityImplementors = []string{"Identity"} -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _Repository(ctx context.Context, sel ast.SelectionSet, obj *models.Repository) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, repositoryImplementors) +func (ec *executionContext) _Identity(ctx context.Context, sel ast.SelectionSet, obj *identity.Interface) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, identityImplementors) - var wg sync.WaitGroup - out := graphql.NewOrderedMap(len(fields)) + out := graphql.NewFieldSet(fields) invalid := false for i, field := range fields { - out.Keys[i] = field.Alias - switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("Repository") - case "allBugs": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._Repository_allBugs(ctx, field, obj) - if out.Values[i] == graphql.Null { + out.Values[i] = graphql.MarshalString("Identity") + case "id": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Identity_id(ctx, field, obj) + if res == graphql.Null { invalid = true } - wg.Done() - }(i, field) - case "bug": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._Repository_bug(ctx, field, obj) - wg.Done() - }(i, field) - case "allIdentities": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._Repository_allIdentities(ctx, field, obj) - if out.Values[i] == graphql.Null { + return res + }) + case "humanId": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Identity_humanId(ctx, field, obj) + if res == graphql.Null { invalid = true } - wg.Done() - }(i, field) - case "identity": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._Repository_identity(ctx, field, obj) - wg.Done() - }(i, field) - case "userIdentity": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._Repository_userIdentity(ctx, field, obj) - wg.Done() - }(i, field) + return res + }) + case "name": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Identity_name(ctx, field, obj) + return res + }) + case "email": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Identity_email(ctx, field, obj) + return res + }) + case "login": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Identity_login(ctx, field, obj) + return res + }) + case "displayName": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Identity_displayName(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + case "avatarUrl": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Identity_avatarUrl(ctx, field, obj) + return res + }) + case "isProtected": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Identity_isProtected(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) default: panic("unknown field " + strconv.Quote(field.Name)) } } - wg.Wait() + out.Dispatch() if invalid { return graphql.Null } return out } -// nolint: vetshadow -func (ec *executionContext) _Repository_allBugs(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rawArgs := field.ArgumentMap(ec.Variables) - args, err := field_Repository_allBugs_args(rawArgs) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - rctx := &graphql.ResolverContext{ - Object: "Repository", - Args: args, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Repository().AllBugs(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int), args["query"].(*string)) - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(models.BugConnection) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) +var identityConnectionImplementors = []string{"IdentityConnection"} - return ec._BugConnection(ctx, field.Selections, &res) -} +func (ec *executionContext) _IdentityConnection(ctx context.Context, sel ast.SelectionSet, obj *models.IdentityConnection) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, identityConnectionImplementors) -// nolint: vetshadow -func (ec *executionContext) _Repository_bug(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rawArgs := field.ArgumentMap(ec.Variables) - args, err := field_Repository_bug_args(rawArgs) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - rctx := &graphql.ResolverContext{ - Object: "Repository", - Args: args, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Repository().Bug(rctx, obj, args["prefix"].(string)) - }) - if resTmp == nil { - return graphql.Null + out := graphql.NewFieldSet(fields) + invalid := false + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IdentityConnection") + case "edges": + out.Values[i] = ec._IdentityConnection_edges(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "nodes": + out.Values[i] = ec._IdentityConnection_nodes(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "pageInfo": + out.Values[i] = ec._IdentityConnection_pageInfo(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "totalCount": + out.Values[i] = ec._IdentityConnection_totalCount(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } } - res := resTmp.(*bug.Snapshot) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - if res == nil { + out.Dispatch() + if invalid { return graphql.Null } - - return ec._Bug(ctx, field.Selections, res) + return out } -// nolint: vetshadow -func (ec *executionContext) _Repository_allIdentities(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rawArgs := field.ArgumentMap(ec.Variables) - args, err := field_Repository_allIdentities_args(rawArgs) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - rctx := &graphql.ResolverContext{ - Object: "Repository", - Args: args, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Repository().AllIdentities(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int)) - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(models.IdentityConnection) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) +var identityEdgeImplementors = []string{"IdentityEdge"} - return ec._IdentityConnection(ctx, field.Selections, &res) -} +func (ec *executionContext) _IdentityEdge(ctx context.Context, sel ast.SelectionSet, obj *models.IdentityEdge) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, identityEdgeImplementors) -// nolint: vetshadow -func (ec *executionContext) _Repository_identity(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rawArgs := field.ArgumentMap(ec.Variables) - args, err := field_Repository_identity_args(rawArgs) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - rctx := &graphql.ResolverContext{ - Object: "Repository", - Args: args, - Field: field, + out := graphql.NewFieldSet(fields) + invalid := false + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IdentityEdge") + case "cursor": + out.Values[i] = ec._IdentityEdge_cursor(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "node": + out.Values[i] = ec._IdentityEdge_node(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Repository().Identity(rctx, obj, args["prefix"].(string)) - }) - if resTmp == nil { + out.Dispatch() + if invalid { return graphql.Null } - res := resTmp.(*identity.Interface) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + return out +} - if res == nil { - return graphql.Null - } +var labelChangeOperationImplementors = []string{"LabelChangeOperation", "Operation", "Authored"} - return ec._Identity(ctx, field.Selections, res) -} +func (ec *executionContext) _LabelChangeOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.LabelChangeOperation) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, labelChangeOperationImplementors) -// nolint: vetshadow -func (ec *executionContext) _Repository_userIdentity(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "Repository", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Repository().UserIdentity(rctx, obj) - }) - if resTmp == nil { - return graphql.Null + out := graphql.NewFieldSet(fields) + invalid := false + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("LabelChangeOperation") + case "hash": + out.Values[i] = ec._LabelChangeOperation_hash(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "author": + out.Values[i] = ec._LabelChangeOperation_author(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "date": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._LabelChangeOperation_date(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + case "added": + out.Values[i] = ec._LabelChangeOperation_added(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "removed": + out.Values[i] = ec._LabelChangeOperation_removed(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } } - res := resTmp.(*identity.Interface) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - if res == nil { + out.Dispatch() + if invalid { return graphql.Null } - - return ec._Identity(ctx, field.Selections, res) + return out } -var setStatusOperationImplementors = []string{"SetStatusOperation", "Operation", "Authored"} +var labelChangeTimelineItemImplementors = []string{"LabelChangeTimelineItem", "TimelineItem"} -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _SetStatusOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.SetStatusOperation) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, setStatusOperationImplementors) +func (ec *executionContext) _LabelChangeTimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.LabelChangeTimelineItem) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, labelChangeTimelineItemImplementors) - var wg sync.WaitGroup - out := graphql.NewOrderedMap(len(fields)) + out := graphql.NewFieldSet(fields) invalid := false for i, field := range fields { - out.Keys[i] = field.Alias - switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("SetStatusOperation") + out.Values[i] = graphql.MarshalString("LabelChangeTimelineItem") case "hash": - out.Values[i] = ec._SetStatusOperation_hash(ctx, field, obj) + out.Values[i] = ec._LabelChangeTimelineItem_hash(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } case "author": - out.Values[i] = ec._SetStatusOperation_author(ctx, field, obj) + out.Values[i] = ec._LabelChangeTimelineItem_author(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._SetStatusOperation_date(ctx, field, obj) - if out.Values[i] == graphql.Null { + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._LabelChangeTimelineItem_date(ctx, field, obj) + if res == graphql.Null { invalid = true } - wg.Done() - }(i, field) - case "status": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._SetStatusOperation_status(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - wg.Done() - }(i, field) + return res + }) + case "added": + out.Values[i] = ec._LabelChangeTimelineItem_added(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "removed": + out.Values[i] = ec._LabelChangeTimelineItem_removed(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } default: panic("unknown field " + strconv.Quote(field.Name)) } } - wg.Wait() + out.Dispatch() if invalid { return graphql.Null } return out } -// nolint: vetshadow -func (ec *executionContext) _SetStatusOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "SetStatusOperation", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - 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 - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return res -} - -// nolint: vetshadow -func (ec *executionContext) _SetStatusOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "SetStatusOperation", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Author, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(identity.Interface) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._Identity(ctx, field.Selections, &res) -} +var mutationImplementors = []string{"Mutation"} -// nolint: vetshadow -func (ec *executionContext) _SetStatusOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "SetStatusOperation", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.SetStatusOperation().Date(rctx, 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 - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalTime(res) -} +func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, mutationImplementors) -// nolint: vetshadow -func (ec *executionContext) _SetStatusOperation_status(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "SetStatusOperation", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.SetStatusOperation().Status(rctx, obj) + ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + Object: "Mutation", }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(models.Status) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return res -} - -var setStatusTimelineItemImplementors = []string{"SetStatusTimelineItem", "TimelineItem"} -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _SetStatusTimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.SetStatusTimelineItem) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, setStatusTimelineItemImplementors) - - var wg sync.WaitGroup - out := graphql.NewOrderedMap(len(fields)) + out := graphql.NewFieldSet(fields) invalid := false for i, field := range fields { - out.Keys[i] = field.Alias - switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("SetStatusTimelineItem") - case "hash": - out.Values[i] = ec._SetStatusTimelineItem_hash(ctx, field, obj) + out.Values[i] = graphql.MarshalString("Mutation") + case "newBug": + out.Values[i] = ec._Mutation_newBug(ctx, field) if out.Values[i] == graphql.Null { invalid = true } - case "author": - out.Values[i] = ec._SetStatusTimelineItem_author(ctx, field, obj) + case "addComment": + out.Values[i] = ec._Mutation_addComment(ctx, field) + if out.Values[i] == graphql.Null { + invalid = true + } + case "changeLabels": + out.Values[i] = ec._Mutation_changeLabels(ctx, field) + if out.Values[i] == graphql.Null { + invalid = true + } + case "open": + out.Values[i] = ec._Mutation_open(ctx, field) + if out.Values[i] == graphql.Null { + invalid = true + } + case "close": + out.Values[i] = ec._Mutation_close(ctx, field) + if out.Values[i] == graphql.Null { + invalid = true + } + case "setTitle": + out.Values[i] = ec._Mutation_setTitle(ctx, field) + if out.Values[i] == graphql.Null { + invalid = true + } + case "commit": + out.Values[i] = ec._Mutation_commit(ctx, field) if out.Values[i] == graphql.Null { invalid = true } - case "date": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._SetStatusTimelineItem_date(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - wg.Done() - }(i, field) - case "status": - wg.Add(1) - go func(i int, field graphql.CollectedField) { - out.Values[i] = ec._SetStatusTimelineItem_status(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() + out.Dispatch() if invalid { return graphql.Null } return out } -// nolint: vetshadow -func (ec *executionContext) _SetStatusTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "SetStatusTimelineItem", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Hash(), 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 - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return res -} - -// nolint: vetshadow -func (ec *executionContext) _SetStatusTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "SetStatusTimelineItem", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Author, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(identity.Interface) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) +var operationConnectionImplementors = []string{"OperationConnection"} - return ec._Identity(ctx, field.Selections, &res) -} +func (ec *executionContext) _OperationConnection(ctx context.Context, sel ast.SelectionSet, obj *models.OperationConnection) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, operationConnectionImplementors) -// nolint: vetshadow -func (ec *executionContext) _SetStatusTimelineItem_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "SetStatusTimelineItem", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.SetStatusTimelineItem().Date(rctx, obj) - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") + out := graphql.NewFieldSet(fields) + invalid := false + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("OperationConnection") + case "edges": + out.Values[i] = ec._OperationConnection_edges(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "nodes": + out.Values[i] = ec._OperationConnection_nodes(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "pageInfo": + out.Values[i] = ec._OperationConnection_pageInfo(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "totalCount": + out.Values[i] = ec._OperationConnection_totalCount(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + default: + panic("unknown field " + strconv.Quote(field.Name)) } + } + out.Dispatch() + if invalid { return graphql.Null } - res := resTmp.(time.Time) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalTime(res) + return out } -// nolint: vetshadow -func (ec *executionContext) _SetStatusTimelineItem_status(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "SetStatusTimelineItem", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.SetStatusTimelineItem().Status(rctx, obj) - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") +var operationEdgeImplementors = []string{"OperationEdge"} + +func (ec *executionContext) _OperationEdge(ctx context.Context, sel ast.SelectionSet, obj *models.OperationEdge) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, operationEdgeImplementors) + + out := graphql.NewFieldSet(fields) + invalid := false + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("OperationEdge") + case "cursor": + out.Values[i] = ec._OperationEdge_cursor(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "node": + out.Values[i] = ec._OperationEdge_node(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + default: + panic("unknown field " + strconv.Quote(field.Name)) } + } + out.Dispatch() + if invalid { return graphql.Null } - res := resTmp.(models.Status) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return res + return out } -var setTitleOperationImplementors = []string{"SetTitleOperation", "Operation", "Authored"} +var pageInfoImplementors = []string{"PageInfo"} -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _SetTitleOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.SetTitleOperation) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, setTitleOperationImplementors) +func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, obj *models.PageInfo) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, pageInfoImplementors) - var wg sync.WaitGroup - out := graphql.NewOrderedMap(len(fields)) + out := graphql.NewFieldSet(fields) invalid := false for i, field := range fields { - out.Keys[i] = field.Alias - switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("SetTitleOperation") - case "hash": - out.Values[i] = ec._SetTitleOperation_hash(ctx, field, obj) + out.Values[i] = graphql.MarshalString("PageInfo") + case "hasNextPage": + out.Values[i] = ec._PageInfo_hasNextPage(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } - case "author": - out.Values[i] = ec._SetTitleOperation_author(ctx, field, obj) + case "hasPreviousPage": + out.Values[i] = ec._PageInfo_hasPreviousPage(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._SetTitleOperation_date(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - wg.Done() - }(i, field) - case "title": - out.Values[i] = ec._SetTitleOperation_title(ctx, field, obj) + case "startCursor": + out.Values[i] = ec._PageInfo_startCursor(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } - case "was": - out.Values[i] = ec._SetTitleOperation_was(ctx, field, obj) + case "endCursor": + out.Values[i] = ec._PageInfo_endCursor(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } @@ -7647,371 +8453,310 @@ func (ec *executionContext) _SetTitleOperation(ctx context.Context, sel ast.Sele panic("unknown field " + strconv.Quote(field.Name)) } } - wg.Wait() + out.Dispatch() if invalid { return graphql.Null } return out } -// nolint: vetshadow -func (ec *executionContext) _SetTitleOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "SetTitleOperation", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Hash() +var queryImplementors = []string{"Query"} + +func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, queryImplementors) + + ctx = graphql.WithResolverContext(ctx, &graphql.ResolverContext{ + Object: "Query", }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") + + out := graphql.NewFieldSet(fields) + invalid := false + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Query") + case "defaultRepository": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_defaultRepository(ctx, field) + return res + }) + case "repository": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_repository(ctx, field) + return res + }) + case "__type": + out.Values[i] = ec._Query___type(ctx, field) + case "__schema": + out.Values[i] = ec._Query___schema(ctx, field) + default: + panic("unknown field " + strconv.Quote(field.Name)) } + } + out.Dispatch() + if invalid { return graphql.Null } - res := resTmp.(git.Hash) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return res + return out } -// nolint: vetshadow -func (ec *executionContext) _SetTitleOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "SetTitleOperation", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Author, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(identity.Interface) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) +var repositoryImplementors = []string{"Repository"} - return ec._Identity(ctx, field.Selections, &res) -} +func (ec *executionContext) _Repository(ctx context.Context, sel ast.SelectionSet, obj *models.Repository) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, repositoryImplementors) -// nolint: vetshadow -func (ec *executionContext) _SetTitleOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "SetTitleOperation", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.SetTitleOperation().Date(rctx, obj) - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") + out := graphql.NewFieldSet(fields) + invalid := false + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Repository") + case "allBugs": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Repository_allBugs(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + case "bug": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Repository_bug(ctx, field, obj) + return res + }) + case "allIdentities": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Repository_allIdentities(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + case "identity": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Repository_identity(ctx, field, obj) + return res + }) + case "userIdentity": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Repository_userIdentity(ctx, field, obj) + return res + }) + default: + panic("unknown field " + strconv.Quote(field.Name)) } - return graphql.Null - } - res := resTmp.(time.Time) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalTime(res) -} - -// nolint: vetshadow -func (ec *executionContext) _SetTitleOperation_title(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "SetTitleOperation", - Args: nil, - Field: field, } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Title, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } + out.Dispatch() + if invalid { return graphql.Null } - res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + return out } -// nolint: vetshadow -func (ec *executionContext) _SetTitleOperation_was(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "SetTitleOperation", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Was, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") +var setStatusOperationImplementors = []string{"SetStatusOperation", "Operation", "Authored"} + +func (ec *executionContext) _SetStatusOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.SetStatusOperation) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, setStatusOperationImplementors) + + out := graphql.NewFieldSet(fields) + invalid := false + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("SetStatusOperation") + case "hash": + out.Values[i] = ec._SetStatusOperation_hash(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "author": + out.Values[i] = ec._SetStatusOperation_author(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "date": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._SetStatusOperation_date(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + case "status": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._SetStatusOperation_status(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + default: + panic("unknown field " + strconv.Quote(field.Name)) } + } + out.Dispatch() + if invalid { return graphql.Null } - res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + return out } -var setTitleTimelineItemImplementors = []string{"SetTitleTimelineItem", "TimelineItem"} +var setStatusTimelineItemImplementors = []string{"SetStatusTimelineItem", "TimelineItem"} -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _SetTitleTimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.SetTitleTimelineItem) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, setTitleTimelineItemImplementors) +func (ec *executionContext) _SetStatusTimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.SetStatusTimelineItem) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, setStatusTimelineItemImplementors) - var wg sync.WaitGroup - out := graphql.NewOrderedMap(len(fields)) + out := graphql.NewFieldSet(fields) invalid := false for i, field := range fields { - out.Keys[i] = field.Alias - switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("SetTitleTimelineItem") + out.Values[i] = graphql.MarshalString("SetStatusTimelineItem") case "hash": - out.Values[i] = ec._SetTitleTimelineItem_hash(ctx, field, obj) + out.Values[i] = ec._SetStatusTimelineItem_hash(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } case "author": - out.Values[i] = ec._SetTitleTimelineItem_author(ctx, field, obj) + out.Values[i] = ec._SetStatusTimelineItem_author(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._SetTitleTimelineItem_date(ctx, field, obj) - if out.Values[i] == graphql.Null { + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._SetStatusTimelineItem_date(ctx, field, obj) + if res == graphql.Null { invalid = true } - wg.Done() - }(i, field) - case "title": - out.Values[i] = ec._SetTitleTimelineItem_title(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } - case "was": - out.Values[i] = ec._SetTitleTimelineItem_was(ctx, field, obj) - if out.Values[i] == graphql.Null { - invalid = true - } + return res + }) + case "status": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._SetStatusTimelineItem_status(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) default: panic("unknown field " + strconv.Quote(field.Name)) } } - wg.Wait() + out.Dispatch() if invalid { return graphql.Null } return out } -// nolint: vetshadow -func (ec *executionContext) _SetTitleTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "SetTitleTimelineItem", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Hash(), 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 - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return res -} - -// nolint: vetshadow -func (ec *executionContext) _SetTitleTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "SetTitleTimelineItem", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Author, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(identity.Interface) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._Identity(ctx, field.Selections, &res) -} - -// nolint: vetshadow -func (ec *executionContext) _SetTitleTimelineItem_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "SetTitleTimelineItem", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.SetTitleTimelineItem().Date(rctx, 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 - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalTime(res) -} - -// nolint: vetshadow -func (ec *executionContext) _SetTitleTimelineItem_title(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "SetTitleTimelineItem", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Title, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) -} - -// nolint: vetshadow -func (ec *executionContext) _SetTitleTimelineItem_was(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "SetTitleTimelineItem", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Was, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) -} - -var timelineItemConnectionImplementors = []string{"TimelineItemConnection"} +var setTitleOperationImplementors = []string{"SetTitleOperation", "Operation", "Authored"} -// nolint: gocyclo, errcheck, gas, goconst -func (ec *executionContext) _TimelineItemConnection(ctx context.Context, sel ast.SelectionSet, obj *models.TimelineItemConnection) graphql.Marshaler { - fields := graphql.CollectFields(ctx, sel, timelineItemConnectionImplementors) +func (ec *executionContext) _SetTitleOperation(ctx context.Context, sel ast.SelectionSet, obj *bug.SetTitleOperation) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, setTitleOperationImplementors) - out := graphql.NewOrderedMap(len(fields)) + out := graphql.NewFieldSet(fields) invalid := false for i, field := range fields { - out.Keys[i] = field.Alias - switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("TimelineItemConnection") - case "edges": - out.Values[i] = ec._TimelineItemConnection_edges(ctx, field, obj) + out.Values[i] = graphql.MarshalString("SetTitleOperation") + case "hash": + out.Values[i] = ec._SetTitleOperation_hash(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } - case "nodes": - out.Values[i] = ec._TimelineItemConnection_nodes(ctx, field, obj) + case "author": + out.Values[i] = ec._SetTitleOperation_author(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } - case "pageInfo": - out.Values[i] = ec._TimelineItemConnection_pageInfo(ctx, field, obj) + case "date": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._SetTitleOperation_date(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + case "title": + out.Values[i] = ec._SetTitleOperation_title(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } - case "totalCount": - out.Values[i] = ec._TimelineItemConnection_totalCount(ctx, field, obj) + case "was": + out.Values[i] = ec._SetTitleOperation_was(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true } @@ -8019,199 +8764,119 @@ func (ec *executionContext) _TimelineItemConnection(ctx context.Context, sel ast panic("unknown field " + strconv.Quote(field.Name)) } } - + out.Dispatch() if invalid { return graphql.Null } return out } -// nolint: vetshadow -func (ec *executionContext) _TimelineItemConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "TimelineItemConnection", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Edges, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]models.TimelineItemEdge) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - arr1 := make(graphql.Array, len(res)) - var wg sync.WaitGroup +var setTitleTimelineItemImplementors = []string{"SetTitleTimelineItem", "TimelineItem"} - isLen1 := len(res) == 1 - if !isLen1 { - wg.Add(len(res)) - } +func (ec *executionContext) _SetTitleTimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.SetTitleTimelineItem) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, setTitleTimelineItemImplementors) - 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() + out := graphql.NewFieldSet(fields) + invalid := false + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("SetTitleTimelineItem") + case "hash": + out.Values[i] = ec._SetTitleTimelineItem_hash(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true } - arr1[idx1] = func() graphql.Marshaler { - - return ec._TimelineItemEdge(ctx, field.Selections, &res[idx1]) - }() - } - if isLen1 { - f(idx1) - } else { - go f(idx1) - } - - } - wg.Wait() - return arr1 -} - -// nolint: vetshadow -func (ec *executionContext) _TimelineItemConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "TimelineItemConnection", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Nodes, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]bug.TimelineItem) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - 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() + case "author": + out.Values[i] = ec._SetTitleTimelineItem_author(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "date": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._SetTitleTimelineItem_date(ctx, field, obj) + if res == graphql.Null { + invalid = true + } + return res + }) + case "title": + out.Values[i] = ec._SetTitleTimelineItem_title(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true } - arr1[idx1] = func() graphql.Marshaler { - - return ec._TimelineItem(ctx, field.Selections, &res[idx1]) - }() - } - if isLen1 { - f(idx1) - } else { - go f(idx1) + case "was": + out.Values[i] = ec._SetTitleTimelineItem_was(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + default: + panic("unknown field " + strconv.Quote(field.Name)) } - } - wg.Wait() - return arr1 -} - -// nolint: vetshadow -func (ec *executionContext) _TimelineItemConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "TimelineItemConnection", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } + out.Dispatch() + if invalid { return graphql.Null } - res := resTmp.(models.PageInfo) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._PageInfo(ctx, field.Selections, &res) + return out } -// nolint: vetshadow -func (ec *executionContext) _TimelineItemConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "TimelineItemConnection", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.TotalCount, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") +var timelineItemConnectionImplementors = []string{"TimelineItemConnection"} + +func (ec *executionContext) _TimelineItemConnection(ctx context.Context, sel ast.SelectionSet, obj *models.TimelineItemConnection) graphql.Marshaler { + fields := graphql.CollectFields(ctx, sel, timelineItemConnectionImplementors) + + out := graphql.NewFieldSet(fields) + invalid := false + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("TimelineItemConnection") + case "edges": + out.Values[i] = ec._TimelineItemConnection_edges(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "nodes": + out.Values[i] = ec._TimelineItemConnection_nodes(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "pageInfo": + out.Values[i] = ec._TimelineItemConnection_pageInfo(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + case "totalCount": + out.Values[i] = ec._TimelineItemConnection_totalCount(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalid = true + } + default: + panic("unknown field " + strconv.Quote(field.Name)) } + } + out.Dispatch() + if invalid { return graphql.Null } - res := resTmp.(int) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalInt(res) + return out } var timelineItemEdgeImplementors = []string{"TimelineItemEdge"} -// nolint: gocyclo, errcheck, gas, goconst func (ec *executionContext) _TimelineItemEdge(ctx context.Context, sel ast.SelectionSet, obj *models.TimelineItemEdge) graphql.Marshaler { fields := graphql.CollectFields(ctx, sel, timelineItemEdgeImplementors) - out := graphql.NewOrderedMap(len(fields)) + out := graphql.NewFieldSet(fields) invalid := false for i, field := range fields { - out.Keys[i] = field.Alias - switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("TimelineItemEdge") @@ -8229,79 +8894,21 @@ func (ec *executionContext) _TimelineItemEdge(ctx context.Context, sel ast.Selec panic("unknown field " + strconv.Quote(field.Name)) } } - + out.Dispatch() if invalid { return graphql.Null } return out } -// nolint: vetshadow -func (ec *executionContext) _TimelineItemEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemEdge) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "TimelineItemEdge", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) -} - -// nolint: vetshadow -func (ec *executionContext) _TimelineItemEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemEdge) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "TimelineItemEdge", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Node, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(bug.TimelineItem) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - return ec._TimelineItem(ctx, field.Selections, &res) -} - var __DirectiveImplementors = []string{"__Directive"} -// nolint: gocyclo, errcheck, gas, goconst func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { fields := graphql.CollectFields(ctx, sel, __DirectiveImplementors) - out := graphql.NewOrderedMap(len(fields)) + out := graphql.NewFieldSet(fields) invalid := false for i, field := range fields { - out.Keys[i] = field.Alias - switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("__Directive") @@ -8321,176 +8928,26 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS out.Values[i] = ec.___Directive_args(ctx, field, obj) if out.Values[i] == graphql.Null { invalid = true - } - default: - panic("unknown field " + strconv.Quote(field.Name)) - } - } - - if invalid { - return graphql.Null - } - return out -} - -// nolint: vetshadow -func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Directive", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Name, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) -} - -// nolint: vetshadow -func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Directive", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Description, nil - }) - if resTmp == nil { - return graphql.Null - } - res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) -} - -// nolint: vetshadow -func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Directive", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Locations, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - arr1 := make(graphql.Array, len(res)) - - for idx1 := range res { - arr1[idx1] = func() graphql.Marshaler { - return graphql.MarshalString(res[idx1]) - }() - } - - return arr1 -} - -// nolint: vetshadow -func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Directive", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Args, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]introspection.InputValue) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - 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.___InputValue(ctx, field.Selections, &res[idx1]) - }() - } - if isLen1 { - f(idx1) - } else { - go f(idx1) + } + default: + panic("unknown field " + strconv.Quote(field.Name)) } - } - wg.Wait() - return arr1 + out.Dispatch() + if invalid { + return graphql.Null + } + return out } var __EnumValueImplementors = []string{"__EnumValue"} -// nolint: gocyclo, errcheck, gas, goconst func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { fields := graphql.CollectFields(ctx, sel, __EnumValueImplementors) - out := graphql.NewOrderedMap(len(fields)) + out := graphql.NewFieldSet(fields) invalid := false for i, field := range fields { - out.Keys[i] = field.Alias - switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("__EnumValue") @@ -8512,130 +8969,21 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS panic("unknown field " + strconv.Quote(field.Name)) } } - + out.Dispatch() if invalid { return graphql.Null } return out } -// nolint: vetshadow -func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__EnumValue", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Name, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) -} - -// nolint: vetshadow -func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__EnumValue", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Description, nil - }) - if resTmp == nil { - return graphql.Null - } - res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) -} - -// nolint: vetshadow -func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__EnumValue", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.IsDeprecated(), nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(bool) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalBoolean(res) -} - -// nolint: vetshadow -func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__EnumValue", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.DeprecationReason(), nil - }) - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - if res == nil { - return graphql.Null - } - return graphql.MarshalString(*res) -} - var __FieldImplementors = []string{"__Field"} -// nolint: gocyclo, errcheck, gas, goconst func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { fields := graphql.CollectFields(ctx, sel, __FieldImplementors) - out := graphql.NewOrderedMap(len(fields)) + out := graphql.NewFieldSet(fields) invalid := false for i, field := range fields { - out.Keys[i] = field.Alias - switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("__Field") @@ -8667,225 +9015,21 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, panic("unknown field " + strconv.Quote(field.Name)) } } - + out.Dispatch() if invalid { return graphql.Null } return out } -// nolint: vetshadow -func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Field", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Name, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) -} - -// nolint: vetshadow -func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Field", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Description, nil - }) - if resTmp == nil { - return graphql.Null - } - res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) -} - -// nolint: vetshadow -func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Field", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Args, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]introspection.InputValue) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - 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.___InputValue(ctx, field.Selections, &res[idx1]) - }() - } - if isLen1 { - f(idx1) - } else { - go f(idx1) - } - - } - wg.Wait() - return arr1 -} - -// nolint: vetshadow -func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Field", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Type, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*introspection.Type) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - if res == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - - return ec.___Type(ctx, field.Selections, res) -} - -// nolint: vetshadow -func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Field", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.IsDeprecated(), nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(bool) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalBoolean(res) -} - -// nolint: vetshadow -func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Field", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.DeprecationReason(), nil - }) - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - if res == nil { - return graphql.Null - } - return graphql.MarshalString(*res) -} - var __InputValueImplementors = []string{"__InputValue"} -// nolint: gocyclo, errcheck, gas, goconst func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { fields := graphql.CollectFields(ctx, sel, __InputValueImplementors) - out := graphql.NewOrderedMap(len(fields)) + out := graphql.NewFieldSet(fields) invalid := false for i, field := range fields { - out.Keys[i] = field.Alias - switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("__InputValue") @@ -8907,138 +9051,21 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection panic("unknown field " + strconv.Quote(field.Name)) } } - + out.Dispatch() if invalid { return graphql.Null } return out } -// nolint: vetshadow -func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__InputValue", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Name, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) -} - -// nolint: vetshadow -func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__InputValue", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Description, nil - }) - if resTmp == nil { - return graphql.Null - } - res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) -} - -// nolint: vetshadow -func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__InputValue", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Type, nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*introspection.Type) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - if res == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - - return ec.___Type(ctx, field.Selections, res) -} - -// nolint: vetshadow -func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__InputValue", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.DefaultValue, nil - }) - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - if res == nil { - return graphql.Null - } - return graphql.MarshalString(*res) -} - var __SchemaImplementors = []string{"__Schema"} -// nolint: gocyclo, errcheck, gas, goconst func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { fields := graphql.CollectFields(ctx, sel, __SchemaImplementors) - out := graphql.NewOrderedMap(len(fields)) + out := graphql.NewFieldSet(fields) invalid := false for i, field := range fields { - out.Keys[i] = field.Alias - switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("__Schema") @@ -9065,237 +9092,21 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, panic("unknown field " + strconv.Quote(field.Name)) } } - + out.Dispatch() if invalid { return graphql.Null } return out } -// nolint: vetshadow -func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Schema", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Types(), nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]introspection.Type) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - 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.___Type(ctx, field.Selections, &res[idx1]) - }() - } - if isLen1 { - f(idx1) - } else { - go f(idx1) - } - - } - wg.Wait() - return arr1 -} - -// nolint: vetshadow -func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Schema", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.QueryType(), nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*introspection.Type) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - if res == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - - return ec.___Type(ctx, field.Selections, res) -} - -// nolint: vetshadow -func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Schema", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.MutationType(), nil - }) - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*introspection.Type) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - if res == nil { - return graphql.Null - } - - return ec.___Type(ctx, field.Selections, res) -} - -// nolint: vetshadow -func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Schema", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.SubscriptionType(), nil - }) - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*introspection.Type) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - if res == nil { - return graphql.Null - } - - return ec.___Type(ctx, field.Selections, res) -} - -// nolint: vetshadow -func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Schema", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Directives(), nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.([]introspection.Directive) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - 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.___Directive(ctx, field.Selections, &res[idx1]) - }() - } - if isLen1 { - f(idx1) - } else { - go f(idx1) - } - - } - wg.Wait() - return arr1 -} - var __TypeImplementors = []string{"__Type"} -// nolint: gocyclo, errcheck, gas, goconst func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { fields := graphql.CollectFields(ctx, sel, __TypeImplementors) - out := graphql.NewOrderedMap(len(fields)) + out := graphql.NewFieldSet(fields) invalid := false for i, field := range fields { - out.Keys[i] = field.Alias - switch field.Name { case "__typename": out.Values[i] = graphql.MarshalString("__Type") @@ -9324,930 +9135,1246 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o panic("unknown field " + strconv.Quote(field.Name)) } } - + out.Dispatch() if invalid { return graphql.Null } return out } -// nolint: vetshadow -func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Type", - Args: nil, - Field: field, +// endregion **************************** object.gotpl **************************** + +// region ***************************** type.gotpl ***************************** + +func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) { + return graphql.UnmarshalBoolean(v) +} + +func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { + return graphql.MarshalBoolean(v) +} + +func (ec *executionContext) marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx context.Context, sel ast.SelectionSet, v bug.Snapshot) graphql.Marshaler { + return ec._Bug(ctx, sel, &v) +} + +func (ec *executionContext) marshalNBug2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx context.Context, sel ast.SelectionSet, v []bug.Snapshot) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Kind(), nil - }) - if resTmp == nil { - if !ec.HasError(rctx) { - ec.Errorf(ctx, "must not be null") + for i := range v { + i := i + rctx := &graphql.ResolverContext{ + Index: &i, + Result: &v[i], } - return graphql.Null + ctx := graphql.WithResolverContext(ctx, rctx) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + } - res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + wg.Wait() + return ret } -// nolint: vetshadow -func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Type", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Name(), nil - }) - if resTmp == nil { +func (ec *executionContext) marshalNBug2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx context.Context, sel ast.SelectionSet, v *bug.Snapshot) graphql.Marshaler { + if v == nil { + if !ec.HasError(graphql.GetResolverContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec._Bug(ctx, sel, v) +} - if res == nil { +func (ec *executionContext) marshalNBugConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugConnection(ctx context.Context, sel ast.SelectionSet, v models.BugConnection) graphql.Marshaler { + return ec._BugConnection(ctx, sel, &v) +} + +func (ec *executionContext) marshalNBugConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugConnection(ctx context.Context, sel ast.SelectionSet, v *models.BugConnection) graphql.Marshaler { + if v == nil { + if !ec.HasError(graphql.GetResolverContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - return graphql.MarshalString(*res) + return ec._BugConnection(ctx, sel, v) } -// nolint: vetshadow -func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Type", - Args: nil, - Field: field, +func (ec *executionContext) marshalNBugEdge2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugEdge(ctx context.Context, sel ast.SelectionSet, v models.BugEdge) graphql.Marshaler { + return ec._BugEdge(ctx, sel, &v) +} + +func (ec *executionContext) marshalNBugEdge2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugEdge(ctx context.Context, sel ast.SelectionSet, v []models.BugEdge) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Description(), nil - }) - if resTmp == nil { - return graphql.Null + for i := range v { + i := i + rctx := &graphql.ResolverContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithResolverContext(ctx, rctx) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNBugEdge2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugEdge(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + } - res := resTmp.(string) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - return graphql.MarshalString(res) + wg.Wait() + return ret } -// nolint: vetshadow -func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rawArgs := field.ArgumentMap(ec.Variables) - args, err := field___Type_fields_args(rawArgs) - if err != nil { - ec.Error(ctx, err) - return graphql.Null +func (ec *executionContext) marshalNComment2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐComment(ctx context.Context, sel ast.SelectionSet, v bug.Comment) graphql.Marshaler { + return ec._Comment(ctx, sel, &v) +} + +func (ec *executionContext) marshalNComment2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐComment(ctx context.Context, sel ast.SelectionSet, v []bug.Comment) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) } - rctx := &graphql.ResolverContext{ - Object: "__Type", - Args: args, - Field: field, + for i := range v { + i := i + rctx := &graphql.ResolverContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithResolverContext(ctx, rctx) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNComment2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐComment(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Fields(args["includeDeprecated"].(bool)), nil - }) - if resTmp == nil { + wg.Wait() + return ret +} + +func (ec *executionContext) marshalNCommentConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCommentConnection(ctx context.Context, sel ast.SelectionSet, v models.CommentConnection) graphql.Marshaler { + return ec._CommentConnection(ctx, sel, &v) +} + +func (ec *executionContext) marshalNCommentConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCommentConnection(ctx context.Context, sel ast.SelectionSet, v *models.CommentConnection) graphql.Marshaler { + if v == nil { + if !ec.HasError(graphql.GetResolverContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]introspection.Field) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec._CommentConnection(ctx, sel, v) +} - arr1 := make(graphql.Array, len(res)) +func (ec *executionContext) marshalNCommentEdge2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCommentEdge(ctx context.Context, sel ast.SelectionSet, v models.CommentEdge) graphql.Marshaler { + return ec._CommentEdge(ctx, sel, &v) +} + +func (ec *executionContext) marshalNCommentEdge2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCommentEdge(ctx context.Context, sel ast.SelectionSet, v []models.CommentEdge) graphql.Marshaler { + ret := make(graphql.Array, len(v)) var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + rctx := &graphql.ResolverContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithResolverContext(ctx, rctx) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNCommentEdge2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCommentEdge(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} - isLen1 := len(res) == 1 +func (ec *executionContext) marshalNCommentHistoryStep2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐCommentHistoryStep(ctx context.Context, sel ast.SelectionSet, v bug.CommentHistoryStep) graphql.Marshaler { + return ec._CommentHistoryStep(ctx, sel, &v) +} + +func (ec *executionContext) marshalNCommentHistoryStep2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐCommentHistoryStep(ctx context.Context, sel ast.SelectionSet, v []bug.CommentHistoryStep) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 if !isLen1 { - wg.Add(len(res)) + wg.Add(len(v)) + } + for i := range v { + i := i + rctx := &graphql.ResolverContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithResolverContext(ctx, rctx) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNCommentHistoryStep2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐCommentHistoryStep(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) unmarshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx context.Context, v interface{}) (git.Hash, error) { + var res git.Hash + return res, res.UnmarshalGQL(v) +} + +func (ec *executionContext) marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx context.Context, sel ast.SelectionSet, v git.Hash) graphql.Marshaler { + return v +} + +func (ec *executionContext) unmarshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx context.Context, v interface{}) ([]git.Hash, error) { + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]git.Hash, len(vSlice)) + for i := range vSlice { + res[i], err = ec.unmarshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx context.Context, sel ast.SelectionSet, v []git.Hash) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, sel, v[i]) } - for idx1 := range res { - idx1 := idx1 + return ret +} + +func (ec *executionContext) marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx context.Context, sel ast.SelectionSet, v identity.Interface) graphql.Marshaler { + return ec._Identity(ctx, sel, &v) +} + +func (ec *executionContext) marshalNIdentity2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx context.Context, sel ast.SelectionSet, v []identity.Interface) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i rctx := &graphql.ResolverContext{ - Index: &idx1, - Result: &res[idx1], + Index: &i, + Result: &v[i], } ctx := graphql.WithResolverContext(ctx, rctx) - f := func(idx1 int) { + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() if !isLen1 { defer wg.Done() } - arr1[idx1] = func() graphql.Marshaler { + ret[i] = ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) marshalNIdentityConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityConnection(ctx context.Context, sel ast.SelectionSet, v models.IdentityConnection) graphql.Marshaler { + return ec._IdentityConnection(ctx, sel, &v) +} + +func (ec *executionContext) marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityConnection(ctx context.Context, sel ast.SelectionSet, v *models.IdentityConnection) graphql.Marshaler { + if v == nil { + if !ec.HasError(graphql.GetResolverContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._IdentityConnection(ctx, sel, v) +} + +func (ec *executionContext) marshalNIdentityEdge2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityEdge(ctx context.Context, sel ast.SelectionSet, v models.IdentityEdge) graphql.Marshaler { + return ec._IdentityEdge(ctx, sel, &v) +} - return ec.___Field(ctx, field.Selections, &res[idx1]) +func (ec *executionContext) marshalNIdentityEdge2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityEdge(ctx context.Context, sel ast.SelectionSet, v []models.IdentityEdge) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + rctx := &graphql.ResolverContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithResolverContext(ctx, rctx) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNIdentityEdge2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityEdge(ctx, sel, v[i]) } if isLen1 { - f(idx1) + f(i) } else { - go f(idx1) + go f(i) } } wg.Wait() - return arr1 + return ret } -// nolint: vetshadow -func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Type", - Args: nil, - Field: field, +func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) { + return graphql.UnmarshalInt(v) +} + +func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { + return graphql.MarshalInt(v) +} + +func (ec *executionContext) unmarshalNLabel2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabel(ctx context.Context, v interface{}) (bug.Label, error) { + var res bug.Label + return res, res.UnmarshalGQL(v) +} + +func (ec *executionContext) marshalNLabel2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabel(ctx context.Context, sel ast.SelectionSet, v bug.Label) graphql.Marshaler { + return v +} + +func (ec *executionContext) unmarshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabel(ctx context.Context, v interface{}) ([]bug.Label, error) { + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.Interfaces(), nil - }) - if resTmp == nil { - return graphql.Null + var err error + res := make([]bug.Label, len(vSlice)) + for i := range vSlice { + res[i], err = ec.unmarshalNLabel2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabel(ctx, vSlice[i]) + if err != nil { + return nil, err + } } - res := resTmp.([]introspection.Type) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + return res, nil +} - arr1 := make(graphql.Array, len(res)) - var wg sync.WaitGroup +func (ec *executionContext) marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabel(ctx context.Context, sel ast.SelectionSet, v []bug.Label) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNLabel2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabel(ctx, sel, v[i]) + } + + return ret +} - isLen1 := len(res) == 1 +func (ec *executionContext) marshalNOperation2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐOperation(ctx context.Context, sel ast.SelectionSet, v bug.Operation) graphql.Marshaler { + return ec._Operation(ctx, sel, &v) +} + +func (ec *executionContext) marshalNOperation2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐOperation(ctx context.Context, sel ast.SelectionSet, v []bug.Operation) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 if !isLen1 { - wg.Add(len(res)) + wg.Add(len(v)) } - - for idx1 := range res { - idx1 := idx1 + for i := range v { + i := i rctx := &graphql.ResolverContext{ - Index: &idx1, - Result: &res[idx1], + Index: &i, + Result: &v[i], } ctx := graphql.WithResolverContext(ctx, rctx) - f := func(idx1 int) { + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() if !isLen1 { defer wg.Done() } - arr1[idx1] = func() graphql.Marshaler { - - return ec.___Type(ctx, field.Selections, &res[idx1]) - }() + ret[i] = ec.marshalNOperation2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐOperation(ctx, sel, v[i]) } if isLen1 { - f(idx1) + f(i) } else { - go f(idx1) + go f(i) } } wg.Wait() - return arr1 + return ret } -// nolint: vetshadow -func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Type", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.PossibleTypes(), nil - }) - if resTmp == nil { +func (ec *executionContext) marshalNOperationConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐOperationConnection(ctx context.Context, sel ast.SelectionSet, v models.OperationConnection) graphql.Marshaler { + return ec._OperationConnection(ctx, sel, &v) +} + +func (ec *executionContext) marshalNOperationConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐOperationConnection(ctx context.Context, sel ast.SelectionSet, v *models.OperationConnection) graphql.Marshaler { + if v == nil { + if !ec.HasError(graphql.GetResolverContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]introspection.Type) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec._OperationConnection(ctx, sel, v) +} - arr1 := make(graphql.Array, len(res)) - var wg sync.WaitGroup +func (ec *executionContext) marshalNOperationEdge2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐOperationEdge(ctx context.Context, sel ast.SelectionSet, v models.OperationEdge) graphql.Marshaler { + return ec._OperationEdge(ctx, sel, &v) +} - isLen1 := len(res) == 1 +func (ec *executionContext) marshalNOperationEdge2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐOperationEdge(ctx context.Context, sel ast.SelectionSet, v []models.OperationEdge) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 if !isLen1 { - wg.Add(len(res)) + wg.Add(len(v)) } - - for idx1 := range res { - idx1 := idx1 + for i := range v { + i := i rctx := &graphql.ResolverContext{ - Index: &idx1, - Result: &res[idx1], + Index: &i, + Result: &v[i], } ctx := graphql.WithResolverContext(ctx, rctx) - f := func(idx1 int) { + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() if !isLen1 { defer wg.Done() } - arr1[idx1] = func() graphql.Marshaler { - - return ec.___Type(ctx, field.Selections, &res[idx1]) - }() + ret[i] = ec.marshalNOperationEdge2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐOperationEdge(ctx, sel, v[i]) } if isLen1 { - f(idx1) + f(i) } else { - go f(idx1) + go f(i) } } wg.Wait() - return arr1 + return ret } -// nolint: vetshadow -func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rawArgs := field.ArgumentMap(ec.Variables) - args, err := field___Type_enumValues_args(rawArgs) - if err != nil { - ec.Error(ctx, err) +func (ec *executionContext) marshalNPageInfo2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐPageInfo(ctx context.Context, sel ast.SelectionSet, v models.PageInfo) graphql.Marshaler { + return ec._PageInfo(ctx, sel, &v) +} + +func (ec *executionContext) unmarshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐStatus(ctx context.Context, v interface{}) (models.Status, error) { + var res models.Status + return res, res.UnmarshalGQL(v) +} + +func (ec *executionContext) marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐStatus(ctx context.Context, sel ast.SelectionSet, v models.Status) graphql.Marshaler { + return v +} + +func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) { + return graphql.UnmarshalString(v) +} + +func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + return graphql.MarshalString(v) +} + +func (ec *executionContext) unmarshalNTime2timeᚐTime(ctx context.Context, v interface{}) (time.Time, error) { + return graphql.UnmarshalTime(v) +} + +func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler { + if v.IsZero() { + if !ec.HasError(graphql.GetResolverContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - rctx := &graphql.ResolverContext{ - Object: "__Type", - Args: args, - Field: field, + return graphql.MarshalTime(v) +} + +func (ec *executionContext) unmarshalNTime2ᚖtimeᚐTime(ctx context.Context, v interface{}) (*time.Time, error) { + if v == nil { + return nil, nil } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.EnumValues(args["includeDeprecated"].(bool)), nil - }) - if resTmp == nil { + res, err := ec.unmarshalNTime2timeᚐTime(ctx, v) + return &res, err +} + +func (ec *executionContext) marshalNTime2ᚖtimeᚐTime(ctx context.Context, sel ast.SelectionSet, v *time.Time) graphql.Marshaler { + if v == nil { + if !ec.HasError(graphql.GetResolverContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]introspection.EnumValue) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec.marshalNTime2timeᚐTime(ctx, sel, *v) +} - arr1 := make(graphql.Array, len(res)) - var wg sync.WaitGroup +func (ec *executionContext) marshalNTimelineItem2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐTimelineItem(ctx context.Context, sel ast.SelectionSet, v bug.TimelineItem) graphql.Marshaler { + return ec._TimelineItem(ctx, sel, &v) +} - isLen1 := len(res) == 1 +func (ec *executionContext) marshalNTimelineItem2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐTimelineItem(ctx context.Context, sel ast.SelectionSet, v []bug.TimelineItem) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 if !isLen1 { - wg.Add(len(res)) + wg.Add(len(v)) } - - for idx1 := range res { - idx1 := idx1 + for i := range v { + i := i rctx := &graphql.ResolverContext{ - Index: &idx1, - Result: &res[idx1], + Index: &i, + Result: &v[i], } ctx := graphql.WithResolverContext(ctx, rctx) - f := func(idx1 int) { + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() if !isLen1 { defer wg.Done() } - arr1[idx1] = func() graphql.Marshaler { - - return ec.___EnumValue(ctx, field.Selections, &res[idx1]) - }() + ret[i] = ec.marshalNTimelineItem2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐTimelineItem(ctx, sel, v[i]) } if isLen1 { - f(idx1) + f(i) } else { - go f(idx1) + go f(i) } } wg.Wait() - return arr1 + return ret } -// nolint: vetshadow -func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Type", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.InputFields(), nil - }) - if resTmp == nil { +func (ec *executionContext) marshalNTimelineItemConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐTimelineItemConnection(ctx context.Context, sel ast.SelectionSet, v models.TimelineItemConnection) graphql.Marshaler { + return ec._TimelineItemConnection(ctx, sel, &v) +} + +func (ec *executionContext) marshalNTimelineItemConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐTimelineItemConnection(ctx context.Context, sel ast.SelectionSet, v *models.TimelineItemConnection) graphql.Marshaler { + if v == nil { + if !ec.HasError(graphql.GetResolverContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]introspection.InputValue) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) + return ec._TimelineItemConnection(ctx, sel, v) +} - arr1 := make(graphql.Array, len(res)) - var wg sync.WaitGroup +func (ec *executionContext) marshalNTimelineItemEdge2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐTimelineItemEdge(ctx context.Context, sel ast.SelectionSet, v models.TimelineItemEdge) graphql.Marshaler { + return ec._TimelineItemEdge(ctx, sel, &v) +} - isLen1 := len(res) == 1 +func (ec *executionContext) marshalNTimelineItemEdge2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐTimelineItemEdge(ctx context.Context, sel ast.SelectionSet, v []models.TimelineItemEdge) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 if !isLen1 { - wg.Add(len(res)) + wg.Add(len(v)) } - - for idx1 := range res { - idx1 := idx1 + for i := range v { + i := i rctx := &graphql.ResolverContext{ - Index: &idx1, - Result: &res[idx1], + Index: &i, + Result: &v[i], } ctx := graphql.WithResolverContext(ctx, rctx) - f := func(idx1 int) { + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() if !isLen1 { defer wg.Done() } - arr1[idx1] = func() graphql.Marshaler { - - return ec.___InputValue(ctx, field.Selections, &res[idx1]) - }() + ret[i] = ec.marshalNTimelineItemEdge2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐTimelineItemEdge(ctx, sel, v[i]) } if isLen1 { - f(idx1) + f(i) } else { - go f(idx1) + go f(i) } } wg.Wait() - return arr1 + return ret } -// nolint: vetshadow -func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler { - ctx = ec.Tracer.StartFieldExecution(ctx, field) - defer func() { ec.Tracer.EndFieldExecution(ctx) }() - rctx := &graphql.ResolverContext{ - Object: "__Type", - Args: nil, - Field: field, - } - ctx = graphql.WithResolverContext(ctx, rctx) - ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx) - resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.OfType(), nil - }) - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*introspection.Type) - rctx.Result = res - ctx = ec.Tracer.StartFieldChildExecution(ctx) - - if res == nil { - return graphql.Null - } - - return ec.___Type(ctx, field.Selections, res) +func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler { + return ec.___Directive(ctx, sel, &v) } -func (ec *executionContext) _Authored(ctx context.Context, sel ast.SelectionSet, obj *models.Authored) graphql.Marshaler { - switch obj := (*obj).(type) { - case nil: - return graphql.Null - case bug.Comment: - return ec._Comment(ctx, sel, &obj) - case *bug.Comment: - return ec._Comment(ctx, sel, obj) - case *bug.CreateOperation: - return ec._CreateOperation(ctx, sel, obj) - case *bug.SetTitleOperation: - return ec._SetTitleOperation(ctx, sel, obj) - case *bug.AddCommentOperation: - return ec._AddCommentOperation(ctx, sel, obj) - case *bug.EditCommentOperation: - return ec._EditCommentOperation(ctx, sel, obj) - case *bug.SetStatusOperation: - return ec._SetStatusOperation(ctx, sel, obj) - case *bug.LabelChangeOperation: - return ec._LabelChangeOperation(ctx, sel, obj) - default: - panic(fmt.Errorf("unexpected type %T", obj)) +func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) } -} + for i := range v { + i := i + rctx := &graphql.ResolverContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithResolverContext(ctx, rctx) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } -func (ec *executionContext) _Operation(ctx context.Context, sel ast.SelectionSet, obj *bug.Operation) graphql.Marshaler { - switch obj := (*obj).(type) { - case nil: - return graphql.Null - case *bug.CreateOperation: - return ec._CreateOperation(ctx, sel, obj) - case *bug.SetTitleOperation: - return ec._SetTitleOperation(ctx, sel, obj) - case *bug.AddCommentOperation: - return ec._AddCommentOperation(ctx, sel, obj) - case *bug.EditCommentOperation: - return ec._EditCommentOperation(ctx, sel, obj) - case *bug.SetStatusOperation: - return ec._SetStatusOperation(ctx, sel, obj) - case *bug.LabelChangeOperation: - return ec._LabelChangeOperation(ctx, sel, obj) - default: - panic(fmt.Errorf("unexpected type %T", obj)) } + wg.Wait() + return ret } -func (ec *executionContext) _TimelineItem(ctx context.Context, sel ast.SelectionSet, obj *bug.TimelineItem) graphql.Marshaler { - switch obj := (*obj).(type) { - case nil: - return graphql.Null - case *bug.CreateTimelineItem: - return ec._CreateTimelineItem(ctx, sel, obj) - case *bug.AddCommentTimelineItem: - return ec._AddCommentTimelineItem(ctx, sel, obj) - case bug.LabelChangeTimelineItem: - return ec._LabelChangeTimelineItem(ctx, sel, &obj) - case *bug.LabelChangeTimelineItem: - return ec._LabelChangeTimelineItem(ctx, sel, obj) - case bug.SetStatusTimelineItem: - return ec._SetStatusTimelineItem(ctx, sel, &obj) - case *bug.SetStatusTimelineItem: - return ec._SetStatusTimelineItem(ctx, sel, obj) - case bug.SetTitleTimelineItem: - return ec._SetTitleTimelineItem(ctx, sel, &obj) - case *bug.SetTitleTimelineItem: - return ec._SetTitleTimelineItem(ctx, sel, obj) - default: - panic(fmt.Errorf("unexpected type %T", obj)) - } +func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) { + return graphql.UnmarshalString(v) } -func (ec *executionContext) FieldMiddleware(ctx context.Context, obj interface{}, next graphql.Resolver) (ret interface{}) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = nil - } - }() - res, err := ec.ResolverMiddleware(ctx, next) - if err != nil { - ec.Error(ctx, err) - return nil - } - return res +func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + return graphql.MarshalString(v) } -func (ec *executionContext) introspectSchema() (*introspection.Schema, error) { - if ec.DisableIntrospection { - return nil, errors.New("introspection disabled") +func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstring(ctx context.Context, v interface{}) ([]string, error) { + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } } - return introspection.WrapSchema(parsedSchema), nil -} - -func (ec *executionContext) introspectType(name string) (*introspection.Type, error) { - if ec.DisableIntrospection { - return nil, errors.New("introspection disabled") + var err error + res := make([]string, len(vSlice)) + for i := range vSlice { + res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i]) + if err != nil { + return nil, err + } } - return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil + return res, nil } -var parsedSchema = gqlparser.MustLoadSchema( - &ast.Source{Name: "schema/bug.graphql", Input: `"""Represents a comment on a bug.""" -type Comment implements Authored { - """The author of this comment.""" - author: Identity! - - """The message of this comment.""" - message: String! +func (ec *executionContext) marshalN__DirectiveLocation2ᚕstring(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + rctx := &graphql.ResolverContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithResolverContext(ctx, rctx) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } - """All media's hash referenced in this comment""" - files: [Hash!]! + } + wg.Wait() + return ret } -type CommentConnection { - edges: [CommentEdge!]! - nodes: [Comment!]! - pageInfo: PageInfo! - totalCount: Int! +func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler { + return ec.___EnumValue(ctx, sel, &v) } -type CommentEdge { - cursor: String! - node: Comment! +func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler { + return ec.___Field(ctx, sel, &v) } -enum Status { - OPEN - CLOSED +func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler { + return ec.___InputValue(ctx, sel, &v) } -type Bug { - """The identifier for this bug""" - id: String! - """The human version (truncated) identifier for this bug""" - humanId: String! - status: Status! - title: String! - labels: [Label!]! - author: Identity! - createdAt: Time! - lastEdit: Time! - - """The actors of the bug. Actors are Identity that have interacted with the bug.""" - actors( - """Returns the elements in the list that come after the specified cursor.""" - after: String - """Returns the elements in the list that come before the specified cursor.""" - before: String - """Returns the first _n_ elements from the list.""" - first: Int - """Returns the last _n_ elements from the list.""" - last: Int - ): IdentityConnection! +func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + rctx := &graphql.ResolverContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithResolverContext(ctx, rctx) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } - """The participants of the bug. Participants are Identity that have created or - added a comment on the bug.""" - participants( - """Returns the elements in the list that come after the specified cursor.""" - after: String - """Returns the elements in the list that come before the specified cursor.""" - before: String - """Returns the first _n_ elements from the list.""" - first: Int - """Returns the last _n_ elements from the list.""" - last: Int - ): IdentityConnection! + } + wg.Wait() + return ret +} - comments( - """Returns the elements in the list that come after the specified cursor.""" - after: String - """Returns the elements in the list that come before the specified cursor.""" - before: String - """Returns the first _n_ elements from the list.""" - first: Int - """Returns the last _n_ elements from the list.""" - last: Int - ): CommentConnection! +func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { + return ec.___Type(ctx, sel, &v) +} - timeline( - """Returns the elements in the list that come after the specified cursor.""" - after: String - """Returns the elements in the list that come before the specified cursor.""" - before: String - """Returns the first _n_ elements from the list.""" - first: Int - """Returns the last _n_ elements from the list.""" - last: Int - ): TimelineItemConnection! +func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + rctx := &graphql.ResolverContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithResolverContext(ctx, rctx) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } - operations( - """Returns the elements in the list that come after the specified cursor.""" - after: String - """Returns the elements in the list that come before the specified cursor.""" - before: String - """Returns the first _n_ elements from the list.""" - first: Int - """Returns the last _n_ elements from the list.""" - last: Int - ): OperationConnection! + } + wg.Wait() + return ret } -"""The connection type for Bug.""" -type BugConnection { - """A list of edges.""" - edges: [BugEdge!]! - nodes: [Bug!]! - """Information to aid in pagination.""" - pageInfo: PageInfo! - """Identifies the total count of items in the connection.""" - totalCount: Int! +func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { + if v == nil { + if !ec.HasError(graphql.GetResolverContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec.___Type(ctx, sel, v) } -"""An edge in a connection.""" -type BugEdge { - """A cursor for use in pagination.""" - cursor: String! - """The item at the end of the edge.""" - node: Bug! +func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) { + return graphql.UnmarshalString(v) } -`}, - &ast.Source{Name: "schema/identity.graphql", Input: `"""Represents an identity""" -type Identity { - """The identifier for this identity""" - id: String! - """The human version (truncated) identifier for this identity""" - humanId: String! - """The name of the person, if known.""" - name: String - """The email of the person, if known.""" - email: String - """The login of the person, if known.""" - login: String - """A string containing the either the name of the person, its login or both""" - displayName: String! - """An url to an avatar""" - avatarUrl: String - """isProtected is true if the chain of git commits started to be signed. - If that's the case, only signed commit with a valid key for this identity can be added.""" - isProtected: Boolean! +func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + return graphql.MarshalString(v) } -type IdentityConnection { - edges: [IdentityEdge!]! - nodes: [Identity!]! - pageInfo: PageInfo! - totalCount: Int! +func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) { + return graphql.UnmarshalBoolean(v) } -type IdentityEdge { - cursor: String! - node: Identity! -}`}, - &ast.Source{Name: "schema/operations.graphql", Input: `"""An operation applied to a bug.""" -interface Operation { - """The hash of the operation""" - hash: Hash! - """The operations author.""" - author: Identity! - """The datetime when this operation was issued.""" - date: Time! +func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { + return graphql.MarshalBoolean(v) } -# Connection - -"""The connection type for an Operation""" -type OperationConnection { - edges: [OperationEdge!]! - nodes: [Operation!]! - pageInfo: PageInfo! - totalCount: Int! +func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalOBoolean2bool(ctx, v) + return &res, err } -"""Represent an Operation""" -type OperationEdge { - cursor: String! - node: Operation! +func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec.marshalOBoolean2bool(ctx, sel, *v) } -# Operations - -type CreateOperation implements Operation & Authored { - """The hash of the operation""" - hash: Hash! - """The author of this object.""" - author: Identity! - """The datetime when this operation was issued.""" - date: Time! - - title: String! - message: String! - files: [Hash!]! +func (ec *executionContext) marshalOBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx context.Context, sel ast.SelectionSet, v bug.Snapshot) graphql.Marshaler { + return ec._Bug(ctx, sel, &v) } -type SetTitleOperation implements Operation & Authored { - """The hash of the operation""" - hash: Hash! - """The author of this object.""" - author: Identity! - """The datetime when this operation was issued.""" - date: Time! - - title: String! - was: String! +func (ec *executionContext) marshalOBug2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx context.Context, sel ast.SelectionSet, v *bug.Snapshot) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Bug(ctx, sel, v) } -type AddCommentOperation implements Operation & Authored { - """The hash of the operation""" - hash: Hash! - """The author of this object.""" - author: Identity! - """The datetime when this operation was issued.""" - date: Time! - - message: String! - files: [Hash!]! +func (ec *executionContext) unmarshalOHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx context.Context, v interface{}) ([]git.Hash, error) { + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]git.Hash, len(vSlice)) + for i := range vSlice { + res[i], err = ec.unmarshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil } -type EditCommentOperation implements Operation & Authored { - """The hash of the operation""" - hash: Hash! - """The author of this object.""" - author: Identity! - """The datetime when this operation was issued.""" - date: Time! +func (ec *executionContext) marshalOHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx context.Context, sel ast.SelectionSet, v []git.Hash) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, sel, v[i]) + } - target: Hash! - message: String! - files: [Hash!]! + return ret +} + +func (ec *executionContext) marshalOIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx context.Context, sel ast.SelectionSet, v identity.Interface) graphql.Marshaler { + return ec._Identity(ctx, sel, &v) } -type SetStatusOperation implements Operation & Authored { - """The hash of the operation""" - hash: Hash! - """The author of this object.""" - author: Identity! - """The datetime when this operation was issued.""" - date: Time! +func (ec *executionContext) unmarshalOInt2int(ctx context.Context, v interface{}) (int, error) { + return graphql.UnmarshalInt(v) +} - status: Status! +func (ec *executionContext) marshalOInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { + return graphql.MarshalInt(v) } -type LabelChangeOperation implements Operation & Authored { - """The hash of the operation""" - hash: Hash! - """The author of this object.""" - author: Identity! - """The datetime when this operation was issued.""" - date: Time! +func (ec *executionContext) unmarshalOInt2ᚖint(ctx context.Context, v interface{}) (*int, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalOInt2int(ctx, v) + return &res, err +} - added: [Label!]! - removed: [Label!]! +func (ec *executionContext) marshalOInt2ᚖint(ctx context.Context, sel ast.SelectionSet, v *int) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec.marshalOInt2int(ctx, sel, *v) } -`}, - &ast.Source{Name: "schema/repository.graphql", Input: ` -type Repository { - """All the bugs""" - allBugs( - """Returns the elements in the list that come after the specified cursor.""" - after: String - """Returns the elements in the list that come before the specified cursor.""" - before: String - """Returns the first _n_ elements from the list.""" - first: Int - """Returns the last _n_ elements from the list.""" - last: Int - """A query to select and order bugs""" - query: String - ): BugConnection! - bug(prefix: String!): Bug +func (ec *executionContext) marshalORepository2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐRepository(ctx context.Context, sel ast.SelectionSet, v models.Repository) graphql.Marshaler { + return ec._Repository(ctx, sel, &v) +} - """All the identities""" - allIdentities( - """Returns the elements in the list that come after the specified cursor.""" - after: String - """Returns the elements in the list that come before the specified cursor.""" - before: String - """Returns the first _n_ elements from the list.""" - first: Int - """Returns the last _n_ elements from the list.""" - last: Int - ): IdentityConnection! +func (ec *executionContext) marshalORepository2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐRepository(ctx context.Context, sel ast.SelectionSet, v *models.Repository) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Repository(ctx, sel, v) +} - identity(prefix: String!):Identity +func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) { + return graphql.UnmarshalString(v) +} - """The identity created or selected by the user as its own""" - userIdentity:Identity -}`}, - &ast.Source{Name: "schema/root.graphql", Input: `type Query { - defaultRepository: Repository - repository(id: String!): Repository +func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + return graphql.MarshalString(v) } -type Mutation { - newBug(repoRef: String, title: String!, message: String!, files: [Hash!]): Bug! +func (ec *executionContext) unmarshalOString2ᚕstring(ctx context.Context, v interface{}) ([]string, error) { + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]string, len(vSlice)) + for i := range vSlice { + res[i], err = ec.unmarshalNString2string(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} - addComment(repoRef: String, prefix: String!, message: String!, files: [Hash!]): Bug! - changeLabels(repoRef: String, prefix: String!, added: [String!], removed: [String!]): Bug! - open(repoRef: String, prefix: String!): Bug! - close(repoRef: String, prefix: String!): Bug! - setTitle(repoRef: String, prefix: String!, title: String!): Bug! +func (ec *executionContext) marshalOString2ᚕstring(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNString2string(ctx, sel, v[i]) + } - commit(repoRef: String, prefix: String!): Bug! + return ret } -`}, - &ast.Source{Name: "schema/timeline.graphql", Input: `"""An item in the timeline of events""" -interface TimelineItem { - """The hash of the source operation""" - hash: Hash! + +func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalOString2string(ctx, v) + return &res, err } -"""CommentHistoryStep hold one version of a message in the history""" -type CommentHistoryStep { - message: String! - date: Time! +func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec.marshalOString2string(ctx, sel, *v) } -# Connection +func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + rctx := &graphql.ResolverContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithResolverContext(ctx, rctx) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } -"""The connection type for TimelineItem""" -type TimelineItemConnection { - edges: [TimelineItemEdge!]! - nodes: [TimelineItem!]! - pageInfo: PageInfo! - totalCount: Int! + } + wg.Wait() + return ret } -"""Represent a TimelineItem""" -type TimelineItemEdge { - cursor: String! - node: TimelineItem! +func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + rctx := &graphql.ResolverContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithResolverContext(ctx, rctx) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret } -# Items +func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + rctx := &graphql.ResolverContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithResolverContext(ctx, rctx) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } -"""CreateTimelineItem is a TimelineItem that represent the creation of a bug and its message edition history""" -type CreateTimelineItem implements TimelineItem { - """The hash of the source operation""" - hash: Hash! - author: Identity! - message: String! - messageIsEmpty: Boolean! - files: [Hash!]! - createdAt: Time! - lastEdit: Time! - edited: Boolean! - history: [CommentHistoryStep!]! + } + wg.Wait() + return ret } -"""AddCommentTimelineItem is a TimelineItem that represent a Comment and its edition history""" -type AddCommentTimelineItem implements TimelineItem { - """The hash of the source operation""" - hash: Hash! - author: Identity! - message: String! - messageIsEmpty: Boolean! - files: [Hash!]! - createdAt: Time! - lastEdit: Time! - edited: Boolean! - history: [CommentHistoryStep!]! +func (ec *executionContext) marshalO__Schema2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v introspection.Schema) graphql.Marshaler { + return ec.___Schema(ctx, sel, &v) } -"""LabelChangeTimelineItem is a TimelineItem that represent a change in the labels of a bug""" -type LabelChangeTimelineItem implements TimelineItem { - """The hash of the source operation""" - hash: Hash! - author: Identity! - date: Time! - added: [Label!]! - removed: [Label!]! +func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec.___Schema(ctx, sel, v) } -"""SetStatusTimelineItem is a TimelineItem that represent a change in the status of a bug""" -type SetStatusTimelineItem implements TimelineItem { - """The hash of the source operation""" - hash: Hash! - author: Identity! - date: Time! - status: Status! +func (ec *executionContext) marshalO__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { + return ec.___Type(ctx, sel, &v) } -"""LabelChangeTimelineItem is a TimelineItem that represent a change in the title of a bug""" -type SetTitleTimelineItem implements TimelineItem { - """The hash of the source operation""" - hash: Hash! - author: Identity! - date: Time! - title: String! - was: String! +func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + rctx := &graphql.ResolverContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithResolverContext(ctx, rctx) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret } -`}, - &ast.Source{Name: "schema/types.graphql", Input: `scalar Time -scalar Label -scalar Hash -"""Information about pagination in a connection.""" -type PageInfo { - """When paginating forwards, are there more items?""" - hasNextPage: Boolean! - """When paginating backwards, are there more items?""" - hasPreviousPage: Boolean! - """When paginating backwards, the cursor to continue.""" - startCursor: String! - """When paginating forwards, the cursor to continue.""" - endCursor: String! +func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec.___Type(ctx, sel, v) } -"""An object that has an author.""" -interface Authored { - """The author of this object.""" - author: Identity! -}`}, -) +// endregion ***************************** type.gotpl ***************************** -- cgit