aboutsummaryrefslogtreecommitdiffstats
path: root/api/graphql/resolvers
diff options
context:
space:
mode:
Diffstat (limited to 'api/graphql/resolvers')
-rw-r--r--api/graphql/resolvers/mutation.go6
-rw-r--r--api/graphql/resolvers/repo.go14
2 files changed, 10 insertions, 10 deletions
diff --git a/api/graphql/resolvers/mutation.go b/api/graphql/resolvers/mutation.go
index 3f9f7fe1..32e1fa7c 100644
--- a/api/graphql/resolvers/mutation.go
+++ b/api/graphql/resolvers/mutation.go
@@ -32,7 +32,7 @@ func (r mutationResolver) getBug(repoRef *string, bugPrefix string) (*cache.Repo
return nil, nil, err
}
- b, err := repo.ResolveBugPrefix(bugPrefix)
+ b, err := repo.Bugs().ResolvePrefix(bugPrefix)
if err != nil {
return nil, nil, err
}
@@ -50,7 +50,7 @@ func (r mutationResolver) NewBug(ctx context.Context, input models.NewBugInput)
return nil, err
}
- b, op, err := repo.NewBugRaw(author,
+ b, op, err := repo.Bugs().NewRaw(author,
time.Now().Unix(),
text.CleanupOneLine(input.Title),
text.Cleanup(input.Message),
@@ -181,7 +181,7 @@ func (r mutationResolver) EditComment(ctx context.Context, input models.EditComm
return nil, err
}
- b, target, err := repo.ResolveComment(input.TargetPrefix)
+ b, target, err := repo.Bugs().ResolveComment(input.TargetPrefix)
if err != nil {
return nil, err
}
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)
}