aboutsummaryrefslogtreecommitdiffstats
path: root/api/graphql/resolvers/repo.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-12-23 01:48:14 +0100
committerGitHub <noreply@github.com>2022-12-23 01:48:14 +0100
commit0a5a0ec1ef4ad98bc2116a953e201f96474941ab (patch)
tree660a9b17b5247fe2f954bfa814cce3193c5afa23 /api/graphql/resolvers/repo.go
parent108518530e822e3bdf59c8bfc333ad0bbe2d5fc8 (diff)
parent95911100823b5c809225d664de74ad2d64e91972 (diff)
downloadgit-bug-0a5a0ec1ef4ad98bc2116a953e201f96474941ab.tar.gz
Merge pull request #938 from MichaelMure/cache-reorg
Generic cache layer
Diffstat (limited to 'api/graphql/resolvers/repo.go')
-rw-r--r--api/graphql/resolvers/repo.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/api/graphql/resolvers/repo.go b/api/graphql/resolvers/repo.go
index 3fcaada1..67b03628 100644
--- a/api/graphql/resolvers/repo.go
+++ b/api/graphql/resolvers/repo.go
@@ -41,7 +41,7 @@ func (repoResolver) AllBugs(_ context.Context, obj *models.Repository, after *st
}
// Simply pass a []string with the ids to the pagination algorithm
- source, err := obj.Repo.QueryBugs(q)
+ source, err := obj.Repo.Bugs().Query(q)
if err != nil {
return nil, err
}
@@ -60,7 +60,7 @@ func (repoResolver) AllBugs(_ context.Context, obj *models.Repository, after *st
nodes := make([]models.BugWrapper, len(lazyBugEdges))
for i, lazyBugEdge := range lazyBugEdges {
- excerpt, err := obj.Repo.ResolveBugExcerpt(lazyBugEdge.Id)
+ excerpt, err := obj.Repo.Bugs().ResolveExcerpt(lazyBugEdge.Id)
if err != nil {
return nil, err
}
@@ -86,7 +86,7 @@ func (repoResolver) AllBugs(_ context.Context, obj *models.Repository, after *st
}
func (repoResolver) Bug(_ context.Context, obj *models.Repository, prefix string) (models.BugWrapper, error) {
- excerpt, err := obj.Repo.ResolveBugExcerptPrefix(prefix)
+ excerpt, err := obj.Repo.Bugs().ResolveExcerptPrefix(prefix)
if err != nil {
return nil, err
}
@@ -103,7 +103,7 @@ func (repoResolver) AllIdentities(_ context.Context, obj *models.Repository, aft
}
// Simply pass a []string with the ids to the pagination algorithm
- source := obj.Repo.AllIdentityIds()
+ source := obj.Repo.Identities().AllIds()
// The edger create a custom edge holding just the id
edger := func(id entity.Id, offset int) connections.Edge {
@@ -119,7 +119,7 @@ func (repoResolver) AllIdentities(_ context.Context, obj *models.Repository, aft
nodes := make([]models.IdentityWrapper, len(lazyIdentityEdges))
for k, lazyIdentityEdge := range lazyIdentityEdges {
- excerpt, err := obj.Repo.ResolveIdentityExcerpt(lazyIdentityEdge.Id)
+ excerpt, err := obj.Repo.Identities().ResolveExcerpt(lazyIdentityEdge.Id)
if err != nil {
return nil, err
}
@@ -145,7 +145,7 @@ func (repoResolver) AllIdentities(_ context.Context, obj *models.Repository, aft
}
func (repoResolver) Identity(_ context.Context, obj *models.Repository, prefix string) (models.IdentityWrapper, error) {
- excerpt, err := obj.Repo.ResolveIdentityExcerptPrefix(prefix)
+ excerpt, err := obj.Repo.Identities().ResolveExcerptPrefix(prefix)
if err != nil {
return nil, err
}
@@ -187,5 +187,5 @@ func (repoResolver) ValidLabels(_ context.Context, obj *models.Repository, after
}, nil
}
- return connections.LabelCon(obj.Repo.ValidLabels(), edger, conMaker, input)
+ return connections.LabelCon(obj.Repo.Bugs().ValidLabels(), edger, conMaker, input)
}