diff options
Diffstat (limited to 'graphql/resolvers/identity.go')
-rw-r--r-- | graphql/resolvers/identity.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/graphql/resolvers/identity.go b/graphql/resolvers/identity.go index d4f9bba2..05f7207e 100644 --- a/graphql/resolvers/identity.go +++ b/graphql/resolvers/identity.go @@ -3,15 +3,22 @@ package resolvers import ( "context" + "github.com/MichaelMure/git-bug/graphql/graph" "github.com/MichaelMure/git-bug/identity" ) +var _ graph.IdentityResolver = &identityResolver{} + type identityResolver struct{} func (identityResolver) ID(ctx context.Context, obj *identity.Interface) (string, error) { return (*obj).Id(), nil } +func (identityResolver) HumanID(ctx context.Context, obj *identity.Interface) (string, error) { + return (*obj).HumanId(), nil +} + func (identityResolver) Name(ctx context.Context, obj *identity.Interface) (*string, error) { return nilIfEmpty((*obj).Name()) } |