diff options
Diffstat (limited to 'api/graphql/resolvers/comment.go')
-rw-r--r-- | api/graphql/resolvers/comment.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/api/graphql/resolvers/comment.go b/api/graphql/resolvers/comment.go new file mode 100644 index 00000000..5206e8a7 --- /dev/null +++ b/api/graphql/resolvers/comment.go @@ -0,0 +1,17 @@ +package resolvers + +import ( + "context" + + "github.com/MichaelMure/git-bug/api/graphql/graph" + "github.com/MichaelMure/git-bug/api/graphql/models" + "github.com/MichaelMure/git-bug/bug" +) + +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 +} |