diff options
author | Michael Muré <batolettre@gmail.com> | 2024-08-25 20:40:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-25 18:40:23 +0000 |
commit | 3a4b8805dfd794cc25f57e99c73ddec651805af1 (patch) | |
tree | b6af67c761c96b323400d061db22ceed73fb0bb0 | |
parent | c3ff05f95bdfad6c2ea4cb899024fd47ac503b5f (diff) | |
download | git-bug-3a4b8805dfd794cc25f57e99c73ddec651805af1.tar.gz |
core: make label a common type, in a similar fashion as for status (#1252)
This will be useful for Board, and likely code review support later
46 files changed, 691 insertions, 1573 deletions
diff --git a/api/graphql/connections/connection_template.go b/api/graphql/connections/connection_template.go deleted file mode 100644 index b97d1ece..00000000 --- a/api/graphql/connections/connection_template.go +++ /dev/null @@ -1,122 +0,0 @@ -package connections - -import ( - "fmt" - - "github.com/cheekybits/genny/generic" - - "github.com/git-bug/git-bug/api/graphql/models" -) - -// Name define the name of the connection -type Name generic.Type - -// NodeType define the node type handled by this relay connection -type NodeType generic.Type - -// EdgeType define the edge type handled by this relay connection -type EdgeType generic.Type - -// ConnectionType define the connection type handled by this relay connection -type ConnectionType generic.Type - -// NameEdgeMaker define a function that take a NodeType and an offset and -// create an Edge. -type NameEdgeMaker func(value NodeType, offset int) Edge - -// NameConMaker define a function that create a ConnectionType -type NameConMaker func( - edges []*EdgeType, - nodes []NodeType, - info *models.PageInfo, - totalCount int) (*ConnectionType, error) - -// NameCon will paginate a source according to the input of a relay connection -func NameCon(source []NodeType, edgeMaker NameEdgeMaker, conMaker NameConMaker, input models.ConnectionInput) (*ConnectionType, error) { - var nodes []NodeType - var edges []*EdgeType - var cursors []string - var pageInfo = &models.PageInfo{} - var totalCount = len(source) - - emptyCon, _ := conMaker(edges, nodes, pageInfo, 0) - - offset := 0 - - if input.After != nil { - for i, value := range source { - edge := edgeMaker(value, i) - if edge.GetCursor() == *input.After { - // remove all previous element including the "after" one - source = source[i+1:] - offset = i + 1 - pageInfo.HasPreviousPage = true - break - } - } - } - - if input.Before != nil { - for i, value := range source { - edge := edgeMaker(value, i+offset) - - if edge.GetCursor() == *input.Before { - // remove all after element including the "before" one - pageInfo.HasNextPage = true - break - } - - e := edge.(EdgeType) - edges = append(edges, &e) - cursors = append(cursors, edge.GetCursor()) - nodes = append(nodes, value) - } - } else { - edges = make([]*EdgeType, len(source)) - cursors = make([]string, len(source)) - nodes = source - - for i, value := range source { - edge := edgeMaker(value, i+offset) - e := edge.(EdgeType) - edges[i] = &e - cursors[i] = edge.GetCursor() - } - } - - if input.First != nil { - if *input.First < 0 { - return emptyCon, fmt.Errorf("first less than zero") - } - - if len(edges) > *input.First { - // Slice result to be of length first by removing edges from the end - edges = edges[:*input.First] - cursors = cursors[:*input.First] - nodes = nodes[:*input.First] - pageInfo.HasNextPage = true - } - } - - if input.Last != nil { - if *input.Last < 0 { - return emptyCon, fmt.Errorf("last less than zero") - } - - if len(edges) > *input.Last { - // Slice result to be of length last by removing edges from the start - edges = edges[len(edges)-*input.Last:] - cursors = cursors[len(cursors)-*input.Last:] - nodes = nodes[len(nodes)-*input.Last:] - pageInfo.HasPreviousPage = true - } - } - - // Fill up pageInfo cursors - if len(cursors) > 0 { - pageInfo.StartCursor = cursors[0] - pageInfo.EndCursor = cursors[len(cursors)-1] - } - - return conMaker(edges, nodes, pageInfo, totalCount) -} diff --git a/api/graphql/connections/connections.go b/api/graphql/connections/connections.go index bfdf8909..1ac2294f 100644 --- a/api/graphql/connections/connections.go +++ b/api/graphql/connections/connections.go @@ -1,11 +1,3 @@ -//go:generate genny -in=connection_template.go -out=gen_lazy_bug.go gen "Name=LazyBug NodeType=entity.Id EdgeType=LazyBugEdge ConnectionType=models.BugConnection" -//go:generate genny -in=connection_template.go -out=gen_lazy_identity.go gen "Name=LazyIdentity NodeType=entity.Id EdgeType=LazyIdentityEdge ConnectionType=models.IdentityConnection" -//go:generate genny -in=connection_template.go -out=gen_identity.go gen "Name=Identity NodeType=models.IdentityWrapper EdgeType=models.IdentityEdge ConnectionType=models.IdentityConnection" -//go:generate genny -in=connection_template.go -out=gen_operation.go gen "Name=Operation NodeType=dag.Operation EdgeType=models.OperationEdge ConnectionType=models.OperationConnection" -//go:generate genny -in=connection_template.go -out=gen_comment.go gen "Name=Comment NodeType=bug.Comment EdgeType=models.CommentEdge ConnectionType=models.CommentConnection" -//go:generate genny -in=connection_template.go -out=gen_timeline.go gen "Name=TimelineItem NodeType=bug.TimelineItem EdgeType=models.TimelineItemEdge ConnectionType=models.TimelineItemConnection" -//go:generate genny -in=connection_template.go -out=gen_label.go gen "Name=Label NodeType=bug.Label EdgeType=models.LabelEdge ConnectionType=models.LabelConnection" - // Package connections implement a generic GraphQL relay connection package connections @@ -14,6 +6,8 @@ import ( "fmt" "strconv" "strings" + + "github.com/git-bug/git-bug/api/graphql/models" ) const cursorPrefix = "cursor:" @@ -43,3 +37,109 @@ func CursorToOffset(cursor string) (int, error) { } return offset, nil } + +// EdgeMaker defines a function that takes a NodeType and an offset and +// create an Edge. +type EdgeMaker[NodeType any] func(value NodeType, offset int) Edge + +// ConMaker defines a function that creates a ConnectionType +type ConMaker[NodeType any, EdgeType Edge, ConType any] func( + edges []*EdgeType, + nodes []NodeType, + info *models.PageInfo, + totalCount int) (*ConType, error) + +// Connection will paginate a source according to the input of a relay connection +func Connection[NodeType any, EdgeType Edge, ConType any]( + source []NodeType, + edgeMaker EdgeMaker[NodeType], + conMaker ConMaker[NodeType, EdgeType, ConType], + input models.ConnectionInput) (*ConType, error) { + + var nodes []NodeType + var edges []*EdgeType + var cursors []string + var pageInfo = &models.PageInfo{} + var totalCount = len(source) + + emptyCon, _ := conMaker(edges, nodes, pageInfo, 0) + + offset := 0 + + if input.After != nil { + for i, value := range source { + edge := edgeMaker(value, i) + if edge.GetCursor() == *input.After { + // remove all previous element including the "after" one + source = source[i+1:] + offset = i + 1 + pageInfo.HasPreviousPage = true + break + } + } + } + + if input.Before != nil { + for i, value := range source { + edge := edgeMaker(value, i+offset) + + if edge.GetCursor() == *input.Before { + // remove all after element including the "before" one + pageInfo.HasNextPage = true + break + } + + e := edge.(EdgeType) + edges = append(edges, &e) + cursors = append(cursors, edge.GetCursor()) + nodes = append(nodes, value) + } + } else { + edges = make([]*EdgeType, len(source)) + cursors = make([]string, len(source)) + nodes = source + + for i, value := range source { + edge := edgeMaker(value, i+offset) + e := edge.(EdgeType) + edges[i] = &e + cursors[i] = edge.GetCursor() + } + } + + if input.First != nil { + if *input.First < 0 { + return emptyCon, fmt.Errorf("first less than zero") + } + + if len(edges) > *input.First { + // Slice result to be of length first by removing edges from the end + edges = edges[:*input.First] + cursors = cursors[:*input.First] + nodes = nodes[:*input.First] + pageInfo.HasNextPage = true + } + } + + if input.Last != nil { + if *input.Last < 0 { + return emptyCon, fmt.Errorf("last less than zero") + } + + if len(edges) > *input.Last { + // Slice result to be of length last by removing edges from the start + edges = edges[len(edges)-*input.Last:] + cursors = cursors[len(cursors)-*input.Last:] + nodes = nodes[len(nodes)-*input.Last:] + pageInfo.HasPreviousPage = true + } + } + + // Fill up pageInfo cursors + if len(cursors) > 0 { + pageInfo.StartCursor = cursors[0] + pageInfo.EndCursor = cursors[len(cursors)-1] + } + + return conMaker(edges, nodes, pageInfo, totalCount) +} diff --git a/api/graphql/connections/gen_comment.go b/api/graphql/connections/gen_comment.go deleted file mode 100644 index 1994aced..00000000 --- a/api/graphql/connections/gen_comment.go +++ /dev/null @@ -1,113 +0,0 @@ -// This file was automatically generated by genny. -// Any changes will be lost if this file is regenerated. -// see https://github.com/cheekybits/genny - -package connections - -import ( - "fmt" - - "github.com/git-bug/git-bug/api/graphql/models" - "github.com/git-bug/git-bug/entities/bug" -) - -// BugCommentEdgeMaker define a function that take a bug.Comment and an offset and -// create an Edge. -type CommentEdgeMaker func(value bug.Comment, offset int) Edge - -// CommentConMaker define a function that create a models.CommentConnection -type CommentConMaker func( - edges []*models.CommentEdge, - nodes []bug.Comment, - info *models.PageInfo, - totalCount int) (*models.CommentConnection, error) - -// CommentCon will paginate a source according to the input of a relay connection -func CommentCon(source []bug.Comment, edgeMaker CommentEdgeMaker, conMaker CommentConMaker, input models.ConnectionInput) (*models.CommentConnection, error) { - var nodes []bug.Comment - var edges []*models.CommentEdge - var cursors []string - var pageInfo = &models.PageInfo{} - var totalCount = len(source) - - emptyCon, _ := conMaker(edges, nodes, pageInfo, 0) - - offset := 0 - - if input.After != nil { - for i, value := range source { - edge := edgeMaker(value, i) - if edge.GetCursor() == *input.After { - // remove all previous element including the "after" one - source = source[i+1:] - offset = i + 1 - pageInfo.HasPreviousPage = true - break - } - } - } - - if input.Before != nil { - for i, value := range source { - edge := edgeMaker(value, i+offset) - - if edge.GetCursor() == *input.Before { - // remove all after element including the "before" one - pageInfo.HasNextPage = true - break - } - - e := edge.(models.CommentEdge) - edges = append(edges, &e) - cursors = append(cursors, edge.GetCursor()) - nodes = append(nodes, value) - } - } else { - edges = make([]*models.CommentEdge, len(source)) - cursors = make([]string, len(source)) - nodes = source - - for i, value := range source { - edge := edgeMaker(value, i+offset) - e := edge.(models.CommentEdge) - edges[i] = &e - cursors[i] = edge.GetCursor() - } - } - - if input.First != nil { - if *input.First < 0 { - return emptyCon, fmt.Errorf("first less than zero") - } - - if len(edges) > *input.First { - // Slice result to be of length first by removing edges from the end - edges = edges[:*input.First] - cursors = cursors[:*input.First] - nodes = nodes[:*input.First] - pageInfo.HasNextPage = true - } - } - - if input.Last != nil { - if *input.Last < 0 { - return emptyCon, fmt.Errorf("last less than zero") - } - - if len(edges) > *input.Last { - // Slice result to be of length last by removing edges from the start - edges = edges[len(edges)-*input.Last:] - cursors = cursors[len(cursors)-*input.Last:] - nodes = nodes[len(nodes)-*input.Last:] - pageInfo.HasPreviousPage = true - } - } - - // Fill up pageInfo cursors - if len(cursors) > 0 { - pageInfo.StartCursor = cursors[0] - pageInfo.EndCursor = cursors[len(cursors)-1] - } - - return conMaker(edges, nodes, pageInfo, totalCount) -} diff --git a/api/graphql/connections/gen_identity.go b/api/graphql/connections/gen_identity.go deleted file mode 100644 index cdd9c077..00000000 --- a/api/graphql/connections/gen_identity.go +++ /dev/null @@ -1,112 +0,0 @@ -// This file was automatically generated by genny. -// Any changes will be lost if this file is regenerated. -// see https://github.com/cheekybits/genny - -package connections - -import ( - "fmt" - - "github.com/git-bug/git-bug/api/graphql/models" -) - -// IdentityEdgeMaker define a function that take a models.IdentityWrapper and an offset and -// create an Edge. -type IdentityEdgeMaker func(value models.IdentityWrapper, offset int) Edge - -// IdentityConMaker define a function that create a models.IdentityConnection -type IdentityConMaker func( - edges []*models.IdentityEdge, - nodes []models.IdentityWrapper, - info *models.PageInfo, - totalCount int) (*models.IdentityConnection, error) - -// IdentityCon will paginate a source according to the input of a relay connection -func IdentityCon(source []models.IdentityWrapper, edgeMaker IdentityEdgeMaker, conMaker IdentityConMaker, input models.ConnectionInput) (*models.IdentityConnection, error) { - var nodes []models.IdentityWrapper - var edges []*models.IdentityEdge - var cursors []string - var pageInfo = &models.PageInfo{} - var totalCount = len(source) - - emptyCon, _ := conMaker(edges, nodes, pageInfo, 0) - - offset := 0 - - if input.After != nil { - for i, value := range source { - edge := edgeMaker(value, i) - if edge.GetCursor() == *input.After { - // remove all previous element including the "after" one - source = source[i+1:] - offset = i + 1 - pageInfo.HasPreviousPage = true - break - } - } - } - - if input.Before != nil { - for i, value := range source { - edge := edgeMaker(value, i+offset) - - if edge.GetCursor() == *input.Before { - // remove all after element including the "before" one - pageInfo.HasNextPage = true - break - } - - e := edge.(models.IdentityEdge) - edges = append(edges, &e) - cursors = append(cursors, edge.GetCursor()) - nodes = append(nodes, value) - } - } else { - edges = make([]*models.IdentityEdge, len(source)) - cursors = make([]string, len(source)) - nodes = source - - for i, value := range source { - edge := edgeMaker(value, i+offset) - e := edge.(models.IdentityEdge) - edges[i] = &e - cursors[i] = edge.GetCursor() - } - } - - if input.First != nil { - if *input.First < 0 { - return emptyCon, fmt.Errorf("first less than zero") - } - - if len(edges) > *input.First { - // Slice result to be of length first by removing edges from the end - edges = edges[:*input.First] - cursors = cursors[:*input.First] - nodes = nodes[:*input.First] - pageInfo.HasNextPage = true - } - } - - if input.Last != nil { - if *input.Last < 0 { - return emptyCon, fmt.Errorf("last less than zero") - } - - if len(edges) > *input.Last { - // Slice result to be of length last by removing edges from the start - edges = edges[len(edges)-*input.Last:] - cursors = cursors[len(cursors)-*input.Last:] - nodes = nodes[len(nodes)-*input.Last:] - pageInfo.HasPreviousPage = true - } - } - - // Fill up pageInfo cursors - if len(cursors) > 0 { - pageInfo.StartCursor = cursors[0] - pageInfo.EndCursor = cursors[len(cursors)-1] - } - - return conMaker(edges, nodes, pageInfo, totalCount) -} diff --git a/api/graphql/connections/gen_label.go b/api/graphql/connections/gen_label.go deleted file mode 100644 index 238305b4..00000000 --- a/api/graphql/connections/gen_label.go +++ /dev/null @@ -1,113 +0,0 @@ -// This file was automatically generated by genny. -// Any changes will be lost if this file is regenerated. -// see https://github.com/cheekybits/genny - -package connections - -import ( - "fmt" - - "github.com/git-bug/git-bug/api/graphql/models" - "github.com/git-bug/git-bug/entities/bug" -) - -// BugLabelEdgeMaker define a function that take a bug.Label and an offset and -// create an Edge. -type LabelEdgeMaker func(value bug.Label, offset int) Edge - -// LabelConMaker define a function that create a models.LabelConnection -type LabelConMaker func( - edges []*models.LabelEdge, - nodes []bug.Label, - info *models.PageInfo, - totalCount int) (*models.LabelConnection, error) - -// LabelCon will paginate a source according to the input of a relay connection -func LabelCon(source []bug.Label, edgeMaker LabelEdgeMaker, conMaker LabelConMaker, input models.ConnectionInput) (*models.LabelConnection, error) { - var nodes []bug.Label - var edges []*models.LabelEdge - var cursors []string - var pageInfo = &models.PageInfo{} - var totalCount = len(source) - - emptyCon, _ := conMaker(edges, nodes, pageInfo, 0) - - offset := 0 - - if input.After != nil { - for i, value := range source { - edge := edgeMaker(value, i) - if edge.GetCursor() == *input.After { - // remove all previous element including the "after" one - source = source[i+1:] - offset = i + 1 - pageInfo.HasPreviousPage = true - break - } - } - } - - if input.Before != nil { - for i, value := range source { - edge := edgeMaker(value, i+offset) - - if edge.GetCursor() == *input.Before { - // remove all after element including the "before" one - pageInfo.HasNextPage = true - break - } - - e := edge.(models.LabelEdge) - edges = append(edges, &e) - cursors = append(cursors, edge.GetCursor()) - nodes = append(nodes, value) - } - } else { - edges = make([]*models.LabelEdge, len(source)) - cursors = make([]string, len(source)) - nodes = source - - for i, value := range source { - edge := edgeMaker(value, i+offset) - e := edge.(models.LabelEdge) - edges[i] = &e - cursors[i] = edge.GetCursor() - } - } - - if input.First != nil { - if *input.First < 0 { - return emptyCon, fmt.Errorf("first less than zero") - } - - if len(edges) > *input.First { - // Slice result to be of length first by removing edges from the end - edges = edges[:*input.First] - cursors = cursors[:*input.First] - nodes = nodes[:*input.First] - pageInfo.HasNextPage = true - } - } - - if input.Last != nil { - if *input.Last < 0 { - return emptyCon, fmt.Errorf("last less than zero") - } - - if len(edges) > *input.Last { - // Slice result to be of length last by removing edges from the start - edges = edges[len(edges)-*input.Last:] - cursors = cursors[len(cursors)-*input.Last:] - nodes = nodes[len(nodes)-*input.Last:] - pageInfo.HasPreviousPage = true - } - } - - // Fill up pageInfo cursors - if len(cursors) > 0 { - pageInfo.StartCursor = cursors[0] - pageInfo.EndCursor = cursors[len(cursors)-1] - } - - return conMaker(edges, nodes, pageInfo, totalCount) -} diff --git a/api/graphql/connections/gen_lazy_bug.go b/api/graphql/connections/gen_lazy_bug.go deleted file mode 100644 index 5a7af08f..00000000 --- a/api/graphql/connections/gen_lazy_bug.go +++ /dev/null @@ -1,113 +0,0 @@ -// This file was automatically generated by genny. -// Any changes will be lost if this file is regenerated. -// see https://github.com/cheekybits/genny - -package connections - -import ( - "fmt" - - "github.com/git-bug/git-bug/api/graphql/models" - "github.com/git-bug/git-bug/entity" -) - -// LazyBugEdgeMaker define a function that take a entity.Id and an offset and -// create an Edge. -type LazyBugEdgeMaker func(value entity.Id, offset int) Edge - -// LazyBugConMaker define a function that create a models.BugConnection -type LazyBugConMaker func( - edges []*LazyBugEdge, - nodes []entity.Id, - info *models.PageInfo, - totalCount int) (*models.BugConnection, error) - -// LazyBugCon will paginate a source according to the input of a relay connection -func LazyBugCon(source []entity.Id, edgeMaker LazyBugEdgeMaker, conMaker LazyBugConMaker, input models.ConnectionInput) (*models.BugConnection, error) { - var nodes []entity.Id - var edges []*LazyBugEdge - var cursors []string - var pageInfo = &models.PageInfo{} - var totalCount = len(source) - - emptyCon, _ := conMaker(edges, nodes, pageInfo, 0) - - offset := 0 - - if input.After != nil { - for i, value := range source { - edge := edgeMaker(value, i) - if edge.GetCursor() == *input.After { - // remove all previous element including the "after" one - source = source[i+1:] - offset = i + 1 - pageInfo.HasPreviousPage = true - break - } - } - } - - if input.Before != nil { - for i, value := range source { - edge := edgeMaker(value, i+offset) - - if edge.GetCursor() == *input.Before { - // remove all after element including the "before" one - pageInfo.HasNextPage = true - break - } - - e := edge.(LazyBugEdge) - edges = append(edges, &e) - cursors = append(cursors, edge.GetCursor()) - nodes = append(nodes, value) - } - } else { - edges = make([]*LazyBugEdge, len(source)) - cursors = make([]string, len(source)) - nodes = source - - for i, value := range source { - edge := edgeMaker(value, i+offset) - e := edge.(LazyBugEdge) - edges[i] = &e - cursors[i] = edge.GetCursor() - } - } - - if input.First != nil { - if *input.First < 0 { - return emptyCon, fmt.Errorf("first less than zero") - } - - if len(edges) > *input.First { - // Slice result to be of length first by removing edges from the end - edges = edges[:*input.First] - cursors = cursors[:*input.First] - nodes = nodes[:*input.First] - pageInfo.HasNextPage = true - } - } - - if input.Last != nil { - if *input.Last < 0 { - return emptyCon, fmt.Errorf("last less than zero") - } - - if len(edges) > *input.Last { - // Slice result to be of length last by removing edges from the start - edges = edges[len(edges)-*input.Last:] - cursors = cursors[len(cursors)-*input.Last:] - nodes = nodes[len(nodes)-*input.Last:] - pageInfo.HasPreviousPage = true - } - } - - // Fill up pageInfo cursors - if len(cursors) > 0 { - pageInfo.StartCursor = cursors[0] - pageInfo.EndCursor = cursors[len(cursors)-1] - } - - return conMaker(edges, nodes, pageInfo, totalCount) -} diff --git a/api/graphql/connections/gen_lazy_identity.go b/api/graphql/connections/gen_lazy_identity.go deleted file mode 100644 index acb1d048..00000000 --- a/api/graphql/connections/gen_lazy_identity.go +++ /dev/null @@ -1,113 +0,0 @@ -// This file was automatically generated by genny. -// Any changes will be lost if this file is regenerated. -// see https://github.com/cheekybits/genny - -package connections - -import ( - "fmt" - - "github.com/git-bug/git-bug/api/graphql/models" - "github.com/git-bug/git-bug/entity" -) - -// LazyIdentityEdgeMaker define a function that take a entity.Id and an offset and -// create an Edge. -type LazyIdentityEdgeMaker func(value entity.Id, offset int) Edge - -// LazyIdentityConMaker define a function that create a models.IdentityConnection -type LazyIdentityConMaker func( - edges []*LazyIdentityEdge, - nodes []entity.Id, - info *models.PageInfo, - totalCount int) (*models.IdentityConnection, error) - -// LazyIdentityCon will paginate a source according to the input of a relay connection -func LazyIdentityCon(source []entity.Id, edgeMaker LazyIdentityEdgeMaker, conMaker LazyIdentityConMaker, input models.ConnectionInput) (*models.IdentityConnection, error) { - var nodes []entity.Id - var edges []*LazyIdentityEdge - var cursors []string - var pageInfo = &models.PageInfo{} - var totalCount = len(source) - - emptyCon, _ := conMaker(edges, nodes, pageInfo, 0) - - offset := 0 - - if input.After != nil { - for i, value := range source { - edge := edgeMaker(value, i) - if edge.GetCursor() == *input.After { - // remove all previous element including the "after" one - source = source[i+1:] - offset = i + 1 - pageInfo.HasPreviousPage = true - break - } - } - } - - if input.Before != nil { - for i, value := range source { - edge := edgeMaker(value, i+offset) - - if edge.GetCursor() == *input.Before { - // remove all after element including the "before" one - pageInfo.HasNextPage = true - break - } - - e := edge.(LazyIdentityEdge) - edges = append(edges, &e) - cursors = append(cursors, edge.GetCursor()) - nodes = append(nodes, value) - } - } else { - edges = make([]*LazyIdentityEdge, len(source)) - cursors = make([]string, len(source)) - nodes = source - - for i, value := range source { - edge := edgeMaker(value, i+offset) - e := edge.(LazyIdentityEdge) - edges[i] = &e - cursors[i] = edge.GetCursor() - } - } - - if input.First != nil { - if *input.First < 0 { - return emptyCon, fmt.Errorf("first less than zero") - } - - if len(edges) > *input.First { - // Slice result to be of length first by removing edges from the end - edges = edges[:*input.First] - cursors = cursors[:*input.First] - nodes = nodes[:*input.First] - pageInfo.HasNextPage = true - } - } - - if input.Last != nil { - if *input.Last < 0 { - return emptyCon, fmt.Errorf("last less than zero") - } - - if len(edges) > *input.Last { - // Slice result to be of length last by removing edges from the start - edges = edges[len(edges)-*input.Last:] - cursors = cursors[len(cursors)-*input.Last:] - nodes = nodes[len(nodes)-*input.Last:] - pageInfo.HasPreviousPage = true - } - } - - // Fill up pageInfo cursors - if len(cursors) > 0 { - pageInfo.StartCursor = cursors[0] - pageInfo.EndCursor = cursors[len(cursors)-1] - } - - return conMaker(edges, nodes, pageInfo, totalCount) -} diff --git a/api/graphql/connections/gen_operation.go b/api/graphql/connections/gen_operation.go deleted file mode 100644 index bfdf3491..00000000 --- a/api/graphql/connections/gen_operation.go +++ /dev/null @@ -1,113 +0,0 @@ -// This file was automatically generated by genny. -// Any changes will be lost if this file is regenerated. -// see https://github.com/cheekybits/genny - -package connections - -import ( - "fmt" - - "github.com/git-bug/git-bug/api/graphql/models" - "github.com/git-bug/git-bug/entity/dag" -) - -// DagOperationEdgeMaker define a function that take a dag.Operation and an offset and -// create an Edge. -type OperationEdgeMaker func(value dag.Operation, offset int) Edge - -// OperationConMaker define a function that create a models.OperationConnection -type OperationConMaker func( - edges []*models.OperationEdge, - nodes []dag.Operation, - info *models.PageInfo, - totalCount int) (*models.OperationConnection, error) - -// OperationCon will paginate a source according to the input of a relay connection -func OperationCon(source []dag.Operation, edgeMaker OperationEdgeMaker, conMaker OperationConMaker, input models.ConnectionInput) (*models.OperationConnection, error) { - var nodes []dag.Operation - var edges []*models.OperationEdge - var cursors []string - var pageInfo = &models.PageInfo{} - var totalCount = len(source) - - emptyCon, _ := conMaker(edges, nodes, pageInfo, 0) - - offset := 0 - - if input.After != nil { - for i, value := range source { - edge := edgeMaker(value, i) - if edge.GetCursor() == *input.After { - // remove all previous element including the "after" one - source = source[i+1:] - offset = i + 1 - pageInfo.HasPreviousPage = true - break - } - } - } - - if input.Before != nil { - for i, value := range source { - edge := edgeMaker(value, i+offset) - - if edge.GetCursor() == *input.Before { - // remove all after element including the "before" one - pageInfo.HasNextPage = true - break - } - - e := edge.(models.OperationEdge) - edges = append(edges, &e) - cursors = append(cursors, edge.GetCursor()) - nodes = append(nodes, value) - } - } else { - edges = make([]*models.OperationEdge, len(source)) - cursors = make([]string, len(source)) - nodes = source - - for i, value := range source { - edge := edgeMaker(value, i+offset) - e := edge.(models.OperationEdge) - edges[i] = &e - cursors[i] = edge.GetCursor() - } - } - - if input.First != nil { - if *input.First < 0 { - return emptyCon, fmt.Errorf("first less than zero") - } - - if len(edges) > *input.First { - // Slice result to be of length first by removing edges from the end - edges = edges[:*input.First] - cursors = cursors[:*input.First] - nodes = nodes[:*input.First] - pageInfo.HasNextPage = true - } - } - - if input.Last != nil { - if *input.Last < 0 { - return emptyCon, fmt.Errorf("last less than zero") - } - - if len(edges) > *input.Last { - // Slice result to be of length last by removing edges from the start - edges = edges[len(edges)-*input.Last:] - cursors = cursors[len(cursors)-*input.Last:] - nodes = nodes[len(nodes)-*input.Last:] - pageInfo.HasPreviousPage = true - } - } - - // Fill up pageInfo cursors - if len(cursors) > 0 { - pageInfo.StartCursor = cursors[0] - pageInfo.EndCursor = cursors[len(cursors)-1] - } - - return conMaker(edges, nodes, pageInfo, totalCount) -} diff --git a/api/graphql/connections/gen_timeline.go b/api/graphql/connections/gen_timeline.go deleted file mode 100644 index ea24f44c..00000000 --- a/api/graphql/connections/gen_timeline.go +++ /dev/null @@ -1,113 +0,0 @@ -// This file was automatically generated by genny. -// Any changes will be lost if this file is regenerated. -// see https://github.com/cheekybits/genny - -package connections - -import ( - "fmt" - - "github.com/git-bug/git-bug/api/graphql/models" - "github.com/git-bug/git-bug/entities/bug" -) - -// BugTimelineItemEdgeMaker define a function that take a bug.TimelineItem and an offset and -// create an Edge. -type TimelineItemEdgeMaker func(value bug.TimelineItem, offset int) Edge - -// TimelineItemConMaker define a function that create a models.TimelineItemConnection -type TimelineItemConMaker func( - edges []*models.TimelineItemEdge, - nodes []bug.TimelineItem, - info *models.PageInfo, - totalCount int) (*models.TimelineItemConnection, error) - -// TimelineItemCon will paginate a source according to the input of a relay connection -func TimelineItemCon(source []bug.TimelineItem, edgeMaker TimelineItemEdgeMaker, conMaker TimelineItemConMaker, input models.ConnectionInput) (*models.TimelineItemConnection, error) { - var nodes []bug.TimelineItem - var edges []*models.TimelineItemEdge - var cursors []string - var pageInfo = &models.PageInfo{} - var totalCount = len(source) - - emptyCon, _ := conMaker(edges, nodes, pageInfo, 0) - - offset := 0 - - if input.After != nil { - for i, value := range source { - edge := edgeMaker(value, i) - if edge.GetCursor() == *input.After { - // remove all previous element including the "after" one - source = source[i+1:] - offset = i + 1 - pageInfo.HasPreviousPage = true - break - } - } - } - - if input.Before != nil { - for i, value := range source { - edge := edgeMaker(value, i+offset) - - if edge.GetCursor() == *input.Before { - // remove all after element including the "before" one - pageInfo.HasNextPage = true - break - } - - e := edge.(models.TimelineItemEdge) - edges = append(edges, &e) - cursors = append(cursors, edge.GetCursor()) - nodes = append(nodes, value) - } - } else { - edges = make([]*models.TimelineItemEdge, len(source)) - cursors = make([]string, len(source)) - nodes = source - - for i, value := range source { - edge := edgeMaker(value, i+offset) - e := edge.(models.TimelineItemEdge) - edges[i] = &e - cursors[i] = edge.GetCursor() - } - } - - if input.First != nil { - if *input.First < 0 { - return emptyCon, fmt.Errorf("first less than zero") - } - - if len(edges) > *input.First { - // Slice result to be of length first by removing edges from the end - edges = edges[:*input.First] - cursors = cursors[:*input.First] - nodes = nodes[:*input.First] - pageInfo.HasNextPage = true - } - } - - if input.Last != nil { - if *input.Last < 0 { - return emptyCon, fmt.Errorf("last less than zero") - } - - if len(edges) > *input.Last { - // Slice result to be of length last by removing edges from the start - edges = edges[len(edges)-*input.Last:] - cursors = cursors[len(cursors)-*input.Last:] - nodes = nodes[len(nodes)-*input.Last:] - pageInfo.HasPreviousPage = true - } - } - - // Fill up pageInfo cursors - if len(cursors) > 0 { - pageInfo.StartCursor = cursors[0] - pageInfo.EndCursor = cursors[len(cursors)-1] - } - - return conMaker(edges, nodes, pageInfo, totalCount) -} diff --git a/api/graphql/graph/bug.generated.go b/api/graphql/graph/bug.generated.go index 4d12cc84..49ce3e4a 100644 --- a/api/graphql/graph/bug.generated.go +++ b/api/graphql/graph/bug.generated.go @@ -286,10 +286,10 @@ func (ec *executionContext) _Bug_id(ctx context.Context, field graphql.Collected } res := resTmp.(entity.Id) fc.Result = res - return ec.marshalNID2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res) + return ec.marshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Bug_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Bug_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Bug", Field: field, @@ -333,7 +333,7 @@ func (ec *executionContext) _Bug_humanId(ctx context.Context, field graphql.Coll return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Bug_humanId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Bug_humanId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Bug", Field: field, @@ -374,10 +374,10 @@ func (ec *executionContext) _Bug_status(ctx context.Context, field graphql.Colle } res := resTmp.(common.Status) fc.Result = res - return ec.marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋcommonᚐStatus(ctx, field.Selections, res) + return ec.marshalNStatus2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Bug_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Bug_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Bug", Field: field, @@ -421,7 +421,7 @@ func (ec *executionContext) _Bug_title(ctx context.Context, field graphql.Collec return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Bug_title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Bug_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Bug", Field: field, @@ -460,12 +460,12 @@ func (ec *executionContext) _Bug_labels(ctx context.Context, field graphql.Colle } return graphql.Null } - res := resTmp.([]bug.Label) + res := resTmp.([]common.Label) fc.Result = res - return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabelᚄ(ctx, field.Selections, res) + return ec.marshalNLabel2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐLabelᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Bug_labels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Bug_labels(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Bug", Field: field, @@ -512,10 +512,10 @@ func (ec *executionContext) _Bug_author(ctx context.Context, field graphql.Colle } res := resTmp.(models.IdentityWrapper) fc.Result = res - return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) + return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Bug_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Bug_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Bug", Field: field, @@ -577,7 +577,7 @@ func (ec *executionContext) _Bug_createdAt(ctx context.Context, field graphql.Co return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Bug_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Bug_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Bug", Field: field, @@ -621,7 +621,7 @@ func (ec *executionContext) _Bug_lastEdit(ctx context.Context, field graphql.Col return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Bug_lastEdit(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Bug_lastEdit(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Bug", Field: field, @@ -662,7 +662,7 @@ func (ec *executionContext) _Bug_actors(ctx context.Context, field graphql.Colle } res := resTmp.(*models.IdentityConnection) fc.Result = res - return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res) + return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Bug_actors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -727,7 +727,7 @@ func (ec *executionContext) _Bug_participants(ctx context.Context, field graphql } res := resTmp.(*models.IdentityConnection) fc.Result = res - return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res) + return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Bug_participants(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -792,7 +792,7 @@ func (ec *executionContext) _Bug_comments(ctx context.Context, field graphql.Col } res := resTmp.(*models.CommentConnection) fc.Result = res - return ec.marshalNCommentConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentConnection(ctx, field.Selections, res) + return ec.marshalNCommentConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentConnection(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Bug_comments(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -857,7 +857,7 @@ func (ec *executionContext) _Bug_timeline(ctx context.Context, field graphql.Col } res := resTmp.(*models.TimelineItemConnection) fc.Result = res - return ec.marshalNTimelineItemConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐTimelineItemConnection(ctx, field.Selections, res) + return ec.marshalNTimelineItemConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐTimelineItemConnection(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Bug_timeline(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -922,7 +922,7 @@ func (ec *executionContext) _Bug_operations(ctx context.Context, field graphql.C } res := resTmp.(*models.OperationConnection) fc.Result = res - return ec.marshalNOperationConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOperationConnection(ctx, field.Selections, res) + return ec.marshalNOperationConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOperationConnection(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Bug_operations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -987,10 +987,10 @@ func (ec *executionContext) _BugConnection_edges(ctx context.Context, field grap } res := resTmp.([]*models.BugEdge) fc.Result = res - return ec.marshalNBugEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNBugEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BugConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BugConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BugConnection", Field: field, @@ -1037,10 +1037,10 @@ func (ec *executionContext) _BugConnection_nodes(ctx context.Context, field grap } res := resTmp.([]models.BugWrapper) fc.Result = res - return ec.marshalNBug2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapperᚄ(ctx, field.Selections, res) + return ec.marshalNBug2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapperᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BugConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BugConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BugConnection", Field: field, @@ -1109,10 +1109,10 @@ func (ec *executionContext) _BugConnection_pageInfo(ctx context.Context, field g } res := resTmp.(*models.PageInfo) fc.Result = res - return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BugConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BugConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BugConnection", Field: field, @@ -1166,7 +1166,7 @@ func (ec *executionContext) _BugConnection_totalCount(ctx context.Context, field return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BugConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BugConnection_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BugConnection", Field: field, @@ -1210,7 +1210,7 @@ func (ec *executionContext) _BugEdge_cursor(ctx context.Context, field graphql.C return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BugEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BugEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BugEdge", Field: field, @@ -1251,10 +1251,10 @@ func (ec *executionContext) _BugEdge_node(ctx context.Context, field graphql.Col } res := resTmp.(models.BugWrapper) fc.Result = res - return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) + return ec.marshalNBug2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BugEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BugEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "BugEdge", Field: field, @@ -1323,10 +1323,10 @@ func (ec *executionContext) _Comment_id(ctx context.Context, field graphql.Colle } res := resTmp.(entity.CombinedId) fc.Result = res - return ec.marshalNCombinedId2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚐCombinedId(ctx, field.Selections, res) + return ec.marshalNCombinedId2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐCombinedId(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Comment_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Comment_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Comment", Field: field, @@ -1367,10 +1367,10 @@ func (ec *executionContext) _Comment_author(ctx context.Context, field graphql.C } res := resTmp.(models.IdentityWrapper) fc.Result = res - return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) + return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Comment_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Comment_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Comment", Field: field, @@ -1432,7 +1432,7 @@ func (ec *executionContext) _Comment_message(ctx context.Context, field graphql. return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Comment_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Comment_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Comment", Field: field, @@ -1473,10 +1473,10 @@ func (ec *executionContext) _Comment_files(ctx context.Context, field graphql.Co } res := resTmp.([]repository.Hash) fc.Result = res - return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res) + return ec.marshalNHash2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Comment_files(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Comment_files(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Comment", Field: field, @@ -1517,10 +1517,10 @@ func (ec *executionContext) _CommentConnection_edges(ctx context.Context, field } res := resTmp.([]*models.CommentEdge) fc.Result = res - return ec.marshalNCommentEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNCommentEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CommentConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CommentConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CommentConnection", Field: field, @@ -1567,10 +1567,10 @@ func (ec *executionContext) _CommentConnection_nodes(ctx context.Context, field } res := resTmp.([]*bug.Comment) fc.Result = res - return ec.marshalNComment2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐCommentᚄ(ctx, field.Selections, res) + return ec.marshalNComment2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐCommentᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CommentConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CommentConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CommentConnection", Field: field, @@ -1621,10 +1621,10 @@ func (ec *executionContext) _CommentConnection_pageInfo(ctx context.Context, fie } res := resTmp.(*models.PageInfo) fc.Result = res - return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CommentConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CommentConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CommentConnection", Field: field, @@ -1678,7 +1678,7 @@ func (ec *executionContext) _CommentConnection_totalCount(ctx context.Context, f return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CommentConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CommentConnection_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CommentConnection", Field: field, @@ -1722,7 +1722,7 @@ func (ec *executionContext) _CommentEdge_cursor(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CommentEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CommentEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CommentEdge", Field: field, @@ -1763,10 +1763,10 @@ func (ec *executionContext) _CommentEdge_node(ctx context.Context, field graphql } res := resTmp.(*bug.Comment) fc.Result = res - return ec.marshalNComment2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐComment(ctx, field.Selections, res) + return ec.marshalNComment2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐComment(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CommentEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CommentEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CommentEdge", Field: field, @@ -2402,7 +2402,7 @@ func (ec *executionContext) _CommentEdge(ctx context.Context, sel ast.SelectionS // region ***************************** type.gotpl ***************************** -func (ec *executionContext) marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx context.Context, sel ast.SelectionSet, v models.BugWrapper) graphql.Marshaler { +func (ec *executionContext) marshalNBug2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx context.Context, sel ast.SelectionSet, v models.BugWrapper) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -2412,7 +2412,7 @@ func (ec *executionContext) marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbug return ec._Bug(ctx, sel, v) } -func (ec *executionContext) marshalNBug2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapperᚄ(ctx context.Context, sel ast.SelectionSet, v []models.BugWrapper) graphql.Marshaler { +func (ec *executionContext) marshalNBug2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapperᚄ(ctx context.Context, sel ast.SelectionSet, v []models.BugWrapper) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -2436,7 +2436,7 @@ func (ec *executionContext) marshalNBug2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbu if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, sel, v[i]) + ret[i] = ec.marshalNBug2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, sel, v[i]) } if isLen1 { f(i) @@ -2456,11 +2456,11 @@ func (ec *executionContext) marshalNBug2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbu return ret } -func (ec *executionContext) marshalNBugConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugConnection(ctx context.Context, sel ast.SelectionSet, v models.BugConnection) graphql.Marshaler { +func (ec *executionContext) marshalNBugConnection2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋ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ᚋapiᚋgraphqlᚋmodelsᚐBugConnection(ctx context.Context, sel ast.SelectionSet, v *models.BugConnection) graphql.Marshaler { +func (ec *executionContext) marshalNBugConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugConnection(ctx context.Context, sel ast.SelectionSet, v *models.BugConnection) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -2470,7 +2470,7 @@ func (ec *executionContext) marshalNBugConnection2ᚖgithubᚗcomᚋMichaelMure return ec._BugConnection(ctx, sel, v) } -func (ec *executionContext) marshalNBugEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.BugEdge) graphql.Marshaler { +func (ec *executionContext) marshalNBugEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋ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 @@ -2494,7 +2494,7 @@ func (ec *executionContext) marshalNBugEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋg if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNBugEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdge(ctx, sel, v[i]) + ret[i] = ec.marshalNBugEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdge(ctx, sel, v[i]) } if isLen1 { f(i) @@ -2514,7 +2514,7 @@ func (ec *executionContext) marshalNBugEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋg return ret } -func (ec *executionContext) marshalNBugEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdge(ctx context.Context, sel ast.SelectionSet, v *models.BugEdge) graphql.Marshaler { +func (ec *executionContext) marshalNBugEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugEdge(ctx context.Context, sel ast.SelectionSet, v *models.BugEdge) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -2524,7 +2524,7 @@ func (ec *executionContext) marshalNBugEdge2ᚖgithubᚗcomᚋMichaelMureᚋgit return ec._BugEdge(ctx, sel, v) } -func (ec *executionContext) marshalNComment2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐCommentᚄ(ctx context.Context, sel ast.SelectionSet, v []*bug.Comment) graphql.Marshaler { +func (ec *executionContext) marshalNComment2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋ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 @@ -2548,7 +2548,7 @@ func (ec *executionContext) marshalNComment2ᚕᚖgithubᚗcomᚋMichaelMureᚋg if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNComment2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐComment(ctx, sel, v[i]) + ret[i] = ec.marshalNComment2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐComment(ctx, sel, v[i]) } if isLen1 { f(i) @@ -2568,7 +2568,7 @@ func (ec *executionContext) marshalNComment2ᚕᚖgithubᚗcomᚋMichaelMureᚋg return ret } -func (ec *executionContext) marshalNComment2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐComment(ctx context.Context, sel ast.SelectionSet, v *bug.Comment) graphql.Marshaler { +func (ec *executionContext) marshalNComment2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐComment(ctx context.Context, sel ast.SelectionSet, v *bug.Comment) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -2578,11 +2578,11 @@ func (ec *executionContext) marshalNComment2ᚖgithubᚗcomᚋMichaelMureᚋgit return ec._Comment(ctx, sel, v) } -func (ec *executionContext) marshalNCommentConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentConnection(ctx context.Context, sel ast.SelectionSet, v models.CommentConnection) graphql.Marshaler { +func (ec *executionContext) marshalNCommentConnection2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋ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ᚋapiᚋgraphqlᚋmodelsᚐCommentConnection(ctx context.Context, sel ast.SelectionSet, v *models.CommentConnection) graphql.Marshaler { +func (ec *executionContext) marshalNCommentConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentConnection(ctx context.Context, sel ast.SelectionSet, v *models.CommentConnection) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -2592,7 +2592,7 @@ func (ec *executionContext) marshalNCommentConnection2ᚖgithubᚗcomᚋMichaelM return ec._CommentConnection(ctx, sel, v) } -func (ec *executionContext) marshalNCommentEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.CommentEdge) graphql.Marshaler { +func (ec *executionContext) marshalNCommentEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋ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 @@ -2616,7 +2616,7 @@ func (ec *executionContext) marshalNCommentEdge2ᚕᚖgithubᚗcomᚋMichaelMure if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNCommentEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentEdge(ctx, sel, v[i]) + ret[i] = ec.marshalNCommentEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentEdge(ctx, sel, v[i]) } if isLen1 { f(i) @@ -2636,7 +2636,7 @@ func (ec *executionContext) marshalNCommentEdge2ᚕᚖgithubᚗcomᚋMichaelMure return ret } -func (ec *executionContext) marshalNCommentEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentEdge(ctx context.Context, sel ast.SelectionSet, v *models.CommentEdge) graphql.Marshaler { +func (ec *executionContext) marshalNCommentEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCommentEdge(ctx context.Context, sel ast.SelectionSet, v *models.CommentEdge) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -2646,17 +2646,17 @@ func (ec *executionContext) marshalNCommentEdge2ᚖgithubᚗcomᚋMichaelMureᚋ return ec._CommentEdge(ctx, sel, v) } -func (ec *executionContext) unmarshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋcommonᚐStatus(ctx context.Context, v interface{}) (common.Status, error) { +func (ec *executionContext) unmarshalNStatus2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐStatus(ctx context.Context, v interface{}) (common.Status, error) { var res common.Status err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋcommonᚐStatus(ctx context.Context, sel ast.SelectionSet, v common.Status) graphql.Marshaler { +func (ec *executionContext) marshalNStatus2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐStatus(ctx context.Context, sel ast.SelectionSet, v common.Status) graphql.Marshaler { return v } -func (ec *executionContext) marshalOBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx context.Context, sel ast.SelectionSet, v models.BugWrapper) graphql.Marshaler { +func (ec *executionContext) marshalOBug2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx context.Context, sel ast.SelectionSet, v models.BugWrapper) graphql.Marshaler { if v == nil { return graphql.Null } diff --git a/api/graphql/graph/identity.generated.go b/api/graphql/graph/identity.generated.go index b65cf1ab..4dd246e4 100644 --- a/api/graphql/graph/identity.generated.go +++ b/api/graphql/graph/identity.generated.go @@ -62,10 +62,10 @@ func (ec *executionContext) _Identity_id(ctx context.Context, field graphql.Coll } res := resTmp.(entity.Id) fc.Result = res - return ec.marshalNID2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res) + return ec.marshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Identity_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Identity_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Identity", Field: field, @@ -109,7 +109,7 @@ func (ec *executionContext) _Identity_humanId(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Identity_humanId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Identity_humanId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Identity", Field: field, @@ -150,7 +150,7 @@ func (ec *executionContext) _Identity_name(ctx context.Context, field graphql.Co return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Identity_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Identity_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Identity", Field: field, @@ -191,7 +191,7 @@ func (ec *executionContext) _Identity_email(ctx context.Context, field graphql.C return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Identity_email(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Identity_email(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Identity", Field: field, @@ -232,7 +232,7 @@ func (ec *executionContext) _Identity_login(ctx context.Context, field graphql.C return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Identity_login(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Identity_login(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Identity", Field: field, @@ -276,7 +276,7 @@ func (ec *executionContext) _Identity_displayName(ctx context.Context, field gra return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Identity_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Identity_displayName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Identity", Field: field, @@ -317,7 +317,7 @@ func (ec *executionContext) _Identity_avatarUrl(ctx context.Context, field graph return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Identity_avatarUrl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Identity_avatarUrl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Identity", Field: field, @@ -361,7 +361,7 @@ func (ec *executionContext) _Identity_isProtected(ctx context.Context, field gra return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Identity_isProtected(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Identity_isProtected(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Identity", Field: field, @@ -402,10 +402,10 @@ func (ec *executionContext) _IdentityConnection_edges(ctx context.Context, field } res := resTmp.([]*models.IdentityEdge) fc.Result = res - return ec.marshalNIdentityEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNIdentityEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IdentityConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IdentityConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "IdentityConnection", Field: field, @@ -452,10 +452,10 @@ func (ec *executionContext) _IdentityConnection_nodes(ctx context.Context, field } res := resTmp.([]models.IdentityWrapper) fc.Result = res - return ec.marshalNIdentity2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapperᚄ(ctx, field.Selections, res) + return ec.marshalNIdentity2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapperᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IdentityConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IdentityConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "IdentityConnection", Field: field, @@ -514,10 +514,10 @@ func (ec *executionContext) _IdentityConnection_pageInfo(ctx context.Context, fi } res := resTmp.(*models.PageInfo) fc.Result = res - return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IdentityConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IdentityConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "IdentityConnection", Field: field, @@ -571,7 +571,7 @@ func (ec *executionContext) _IdentityConnection_totalCount(ctx context.Context, return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IdentityConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IdentityConnection_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "IdentityConnection", Field: field, @@ -615,7 +615,7 @@ func (ec *executionContext) _IdentityEdge_cursor(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IdentityEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IdentityEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "IdentityEdge", Field: field, @@ -656,10 +656,10 @@ func (ec *executionContext) _IdentityEdge_node(ctx context.Context, field graphq } res := resTmp.(models.IdentityWrapper) fc.Result = res - return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) + return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IdentityEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IdentityEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "IdentityEdge", Field: field, @@ -897,7 +897,7 @@ func (ec *executionContext) _IdentityEdge(ctx context.Context, sel ast.Selection // region ***************************** type.gotpl ***************************** -func (ec *executionContext) marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx context.Context, sel ast.SelectionSet, v models.IdentityWrapper) graphql.Marshaler { +func (ec *executionContext) marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx context.Context, sel ast.SelectionSet, v models.IdentityWrapper) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -907,7 +907,7 @@ func (ec *executionContext) marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑ return ec._Identity(ctx, sel, v) } -func (ec *executionContext) marshalNIdentity2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapperᚄ(ctx context.Context, sel ast.SelectionSet, v []models.IdentityWrapper) graphql.Marshaler { +func (ec *executionContext) marshalNIdentity2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapperᚄ(ctx context.Context, sel ast.SelectionSet, v []models.IdentityWrapper) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -931,7 +931,7 @@ func (ec *executionContext) marshalNIdentity2ᚕgithubᚗcomᚋMichaelMureᚋgit if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, sel, v[i]) + ret[i] = ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, sel, v[i]) } if isLen1 { f(i) @@ -951,11 +951,11 @@ func (ec *executionContext) marshalNIdentity2ᚕgithubᚗcomᚋMichaelMureᚋgit return ret } -func (ec *executionContext) marshalNIdentityConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx context.Context, sel ast.SelectionSet, v models.IdentityConnection) graphql.Marshaler { +func (ec *executionContext) marshalNIdentityConnection2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋ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ᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx context.Context, sel ast.SelectionSet, v *models.IdentityConnection) graphql.Marshaler { +func (ec *executionContext) marshalNIdentityConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx context.Context, sel ast.SelectionSet, v *models.IdentityConnection) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -965,7 +965,7 @@ func (ec *executionContext) marshalNIdentityConnection2ᚖgithubᚗcomᚋMichael return ec._IdentityConnection(ctx, sel, v) } -func (ec *executionContext) marshalNIdentityEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.IdentityEdge) graphql.Marshaler { +func (ec *executionContext) marshalNIdentityEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋ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 @@ -989,7 +989,7 @@ func (ec *executionContext) marshalNIdentityEdge2ᚕᚖgithubᚗcomᚋMichaelMur if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNIdentityEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityEdge(ctx, sel, v[i]) + ret[i] = ec.marshalNIdentityEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityEdge(ctx, sel, v[i]) } if isLen1 { f(i) @@ -1009,7 +1009,7 @@ func (ec *executionContext) marshalNIdentityEdge2ᚕᚖgithubᚗcomᚋMichaelMur return ret } -func (ec *executionContext) marshalNIdentityEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityEdge(ctx context.Context, sel ast.SelectionSet, v *models.IdentityEdge) graphql.Marshaler { +func (ec *executionContext) marshalNIdentityEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityEdge(ctx context.Context, sel ast.SelectionSet, v *models.IdentityEdge) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -1019,7 +1019,7 @@ func (ec *executionContext) marshalNIdentityEdge2ᚖgithubᚗcomᚋMichaelMure return ec._IdentityEdge(ctx, sel, v) } -func (ec *executionContext) marshalOIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx context.Context, sel ast.SelectionSet, v models.IdentityWrapper) graphql.Marshaler { +func (ec *executionContext) marshalOIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx context.Context, sel ast.SelectionSet, v models.IdentityWrapper) graphql.Marshaler { if v == nil { return graphql.Null } diff --git a/api/graphql/graph/label.generated.go b/api/graphql/graph/label.generated.go index 7941db71..1f861c35 100644 --- a/api/graphql/graph/label.generated.go +++ b/api/graphql/graph/label.generated.go @@ -13,15 +13,15 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/git-bug/git-bug/api/graphql/models" - "github.com/git-bug/git-bug/entities/bug" + "github.com/git-bug/git-bug/entities/common" "github.com/vektah/gqlparser/v2/ast" ) // region ************************** generated!.gotpl ************************** type LabelResolver interface { - Name(ctx context.Context, obj *bug.Label) (string, error) - Color(ctx context.Context, obj *bug.Label) (*color.RGBA, error) + Name(ctx context.Context, obj *common.Label) (string, error) + Color(ctx context.Context, obj *common.Label) (*color.RGBA, error) } // endregion ************************** generated!.gotpl ************************** @@ -36,7 +36,7 @@ type LabelResolver interface { // region **************************** field.gotpl ***************************** -func (ec *executionContext) _Label_name(ctx context.Context, field graphql.CollectedField, obj *bug.Label) (ret graphql.Marshaler) { +func (ec *executionContext) _Label_name(ctx context.Context, field graphql.CollectedField, obj *common.Label) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Label_name(ctx, field) if err != nil { return graphql.Null @@ -67,7 +67,7 @@ func (ec *executionContext) _Label_name(ctx context.Context, field graphql.Colle return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Label_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Label_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Label", Field: field, @@ -80,7 +80,7 @@ func (ec *executionContext) fieldContext_Label_name(ctx context.Context, field g return fc, nil } -func (ec *executionContext) _Label_color(ctx context.Context, field graphql.CollectedField, obj *bug.Label) (ret graphql.Marshaler) { +func (ec *executionContext) _Label_color(ctx context.Context, field graphql.CollectedField, obj *common.Label) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Label_color(ctx, field) if err != nil { return graphql.Null @@ -111,7 +111,7 @@ func (ec *executionContext) _Label_color(ctx context.Context, field graphql.Coll return ec.marshalNColor2ᚖimageᚋcolorᚐRGBA(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Label_color(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Label_color(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Label", Field: field, @@ -160,10 +160,10 @@ func (ec *executionContext) _LabelConnection_edges(ctx context.Context, field gr } res := resTmp.([]*models.LabelEdge) fc.Result = res - return ec.marshalNLabelEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNLabelEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LabelConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LabelConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LabelConnection", Field: field, @@ -208,12 +208,12 @@ func (ec *executionContext) _LabelConnection_nodes(ctx context.Context, field gr } return graphql.Null } - res := resTmp.([]bug.Label) + res := resTmp.([]common.Label) fc.Result = res - return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabelᚄ(ctx, field.Selections, res) + return ec.marshalNLabel2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐLabelᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LabelConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LabelConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LabelConnection", Field: field, @@ -260,10 +260,10 @@ func (ec *executionContext) _LabelConnection_pageInfo(ctx context.Context, field } res := resTmp.(*models.PageInfo) fc.Result = res - return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LabelConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LabelConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LabelConnection", Field: field, @@ -317,7 +317,7 @@ func (ec *executionContext) _LabelConnection_totalCount(ctx context.Context, fie return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LabelConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LabelConnection_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LabelConnection", Field: field, @@ -361,7 +361,7 @@ func (ec *executionContext) _LabelEdge_cursor(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LabelEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LabelEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LabelEdge", Field: field, @@ -400,12 +400,12 @@ func (ec *executionContext) _LabelEdge_node(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.(bug.Label) + res := resTmp.(common.Label) fc.Result = res - return ec.marshalNLabel2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabel(ctx, field.Selections, res) + return ec.marshalNLabel2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐLabel(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LabelEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LabelEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LabelEdge", Field: field, @@ -438,7 +438,7 @@ func (ec *executionContext) fieldContext_LabelEdge_node(ctx context.Context, fie var labelImplementors = []string{"Label"} -func (ec *executionContext) _Label(ctx context.Context, sel ast.SelectionSet, obj *bug.Label) graphql.Marshaler { +func (ec *executionContext) _Label(ctx context.Context, sel ast.SelectionSet, obj *common.Label) graphql.Marshaler { fields := graphql.CollectFields(ec.OperationContext, sel, labelImplementors) out := graphql.NewFieldSet(fields) @@ -644,11 +644,11 @@ func (ec *executionContext) _LabelEdge(ctx context.Context, sel ast.SelectionSet // region ***************************** type.gotpl ***************************** -func (ec *executionContext) marshalNLabel2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabel(ctx context.Context, sel ast.SelectionSet, v bug.Label) graphql.Marshaler { +func (ec *executionContext) marshalNLabel2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐLabel(ctx context.Context, sel ast.SelectionSet, v common.Label) graphql.Marshaler { return ec._Label(ctx, sel, &v) } -func (ec *executionContext) marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabelᚄ(ctx context.Context, sel ast.SelectionSet, v []bug.Label) graphql.Marshaler { +func (ec *executionContext) marshalNLabel2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐLabelᚄ(ctx context.Context, sel ast.SelectionSet, v []common.Label) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -672,7 +672,7 @@ func (ec *executionContext) marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑ if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNLabel2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabel(ctx, sel, v[i]) + ret[i] = ec.marshalNLabel2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐLabel(ctx, sel, v[i]) } if isLen1 { f(i) @@ -692,11 +692,11 @@ func (ec *executionContext) marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑ return ret } -func (ec *executionContext) marshalNLabelConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelConnection(ctx context.Context, sel ast.SelectionSet, v models.LabelConnection) graphql.Marshaler { +func (ec *executionContext) marshalNLabelConnection2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelConnection(ctx context.Context, sel ast.SelectionSet, v models.LabelConnection) graphql.Marshaler { return ec._LabelConnection(ctx, sel, &v) } -func (ec *executionContext) marshalNLabelConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelConnection(ctx context.Context, sel ast.SelectionSet, v *models.LabelConnection) graphql.Marshaler { +func (ec *executionContext) marshalNLabelConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelConnection(ctx context.Context, sel ast.SelectionSet, v *models.LabelConnection) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -706,7 +706,7 @@ func (ec *executionContext) marshalNLabelConnection2ᚖgithubᚗcomᚋMichaelMur return ec._LabelConnection(ctx, sel, v) } -func (ec *executionContext) marshalNLabelEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.LabelEdge) graphql.Marshaler { +func (ec *executionContext) marshalNLabelEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.LabelEdge) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -730,7 +730,7 @@ func (ec *executionContext) marshalNLabelEdge2ᚕᚖgithubᚗcomᚋMichaelMure if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNLabelEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelEdge(ctx, sel, v[i]) + ret[i] = ec.marshalNLabelEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelEdge(ctx, sel, v[i]) } if isLen1 { f(i) @@ -750,7 +750,7 @@ func (ec *executionContext) marshalNLabelEdge2ᚕᚖgithubᚗcomᚋMichaelMure return ret } -func (ec *executionContext) marshalNLabelEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelEdge(ctx context.Context, sel ast.SelectionSet, v *models.LabelEdge) graphql.Marshaler { +func (ec *executionContext) marshalNLabelEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelEdge(ctx context.Context, sel ast.SelectionSet, v *models.LabelEdge) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") diff --git a/api/graphql/graph/mutations.generated.go b/api/graphql/graph/mutations.generated.go index 1316b407..48a31d2a 100644 --- a/api/graphql/graph/mutations.generated.go +++ b/api/graphql/graph/mutations.generated.go @@ -13,6 +13,7 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/git-bug/git-bug/api/graphql/models" "github.com/git-bug/git-bug/entities/bug" + "github.com/git-bug/git-bug/entities/common" "github.com/vektah/gqlparser/v2/ast" ) @@ -58,7 +59,7 @@ func (ec *executionContext) _AddCommentAndCloseBugPayload_clientMutationId(ctx c return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentAndCloseBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentAndCloseBugPayload_clientMutationId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentAndCloseBugPayload", Field: field, @@ -99,10 +100,10 @@ func (ec *executionContext) _AddCommentAndCloseBugPayload_bug(ctx context.Contex } res := resTmp.(models.BugWrapper) fc.Result = res - return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) + return ec.marshalNBug2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentAndCloseBugPayload_bug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentAndCloseBugPayload_bug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentAndCloseBugPayload", Field: field, @@ -171,10 +172,10 @@ func (ec *executionContext) _AddCommentAndCloseBugPayload_commentOperation(ctx c } res := resTmp.(*bug.AddCommentOperation) fc.Result = res - return ec.marshalNAddCommentOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐAddCommentOperation(ctx, field.Selections, res) + return ec.marshalNAddCommentOperation2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐAddCommentOperation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentAndCloseBugPayload_commentOperation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentAndCloseBugPayload_commentOperation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentAndCloseBugPayload", Field: field, @@ -227,10 +228,10 @@ func (ec *executionContext) _AddCommentAndCloseBugPayload_statusOperation(ctx co } res := resTmp.(*bug.SetStatusOperation) fc.Result = res - return ec.marshalNSetStatusOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐSetStatusOperation(ctx, field.Selections, res) + return ec.marshalNSetStatusOperation2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐSetStatusOperation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentAndCloseBugPayload_statusOperation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentAndCloseBugPayload_statusOperation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentAndCloseBugPayload", Field: field, @@ -281,7 +282,7 @@ func (ec *executionContext) _AddCommentAndReopenBugPayload_clientMutationId(ctx return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentAndReopenBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentAndReopenBugPayload_clientMutationId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentAndReopenBugPayload", Field: field, @@ -322,10 +323,10 @@ func (ec *executionContext) _AddCommentAndReopenBugPayload_bug(ctx context.Conte } res := resTmp.(models.BugWrapper) fc.Result = res - return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) + return ec.marshalNBug2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentAndReopenBugPayload_bug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentAndReopenBugPayload_bug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentAndReopenBugPayload", Field: field, @@ -394,10 +395,10 @@ func (ec *executionContext) _AddCommentAndReopenBugPayload_commentOperation(ctx } res := resTmp.(*bug.AddCommentOperation) fc.Result = res - return ec.marshalNAddCommentOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐAddCommentOperation(ctx, field.Selections, res) + return ec.marshalNAddCommentOperation2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐAddCommentOperation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentAndReopenBugPayload_commentOperation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentAndReopenBugPayload_commentOperation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentAndReopenBugPayload", Field: field, @@ -450,10 +451,10 @@ func (ec *executionContext) _AddCommentAndReopenBugPayload_statusOperation(ctx c } res := resTmp.(*bug.SetStatusOperation) fc.Result = res - return ec.marshalNSetStatusOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐSetStatusOperation(ctx, field.Selections, res) + return ec.marshalNSetStatusOperation2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐSetStatusOperation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentAndReopenBugPayload_statusOperation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentAndReopenBugPayload_statusOperation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentAndReopenBugPayload", Field: field, @@ -504,7 +505,7 @@ func (ec *executionContext) _AddCommentPayload_clientMutationId(ctx context.Cont return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentPayload_clientMutationId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentPayload_clientMutationId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentPayload", Field: field, @@ -545,10 +546,10 @@ func (ec *executionContext) _AddCommentPayload_bug(ctx context.Context, field gr } res := resTmp.(models.BugWrapper) fc.Result = res - return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) + return ec.marshalNBug2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentPayload_bug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentPayload_bug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentPayload", Field: field, @@ -617,10 +618,10 @@ func (ec *executionContext) _AddCommentPayload_operation(ctx context.Context, fi } res := resTmp.(*bug.AddCommentOperation) fc.Result = res - return ec.marshalNAddCommentOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐAddCommentOperation(ctx, field.Selections, res) + return ec.marshalNAddCommentOperation2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐAddCommentOperation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentPayload_operation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentPayload_operation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentPayload", Field: field, @@ -673,7 +674,7 @@ func (ec *executionContext) _ChangeLabelPayload_clientMutationId(ctx context.Con return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ChangeLabelPayload_clientMutationId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ChangeLabelPayload_clientMutationId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ChangeLabelPayload", Field: field, @@ -714,10 +715,10 @@ func (ec *executionContext) _ChangeLabelPayload_bug(ctx context.Context, field g } res := resTmp.(models.BugWrapper) fc.Result = res - return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) + return ec.marshalNBug2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ChangeLabelPayload_bug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ChangeLabelPayload_bug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ChangeLabelPayload", Field: field, @@ -786,10 +787,10 @@ func (ec *executionContext) _ChangeLabelPayload_operation(ctx context.Context, f } res := resTmp.(*bug.LabelChangeOperation) fc.Result = res - return ec.marshalNLabelChangeOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabelChangeOperation(ctx, field.Selections, res) + return ec.marshalNLabelChangeOperation2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐLabelChangeOperation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ChangeLabelPayload_operation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ChangeLabelPayload_operation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ChangeLabelPayload", Field: field, @@ -842,10 +843,10 @@ func (ec *executionContext) _ChangeLabelPayload_results(ctx context.Context, fie } res := resTmp.([]*bug.LabelChangeResult) fc.Result = res - return ec.marshalNLabelChangeResult2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabelChangeResult(ctx, field.Selections, res) + return ec.marshalNLabelChangeResult2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐLabelChangeResult(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ChangeLabelPayload_results(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ChangeLabelPayload_results(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ChangeLabelPayload", Field: field, @@ -892,7 +893,7 @@ func (ec *executionContext) _CloseBugPayload_clientMutationId(ctx context.Contex return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloseBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloseBugPayload_clientMutationId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CloseBugPayload", Field: field, @@ -933,10 +934,10 @@ func (ec *executionContext) _CloseBugPayload_bug(ctx context.Context, field grap } res := resTmp.(models.BugWrapper) fc.Result = res - return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) + return ec.marshalNBug2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloseBugPayload_bug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloseBugPayload_bug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CloseBugPayload", Field: field, @@ -1005,10 +1006,10 @@ func (ec *executionContext) _CloseBugPayload_operation(ctx context.Context, fiel } res := resTmp.(*bug.SetStatusOperation) fc.Result = res - return ec.marshalNSetStatusOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐSetStatusOperation(ctx, field.Selections, res) + return ec.marshalNSetStatusOperation2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐSetStatusOperation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CloseBugPayload_operation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CloseBugPayload_operation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CloseBugPayload", Field: field, @@ -1059,7 +1060,7 @@ func (ec *executionContext) _EditCommentPayload_clientMutationId(ctx context.Con return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EditCommentPayload_clientMutationId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EditCommentPayload_clientMutationId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EditCommentPayload", Field: field, @@ -1100,10 +1101,10 @@ func (ec *executionContext) _EditCommentPayload_bug(ctx context.Context, field g } res := resTmp.(models.BugWrapper) fc.Result = res - return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) + return ec.marshalNBug2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EditCommentPayload_bug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EditCommentPayload_bug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EditCommentPayload", Field: field, @@ -1172,10 +1173,10 @@ func (ec *executionContext) _EditCommentPayload_operation(ctx context.Context, f } res := resTmp.(*bug.EditCommentOperation) fc.Result = res - return ec.marshalNEditCommentOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐEditCommentOperation(ctx, field.Selections, res) + return ec.marshalNEditCommentOperation2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐEditCommentOperation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EditCommentPayload_operation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EditCommentPayload_operation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EditCommentPayload", Field: field, @@ -1228,12 +1229,12 @@ func (ec *executionContext) _LabelChangeResult_label(ctx context.Context, field } return graphql.Null } - res := resTmp.(bug.Label) + res := resTmp.(common.Label) fc.Result = res - return ec.marshalNLabel2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabel(ctx, field.Selections, res) + return ec.marshalNLabel2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐLabel(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LabelChangeResult_label(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LabelChangeResult_label(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LabelChangeResult", Field: field, @@ -1280,10 +1281,10 @@ func (ec *executionContext) _LabelChangeResult_status(ctx context.Context, field } res := resTmp.(bug.LabelChangeStatus) fc.Result = res - return ec.marshalNLabelChangeStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabelChangeStatus(ctx, field.Selections, res) + return ec.marshalNLabelChangeStatus2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐLabelChangeStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LabelChangeResult_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LabelChangeResult_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LabelChangeResult", Field: field, @@ -1324,7 +1325,7 @@ func (ec *executionContext) _NewBugPayload_clientMutationId(ctx context.Context, return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewBugPayload_clientMutationId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NewBugPayload", Field: field, @@ -1365,10 +1366,10 @@ func (ec *executionContext) _NewBugPayload_bug(ctx context.Context, field graphq } res := resTmp.(models.BugWrapper) fc.Result = res - return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) + return ec.marshalNBug2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewBugPayload_bug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewBugPayload_bug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NewBugPayload", Field: field, @@ -1437,10 +1438,10 @@ func (ec *executionContext) _NewBugPayload_operation(ctx context.Context, field } res := resTmp.(*bug.CreateOperation) fc.Result = res - return ec.marshalNCreateOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐCreateOperation(ctx, field.Selections, res) + return ec.marshalNCreateOperation2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐCreateOperation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NewBugPayload_operation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NewBugPayload_operation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NewBugPayload", Field: field, @@ -1495,7 +1496,7 @@ func (ec *executionContext) _OpenBugPayload_clientMutationId(ctx context.Context return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OpenBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OpenBugPayload_clientMutationId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "OpenBugPayload", Field: field, @@ -1536,10 +1537,10 @@ func (ec *executionContext) _OpenBugPayload_bug(ctx context.Context, field graph } res := resTmp.(models.BugWrapper) fc.Result = res - return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) + return ec.marshalNBug2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OpenBugPayload_bug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OpenBugPayload_bug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "OpenBugPayload", Field: field, @@ -1608,10 +1609,10 @@ func (ec *executionContext) _OpenBugPayload_operation(ctx context.Context, field } res := resTmp.(*bug.SetStatusOperation) fc.Result = res - return ec.marshalNSetStatusOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐSetStatusOperation(ctx, field.Selections, res) + return ec.marshalNSetStatusOperation2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐSetStatusOperation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OpenBugPayload_operation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OpenBugPayload_operation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "OpenBugPayload", Field: field, @@ -1662,7 +1663,7 @@ func (ec *executionContext) _SetTitlePayload_clientMutationId(ctx context.Contex return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SetTitlePayload_clientMutationId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SetTitlePayload_clientMutationId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SetTitlePayload", Field: field, @@ -1703,10 +1704,10 @@ func (ec *executionContext) _SetTitlePayload_bug(ctx context.Context, field grap } res := resTmp.(models.BugWrapper) fc.Result = res - return ec.marshalNBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) + return ec.marshalNBug2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SetTitlePayload_bug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SetTitlePayload_bug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SetTitlePayload", Field: field, @@ -1775,10 +1776,10 @@ func (ec *executionContext) _SetTitlePayload_operation(ctx context.Context, fiel } res := resTmp.(*bug.SetTitleOperation) fc.Result = res - return ec.marshalNSetTitleOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐSetTitleOperation(ctx, field.Selections, res) + return ec.marshalNSetTitleOperation2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐSetTitleOperation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SetTitlePayload_operation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SetTitlePayload_operation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SetTitlePayload", Field: field, @@ -1822,8 +1823,6 @@ func (ec *executionContext) unmarshalInputAddCommentAndCloseBugInput(ctx context } switch k { case "clientMutationId": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clientMutationId")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -1831,8 +1830,6 @@ func (ec *executionContext) unmarshalInputAddCommentAndCloseBugInput(ctx context } it.ClientMutationID = data case "repoRef": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repoRef")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -1840,8 +1837,6 @@ func (ec *executionContext) unmarshalInputAddCommentAndCloseBugInput(ctx context } it.RepoRef = data case "prefix": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("prefix")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -1849,8 +1844,6 @@ func (ec *executionContext) unmarshalInputAddCommentAndCloseBugInput(ctx context } it.Prefix = data case "message": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("message")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -1858,10 +1851,8 @@ func (ec *executionContext) unmarshalInputAddCommentAndCloseBugInput(ctx context } it.Message = data case "files": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("files")) - data, err := ec.unmarshalOHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, v) + data, err := ec.unmarshalOHash2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, v) if err != nil { return it, err } @@ -1887,8 +1878,6 @@ func (ec *executionContext) unmarshalInputAddCommentAndReopenBugInput(ctx contex } switch k { case "clientMutationId": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clientMutationId")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -1896,8 +1885,6 @@ func (ec *executionContext) unmarshalInputAddCommentAndReopenBugInput(ctx contex } it.ClientMutationID = data case "repoRef": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repoRef")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -1905,8 +1892,6 @@ func (ec *executionContext) unmarshalInputAddCommentAndReopenBugInput(ctx contex } it.RepoRef = data case "prefix": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("prefix")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -1914,8 +1899,6 @@ func (ec *executionContext) unmarshalInputAddCommentAndReopenBugInput(ctx contex } it.Prefix = data case "message": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("message")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -1923,10 +1906,8 @@ func (ec *executionContext) unmarshalInputAddCommentAndReopenBugInput(ctx contex } it.Message = data case "files": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("files")) - data, err := ec.unmarshalOHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, v) + data, err := ec.unmarshalOHash2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, v) if err != nil { return it, err } @@ -1952,8 +1933,6 @@ func (ec *executionContext) unmarshalInputAddCommentInput(ctx context.Context, o } switch k { case "clientMutationId": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clientMutationId")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -1961,8 +1940,6 @@ func (ec *executionContext) unmarshalInputAddCommentInput(ctx context.Context, o } it.ClientMutationID = data case "repoRef": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repoRef")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -1970,8 +1947,6 @@ func (ec *executionContext) unmarshalInputAddCommentInput(ctx context.Context, o } it.RepoRef = data case "prefix": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("prefix")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -1979,8 +1954,6 @@ func (ec *executionContext) unmarshalInputAddCommentInput(ctx context.Context, o } it.Prefix = data case "message": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("message")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -1988,10 +1961,8 @@ func (ec *executionContext) unmarshalInputAddCommentInput(ctx context.Context, o } it.Message = data case "files": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("files")) - data, err := ec.unmarshalOHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, v) + data, err := ec.unmarshalOHash2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, v) if err != nil { return it, err } @@ -2017,8 +1988,6 @@ func (ec *executionContext) unmarshalInputChangeLabelInput(ctx context.Context, } switch k { case "clientMutationId": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clientMutationId")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -2026,8 +1995,6 @@ func (ec *executionContext) unmarshalInputChangeLabelInput(ctx context.Context, } it.ClientMutationID = data case "repoRef": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repoRef")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -2035,8 +2002,6 @@ func (ec *executionContext) unmarshalInputChangeLabelInput(ctx context.Context, } it.RepoRef = data case "prefix": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("prefix")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -2044,8 +2009,6 @@ func (ec *executionContext) unmarshalInputChangeLabelInput(ctx context.Context, } it.Prefix = data case "added": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("added")) data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { @@ -2053,8 +2016,6 @@ func (ec *executionContext) unmarshalInputChangeLabelInput(ctx context.Context, } it.Added = data case "Removed": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("Removed")) data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { @@ -2082,8 +2043,6 @@ func (ec *executionContext) unmarshalInputCloseBugInput(ctx context.Context, obj } switch k { case "clientMutationId": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clientMutationId")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -2091,8 +2050,6 @@ func (ec *executionContext) unmarshalInputCloseBugInput(ctx context.Context, obj } it.ClientMutationID = data case "repoRef": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repoRef")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -2100,8 +2057,6 @@ func (ec *executionContext) unmarshalInputCloseBugInput(ctx context.Context, obj } it.RepoRef = data case "prefix": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("prefix")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -2129,8 +2084,6 @@ func (ec *executionContext) unmarshalInputEditCommentInput(ctx context.Context, } switch k { case "clientMutationId": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clientMutationId")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -2138,8 +2091,6 @@ func (ec *executionContext) unmarshalInputEditCommentInput(ctx context.Context, } it.ClientMutationID = data case "repoRef": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repoRef")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -2147,8 +2098,6 @@ func (ec *executionContext) unmarshalInputEditCommentInput(ctx context.Context, } it.RepoRef = data case "targetPrefix": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("targetPrefix")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -2156,8 +2105,6 @@ func (ec *executionContext) unmarshalInputEditCommentInput(ctx context.Context, } it.TargetPrefix = data case "message": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("message")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -2165,10 +2112,8 @@ func (ec *executionContext) unmarshalInputEditCommentInput(ctx context.Context, } it.Message = data case "files": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("files")) - data, err := ec.unmarshalOHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, v) + data, err := ec.unmarshalOHash2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, v) if err != nil { return it, err } @@ -2194,8 +2139,6 @@ func (ec *executionContext) unmarshalInputNewBugInput(ctx context.Context, obj i } switch k { case "clientMutationId": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clientMutationId")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -2203,8 +2146,6 @@ func (ec *executionContext) unmarshalInputNewBugInput(ctx context.Context, obj i } it.ClientMutationID = data case "repoRef": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repoRef")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -2212,8 +2153,6 @@ func (ec *executionContext) unmarshalInputNewBugInput(ctx context.Context, obj i } it.RepoRef = data case "title": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("title")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -2221,8 +2160,6 @@ func (ec *executionContext) unmarshalInputNewBugInput(ctx context.Context, obj i } it.Title = data case "message": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("message")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -2230,10 +2167,8 @@ func (ec *executionContext) unmarshalInputNewBugInput(ctx context.Context, obj i } it.Message = data case "files": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("files")) - data, err := ec.unmarshalOHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, v) + data, err := ec.unmarshalOHash2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, v) if err != nil { return it, err } @@ -2259,8 +2194,6 @@ func (ec *executionContext) unmarshalInputOpenBugInput(ctx context.Context, obj } switch k { case "clientMutationId": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clientMutationId")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -2268,8 +2201,6 @@ func (ec *executionContext) unmarshalInputOpenBugInput(ctx context.Context, obj } it.ClientMutationID = data case "repoRef": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repoRef")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -2277,8 +2208,6 @@ func (ec *executionContext) unmarshalInputOpenBugInput(ctx context.Context, obj } it.RepoRef = data case "prefix": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("prefix")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -2306,8 +2235,6 @@ func (ec *executionContext) unmarshalInputSetTitleInput(ctx context.Context, obj } switch k { case "clientMutationId": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clientMutationId")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -2315,8 +2242,6 @@ func (ec *executionContext) unmarshalInputSetTitleInput(ctx context.Context, obj } it.ClientMutationID = data case "repoRef": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("repoRef")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { @@ -2324,8 +2249,6 @@ func (ec *executionContext) unmarshalInputSetTitleInput(ctx context.Context, obj } it.RepoRef = data case "prefix": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("prefix")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -2333,8 +2256,6 @@ func (ec *executionContext) unmarshalInputSetTitleInput(ctx context.Context, obj } it.Prefix = data case "title": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("title")) data, err := ec.unmarshalNString2string(ctx, v) if err != nil { @@ -2832,16 +2753,16 @@ func (ec *executionContext) _SetTitlePayload(ctx context.Context, sel ast.Select // region ***************************** type.gotpl ***************************** -func (ec *executionContext) unmarshalNAddCommentAndCloseBugInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndCloseBugInput(ctx context.Context, v interface{}) (models.AddCommentAndCloseBugInput, error) { +func (ec *executionContext) unmarshalNAddCommentAndCloseBugInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndCloseBugInput(ctx context.Context, v interface{}) (models.AddCommentAndCloseBugInput, error) { res, err := ec.unmarshalInputAddCommentAndCloseBugInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNAddCommentAndCloseBugPayload2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndCloseBugPayload(ctx context.Context, sel ast.SelectionSet, v models.AddCommentAndCloseBugPayload) graphql.Marshaler { +func (ec *executionContext) marshalNAddCommentAndCloseBugPayload2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndCloseBugPayload(ctx context.Context, sel ast.SelectionSet, v models.AddCommentAndCloseBugPayload) graphql.Marshaler { return ec._AddCommentAndCloseBugPayload(ctx, sel, &v) } -func (ec *executionContext) marshalNAddCommentAndCloseBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndCloseBugPayload(ctx context.Context, sel ast.SelectionSet, v *models.AddCommentAndCloseBugPayload) graphql.Marshaler { +func (ec *executionContext) marshalNAddCommentAndCloseBugPayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndCloseBugPayload(ctx context.Context, sel ast.SelectionSet, v *models.AddCommentAndCloseBugPayload) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -2851,16 +2772,16 @@ func (ec *executionContext) marshalNAddCommentAndCloseBugPayload2ᚖgithubᚗcom return ec._AddCommentAndCloseBugPayload(ctx, sel, v) } -func (ec *executionContext) unmarshalNAddCommentAndReopenBugInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndReopenBugInput(ctx context.Context, v interface{}) (models.AddCommentAndReopenBugInput, error) { +func (ec *executionContext) unmarshalNAddCommentAndReopenBugInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndReopenBugInput(ctx context.Context, v interface{}) (models.AddCommentAndReopenBugInput, error) { res, err := ec.unmarshalInputAddCommentAndReopenBugInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNAddCommentAndReopenBugPayload2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndReopenBugPayload(ctx context.Context, sel ast.SelectionSet, v models.AddCommentAndReopenBugPayload) graphql.Marshaler { +func (ec *executionContext) marshalNAddCommentAndReopenBugPayload2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndReopenBugPayload(ctx context.Context, sel ast.SelectionSet, v models.AddCommentAndReopenBugPayload) graphql.Marshaler { return ec._AddCommentAndReopenBugPayload(ctx, sel, &v) } -func (ec *executionContext) marshalNAddCommentAndReopenBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndReopenBugPayload(ctx context.Context, sel ast.SelectionSet, v *models.AddCommentAndReopenBugPayload) graphql.Marshaler { +func (ec *executionContext) marshalNAddCommentAndReopenBugPayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndReopenBugPayload(ctx context.Context, sel ast.SelectionSet, v *models.AddCommentAndReopenBugPayload) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -2870,16 +2791,16 @@ func (ec *executionContext) marshalNAddCommentAndReopenBugPayload2ᚖgithubᚗco return ec._AddCommentAndReopenBugPayload(ctx, sel, v) } -func (ec *executionContext) unmarshalNAddCommentInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentInput(ctx context.Context, v interface{}) (models.AddCommentInput, error) { +func (ec *executionContext) unmarshalNAddCommentInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentInput(ctx context.Context, v interface{}) (models.AddCommentInput, error) { res, err := ec.unmarshalInputAddCommentInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNAddCommentPayload2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentPayload(ctx context.Context, sel ast.SelectionSet, v models.AddCommentPayload) graphql.Marshaler { +func (ec *executionContext) marshalNAddCommentPayload2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentPayload(ctx context.Context, sel ast.SelectionSet, v models.AddCommentPayload) graphql.Marshaler { return ec._AddCommentPayload(ctx, sel, &v) } -func (ec *executionContext) marshalNAddCommentPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentPayload(ctx context.Context, sel ast.SelectionSet, v *models.AddCommentPayload) graphql.Marshaler { +func (ec *executionContext) marshalNAddCommentPayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentPayload(ctx context.Context, sel ast.SelectionSet, v *models.AddCommentPayload) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -2889,11 +2810,11 @@ func (ec *executionContext) marshalNAddCommentPayload2ᚖgithubᚗcomᚋMichaelM return ec._AddCommentPayload(ctx, sel, v) } -func (ec *executionContext) marshalNChangeLabelPayload2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐChangeLabelPayload(ctx context.Context, sel ast.SelectionSet, v models.ChangeLabelPayload) graphql.Marshaler { +func (ec *executionContext) marshalNChangeLabelPayload2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐChangeLabelPayload(ctx context.Context, sel ast.SelectionSet, v models.ChangeLabelPayload) graphql.Marshaler { return ec._ChangeLabelPayload(ctx, sel, &v) } -func (ec *executionContext) marshalNChangeLabelPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐChangeLabelPayload(ctx context.Context, sel ast.SelectionSet, v *models.ChangeLabelPayload) graphql.Marshaler { +func (ec *executionContext) marshalNChangeLabelPayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐChangeLabelPayload(ctx context.Context, sel ast.SelectionSet, v *models.ChangeLabelPayload) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -2903,16 +2824,16 @@ func (ec *executionContext) marshalNChangeLabelPayload2ᚖgithubᚗcomᚋMichael return ec._ChangeLabelPayload(ctx, sel, v) } -func (ec *executionContext) unmarshalNCloseBugInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCloseBugInput(ctx context.Context, v interface{}) (models.CloseBugInput, error) { +func (ec *executionContext) unmarshalNCloseBugInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCloseBugInput(ctx context.Context, v interface{}) (models.CloseBugInput, error) { res, err := ec.unmarshalInputCloseBugInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNCloseBugPayload2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCloseBugPayload(ctx context.Context, sel ast.SelectionSet, v models.CloseBugPayload) graphql.Marshaler { +func (ec *executionContext) marshalNCloseBugPayload2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCloseBugPayload(ctx context.Context, sel ast.SelectionSet, v models.CloseBugPayload) graphql.Marshaler { return ec._CloseBugPayload(ctx, sel, &v) } -func (ec *executionContext) marshalNCloseBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCloseBugPayload(ctx context.Context, sel ast.SelectionSet, v *models.CloseBugPayload) graphql.Marshaler { +func (ec *executionContext) marshalNCloseBugPayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCloseBugPayload(ctx context.Context, sel ast.SelectionSet, v *models.CloseBugPayload) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -2922,16 +2843,16 @@ func (ec *executionContext) marshalNCloseBugPayload2ᚖgithubᚗcomᚋMichaelMur return ec._CloseBugPayload(ctx, sel, v) } -func (ec *executionContext) unmarshalNEditCommentInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐEditCommentInput(ctx context.Context, v interface{}) (models.EditCommentInput, error) { +func (ec *executionContext) unmarshalNEditCommentInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐEditCommentInput(ctx context.Context, v interface{}) (models.EditCommentInput, error) { res, err := ec.unmarshalInputEditCommentInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNEditCommentPayload2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐEditCommentPayload(ctx context.Context, sel ast.SelectionSet, v models.EditCommentPayload) graphql.Marshaler { +func (ec *executionContext) marshalNEditCommentPayload2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐEditCommentPayload(ctx context.Context, sel ast.SelectionSet, v models.EditCommentPayload) graphql.Marshaler { return ec._EditCommentPayload(ctx, sel, &v) } -func (ec *executionContext) marshalNEditCommentPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐEditCommentPayload(ctx context.Context, sel ast.SelectionSet, v *models.EditCommentPayload) graphql.Marshaler { +func (ec *executionContext) marshalNEditCommentPayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐEditCommentPayload(ctx context.Context, sel ast.SelectionSet, v *models.EditCommentPayload) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -2941,7 +2862,7 @@ func (ec *executionContext) marshalNEditCommentPayload2ᚖgithubᚗcomᚋMichael return ec._EditCommentPayload(ctx, sel, v) } -func (ec *executionContext) marshalNLabelChangeResult2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabelChangeResult(ctx context.Context, sel ast.SelectionSet, v []*bug.LabelChangeResult) graphql.Marshaler { +func (ec *executionContext) marshalNLabelChangeResult2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐLabelChangeResult(ctx context.Context, sel ast.SelectionSet, v []*bug.LabelChangeResult) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -2965,7 +2886,7 @@ func (ec *executionContext) marshalNLabelChangeResult2ᚕᚖgithubᚗcomᚋMicha if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalOLabelChangeResult2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabelChangeResult(ctx, sel, v[i]) + ret[i] = ec.marshalOLabelChangeResult2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐLabelChangeResult(ctx, sel, v[i]) } if isLen1 { f(i) @@ -2979,26 +2900,26 @@ func (ec *executionContext) marshalNLabelChangeResult2ᚕᚖgithubᚗcomᚋMicha return ret } -func (ec *executionContext) unmarshalNLabelChangeStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabelChangeStatus(ctx context.Context, v interface{}) (bug.LabelChangeStatus, error) { +func (ec *executionContext) unmarshalNLabelChangeStatus2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐLabelChangeStatus(ctx context.Context, v interface{}) (bug.LabelChangeStatus, error) { var res bug.LabelChangeStatus err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNLabelChangeStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabelChangeStatus(ctx context.Context, sel ast.SelectionSet, v bug.LabelChangeStatus) graphql.Marshaler { +func (ec *executionContext) marshalNLabelChangeStatus2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐLabelChangeStatus(ctx context.Context, sel ast.SelectionSet, v bug.LabelChangeStatus) graphql.Marshaler { return v } -func (ec *executionContext) unmarshalNNewBugInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐNewBugInput(ctx context.Context, v interface{}) (models.NewBugInput, error) { +func (ec *executionContext) unmarshalNNewBugInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐNewBugInput(ctx context.Context, v interface{}) (models.NewBugInput, error) { res, err := ec.unmarshalInputNewBugInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNNewBugPayload2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐNewBugPayload(ctx context.Context, sel ast.SelectionSet, v models.NewBugPayload) graphql.Marshaler { +func (ec *executionContext) marshalNNewBugPayload2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐNewBugPayload(ctx context.Context, sel ast.SelectionSet, v models.NewBugPayload) graphql.Marshaler { return ec._NewBugPayload(ctx, sel, &v) } -func (ec *executionContext) marshalNNewBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐNewBugPayload(ctx context.Context, sel ast.SelectionSet, v *models.NewBugPayload) graphql.Marshaler { +func (ec *executionContext) marshalNNewBugPayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐNewBugPayload(ctx context.Context, sel ast.SelectionSet, v *models.NewBugPayload) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -3008,16 +2929,16 @@ func (ec *executionContext) marshalNNewBugPayload2ᚖgithubᚗcomᚋMichaelMure return ec._NewBugPayload(ctx, sel, v) } -func (ec *executionContext) unmarshalNOpenBugInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOpenBugInput(ctx context.Context, v interface{}) (models.OpenBugInput, error) { +func (ec *executionContext) unmarshalNOpenBugInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOpenBugInput(ctx context.Context, v interface{}) (models.OpenBugInput, error) { res, err := ec.unmarshalInputOpenBugInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNOpenBugPayload2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOpenBugPayload(ctx context.Context, sel ast.SelectionSet, v models.OpenBugPayload) graphql.Marshaler { +func (ec *executionContext) marshalNOpenBugPayload2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOpenBugPayload(ctx context.Context, sel ast.SelectionSet, v models.OpenBugPayload) graphql.Marshaler { return ec._OpenBugPayload(ctx, sel, &v) } -func (ec *executionContext) marshalNOpenBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOpenBugPayload(ctx context.Context, sel ast.SelectionSet, v *models.OpenBugPayload) graphql.Marshaler { +func (ec *executionContext) marshalNOpenBugPayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOpenBugPayload(ctx context.Context, sel ast.SelectionSet, v *models.OpenBugPayload) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -3027,16 +2948,16 @@ func (ec *executionContext) marshalNOpenBugPayload2ᚖgithubᚗcomᚋMichaelMure return ec._OpenBugPayload(ctx, sel, v) } -func (ec *executionContext) unmarshalNSetTitleInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐSetTitleInput(ctx context.Context, v interface{}) (models.SetTitleInput, error) { +func (ec *executionContext) unmarshalNSetTitleInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐSetTitleInput(ctx context.Context, v interface{}) (models.SetTitleInput, error) { res, err := ec.unmarshalInputSetTitleInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNSetTitlePayload2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐSetTitlePayload(ctx context.Context, sel ast.SelectionSet, v models.SetTitlePayload) graphql.Marshaler { +func (ec *executionContext) marshalNSetTitlePayload2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐSetTitlePayload(ctx context.Context, sel ast.SelectionSet, v models.SetTitlePayload) graphql.Marshaler { return ec._SetTitlePayload(ctx, sel, &v) } -func (ec *executionContext) marshalNSetTitlePayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐSetTitlePayload(ctx context.Context, sel ast.SelectionSet, v *models.SetTitlePayload) graphql.Marshaler { +func (ec *executionContext) marshalNSetTitlePayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐSetTitlePayload(ctx context.Context, sel ast.SelectionSet, v *models.SetTitlePayload) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -3046,7 +2967,7 @@ func (ec *executionContext) marshalNSetTitlePayload2ᚖgithubᚗcomᚋMichaelMur return ec._SetTitlePayload(ctx, sel, v) } -func (ec *executionContext) unmarshalOChangeLabelInput2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐChangeLabelInput(ctx context.Context, v interface{}) (*models.ChangeLabelInput, error) { +func (ec *executionContext) unmarshalOChangeLabelInput2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐChangeLabelInput(ctx context.Context, v interface{}) (*models.ChangeLabelInput, error) { if v == nil { return nil, nil } @@ -3054,7 +2975,7 @@ func (ec *executionContext) unmarshalOChangeLabelInput2ᚖgithubᚗcomᚋMichael return &res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOLabelChangeResult2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabelChangeResult(ctx context.Context, sel ast.SelectionSet, v *bug.LabelChangeResult) graphql.Marshaler { +func (ec *executionContext) marshalOLabelChangeResult2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐLabelChangeResult(ctx context.Context, sel ast.SelectionSet, v *bug.LabelChangeResult) graphql.Marshaler { if v == nil { return graphql.Null } diff --git a/api/graphql/graph/operations.generated.go b/api/graphql/graph/operations.generated.go index feb8878d..f8acf02c 100644 --- a/api/graphql/graph/operations.generated.go +++ b/api/graphql/graph/operations.generated.go @@ -89,10 +89,10 @@ func (ec *executionContext) _AddCommentOperation_id(ctx context.Context, field g } res := resTmp.(entity.Id) fc.Result = res - return ec.marshalNID2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res) + return ec.marshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentOperation_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentOperation_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentOperation", Field: field, @@ -133,10 +133,10 @@ func (ec *executionContext) _AddCommentOperation_author(ctx context.Context, fie } res := resTmp.(models.IdentityWrapper) fc.Result = res - return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) + return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentOperation_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentOperation_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentOperation", Field: field, @@ -198,7 +198,7 @@ func (ec *executionContext) _AddCommentOperation_date(ctx context.Context, field return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentOperation_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentOperation_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentOperation", Field: field, @@ -242,7 +242,7 @@ func (ec *executionContext) _AddCommentOperation_message(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentOperation_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentOperation_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentOperation", Field: field, @@ -283,10 +283,10 @@ func (ec *executionContext) _AddCommentOperation_files(ctx context.Context, fiel } res := resTmp.([]repository.Hash) fc.Result = res - return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res) + return ec.marshalNHash2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentOperation_files(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentOperation_files(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentOperation", Field: field, @@ -327,10 +327,10 @@ func (ec *executionContext) _CreateOperation_id(ctx context.Context, field graph } res := resTmp.(entity.Id) fc.Result = res - return ec.marshalNID2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res) + return ec.marshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CreateOperation_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CreateOperation_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CreateOperation", Field: field, @@ -371,10 +371,10 @@ func (ec *executionContext) _CreateOperation_author(ctx context.Context, field g } res := resTmp.(models.IdentityWrapper) fc.Result = res - return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) + return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CreateOperation_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CreateOperation_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CreateOperation", Field: field, @@ -436,7 +436,7 @@ func (ec *executionContext) _CreateOperation_date(ctx context.Context, field gra return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CreateOperation_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CreateOperation_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CreateOperation", Field: field, @@ -480,7 +480,7 @@ func (ec *executionContext) _CreateOperation_title(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CreateOperation_title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CreateOperation_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CreateOperation", Field: field, @@ -524,7 +524,7 @@ func (ec *executionContext) _CreateOperation_message(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CreateOperation_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CreateOperation_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CreateOperation", Field: field, @@ -565,10 +565,10 @@ func (ec *executionContext) _CreateOperation_files(ctx context.Context, field gr } res := resTmp.([]repository.Hash) fc.Result = res - return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res) + return ec.marshalNHash2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CreateOperation_files(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CreateOperation_files(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CreateOperation", Field: field, @@ -609,10 +609,10 @@ func (ec *executionContext) _EditCommentOperation_id(ctx context.Context, field } res := resTmp.(entity.Id) fc.Result = res - return ec.marshalNID2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res) + return ec.marshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EditCommentOperation_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EditCommentOperation_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EditCommentOperation", Field: field, @@ -653,10 +653,10 @@ func (ec *executionContext) _EditCommentOperation_author(ctx context.Context, fi } res := resTmp.(models.IdentityWrapper) fc.Result = res - return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) + return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EditCommentOperation_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EditCommentOperation_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EditCommentOperation", Field: field, @@ -718,7 +718,7 @@ func (ec *executionContext) _EditCommentOperation_date(ctx context.Context, fiel return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EditCommentOperation_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EditCommentOperation_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EditCommentOperation", Field: field, @@ -762,7 +762,7 @@ func (ec *executionContext) _EditCommentOperation_target(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EditCommentOperation_target(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EditCommentOperation_target(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EditCommentOperation", Field: field, @@ -806,7 +806,7 @@ func (ec *executionContext) _EditCommentOperation_message(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EditCommentOperation_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EditCommentOperation_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EditCommentOperation", Field: field, @@ -847,10 +847,10 @@ func (ec *executionContext) _EditCommentOperation_files(ctx context.Context, fie } res := resTmp.([]repository.Hash) fc.Result = res - return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res) + return ec.marshalNHash2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EditCommentOperation_files(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EditCommentOperation_files(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EditCommentOperation", Field: field, @@ -891,10 +891,10 @@ func (ec *executionContext) _LabelChangeOperation_id(ctx context.Context, field } res := resTmp.(entity.Id) fc.Result = res - return ec.marshalNID2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res) + return ec.marshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LabelChangeOperation_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LabelChangeOperation_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LabelChangeOperation", Field: field, @@ -935,10 +935,10 @@ func (ec *executionContext) _LabelChangeOperation_author(ctx context.Context, fi } res := resTmp.(models.IdentityWrapper) fc.Result = res - return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) + return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LabelChangeOperation_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LabelChangeOperation_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LabelChangeOperation", Field: field, @@ -1000,7 +1000,7 @@ func (ec *executionContext) _LabelChangeOperation_date(ctx context.Context, fiel return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LabelChangeOperation_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LabelChangeOperation_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LabelChangeOperation", Field: field, @@ -1039,12 +1039,12 @@ func (ec *executionContext) _LabelChangeOperation_added(ctx context.Context, fie } return graphql.Null } - res := resTmp.([]bug.Label) + res := resTmp.([]common.Label) fc.Result = res - return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabelᚄ(ctx, field.Selections, res) + return ec.marshalNLabel2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐLabelᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LabelChangeOperation_added(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LabelChangeOperation_added(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LabelChangeOperation", Field: field, @@ -1089,12 +1089,12 @@ func (ec *executionContext) _LabelChangeOperation_removed(ctx context.Context, f } return graphql.Null } - res := resTmp.([]bug.Label) + res := resTmp.([]common.Label) fc.Result = res - return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabelᚄ(ctx, field.Selections, res) + return ec.marshalNLabel2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐLabelᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LabelChangeOperation_removed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LabelChangeOperation_removed(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LabelChangeOperation", Field: field, @@ -1141,10 +1141,10 @@ func (ec *executionContext) _OperationConnection_edges(ctx context.Context, fiel } res := resTmp.([]*models.OperationEdge) fc.Result = res - return ec.marshalNOperationEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOperationEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNOperationEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOperationEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OperationConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OperationConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "OperationConnection", Field: field, @@ -1191,10 +1191,10 @@ func (ec *executionContext) _OperationConnection_nodes(ctx context.Context, fiel } res := resTmp.([]dag.Operation) fc.Result = res - return ec.marshalNOperation2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚋdagᚐOperationᚄ(ctx, field.Selections, res) + return ec.marshalNOperation2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚋdagᚐOperationᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OperationConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OperationConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "OperationConnection", Field: field, @@ -1235,10 +1235,10 @@ func (ec *executionContext) _OperationConnection_pageInfo(ctx context.Context, f } res := resTmp.(*models.PageInfo) fc.Result = res - return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OperationConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OperationConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "OperationConnection", Field: field, @@ -1292,7 +1292,7 @@ func (ec *executionContext) _OperationConnection_totalCount(ctx context.Context, return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OperationConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OperationConnection_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "OperationConnection", Field: field, @@ -1336,7 +1336,7 @@ func (ec *executionContext) _OperationEdge_cursor(ctx context.Context, field gra return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OperationEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OperationEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "OperationEdge", Field: field, @@ -1377,10 +1377,10 @@ func (ec *executionContext) _OperationEdge_node(ctx context.Context, field graph } res := resTmp.(dag.Operation) fc.Result = res - return ec.marshalNOperation2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚋdagᚐOperation(ctx, field.Selections, res) + return ec.marshalNOperation2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚋdagᚐOperation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OperationEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OperationEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "OperationEdge", Field: field, @@ -1421,10 +1421,10 @@ func (ec *executionContext) _SetStatusOperation_id(ctx context.Context, field gr } res := resTmp.(entity.Id) fc.Result = res - return ec.marshalNID2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res) + return ec.marshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SetStatusOperation_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SetStatusOperation_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SetStatusOperation", Field: field, @@ -1465,10 +1465,10 @@ func (ec *executionContext) _SetStatusOperation_author(ctx context.Context, fiel } res := resTmp.(models.IdentityWrapper) fc.Result = res - return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) + return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SetStatusOperation_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SetStatusOperation_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SetStatusOperation", Field: field, @@ -1530,7 +1530,7 @@ func (ec *executionContext) _SetStatusOperation_date(ctx context.Context, field return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SetStatusOperation_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SetStatusOperation_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SetStatusOperation", Field: field, @@ -1571,10 +1571,10 @@ func (ec *executionContext) _SetStatusOperation_status(ctx context.Context, fiel } res := resTmp.(common.Status) fc.Result = res - return ec.marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋcommonᚐStatus(ctx, field.Selections, res) + return ec.marshalNStatus2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SetStatusOperation_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SetStatusOperation_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SetStatusOperation", Field: field, @@ -1615,10 +1615,10 @@ func (ec *executionContext) _SetTitleOperation_id(ctx context.Context, field gra } res := resTmp.(entity.Id) fc.Result = res - return ec.marshalNID2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res) + return ec.marshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SetTitleOperation_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SetTitleOperation_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SetTitleOperation", Field: field, @@ -1659,10 +1659,10 @@ func (ec *executionContext) _SetTitleOperation_author(ctx context.Context, field } res := resTmp.(models.IdentityWrapper) fc.Result = res - return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) + return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SetTitleOperation_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SetTitleOperation_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SetTitleOperation", Field: field, @@ -1724,7 +1724,7 @@ func (ec *executionContext) _SetTitleOperation_date(ctx context.Context, field g return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SetTitleOperation_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SetTitleOperation_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SetTitleOperation", Field: field, @@ -1768,7 +1768,7 @@ func (ec *executionContext) _SetTitleOperation_title(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SetTitleOperation_title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SetTitleOperation_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SetTitleOperation", Field: field, @@ -1812,7 +1812,7 @@ func (ec *executionContext) _SetTitleOperation_was(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SetTitleOperation_was(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SetTitleOperation_was(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SetTitleOperation", Field: field, @@ -2740,7 +2740,7 @@ func (ec *executionContext) _SetTitleOperation(ctx context.Context, sel ast.Sele // region ***************************** type.gotpl ***************************** -func (ec *executionContext) marshalNAddCommentOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐAddCommentOperation(ctx context.Context, sel ast.SelectionSet, v *bug.AddCommentOperation) graphql.Marshaler { +func (ec *executionContext) marshalNAddCommentOperation2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐAddCommentOperation(ctx context.Context, sel ast.SelectionSet, v *bug.AddCommentOperation) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -2750,7 +2750,7 @@ func (ec *executionContext) marshalNAddCommentOperation2ᚖgithubᚗcomᚋMichae return ec._AddCommentOperation(ctx, sel, v) } -func (ec *executionContext) marshalNCreateOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐCreateOperation(ctx context.Context, sel ast.SelectionSet, v *bug.CreateOperation) graphql.Marshaler { +func (ec *executionContext) marshalNCreateOperation2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐCreateOperation(ctx context.Context, sel ast.SelectionSet, v *bug.CreateOperation) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -2760,7 +2760,7 @@ func (ec *executionContext) marshalNCreateOperation2ᚖgithubᚗcomᚋMichaelMur return ec._CreateOperation(ctx, sel, v) } -func (ec *executionContext) marshalNEditCommentOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐEditCommentOperation(ctx context.Context, sel ast.SelectionSet, v *bug.EditCommentOperation) graphql.Marshaler { +func (ec *executionContext) marshalNEditCommentOperation2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐEditCommentOperation(ctx context.Context, sel ast.SelectionSet, v *bug.EditCommentOperation) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -2770,7 +2770,7 @@ func (ec *executionContext) marshalNEditCommentOperation2ᚖgithubᚗcomᚋMicha return ec._EditCommentOperation(ctx, sel, v) } -func (ec *executionContext) marshalNLabelChangeOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabelChangeOperation(ctx context.Context, sel ast.SelectionSet, v *bug.LabelChangeOperation) graphql.Marshaler { +func (ec *executionContext) marshalNLabelChangeOperation2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐLabelChangeOperation(ctx context.Context, sel ast.SelectionSet, v *bug.LabelChangeOperation) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -2780,7 +2780,7 @@ func (ec *executionContext) marshalNLabelChangeOperation2ᚖgithubᚗcomᚋMicha return ec._LabelChangeOperation(ctx, sel, v) } -func (ec *executionContext) marshalNOperation2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚋdagᚐOperation(ctx context.Context, sel ast.SelectionSet, v dag.Operation) graphql.Marshaler { +func (ec *executionContext) marshalNOperation2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚋdagᚐOperation(ctx context.Context, sel ast.SelectionSet, v dag.Operation) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -2790,7 +2790,7 @@ func (ec *executionContext) marshalNOperation2githubᚗcomᚋMichaelMureᚋgit return ec._Operation(ctx, sel, v) } -func (ec *executionContext) marshalNOperation2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚋdagᚐOperationᚄ(ctx context.Context, sel ast.SelectionSet, v []dag.Operation) graphql.Marshaler { +func (ec *executionContext) marshalNOperation2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚋdagᚐOperationᚄ(ctx context.Context, sel ast.SelectionSet, v []dag.Operation) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -2814,7 +2814,7 @@ func (ec *executionContext) marshalNOperation2ᚕgithubᚗcomᚋMichaelMureᚋgi if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNOperation2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚋdagᚐOperation(ctx, sel, v[i]) + ret[i] = ec.marshalNOperation2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚋdagᚐOperation(ctx, sel, v[i]) } if isLen1 { f(i) @@ -2834,11 +2834,11 @@ func (ec *executionContext) marshalNOperation2ᚕgithubᚗcomᚋMichaelMureᚋgi return ret } -func (ec *executionContext) marshalNOperationConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOperationConnection(ctx context.Context, sel ast.SelectionSet, v models.OperationConnection) graphql.Marshaler { +func (ec *executionContext) marshalNOperationConnection2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋ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ᚋapiᚋgraphqlᚋmodelsᚐOperationConnection(ctx context.Context, sel ast.SelectionSet, v *models.OperationConnection) graphql.Marshaler { +func (ec *executionContext) marshalNOperationConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOperationConnection(ctx context.Context, sel ast.SelectionSet, v *models.OperationConnection) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -2848,7 +2848,7 @@ func (ec *executionContext) marshalNOperationConnection2ᚖgithubᚗcomᚋMichae return ec._OperationConnection(ctx, sel, v) } -func (ec *executionContext) marshalNOperationEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOperationEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.OperationEdge) graphql.Marshaler { +func (ec *executionContext) marshalNOperationEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋ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 @@ -2872,7 +2872,7 @@ func (ec *executionContext) marshalNOperationEdge2ᚕᚖgithubᚗcomᚋMichaelMu if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNOperationEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOperationEdge(ctx, sel, v[i]) + ret[i] = ec.marshalNOperationEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOperationEdge(ctx, sel, v[i]) } if isLen1 { f(i) @@ -2892,7 +2892,7 @@ func (ec *executionContext) marshalNOperationEdge2ᚕᚖgithubᚗcomᚋMichaelMu return ret } -func (ec *executionContext) marshalNOperationEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOperationEdge(ctx context.Context, sel ast.SelectionSet, v *models.OperationEdge) graphql.Marshaler { +func (ec *executionContext) marshalNOperationEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOperationEdge(ctx context.Context, sel ast.SelectionSet, v *models.OperationEdge) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -2902,7 +2902,7 @@ func (ec *executionContext) marshalNOperationEdge2ᚖgithubᚗcomᚋMichaelMure return ec._OperationEdge(ctx, sel, v) } -func (ec *executionContext) marshalNSetStatusOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐSetStatusOperation(ctx context.Context, sel ast.SelectionSet, v *bug.SetStatusOperation) graphql.Marshaler { +func (ec *executionContext) marshalNSetStatusOperation2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐSetStatusOperation(ctx context.Context, sel ast.SelectionSet, v *bug.SetStatusOperation) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -2912,7 +2912,7 @@ func (ec *executionContext) marshalNSetStatusOperation2ᚖgithubᚗcomᚋMichael return ec._SetStatusOperation(ctx, sel, v) } -func (ec *executionContext) marshalNSetTitleOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐSetTitleOperation(ctx context.Context, sel ast.SelectionSet, v *bug.SetTitleOperation) graphql.Marshaler { +func (ec *executionContext) marshalNSetTitleOperation2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐSetTitleOperation(ctx context.Context, sel ast.SelectionSet, v *bug.SetTitleOperation) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") diff --git a/api/graphql/graph/prelude.generated.go b/api/graphql/graph/prelude.generated.go index 6600b364..3c065b5b 100644 --- a/api/graphql/graph/prelude.generated.go +++ b/api/graphql/graph/prelude.generated.go @@ -115,7 +115,7 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -156,7 +156,7 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -200,7 +200,7 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_locations(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -244,7 +244,7 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_args(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -298,7 +298,7 @@ func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_isRepeatable(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -342,7 +342,7 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, @@ -383,7 +383,7 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, @@ -427,7 +427,7 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_isDeprecated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, @@ -468,7 +468,7 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_deprecationReason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, @@ -512,7 +512,7 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -553,7 +553,7 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -597,7 +597,7 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_args(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -651,7 +651,7 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -717,7 +717,7 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_isDeprecated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -758,7 +758,7 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_deprecationReason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -802,7 +802,7 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, @@ -843,7 +843,7 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, @@ -887,7 +887,7 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, @@ -950,7 +950,7 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_defaultValue(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, @@ -991,7 +991,7 @@ func (ec *executionContext) ___Schema_description(ctx context.Context, field gra return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -1035,7 +1035,7 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_types(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -1101,7 +1101,7 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_queryType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -1164,7 +1164,7 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_mutationType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -1227,7 +1227,7 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_subscriptionType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -1293,7 +1293,7 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_directives(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -1349,7 +1349,7 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -1390,7 +1390,7 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -1431,7 +1431,7 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -1538,7 +1538,7 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_interfaces(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -1601,7 +1601,7 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_possibleTypes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -1726,7 +1726,7 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_inputFields(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -1777,7 +1777,7 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_ofType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -1840,7 +1840,7 @@ func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field gr return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_specifiedByURL(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -2206,13 +2206,13 @@ func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.Se return res } -func (ec *executionContext) unmarshalNID2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚐId(ctx context.Context, v interface{}) (entity.Id, error) { +func (ec *executionContext) unmarshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx context.Context, v interface{}) (entity.Id, error) { var res entity.Id err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNID2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚐId(ctx context.Context, sel ast.SelectionSet, v entity.Id) graphql.Marshaler { +func (ec *executionContext) marshalNID2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐId(ctx context.Context, sel ast.SelectionSet, v entity.Id) graphql.Marshaler { return v } diff --git a/api/graphql/graph/repository.generated.go b/api/graphql/graph/repository.generated.go index 99cbbcb6..dd0c28a9 100644 --- a/api/graphql/graph/repository.generated.go +++ b/api/graphql/graph/repository.generated.go @@ -231,7 +231,7 @@ func (ec *executionContext) _Repository_name(ctx context.Context, field graphql. return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Repository_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Repository_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Repository", Field: field, @@ -272,7 +272,7 @@ func (ec *executionContext) _Repository_allBugs(ctx context.Context, field graph } res := resTmp.(*models.BugConnection) fc.Result = res - return ec.marshalNBugConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugConnection(ctx, field.Selections, res) + return ec.marshalNBugConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugConnection(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Repository_allBugs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -334,7 +334,7 @@ func (ec *executionContext) _Repository_bug(ctx context.Context, field graphql.C } res := resTmp.(models.BugWrapper) fc.Result = res - return ec.marshalOBug2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) + return ec.marshalOBug2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐBugWrapper(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Repository_bug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -417,7 +417,7 @@ func (ec *executionContext) _Repository_allIdentities(ctx context.Context, field } res := resTmp.(*models.IdentityConnection) fc.Result = res - return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res) + return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Repository_allIdentities(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -479,7 +479,7 @@ func (ec *executionContext) _Repository_identity(ctx context.Context, field grap } res := resTmp.(models.IdentityWrapper) fc.Result = res - return ec.marshalOIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) + return ec.marshalOIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Repository_identity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -549,10 +549,10 @@ func (ec *executionContext) _Repository_userIdentity(ctx context.Context, field } res := resTmp.(models.IdentityWrapper) fc.Result = res - return ec.marshalOIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) + return ec.marshalOIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Repository_userIdentity(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Repository_userIdentity(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Repository", Field: field, @@ -611,7 +611,7 @@ func (ec *executionContext) _Repository_validLabels(ctx context.Context, field g } res := resTmp.(*models.LabelConnection) fc.Result = res - return ec.marshalNLabelConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelConnection(ctx, field.Selections, res) + return ec.marshalNLabelConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐLabelConnection(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Repository_validLabels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -674,7 +674,7 @@ func (ec *executionContext) _Repository(ctx context.Context, sel ast.SelectionSe case "name": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -743,7 +743,7 @@ func (ec *executionContext) _Repository(ctx context.Context, sel ast.SelectionSe case "bug": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -812,7 +812,7 @@ func (ec *executionContext) _Repository(ctx context.Context, sel ast.SelectionSe case "identity": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -845,7 +845,7 @@ func (ec *executionContext) _Repository(ctx context.Context, sel ast.SelectionSe case "userIdentity": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -938,7 +938,7 @@ func (ec *executionContext) _Repository(ctx context.Context, sel ast.SelectionSe // region ***************************** type.gotpl ***************************** -func (ec *executionContext) marshalORepository2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐRepository(ctx context.Context, sel ast.SelectionSet, v *models.Repository) graphql.Marshaler { +func (ec *executionContext) marshalORepository2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐRepository(ctx context.Context, sel ast.SelectionSet, v *models.Repository) graphql.Marshaler { if v == nil { return graphql.Null } diff --git a/api/graphql/graph/root.generated.go b/api/graphql/graph/root.generated.go index 764a221d..7a99343d 100644 --- a/api/graphql/graph/root.generated.go +++ b/api/graphql/graph/root.generated.go @@ -41,7 +41,7 @@ func (ec *executionContext) field_Mutation_addCommentAndClose_args(ctx context.C var arg0 models.AddCommentAndCloseBugInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNAddCommentAndCloseBugInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndCloseBugInput(ctx, tmp) + arg0, err = ec.unmarshalNAddCommentAndCloseBugInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndCloseBugInput(ctx, tmp) if err != nil { return nil, err } @@ -56,7 +56,7 @@ func (ec *executionContext) field_Mutation_addCommentAndReopen_args(ctx context. var arg0 models.AddCommentAndReopenBugInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNAddCommentAndReopenBugInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndReopenBugInput(ctx, tmp) + arg0, err = ec.unmarshalNAddCommentAndReopenBugInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndReopenBugInput(ctx, tmp) if err != nil { return nil, err } @@ -71,7 +71,7 @@ func (ec *executionContext) field_Mutation_addComment_args(ctx context.Context, var arg0 models.AddCommentInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNAddCommentInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentInput(ctx, tmp) + arg0, err = ec.unmarshalNAddCommentInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentInput(ctx, tmp) if err != nil { return nil, err } @@ -86,7 +86,7 @@ func (ec *executionContext) field_Mutation_changeLabels_args(ctx context.Context var arg0 *models.ChangeLabelInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalOChangeLabelInput2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐChangeLabelInput(ctx, tmp) + arg0, err = ec.unmarshalOChangeLabelInput2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐChangeLabelInput(ctx, tmp) if err != nil { return nil, err } @@ -101,7 +101,7 @@ func (ec *executionContext) field_Mutation_closeBug_args(ctx context.Context, ra var arg0 models.CloseBugInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNCloseBugInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCloseBugInput(ctx, tmp) + arg0, err = ec.unmarshalNCloseBugInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCloseBugInput(ctx, tmp) if err != nil { return nil, err } @@ -116,7 +116,7 @@ func (ec *executionContext) field_Mutation_editComment_args(ctx context.Context, var arg0 models.EditCommentInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNEditCommentInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐEditCommentInput(ctx, tmp) + arg0, err = ec.unmarshalNEditCommentInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐEditCommentInput(ctx, tmp) if err != nil { return nil, err } @@ -131,7 +131,7 @@ func (ec *executionContext) field_Mutation_newBug_args(ctx context.Context, rawA var arg0 models.NewBugInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNNewBugInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐNewBugInput(ctx, tmp) + arg0, err = ec.unmarshalNNewBugInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐNewBugInput(ctx, tmp) if err != nil { return nil, err } @@ -146,7 +146,7 @@ func (ec *executionContext) field_Mutation_openBug_args(ctx context.Context, raw var arg0 models.OpenBugInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNOpenBugInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOpenBugInput(ctx, tmp) + arg0, err = ec.unmarshalNOpenBugInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOpenBugInput(ctx, tmp) if err != nil { return nil, err } @@ -161,7 +161,7 @@ func (ec *executionContext) field_Mutation_setTitle_args(ctx context.Context, ra var arg0 models.SetTitleInput if tmp, ok := rawArgs["input"]; ok { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) - arg0, err = ec.unmarshalNSetTitleInput2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐSetTitleInput(ctx, tmp) + arg0, err = ec.unmarshalNSetTitleInput2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐSetTitleInput(ctx, tmp) if err != nil { return nil, err } @@ -236,7 +236,7 @@ func (ec *executionContext) _Mutation_newBug(ctx context.Context, field graphql. } res := resTmp.(*models.NewBugPayload) fc.Result = res - return ec.marshalNNewBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐNewBugPayload(ctx, field.Selections, res) + return ec.marshalNNewBugPayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐNewBugPayload(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_newBug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -299,7 +299,7 @@ func (ec *executionContext) _Mutation_addComment(ctx context.Context, field grap } res := resTmp.(*models.AddCommentPayload) fc.Result = res - return ec.marshalNAddCommentPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentPayload(ctx, field.Selections, res) + return ec.marshalNAddCommentPayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentPayload(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_addComment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -362,7 +362,7 @@ func (ec *executionContext) _Mutation_addCommentAndClose(ctx context.Context, fi } res := resTmp.(*models.AddCommentAndCloseBugPayload) fc.Result = res - return ec.marshalNAddCommentAndCloseBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndCloseBugPayload(ctx, field.Selections, res) + return ec.marshalNAddCommentAndCloseBugPayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndCloseBugPayload(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_addCommentAndClose(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -427,7 +427,7 @@ func (ec *executionContext) _Mutation_addCommentAndReopen(ctx context.Context, f } res := resTmp.(*models.AddCommentAndReopenBugPayload) fc.Result = res - return ec.marshalNAddCommentAndReopenBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndReopenBugPayload(ctx, field.Selections, res) + return ec.marshalNAddCommentAndReopenBugPayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐAddCommentAndReopenBugPayload(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_addCommentAndReopen(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -492,7 +492,7 @@ func (ec *executionContext) _Mutation_editComment(ctx context.Context, field gra } res := resTmp.(*models.EditCommentPayload) fc.Result = res - return ec.marshalNEditCommentPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐEditCommentPayload(ctx, field.Selections, res) + return ec.marshalNEditCommentPayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐEditCommentPayload(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_editComment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -555,7 +555,7 @@ func (ec *executionContext) _Mutation_changeLabels(ctx context.Context, field gr } res := resTmp.(*models.ChangeLabelPayload) fc.Result = res - return ec.marshalNChangeLabelPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐChangeLabelPayload(ctx, field.Selections, res) + return ec.marshalNChangeLabelPayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐChangeLabelPayload(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_changeLabels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -620,7 +620,7 @@ func (ec *executionContext) _Mutation_openBug(ctx context.Context, field graphql } res := resTmp.(*models.OpenBugPayload) fc.Result = res - return ec.marshalNOpenBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOpenBugPayload(ctx, field.Selections, res) + return ec.marshalNOpenBugPayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐOpenBugPayload(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_openBug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -683,7 +683,7 @@ func (ec *executionContext) _Mutation_closeBug(ctx context.Context, field graphq } res := resTmp.(*models.CloseBugPayload) fc.Result = res - return ec.marshalNCloseBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCloseBugPayload(ctx, field.Selections, res) + return ec.marshalNCloseBugPayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐCloseBugPayload(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_closeBug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -746,7 +746,7 @@ func (ec *executionContext) _Mutation_setTitle(ctx context.Context, field graphq } res := resTmp.(*models.SetTitlePayload) fc.Result = res - return ec.marshalNSetTitlePayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐSetTitlePayload(ctx, field.Selections, res) + return ec.marshalNSetTitlePayload2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐSetTitlePayload(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Mutation_setTitle(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -806,7 +806,7 @@ func (ec *executionContext) _Query_repository(ctx context.Context, field graphql } res := resTmp.(*models.Repository) fc.Result = res - return ec.marshalORepository2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐRepository(ctx, field.Selections, res) + return ec.marshalORepository2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐRepository(ctx, field.Selections, res) } func (ec *executionContext) fieldContext_Query_repository(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { @@ -951,7 +951,7 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query___schema(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -1117,7 +1117,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "repository": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) diff --git a/api/graphql/graph/root_.generated.go b/api/graphql/graph/root_.generated.go index db7dc82b..37789d5c 100644 --- a/api/graphql/graph/root_.generated.go +++ b/api/graphql/graph/root_.generated.go @@ -18,6 +18,7 @@ import ( // NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface. func NewExecutableSchema(cfg Config) graphql.ExecutableSchema { return &executableSchema{ + schema: cfg.Schema, resolvers: cfg.Resolvers, directives: cfg.Directives, complexity: cfg.Complexity, @@ -25,6 +26,7 @@ func NewExecutableSchema(cfg Config) graphql.ExecutableSchema { } type Config struct { + Schema *ast.Schema Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot @@ -372,12 +374,16 @@ type ComplexityRoot struct { } type executableSchema struct { + schema *ast.Schema resolvers ResolverRoot directives DirectiveRoot complexity ComplexityRoot } func (e *executableSchema) Schema() *ast.Schema { + if e.schema != nil { + return e.schema + } return parsedSchema } @@ -1877,14 +1883,14 @@ func (ec *executionContext) introspectSchema() (*introspection.Schema, error) { if ec.DisableIntrospection { return nil, errors.New("introspection disabled") } - return introspection.WrapSchema(parsedSchema), nil + return introspection.WrapSchema(ec.Schema()), nil } 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 introspection.WrapTypeFromDef(ec.Schema(), ec.Schema().Types[name]), nil } var sources = []*ast.Source{ diff --git a/api/graphql/graph/timeline.generated.go b/api/graphql/graph/timeline.generated.go index 2433ccd2..f2945710 100644 --- a/api/graphql/graph/timeline.generated.go +++ b/api/graphql/graph/timeline.generated.go @@ -95,10 +95,10 @@ func (ec *executionContext) _AddCommentTimelineItem_id(ctx context.Context, fiel } res := resTmp.(entity.CombinedId) fc.Result = res - return ec.marshalNCombinedId2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚐCombinedId(ctx, field.Selections, res) + return ec.marshalNCombinedId2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐCombinedId(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentTimelineItem_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentTimelineItem_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentTimelineItem", Field: field, @@ -139,10 +139,10 @@ func (ec *executionContext) _AddCommentTimelineItem_author(ctx context.Context, } res := resTmp.(models.IdentityWrapper) fc.Result = res - return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) + return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentTimelineItem_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentTimelineItem_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentTimelineItem", Field: field, @@ -204,7 +204,7 @@ func (ec *executionContext) _AddCommentTimelineItem_message(ctx context.Context, return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentTimelineItem_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentTimelineItem_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentTimelineItem", Field: field, @@ -248,7 +248,7 @@ func (ec *executionContext) _AddCommentTimelineItem_messageIsEmpty(ctx context.C return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentTimelineItem_messageIsEmpty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentTimelineItem_messageIsEmpty(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentTimelineItem", Field: field, @@ -289,10 +289,10 @@ func (ec *executionContext) _AddCommentTimelineItem_files(ctx context.Context, f } res := resTmp.([]repository.Hash) fc.Result = res - return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res) + return ec.marshalNHash2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentTimelineItem_files(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentTimelineItem_files(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentTimelineItem", Field: field, @@ -336,7 +336,7 @@ func (ec *executionContext) _AddCommentTimelineItem_createdAt(ctx context.Contex return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentTimelineItem_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentTimelineItem_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentTimelineItem", Field: field, @@ -380,7 +380,7 @@ func (ec *executionContext) _AddCommentTimelineItem_lastEdit(ctx context.Context return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentTimelineItem_lastEdit(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentTimelineItem_lastEdit(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentTimelineItem", Field: field, @@ -424,7 +424,7 @@ func (ec *executionContext) _AddCommentTimelineItem_edited(ctx context.Context, return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentTimelineItem_edited(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentTimelineItem_edited(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentTimelineItem", Field: field, @@ -465,10 +465,10 @@ func (ec *executionContext) _AddCommentTimelineItem_history(ctx context.Context, } res := resTmp.([]bug.CommentHistoryStep) fc.Result = res - return ec.marshalNCommentHistoryStep2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐCommentHistoryStepᚄ(ctx, field.Selections, res) + return ec.marshalNCommentHistoryStep2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐCommentHistoryStepᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AddCommentTimelineItem_history(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AddCommentTimelineItem_history(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AddCommentTimelineItem", Field: field, @@ -518,7 +518,7 @@ func (ec *executionContext) _CommentHistoryStep_message(ctx context.Context, fie return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CommentHistoryStep_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CommentHistoryStep_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CommentHistoryStep", Field: field, @@ -562,7 +562,7 @@ func (ec *executionContext) _CommentHistoryStep_date(ctx context.Context, field return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CommentHistoryStep_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CommentHistoryStep_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CommentHistoryStep", Field: field, @@ -603,10 +603,10 @@ func (ec *executionContext) _CreateTimelineItem_id(ctx context.Context, field gr } res := resTmp.(entity.CombinedId) fc.Result = res - return ec.marshalNCombinedId2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚐCombinedId(ctx, field.Selections, res) + return ec.marshalNCombinedId2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐCombinedId(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CreateTimelineItem_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CreateTimelineItem_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CreateTimelineItem", Field: field, @@ -647,10 +647,10 @@ func (ec *executionContext) _CreateTimelineItem_author(ctx context.Context, fiel } res := resTmp.(models.IdentityWrapper) fc.Result = res - return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) + return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CreateTimelineItem_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CreateTimelineItem_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CreateTimelineItem", Field: field, @@ -712,7 +712,7 @@ func (ec *executionContext) _CreateTimelineItem_message(ctx context.Context, fie return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CreateTimelineItem_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CreateTimelineItem_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CreateTimelineItem", Field: field, @@ -756,7 +756,7 @@ func (ec *executionContext) _CreateTimelineItem_messageIsEmpty(ctx context.Conte return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CreateTimelineItem_messageIsEmpty(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CreateTimelineItem_messageIsEmpty(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CreateTimelineItem", Field: field, @@ -797,10 +797,10 @@ func (ec *executionContext) _CreateTimelineItem_files(ctx context.Context, field } res := resTmp.([]repository.Hash) fc.Result = res - return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res) + return ec.marshalNHash2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CreateTimelineItem_files(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CreateTimelineItem_files(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CreateTimelineItem", Field: field, @@ -844,7 +844,7 @@ func (ec *executionContext) _CreateTimelineItem_createdAt(ctx context.Context, f return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CreateTimelineItem_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CreateTimelineItem_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CreateTimelineItem", Field: field, @@ -888,7 +888,7 @@ func (ec *executionContext) _CreateTimelineItem_lastEdit(ctx context.Context, fi return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CreateTimelineItem_lastEdit(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CreateTimelineItem_lastEdit(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CreateTimelineItem", Field: field, @@ -932,7 +932,7 @@ func (ec *executionContext) _CreateTimelineItem_edited(ctx context.Context, fiel return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CreateTimelineItem_edited(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CreateTimelineItem_edited(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CreateTimelineItem", Field: field, @@ -973,10 +973,10 @@ func (ec *executionContext) _CreateTimelineItem_history(ctx context.Context, fie } res := resTmp.([]bug.CommentHistoryStep) fc.Result = res - return ec.marshalNCommentHistoryStep2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐCommentHistoryStepᚄ(ctx, field.Selections, res) + return ec.marshalNCommentHistoryStep2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐCommentHistoryStepᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CreateTimelineItem_history(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CreateTimelineItem_history(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "CreateTimelineItem", Field: field, @@ -1023,10 +1023,10 @@ func (ec *executionContext) _LabelChangeTimelineItem_id(ctx context.Context, fie } res := resTmp.(entity.CombinedId) fc.Result = res - return ec.marshalNCombinedId2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚐCombinedId(ctx, field.Selections, res) + return ec.marshalNCombinedId2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐCombinedId(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LabelChangeTimelineItem_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LabelChangeTimelineItem_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LabelChangeTimelineItem", Field: field, @@ -1067,10 +1067,10 @@ func (ec *executionContext) _LabelChangeTimelineItem_author(ctx context.Context, } res := resTmp.(models.IdentityWrapper) fc.Result = res - return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) + return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LabelChangeTimelineItem_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LabelChangeTimelineItem_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LabelChangeTimelineItem", Field: field, @@ -1132,7 +1132,7 @@ func (ec *executionContext) _LabelChangeTimelineItem_date(ctx context.Context, f return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LabelChangeTimelineItem_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LabelChangeTimelineItem_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LabelChangeTimelineItem", Field: field, @@ -1171,12 +1171,12 @@ func (ec *executionContext) _LabelChangeTimelineItem_added(ctx context.Context, } return graphql.Null } - res := resTmp.([]bug.Label) + res := resTmp.([]common.Label) fc.Result = res - return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabelᚄ(ctx, field.Selections, res) + return ec.marshalNLabel2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐLabelᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LabelChangeTimelineItem_added(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LabelChangeTimelineItem_added(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LabelChangeTimelineItem", Field: field, @@ -1221,12 +1221,12 @@ func (ec *executionContext) _LabelChangeTimelineItem_removed(ctx context.Context } return graphql.Null } - res := resTmp.([]bug.Label) + res := resTmp.([]common.Label) fc.Result = res - return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐLabelᚄ(ctx, field.Selections, res) + return ec.marshalNLabel2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐLabelᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LabelChangeTimelineItem_removed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LabelChangeTimelineItem_removed(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LabelChangeTimelineItem", Field: field, @@ -1273,10 +1273,10 @@ func (ec *executionContext) _SetStatusTimelineItem_id(ctx context.Context, field } res := resTmp.(entity.CombinedId) fc.Result = res - return ec.marshalNCombinedId2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚐCombinedId(ctx, field.Selections, res) + return ec.marshalNCombinedId2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐCombinedId(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SetStatusTimelineItem_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SetStatusTimelineItem_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SetStatusTimelineItem", Field: field, @@ -1317,10 +1317,10 @@ func (ec *executionContext) _SetStatusTimelineItem_author(ctx context.Context, f } res := resTmp.(models.IdentityWrapper) fc.Result = res - return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) + return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SetStatusTimelineItem_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SetStatusTimelineItem_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SetStatusTimelineItem", Field: field, @@ -1382,7 +1382,7 @@ func (ec *executionContext) _SetStatusTimelineItem_date(ctx context.Context, fie return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SetStatusTimelineItem_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SetStatusTimelineItem_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SetStatusTimelineItem", Field: field, @@ -1423,10 +1423,10 @@ func (ec *executionContext) _SetStatusTimelineItem_status(ctx context.Context, f } res := resTmp.(common.Status) fc.Result = res - return ec.marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋcommonᚐStatus(ctx, field.Selections, res) + return ec.marshalNStatus2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋcommonᚐStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SetStatusTimelineItem_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SetStatusTimelineItem_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SetStatusTimelineItem", Field: field, @@ -1467,10 +1467,10 @@ func (ec *executionContext) _SetTitleTimelineItem_id(ctx context.Context, field } res := resTmp.(entity.CombinedId) fc.Result = res - return ec.marshalNCombinedId2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚐCombinedId(ctx, field.Selections, res) + return ec.marshalNCombinedId2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐCombinedId(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SetTitleTimelineItem_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SetTitleTimelineItem_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SetTitleTimelineItem", Field: field, @@ -1511,10 +1511,10 @@ func (ec *executionContext) _SetTitleTimelineItem_author(ctx context.Context, fi } res := resTmp.(models.IdentityWrapper) fc.Result = res - return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) + return ec.marshalNIdentity2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐIdentityWrapper(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SetTitleTimelineItem_author(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SetTitleTimelineItem_author(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SetTitleTimelineItem", Field: field, @@ -1576,7 +1576,7 @@ func (ec *executionContext) _SetTitleTimelineItem_date(ctx context.Context, fiel return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SetTitleTimelineItem_date(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SetTitleTimelineItem_date(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SetTitleTimelineItem", Field: field, @@ -1620,7 +1620,7 @@ func (ec *executionContext) _SetTitleTimelineItem_title(ctx context.Context, fie return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SetTitleTimelineItem_title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SetTitleTimelineItem_title(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SetTitleTimelineItem", Field: field, @@ -1664,7 +1664,7 @@ func (ec *executionContext) _SetTitleTimelineItem_was(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SetTitleTimelineItem_was(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SetTitleTimelineItem_was(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SetTitleTimelineItem", Field: field, @@ -1705,10 +1705,10 @@ func (ec *executionContext) _TimelineItemConnection_edges(ctx context.Context, f } res := resTmp.([]*models.TimelineItemEdge) fc.Result = res - return ec.marshalNTimelineItemEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐTimelineItemEdgeᚄ(ctx, field.Selections, res) + return ec.marshalNTimelineItemEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐTimelineItemEdgeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TimelineItemConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TimelineItemConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "TimelineItemConnection", Field: field, @@ -1755,10 +1755,10 @@ func (ec *executionContext) _TimelineItemConnection_nodes(ctx context.Context, f } res := resTmp.([]bug.TimelineItem) fc.Result = res - return ec.marshalNTimelineItem2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐTimelineItemᚄ(ctx, field.Selections, res) + return ec.marshalNTimelineItem2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐTimelineItemᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TimelineItemConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TimelineItemConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "TimelineItemConnection", Field: field, @@ -1799,10 +1799,10 @@ func (ec *executionContext) _TimelineItemConnection_pageInfo(ctx context.Context } res := resTmp.(*models.PageInfo) fc.Result = res - return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNPageInfo2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TimelineItemConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TimelineItemConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "TimelineItemConnection", Field: field, @@ -1856,7 +1856,7 @@ func (ec *executionContext) _TimelineItemConnection_totalCount(ctx context.Conte return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TimelineItemConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TimelineItemConnection_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "TimelineItemConnection", Field: field, @@ -1900,7 +1900,7 @@ func (ec *executionContext) _TimelineItemEdge_cursor(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TimelineItemEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TimelineItemEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "TimelineItemEdge", Field: field, @@ -1941,10 +1941,10 @@ func (ec *executionContext) _TimelineItemEdge_node(ctx context.Context, field gr } res := resTmp.(bug.TimelineItem) fc.Result = res - return ec.marshalNTimelineItem2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐTimelineItem(ctx, field.Selections, res) + return ec.marshalNTimelineItem2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐTimelineItem(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TimelineItemEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TimelineItemEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "TimelineItemEdge", Field: field, @@ -3043,11 +3043,11 @@ func (ec *executionContext) _TimelineItemEdge(ctx context.Context, sel ast.Selec // region ***************************** type.gotpl ***************************** -func (ec *executionContext) marshalNCommentHistoryStep2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐCommentHistoryStep(ctx context.Context, sel ast.SelectionSet, v bug.CommentHistoryStep) graphql.Marshaler { +func (ec *executionContext) marshalNCommentHistoryStep2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋ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ᚋentitiesᚋbugᚐCommentHistoryStepᚄ(ctx context.Context, sel ast.SelectionSet, v []bug.CommentHistoryStep) graphql.Marshaler { +func (ec *executionContext) marshalNCommentHistoryStep2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋ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 @@ -3071,7 +3071,7 @@ func (ec *executionContext) marshalNCommentHistoryStep2ᚕgithubᚗcomᚋMichael if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNCommentHistoryStep2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐCommentHistoryStep(ctx, sel, v[i]) + ret[i] = ec.marshalNCommentHistoryStep2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐCommentHistoryStep(ctx, sel, v[i]) } if isLen1 { f(i) @@ -3091,7 +3091,7 @@ func (ec *executionContext) marshalNCommentHistoryStep2ᚕgithubᚗcomᚋMichael return ret } -func (ec *executionContext) marshalNTimelineItem2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐTimelineItem(ctx context.Context, sel ast.SelectionSet, v bug.TimelineItem) graphql.Marshaler { +func (ec *executionContext) marshalNTimelineItem2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐTimelineItem(ctx context.Context, sel ast.SelectionSet, v bug.TimelineItem) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -3101,7 +3101,7 @@ func (ec *executionContext) marshalNTimelineItem2githubᚗcomᚋMichaelMureᚋgi return ec._TimelineItem(ctx, sel, v) } -func (ec *executionContext) marshalNTimelineItem2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐTimelineItemᚄ(ctx context.Context, sel ast.SelectionSet, v []bug.TimelineItem) graphql.Marshaler { +func (ec *executionContext) marshalNTimelineItem2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋ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 @@ -3125,7 +3125,7 @@ func (ec *executionContext) marshalNTimelineItem2ᚕgithubᚗcomᚋMichaelMure if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNTimelineItem2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentitiesᚋbugᚐTimelineItem(ctx, sel, v[i]) + ret[i] = ec.marshalNTimelineItem2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentitiesᚋbugᚐTimelineItem(ctx, sel, v[i]) } if isLen1 { f(i) @@ -3145,11 +3145,11 @@ func (ec *executionContext) marshalNTimelineItem2ᚕgithubᚗcomᚋMichaelMure return ret } -func (ec *executionContext) marshalNTimelineItemConnection2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐTimelineItemConnection(ctx context.Context, sel ast.SelectionSet, v models.TimelineItemConnection) graphql.Marshaler { +func (ec *executionContext) marshalNTimelineItemConnection2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋ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ᚋapiᚋgraphqlᚋmodelsᚐTimelineItemConnection(ctx context.Context, sel ast.SelectionSet, v *models.TimelineItemConnection) graphql.Marshaler { +func (ec *executionContext) marshalNTimelineItemConnection2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐTimelineItemConnection(ctx context.Context, sel ast.SelectionSet, v *models.TimelineItemConnection) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -3159,7 +3159,7 @@ func (ec *executionContext) marshalNTimelineItemConnection2ᚖgithubᚗcomᚋMic return ec._TimelineItemConnection(ctx, sel, v) } -func (ec *executionContext) marshalNTimelineItemEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐTimelineItemEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*models.TimelineItemEdge) graphql.Marshaler { +func (ec *executionContext) marshalNTimelineItemEdge2ᚕᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋ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 @@ -3183,7 +3183,7 @@ func (ec *executionContext) marshalNTimelineItemEdge2ᚕᚖgithubᚗcomᚋMichae if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNTimelineItemEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐTimelineItemEdge(ctx, sel, v[i]) + ret[i] = ec.marshalNTimelineItemEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐTimelineItemEdge(ctx, sel, v[i]) } if isLen1 { f(i) @@ -3203,7 +3203,7 @@ func (ec *executionContext) marshalNTimelineItemEdge2ᚕᚖgithubᚗcomᚋMichae return ret } -func (ec *executionContext) marshalNTimelineItemEdge2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐTimelineItemEdge(ctx context.Context, sel ast.SelectionSet, v *models.TimelineItemEdge) graphql.Marshaler { +func (ec *executionContext) marshalNTimelineItemEdge2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐTimelineItemEdge(ctx context.Context, sel ast.SelectionSet, v *models.TimelineItemEdge) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") diff --git a/api/graphql/graph/types.generated.go b/api/graphql/graph/types.generated.go index 014ec58a..a8f709aa 100644 --- a/api/graphql/graph/types.generated.go +++ b/api/graphql/graph/types.generated.go @@ -70,7 +70,7 @@ func (ec *executionContext) _Color_R(ctx context.Context, field graphql.Collecte return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Color_R(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Color_R(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Color", Field: field, @@ -114,7 +114,7 @@ func (ec *executionContext) _Color_G(ctx context.Context, field graphql.Collecte return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Color_G(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Color_G(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Color", Field: field, @@ -158,7 +158,7 @@ func (ec *executionContext) _Color_B(ctx context.Context, field graphql.Collecte return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Color_B(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Color_B(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Color", Field: field, @@ -202,7 +202,7 @@ func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field gra return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_hasNextPage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PageInfo", Field: field, @@ -246,7 +246,7 @@ func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_hasPreviousPage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PageInfo", Field: field, @@ -290,7 +290,7 @@ func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field gra return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_startCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_startCursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PageInfo", Field: field, @@ -334,7 +334,7 @@ func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_endCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_endCursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PageInfo", Field: field, @@ -359,18 +359,11 @@ func (ec *executionContext) _Authored(ctx context.Context, sel ast.SelectionSet, switch obj := (obj).(type) { case nil: return graphql.Null - case bug.Comment: - return ec._Comment(ctx, sel, &obj) - case *bug.Comment: - if obj == nil { - return graphql.Null - } - return ec._Comment(ctx, sel, obj) - case models.BugWrapper: + case *bug.SetStatusOperation: if obj == nil { return graphql.Null } - return ec._Bug(ctx, sel, obj) + return ec._SetStatusOperation(ctx, sel, obj) case *bug.CreateOperation: if obj == nil { return graphql.Null @@ -391,11 +384,6 @@ func (ec *executionContext) _Authored(ctx context.Context, sel ast.SelectionSet, return graphql.Null } return ec._EditCommentOperation(ctx, sel, obj) - case *bug.SetStatusOperation: - if obj == nil { - return graphql.Null - } - return ec._SetStatusOperation(ctx, sel, obj) case *bug.LabelChangeOperation: if obj == nil { return graphql.Null @@ -426,6 +414,18 @@ func (ec *executionContext) _Authored(ctx context.Context, sel ast.SelectionSet, return graphql.Null } return ec._SetTitleTimelineItem(ctx, sel, obj) + case models.BugWrapper: + if obj == nil { + return graphql.Null + } + return ec._Bug(ctx, sel, obj) + case bug.Comment: + return ec._Comment(ctx, sel, &obj) + case *bug.Comment: + if obj == nil { + return graphql.Null + } + return ec._Comment(ctx, sel, obj) default: panic(fmt.Errorf("unexpected type %T", obj)) } @@ -649,27 +649,27 @@ func (ec *executionContext) marshalNColor2ᚖimageᚋcolorᚐRGBA(ctx context.Co return ec._Color(ctx, sel, v) } -func (ec *executionContext) unmarshalNCombinedId2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚐCombinedId(ctx context.Context, v interface{}) (entity.CombinedId, error) { +func (ec *executionContext) unmarshalNCombinedId2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐCombinedId(ctx context.Context, v interface{}) (entity.CombinedId, error) { var res entity.CombinedId err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNCombinedId2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋentityᚐCombinedId(ctx context.Context, sel ast.SelectionSet, v entity.CombinedId) graphql.Marshaler { +func (ec *executionContext) marshalNCombinedId2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋentityᚐCombinedId(ctx context.Context, sel ast.SelectionSet, v entity.CombinedId) graphql.Marshaler { return v } -func (ec *executionContext) unmarshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHash(ctx context.Context, v interface{}) (repository.Hash, error) { +func (ec *executionContext) unmarshalNHash2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHash(ctx context.Context, v interface{}) (repository.Hash, error) { var res repository.Hash err := res.UnmarshalGQL(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHash(ctx context.Context, sel ast.SelectionSet, v repository.Hash) graphql.Marshaler { +func (ec *executionContext) marshalNHash2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHash(ctx context.Context, sel ast.SelectionSet, v repository.Hash) graphql.Marshaler { return v } -func (ec *executionContext) unmarshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx context.Context, v interface{}) ([]repository.Hash, error) { +func (ec *executionContext) unmarshalNHash2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx context.Context, v interface{}) ([]repository.Hash, error) { var vSlice []interface{} if v != nil { vSlice = graphql.CoerceList(v) @@ -678,7 +678,7 @@ func (ec *executionContext) unmarshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgit res := make([]repository.Hash, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHash(ctx, vSlice[i]) + res[i], err = ec.unmarshalNHash2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHash(ctx, vSlice[i]) if err != nil { return nil, err } @@ -686,10 +686,10 @@ func (ec *executionContext) unmarshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgit return res, nil } -func (ec *executionContext) marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx context.Context, sel ast.SelectionSet, v []repository.Hash) graphql.Marshaler { +func (ec *executionContext) marshalNHash2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx context.Context, sel ast.SelectionSet, v []repository.Hash) graphql.Marshaler { ret := make(graphql.Array, len(v)) for i := range v { - ret[i] = ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHash(ctx, sel, v[i]) + ret[i] = ec.marshalNHash2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHash(ctx, sel, v[i]) } for _, e := range ret { @@ -701,7 +701,7 @@ func (ec *executionContext) marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑb return ret } -func (ec *executionContext) marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx context.Context, sel ast.SelectionSet, v *models.PageInfo) graphql.Marshaler { +func (ec *executionContext) marshalNPageInfo2ᚖgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋapiᚋgraphqlᚋmodelsᚐPageInfo(ctx context.Context, sel ast.SelectionSet, v *models.PageInfo) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -747,7 +747,7 @@ func (ec *executionContext) marshalNTime2ᚖtimeᚐTime(ctx context.Context, sel return res } -func (ec *executionContext) unmarshalOHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx context.Context, v interface{}) ([]repository.Hash, error) { +func (ec *executionContext) unmarshalOHash2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx context.Context, v interface{}) ([]repository.Hash, error) { if v == nil { return nil, nil } @@ -759,7 +759,7 @@ func (ec *executionContext) unmarshalOHash2ᚕgithubᚗcomᚋMichaelMureᚋgit res := make([]repository.Hash, len(vSlice)) for i := range vSlice { ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHash(ctx, vSlice[i]) + res[i], err = ec.unmarshalNHash2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHash(ctx, vSlice[i]) if err != nil { return nil, err } @@ -767,13 +767,13 @@ func (ec *executionContext) unmarshalOHash2ᚕgithubᚗcomᚋMichaelMureᚋgit return res, nil } -func (ec *executionContext) marshalOHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx context.Context, sel ast.SelectionSet, v []repository.Hash) graphql.Marshaler { +func (ec *executionContext) marshalOHash2ᚕgithubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHashᚄ(ctx context.Context, sel ast.SelectionSet, v []repository.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ᚋrepositoryᚐHash(ctx, sel, v[i]) + ret[i] = ec.marshalNHash2githubᚗcomᚋgitᚑbugᚋgitᚑbugᚋrepositoryᚐHash(ctx, sel, v[i]) } for _, e := range ret { diff --git a/api/graphql/models/gen_models.go b/api/graphql/models/gen_models.go index a63233a1..a09b36b4 100644 --- a/api/graphql/models/gen_models.go +++ b/api/graphql/models/gen_models.go @@ -4,6 +4,7 @@ package models import ( "github.com/git-bug/git-bug/entities/bug" + "github.com/git-bug/git-bug/entities/common" "github.com/git-bug/git-bug/entity/dag" "github.com/git-bug/git-bug/repository" ) @@ -191,15 +192,18 @@ type IdentityEdge struct { } type LabelConnection struct { - Edges []*LabelEdge `json:"edges"` - Nodes []bug.Label `json:"nodes"` - PageInfo *PageInfo `json:"pageInfo"` - TotalCount int `json:"totalCount"` + Edges []*LabelEdge `json:"edges"` + Nodes []common.Label `json:"nodes"` + PageInfo *PageInfo `json:"pageInfo"` + TotalCount int `json:"totalCount"` } type LabelEdge struct { - Cursor string `json:"cursor"` - Node bug.Label `json:"node"` + Cursor string `json:"cursor"` + Node common.Label `json:"node"` +} + +type Mutation struct { } type NewBugInput struct { @@ -268,6 +272,9 @@ type PageInfo struct { EndCursor string `json:"endCursor"` } +type Query struct { +} + type SetTitleInput struct { // A unique identifier for the client performing the mutation. ClientMutationID *string `json:"clientMutationId,omitempty"` diff --git a/api/graphql/models/lazy_bug.go b/api/graphql/models/lazy_bug.go index a843c97a..7570b4ea 100644 --- a/api/graphql/models/lazy_bug.go +++ b/api/graphql/models/lazy_bug.go @@ -20,7 +20,7 @@ type BugWrapper interface { Status() common.Status Title() string Comments() ([]bug.Comment, error) - Labels() []bug.Label + Labels() []common.Label Author() (IdentityWrapper, error) Actors() ([]IdentityWrapper, error) Participants() ([]IdentityWrapper, error) @@ -102,7 +102,7 @@ func (lb *lazyBug) Comments() ([]bug.Comment, error) { return lb.snap.Comments, nil } -func (lb *lazyBug) Labels() []bug.Label { +func (lb *lazyBug) Labels() []common.Label { return lb.excerpt.Labels } @@ -180,7 +180,7 @@ func (l *loadedBug) Comments() ([]bug.Comment, error) { return l.Snapshot.Comments, nil } -func (l *loadedBug) Labels() []bug.Label { +func (l *loadedBug) Labels() []common.Label { return l.Snapshot.Labels } diff --git a/api/graphql/resolvers/bug.go b/api/graphql/resolvers/bug.go index d5c13e06..c984e191 100644 --- a/api/graphql/resolvers/bug.go +++ b/api/graphql/resolvers/bug.go @@ -51,7 +51,7 @@ func (bugResolver) Comments(_ context.Context, obj models.BugWrapper, after *str return nil, err } - return connections.CommentCon(comments, edger, conMaker, input) + return connections.Connection(comments, edger, conMaker, input) } func (bugResolver) Operations(_ context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int) (*models.OperationConnection, error) { @@ -83,7 +83,7 @@ func (bugResolver) Operations(_ context.Context, obj models.BugWrapper, after *s return nil, err } - return connections.OperationCon(ops, edger, conMaker, input) + return connections.Connection(ops, edger, conMaker, input) } func (bugResolver) Timeline(_ context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int) (*models.TimelineItemConnection, error) { @@ -115,7 +115,7 @@ func (bugResolver) Timeline(_ context.Context, obj models.BugWrapper, after *str return nil, err } - return connections.TimelineItemCon(timeline, edger, conMaker, input) + return connections.Connection(timeline, edger, conMaker, input) } func (bugResolver) Actors(_ context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int) (*models.IdentityConnection, error) { @@ -147,7 +147,7 @@ func (bugResolver) Actors(_ context.Context, obj models.BugWrapper, after *strin return nil, err } - return connections.IdentityCon(actors, edger, conMaker, input) + return connections.Connection(actors, edger, conMaker, input) } func (bugResolver) Participants(_ context.Context, obj models.BugWrapper, after *string, before *string, first *int, last *int) (*models.IdentityConnection, error) { @@ -179,5 +179,5 @@ func (bugResolver) Participants(_ context.Context, obj models.BugWrapper, after return nil, err } - return connections.IdentityCon(participants, edger, conMaker, input) + return connections.Connection(participants, edger, conMaker, input) } diff --git a/api/graphql/resolvers/label.go b/api/graphql/resolvers/label.go index 8fe6c8e5..3e63b655 100644 --- a/api/graphql/resolvers/label.go +++ b/api/graphql/resolvers/label.go @@ -5,18 +5,18 @@ import ( "image/color" "github.com/git-bug/git-bug/api/graphql/graph" - "github.com/git-bug/git-bug/entities/bug" + "github.com/git-bug/git-bug/entities/common" ) var _ graph.LabelResolver = &labelResolver{} type labelResolver struct{} -func (labelResolver) Name(ctx context.Context, obj *bug.Label) (string, error) { +func (labelResolver) Name(ctx context.Context, obj *common.Label) (string, error) { return obj.String(), nil } -func (labelResolver) Color(ctx context.Context, obj *bug.Label) (*color.RGBA, error) { +func (labelResolver) Color(ctx context.Context, obj *common.Label) (*color.RGBA, error) { rgba := obj.Color().RGBA() return &rgba, nil } diff --git a/api/graphql/resolvers/repo.go b/api/graphql/resolvers/repo.go index bfec95fb..45dc7110 100644 --- a/api/graphql/resolvers/repo.go +++ b/api/graphql/resolvers/repo.go @@ -7,7 +7,7 @@ import ( "github.com/git-bug/git-bug/api/graphql/connections" "github.com/git-bug/git-bug/api/graphql/graph" "github.com/git-bug/git-bug/api/graphql/models" - "github.com/git-bug/git-bug/entities/bug" + "github.com/git-bug/git-bug/entities/common" "github.com/git-bug/git-bug/entity" "github.com/git-bug/git-bug/query" ) @@ -82,7 +82,7 @@ func (repoResolver) AllBugs(_ context.Context, obj *models.Repository, after *st }, nil } - return connections.LazyBugCon(source, edger, conMaker, input) + return connections.Connection(source, edger, conMaker, input) } func (repoResolver) Bug(_ context.Context, obj *models.Repository, prefix string) (models.BugWrapper, error) { @@ -141,7 +141,7 @@ func (repoResolver) AllIdentities(_ context.Context, obj *models.Repository, aft }, nil } - return connections.LazyIdentityCon(source, edger, conMaker, input) + return connections.Connection(source, edger, conMaker, input) } func (repoResolver) Identity(_ context.Context, obj *models.Repository, prefix string) (models.IdentityWrapper, error) { @@ -171,14 +171,14 @@ func (repoResolver) ValidLabels(_ context.Context, obj *models.Repository, after Last: last, } - edger := func(label bug.Label, offset int) connections.Edge { + edger := func(label common.Label, offset int) connections.Edge { return models.LabelEdge{ Node: label, Cursor: connections.OffsetToCursor(offset), } } - conMaker := func(edges []*models.LabelEdge, nodes []bug.Label, info *models.PageInfo, totalCount int) (*models.LabelConnection, error) { + conMaker := func(edges []*models.LabelEdge, nodes []common.Label, info *models.PageInfo, totalCount int) (*models.LabelConnection, error) { return &models.LabelConnection{ Edges: edges, Nodes: nodes, @@ -187,5 +187,5 @@ func (repoResolver) ValidLabels(_ context.Context, obj *models.Repository, after }, nil } - return connections.LabelCon(obj.Repo.Bugs().ValidLabels(), edger, conMaker, input) + return connections.Connection(obj.Repo.Bugs().ValidLabels(), edger, conMaker, input) } diff --git a/bridge/github/export.go b/bridge/github/export.go index 6f882637..8cea9314 100644 --- a/bridge/github/export.go +++ b/bridge/github/export.go @@ -595,7 +595,7 @@ func (ge *githubExporter) createGithubLabelV4(gc *githubv4.Client, label, labelC } */ -func (ge *githubExporter) getOrCreateGithubLabelID(ctx context.Context, gc *rateLimitHandlerClient, repositoryID string, label bug.Label) (string, error) { +func (ge *githubExporter) getOrCreateGithubLabelID(ctx context.Context, gc *rateLimitHandlerClient, repositoryID string, label common.Label) (string, error) { // try to get label id from cache labelID, err := ge.getLabelID(string(label)) if err == nil { @@ -617,7 +617,7 @@ func (ge *githubExporter) getOrCreateGithubLabelID(ctx context.Context, gc *rate return labelID, nil } -func (ge *githubExporter) getLabelsIDs(ctx context.Context, gc *rateLimitHandlerClient, repositoryID string, labels []bug.Label) ([]githubv4.ID, error) { +func (ge *githubExporter) getLabelsIDs(ctx context.Context, gc *rateLimitHandlerClient, repositoryID string, labels []common.Label) ([]githubv4.ID, error) { ids := make([]githubv4.ID, 0, len(labels)) var err error @@ -744,7 +744,7 @@ func (ge *githubExporter) updateGithubIssueTitle(ctx context.Context, gc *rateLi } // update github issue labels -func (ge *githubExporter) updateGithubIssueLabels(ctx context.Context, gc *rateLimitHandlerClient, labelableID string, added, removed []bug.Label) error { +func (ge *githubExporter) updateGithubIssueLabels(ctx context.Context, gc *rateLimitHandlerClient, labelableID string, added, removed []common.Label) error { wg, ctx := errgroup.WithContext(ctx) if len(added) > 0 { diff --git a/bridge/github/import_integration_test.go b/bridge/github/import_integration_test.go index a642d374..365427e1 100644 --- a/bridge/github/import_integration_test.go +++ b/bridge/github/import_integration_test.go @@ -14,6 +14,7 @@ import ( "github.com/git-bug/git-bug/bridge/github/mocks" "github.com/git-bug/git-bug/cache" "github.com/git-bug/git-bug/entities/bug" + "github.com/git-bug/git-bug/entities/common" "github.com/git-bug/git-bug/repository" "github.com/git-bug/git-bug/util/interrupt" ) @@ -64,7 +65,7 @@ func TestGithubImporterIntegration(t *testing.T) { ops3 := b3.Snapshot().Operations require.Equal(t, "issue 3 comment 1", ops3[1].(*bug.AddCommentOperation).Message) require.Equal(t, "issue 3 comment 2", ops3[2].(*bug.AddCommentOperation).Message) - require.Equal(t, []bug.Label{"bug"}, ops3[3].(*bug.LabelChangeOperation).Added) + require.Equal(t, []common.Label{"bug"}, ops3[3].(*bug.LabelChangeOperation).Added) require.Equal(t, "title 3, edit 1", ops3[4].(*bug.SetTitleOperation).Title) b4, err := backend.Bugs().ResolveBugCreateMetadata(metaKeyGithubUrl, "https://github.com/marcus/to-himself/issues/4") diff --git a/bridge/github/import_test.go b/bridge/github/import_test.go index 80be5116..3d583c36 100644 --- a/bridge/github/import_test.go +++ b/bridge/github/import_test.go @@ -72,9 +72,9 @@ func TestGithubImporter(t *testing.T) { bug: &bug.Snapshot{ Operations: []dag.Operation{ bug.NewCreateOp(author, 0, "complex issue", "initial comment", nil), - bug.NewLabelChangeOperation(author, 0, []bug.Label{"bug"}, []bug.Label{}), - bug.NewLabelChangeOperation(author, 0, []bug.Label{"duplicate"}, []bug.Label{}), - bug.NewLabelChangeOperation(author, 0, []bug.Label{}, []bug.Label{"duplicate"}), + bug.NewLabelChangeOperation(author, 0, []common.Label{"bug"}, []common.Label{}), + bug.NewLabelChangeOperation(author, 0, []common.Label{"duplicate"}, []common.Label{}), + bug.NewLabelChangeOperation(author, 0, []common.Label{}, []common.Label{"duplicate"}), bug.NewAddCommentOp(author, 0, strings.Join([]string{ "### header", "**bold**", diff --git a/bridge/gitlab/import_test.go b/bridge/gitlab/import_test.go index 2190369b..56feee46 100644 --- a/bridge/gitlab/import_test.go +++ b/bridge/gitlab/import_test.go @@ -78,9 +78,9 @@ func TestGitlabImport(t *testing.T) { bug.NewSetTitleOp(author, 0, "complex issue", "complex issue edited"), bug.NewSetStatusOp(author, 0, common.ClosedStatus), bug.NewSetStatusOp(author, 0, common.OpenStatus), - bug.NewLabelChangeOperation(author, 0, []bug.Label{"bug"}, []bug.Label{}), - bug.NewLabelChangeOperation(author, 0, []bug.Label{"critical"}, []bug.Label{}), - bug.NewLabelChangeOperation(author, 0, []bug.Label{}, []bug.Label{"critical"}), + bug.NewLabelChangeOperation(author, 0, []common.Label{"bug"}, []common.Label{}), + bug.NewLabelChangeOperation(author, 0, []common.Label{"critical"}, []common.Label{}), + bug.NewLabelChangeOperation(author, 0, []common.Label{}, []common.Label{"critical"}), }, }, }, diff --git a/bridge/jira/client.go b/bridge/jira/client.go index 53dfad6e..95856f05 100644 --- a/bridge/jira/client.go +++ b/bridge/jira/client.go @@ -16,7 +16,7 @@ import ( "github.com/pkg/errors" - "github.com/git-bug/git-bug/entities/bug" + "github.com/git-bug/git-bug/entities/common" ) var errDone = errors.New("Iteration Done") @@ -1230,7 +1230,7 @@ func (client *Client) UpdateComment(issueKeyOrID, commentID, body string) ( } // UpdateLabels changes labels for an issue -func (client *Client) UpdateLabels(issueKeyOrID string, added, removed []bug.Label) (time.Time, error) { +func (client *Client) UpdateLabels(issueKeyOrID string, added, removed []common.Label) (time.Time, error) { url := fmt.Sprintf( "%s/rest/api/2/issue/%s/", client.serverURL, issueKeyOrID) var responseTime time.Time diff --git a/bridge/jira/import.go b/bridge/jira/import.go index 0d7d1f1e..bd5a67d8 100644 --- a/bridge/jira/import.go +++ b/bridge/jira/import.go @@ -357,7 +357,7 @@ func getIndexDerivedID(jiraID string, idx int) string { return fmt.Sprintf("%s-%d", jiraID, idx) } -func labelSetsMatch(jiraSet []string, gitbugSet []bug.Label) bool { +func labelSetsMatch(jiraSet []string, gitbugSet []common.Label) bool { if len(jiraSet) != len(gitbugSet) { return false } diff --git a/cache/bug_excerpt.go b/cache/bug_excerpt.go index 12331b62..99c30409 100644 --- a/cache/bug_excerpt.go +++ b/cache/bug_excerpt.go @@ -4,7 +4,6 @@ import ( "encoding/gob" "time" - "github.com/git-bug/git-bug/entities/bug" "github.com/git-bug/git-bug/entities/common" "github.com/git-bug/git-bug/entity" "github.com/git-bug/git-bug/util/lamport" @@ -29,7 +28,7 @@ type BugExcerpt struct { AuthorId entity.Id Status common.Status - Labels []bug.Label + Labels []common.Label Title string LenComments int Actors []entity.Id diff --git a/cache/bug_subcache.go b/cache/bug_subcache.go index a1f4498a..09d7cbba 100644 --- a/cache/bug_subcache.go +++ b/cache/bug_subcache.go @@ -6,6 +6,7 @@ import ( "time" "github.com/git-bug/git-bug/entities/bug" + "github.com/git-bug/git-bug/entities/common" "github.com/git-bug/git-bug/entities/identity" "github.com/git-bug/git-bug/entity" "github.com/git-bug/git-bug/query" @@ -187,11 +188,11 @@ func (c *RepoCacheBug) Query(q *query.Query) ([]entity.Id, error) { // Note: in the future, a proper label policy could be implemented where valid // labels are defined in a configuration file. Until that, the default behavior // is to return the list of labels already used. -func (c *RepoCacheBug) ValidLabels() []bug.Label { +func (c *RepoCacheBug) ValidLabels() []common.Label { c.mu.RLock() defer c.mu.RUnlock() - set := map[bug.Label]interface{}{} + set := map[common.Label]interface{}{} for _, excerpt := range c.excerpts { for _, l := range excerpt.Labels { @@ -199,7 +200,7 @@ func (c *RepoCacheBug) ValidLabels() []bug.Label { } } - result := make([]bug.Label, len(set)) + result := make([]common.Label, len(set)) i := 0 for l := range set { diff --git a/commands/bug/bug.go b/commands/bug/bug.go index 4cf18ab9..4e696a49 100644 --- a/commands/bug/bug.go +++ b/commands/bug/bug.go @@ -13,7 +13,6 @@ import ( "github.com/git-bug/git-bug/commands/cmdjson" "github.com/git-bug/git-bug/commands/completion" "github.com/git-bug/git-bug/commands/execenv" - "github.com/git-bug/git-bug/entities/bug" "github.com/git-bug/git-bug/entities/common" "github.com/git-bug/git-bug/entity" "github.com/git-bug/git-bug/query" @@ -280,7 +279,7 @@ func bugsPlainFormatter(env *execenv.Env, excerpts []*cache.BugExcerpt) error { func bugsOrgmodeFormatter(env *execenv.Env, excerpts []*cache.BugExcerpt) error { // see https://orgmode.org/manual/Tags.html orgTagRe := regexp.MustCompile("[^[:alpha:]_@]") - formatTag := func(l bug.Label) string { + formatTag := func(l common.Label) string { return orgTagRe.ReplaceAllString(l.String(), "_") } diff --git a/commands/bug/completion.go b/commands/bug/completion.go index d313ef37..4329829e 100644 --- a/commands/bug/completion.go +++ b/commands/bug/completion.go @@ -9,7 +9,7 @@ import ( "github.com/git-bug/git-bug/commands/completion" "github.com/git-bug/git-bug/commands/execenv" _select "github.com/git-bug/git-bug/commands/select" - "github.com/git-bug/git-bug/entities/bug" + "github.com/git-bug/git-bug/entities/common" ) // BugCompletion complete a bug id @@ -61,26 +61,26 @@ func BugAndLabelsCompletion(env *execenv.Env, addOrRemove bool) completion.Valid snap := b.Snapshot() - seenLabels := map[bug.Label]bool{} + seenLabels := map[common.Label]bool{} for _, label := range cleanArgs { - seenLabels[bug.Label(label)] = addOrRemove + seenLabels[common.Label(label)] = addOrRemove } - var labels []bug.Label + var labels []common.Label if addOrRemove { for _, label := range snap.Labels { seenLabels[label] = true } allLabels := env.Backend.Bugs().ValidLabels() - labels = make([]bug.Label, 0, len(allLabels)) + labels = make([]common.Label, 0, len(allLabels)) for _, label := range allLabels { if !seenLabels[label] { labels = append(labels, label) } } } else { - labels = make([]bug.Label, 0, len(snap.Labels)) + labels = make([]common.Label, 0, len(snap.Labels)) for _, label := range snap.Labels { if seenLabels[label] { labels = append(labels, label) diff --git a/commands/cmdjson/bug.go b/commands/cmdjson/bug.go index a7f894ed..62eae92b 100644 --- a/commands/cmdjson/bug.go +++ b/commands/cmdjson/bug.go @@ -3,20 +3,21 @@ package cmdjson import ( "github.com/git-bug/git-bug/cache" "github.com/git-bug/git-bug/entities/bug" + "github.com/git-bug/git-bug/entities/common" ) type BugSnapshot struct { - Id string `json:"id"` - HumanId string `json:"human_id"` - CreateTime Time `json:"create_time"` - EditTime Time `json:"edit_time"` - Status string `json:"status"` - Labels []bug.Label `json:"labels"` - Title string `json:"title"` - Author Identity `json:"author"` - Actors []Identity `json:"actors"` - Participants []Identity `json:"participants"` - Comments []BugComment `json:"comments"` + Id string `json:"id"` + HumanId string `json:"human_id"` + CreateTime Time `json:"create_time"` + EditTime Time `json:"edit_time"` + Status string `json:"status"` + Labels []common.Label `json:"labels"` + Title string `json:"title"` + Author Identity `json:"author"` + Actors []Identity `json:"actors"` + Participants []Identity `json:"participants"` + Comments []BugComment `json:"comments"` } func NewBugSnapshot(snap *bug.Snapshot) BugSnapshot { @@ -71,12 +72,12 @@ type BugExcerpt struct { CreateTime Time `json:"create_time"` EditTime Time `json:"edit_time"` - Status string `json:"status"` - Labels []bug.Label `json:"labels"` - Title string `json:"title"` - Actors []Identity `json:"actors"` - Participants []Identity `json:"participants"` - Author Identity `json:"author"` + Status string `json:"status"` + Labels []common.Label `json:"labels"` + Title string `json:"title"` + Actors []Identity `json:"actors"` + Participants []Identity `json:"participants"` + Author Identity `json:"author"` Comments int `json:"comments"` Metadata map[string]string `json:"metadata"` diff --git a/entities/bug/op_label_change.go b/entities/bug/op_label_change.go index b65b8ffb..6a9fb19b 100644 --- a/entities/bug/op_label_change.go +++ b/entities/bug/op_label_change.go @@ -8,6 +8,7 @@ import ( "github.com/pkg/errors" + "github.com/git-bug/git-bug/entities/common" "github.com/git-bug/git-bug/entities/identity" "github.com/git-bug/git-bug/entity" "github.com/git-bug/git-bug/entity/dag" @@ -19,8 +20,8 @@ var _ Operation = &LabelChangeOperation{} // LabelChangeOperation define a Bug operation to add or remove labels type LabelChangeOperation struct { dag.OpBase - Added []Label `json:"added"` - Removed []Label `json:"removed"` + Added []common.Label `json:"added"` + Removed []common.Label `json:"removed"` } func (op *LabelChangeOperation) Id() entity.Id { @@ -96,7 +97,7 @@ func (op *LabelChangeOperation) Validate() error { return nil } -func NewLabelChangeOperation(author identity.Interface, unixTime int64, added, removed []Label) *LabelChangeOperation { +func NewLabelChangeOperation(author identity.Interface, unixTime int64, added, removed []common.Label) *LabelChangeOperation { return &LabelChangeOperation{ OpBase: dag.NewOpBase(LabelChangeOp, author, unixTime), Added: added, @@ -108,8 +109,8 @@ type LabelChangeTimelineItem struct { combinedId entity.CombinedId Author identity.Interface UnixTime timestamp.Timestamp - Added []Label - Removed []Label + Added []common.Label + Removed []common.Label } func (l LabelChangeTimelineItem) CombinedId() entity.CombinedId { @@ -121,13 +122,13 @@ func (l *LabelChangeTimelineItem) IsAuthored() {} // ChangeLabels is a convenience function to change labels on a bug func ChangeLabels(b Interface, author identity.Interface, unixTime int64, add, remove []string, metadata map[string]string) ([]LabelChangeResult, *LabelChangeOperation, error) { - var added, removed []Label + var added, removed []common.Label var results []LabelChangeResult snap := b.Compile() for _, str := range add { - label := Label(str) + label := common.Label(str) // check for duplicate if labelExist(added, label) { @@ -146,7 +147,7 @@ func ChangeLabels(b Interface, author identity.Interface, unixTime int64, add, r } for _, str := range remove { - label := Label(str) + label := common.Label(str) // check for duplicate if labelExist(removed, label) { @@ -187,14 +188,14 @@ func ChangeLabels(b Interface, author identity.Interface, unixTime int64, add, r // The intended use of this function is to allow importers to create legal but unexpected label changes, // like removing a label with no information of when it was added before. func ForceChangeLabels(b Interface, author identity.Interface, unixTime int64, add, remove []string, metadata map[string]string) (*LabelChangeOperation, error) { - added := make([]Label, len(add)) + added := make([]common.Label, len(add)) for i, str := range add { - added[i] = Label(str) + added[i] = common.Label(str) } - removed := make([]Label, len(remove)) + removed := make([]common.Label, len(remove)) for i, str := range remove { - removed[i] = Label(str) + removed[i] = common.Label(str) } op := NewLabelChangeOperation(author, unixTime, added, removed) @@ -211,7 +212,7 @@ func ForceChangeLabels(b Interface, author identity.Interface, unixTime int64, a return op, nil } -func labelExist(labels []Label, label Label) bool { +func labelExist(labels []common.Label, label common.Label) bool { for _, l := range labels { if l == label { return true @@ -272,7 +273,7 @@ func (l *LabelChangeStatus) UnmarshalGQL(v interface{}) error { } type LabelChangeResult struct { - Label Label + Label common.Label Status LabelChangeStatus } diff --git a/entities/bug/op_label_change_test.go b/entities/bug/op_label_change_test.go index d184e47a..abafa222 100644 --- a/entities/bug/op_label_change_test.go +++ b/entities/bug/op_label_change_test.go @@ -3,6 +3,7 @@ package bug import ( "testing" + "github.com/git-bug/git-bug/entities/common" "github.com/git-bug/git-bug/entities/identity" "github.com/git-bug/git-bug/entity" "github.com/git-bug/git-bug/entity/dag" @@ -10,12 +11,12 @@ import ( func TestLabelChangeSerialize(t *testing.T) { dag.SerializeRoundTripTest(t, operationUnmarshaler, func(author identity.Interface, unixTime int64) (*LabelChangeOperation, entity.Resolvers) { - return NewLabelChangeOperation(author, unixTime, []Label{"added"}, []Label{"removed"}), nil + return NewLabelChangeOperation(author, unixTime, []common.Label{"added"}, []common.Label{"removed"}), nil }) dag.SerializeRoundTripTest(t, operationUnmarshaler, func(author identity.Interface, unixTime int64) (*LabelChangeOperation, entity.Resolvers) { - return NewLabelChangeOperation(author, unixTime, []Label{"added"}, nil), nil + return NewLabelChangeOperation(author, unixTime, []common.Label{"added"}, nil), nil }) dag.SerializeRoundTripTest(t, operationUnmarshaler, func(author identity.Interface, unixTime int64) (*LabelChangeOperation, entity.Resolvers) { - return NewLabelChangeOperation(author, unixTime, nil, []Label{"removed"}), nil + return NewLabelChangeOperation(author, unixTime, nil, []common.Label{"removed"}), nil }) } diff --git a/entities/bug/operation_test.go b/entities/bug/operation_test.go index d24faa7a..a6f122b3 100644 --- a/entities/bug/operation_test.go +++ b/entities/bug/operation_test.go @@ -32,7 +32,7 @@ func TestValidate(t *testing.T) { NewSetTitleOp(rene, unix, "title2", "title1"), NewAddCommentOp(rene, unix, "message2", nil), NewSetStatusOp(rene, unix, common.ClosedStatus), - NewLabelChangeOperation(rene, unix, []Label{"added"}, []Label{"removed"}), + NewLabelChangeOperation(rene, unix, []common.Label{"added"}, []common.Label{"removed"}), } for _, op := range good { @@ -65,8 +65,8 @@ func TestValidate(t *testing.T) { NewAddCommentOp(rene, unix, "message", []repository.Hash{repository.Hash("invalid")}), NewSetStatusOp(rene, unix, 1000), NewSetStatusOp(rene, unix, 0), - NewLabelChangeOperation(rene, unix, []Label{}, []Label{}), - NewLabelChangeOperation(rene, unix, []Label{"multi\nline"}, []Label{}), + NewLabelChangeOperation(rene, unix, []common.Label{}, []common.Label{}), + NewLabelChangeOperation(rene, unix, []common.Label{"multi\nline"}, []common.Label{}), } for i, op := range bad { diff --git a/entities/bug/snapshot.go b/entities/bug/snapshot.go index ca352284..7f9e7e58 100644 --- a/entities/bug/snapshot.go +++ b/entities/bug/snapshot.go @@ -19,7 +19,7 @@ type Snapshot struct { Status common.Status Title string Comments []Comment - Labels []Label + Labels []common.Label Author identity.Interface Actors []identity.Interface Participants []identity.Interface diff --git a/entities/bug/label.go b/entities/common/label.go index 948a5b47..92d6c242 100644 --- a/entities/bug/label.go +++ b/entities/common/label.go @@ -1,4 +1,4 @@ -package bug +package common import ( "crypto/sha256" diff --git a/entities/bug/label_test.go b/entities/common/label_test.go index 49401c49..206fc4ab 100644 --- a/entities/bug/label_test.go +++ b/entities/common/label_test.go @@ -1,4 +1,4 @@ -package bug +package common import ( "testing" @@ -17,7 +17,6 @@ require ( github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de github.com/awesome-gocui/gocui v1.1.0 github.com/blevesearch/bleve v1.0.14 - github.com/cheekybits/genny v1.0.0 github.com/dustin/go-humanize v1.0.1 github.com/fatih/color v1.17.0 github.com/go-git/go-billy/v5 v5.5.0 @@ -43,15 +42,6 @@ require ( ) require ( - github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect - github.com/bits-and-blooms/bitset v1.13.0 // indirect - github.com/cyphar/filepath-securejoin v0.3.0 // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/sosodev/duration v1.3.1 // indirect - golang.org/x/telemetry v0.0.0-20240723021908-ccdfb411a0c4 // indirect -) - -require ( dario.cat/mergo v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect @@ -59,6 +49,8 @@ require ( github.com/VividCortex/ewma v1.2.0 // indirect github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect github.com/agnivade/levenshtein v1.1.1 // indirect + github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect + github.com/bits-and-blooms/bitset v1.13.0 // indirect github.com/blevesearch/go-porterstemmer v1.0.3 // indirect github.com/blevesearch/mmap-go v1.0.4 // indirect github.com/blevesearch/segment v0.9.1 // indirect @@ -72,6 +64,7 @@ require ( github.com/corpix/uarand v0.2.0 // indirect github.com/couchbase/vellum v1.0.2 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect + github.com/cyphar/filepath-securejoin v0.3.0 // indirect github.com/danieljoos/wincred v1.2.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dvsekhvalnov/jose2go v1.7.0 // indirect @@ -84,6 +77,7 @@ require ( github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/go-querystring v1.1.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -108,6 +102,7 @@ require ( github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect github.com/shurcooL/graphql v0.0.0-20230722043721-ed46e5a46466 // indirect github.com/skeema/knownhosts v1.3.0 // indirect + github.com/sosodev/duration v1.3.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/steveyen/gtreap v0.1.0 // indirect github.com/stretchr/objx v0.5.2 // indirect @@ -119,6 +114,7 @@ require ( go.etcd.io/bbolt v1.3.10 // indirect golang.org/x/mod v0.19.0 // indirect golang.org/x/net v0.27.0 // indirect + golang.org/x/telemetry v0.0.0-20240723021908-ccdfb411a0c4 // indirect golang.org/x/term v0.23.0 golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.23.0 // indirect @@ -74,8 +74,6 @@ github.com/blevesearch/zap/v14 v14.0.5/go.mod h1:bWe8S7tRrSBTIaZ6cLRbgNH4TUDaC9L github.com/blevesearch/zap/v15 v15.0.3 h1:Ylj8Oe+mo0P25tr9iLPp33lN6d4qcztGjaIsP51UxaY= github.com/blevesearch/zap/v15 v15.0.3/go.mod h1:iuwQrImsh1WjWJ0Ue2kBqY83a0rFtJTqfa9fp1rbVVU= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE= -github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cloudflare/circl v1.3.9 h1:QFrlgFYf2Qpi8bSpVPK1HBvWpx16v/1TZivyo7pGuBE= github.com/cloudflare/circl v1.3.9/go.mod h1:PDRU+oXvdD7KCtgKxW95M5Z8BpSCJXQORiZFnBQS5QU= diff --git a/termui/label_select.go b/termui/label_select.go index 5ae1c09a..6e3503b9 100644 --- a/termui/label_select.go +++ b/termui/label_select.go @@ -8,7 +8,7 @@ import ( "github.com/awesome-gocui/gocui" "github.com/git-bug/git-bug/cache" - "github.com/git-bug/git-bug/entities/bug" + "github.com/git-bug/git-bug/entities/common" ) const labelSelectView = "labelSelectView" @@ -23,7 +23,7 @@ var labelSelectHelp = helpBar{ type labelSelect struct { cache *cache.RepoCache bug *cache.BugCache - labels []bug.Label + labels []common.Label labelSelect []bool selected int scroll int @@ -254,7 +254,7 @@ func (ls *labelSelect) addItem(g *gocui.Gui, v *gocui.View) error { } // Add new label, make it selected, and focus - ls.labels = append(ls.labels, bug.Label(input)) + ls.labels = append(ls.labels, common.Label(input)) ls.labelSelect = append(ls.labelSelect, true) ls.selected = len(ls.labels) - 1 @@ -272,7 +272,7 @@ func (ls *labelSelect) abort(g *gocui.Gui, v *gocui.View) error { func (ls *labelSelect) saveAndReturn(g *gocui.Gui, v *gocui.View) error { bugLabels := ls.bug.Snapshot().Labels - var selectedLabels []bug.Label + var selectedLabels []common.Label for i, label := range ls.labels { if ls.labelSelect[i] { selectedLabels = append(selectedLabels, label) @@ -4,7 +4,6 @@ package tools import ( _ "github.com/99designs/gqlgen" - _ "github.com/cheekybits/genny" _ "github.com/praetorian-inc/gokart" _ "golang.org/x/vuln/cmd/govulncheck" ) |