1package resolvers
2
3import (
4 "context"
5
6 "github.com/git-bug/git-bug/api/graphql/graph"
7 "github.com/git-bug/git-bug/api/graphql/models"
8)
9
10var _ graph.IdentityResolver = &identityResolver{}
11
12type identityResolver struct{}
13
14func (identityResolver) ID(ctx context.Context, obj models.IdentityWrapper) (string, error) {
15 return obj.Id().String(), nil
16}
17
18func (r identityResolver) HumanID(ctx context.Context, obj models.IdentityWrapper) (string, error) {
19 return obj.Id().Human(), nil
20
21}