diff options
Diffstat (limited to 'graphql/resolvers/comment.go')
-rw-r--r-- | graphql/resolvers/comment.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/graphql/resolvers/comment.go b/graphql/resolvers/comment.go new file mode 100644 index 00000000..b142712a --- /dev/null +++ b/graphql/resolvers/comment.go @@ -0,0 +1,17 @@ +package resolvers + +import ( + "context" + + "github.com/MichaelMure/git-bug/bug" + "github.com/MichaelMure/git-bug/graphql/graph" + "github.com/MichaelMure/git-bug/graphql/models" +) + +var _ graph.CommentResolver = &commentResolver{} + +type commentResolver struct{} + +func (c commentResolver) Author(_ context.Context, obj *bug.Comment) (models.IdentityWrapper, error) { + return models.NewLoadedIdentity(obj.Author), nil +} |