aboutsummaryrefslogtreecommitdiffstats
path: root/api/graphql/resolvers/repo.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2024-08-25 20:40:23 +0200
committerGitHub <noreply@github.com>2024-08-25 18:40:23 +0000
commit3a4b8805dfd794cc25f57e99c73ddec651805af1 (patch)
treeb6af67c761c96b323400d061db22ceed73fb0bb0 /api/graphql/resolvers/repo.go
parentc3ff05f95bdfad6c2ea4cb899024fd47ac503b5f (diff)
downloadgit-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
Diffstat (limited to 'api/graphql/resolvers/repo.go')
-rw-r--r--api/graphql/resolvers/repo.go12
1 files changed, 6 insertions, 6 deletions
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)
}