aboutsummaryrefslogblamecommitdiffstats
path: root/api/graphql/resolvers/comment.go
blob: 7854815652f65acd29b6a3bb89034a7426b8b91d (plain) (tree)
1
2
3
4
5
6
7
8




                 

                                                           
                                                     








                                                                                                      
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/entities/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
}