aboutsummaryrefslogtreecommitdiffstats
path: root/api/graphql/resolvers/comment.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2021-05-03 11:45:15 +0200
committerMichael Muré <batolettre@gmail.com>2022-08-22 13:25:26 +0200
commit45b04351d8d02e53b3401b0ee23f7cbe750b63cd (patch)
tree59d203ef6c0f6a497b7074cd5617c8869cac3b14 /api/graphql/resolvers/comment.go
parent43026fc53669d462a60feec7d22aec090959be72 (diff)
downloadgit-bug-45b04351d8d02e53b3401b0ee23f7cbe750b63cd.tar.gz
bug: have a type for combined ids, fix https://github.com/MichaelMure/git-bug/issues/653
Diffstat (limited to 'api/graphql/resolvers/comment.go')
-rw-r--r--api/graphql/resolvers/comment.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/api/graphql/resolvers/comment.go b/api/graphql/resolvers/comment.go
index 78548156..7dddc3c8 100644
--- a/api/graphql/resolvers/comment.go
+++ b/api/graphql/resolvers/comment.go
@@ -6,12 +6,17 @@ import (
"github.com/MichaelMure/git-bug/api/graphql/graph"
"github.com/MichaelMure/git-bug/api/graphql/models"
"github.com/MichaelMure/git-bug/entities/bug"
+ "github.com/MichaelMure/git-bug/entity"
)
var _ graph.CommentResolver = &commentResolver{}
type commentResolver struct{}
+func (c commentResolver) ID(ctx context.Context, obj *bug.Comment) (entity.CombinedId, error) {
+ return obj.CombinedId(), nil
+}
+
func (c commentResolver) Author(_ context.Context, obj *bug.Comment) (models.IdentityWrapper, error) {
return models.NewLoadedIdentity(obj.Author), nil
}