aboutsummaryrefslogtreecommitdiffstats
path: root/graphql/resolvers/bug.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-08-12 16:12:14 +0200
committerMichael Muré <batolettre@gmail.com>2019-08-12 16:12:14 +0200
commit99b5c58d43137bd9f6503788a55484327b0c531f (patch)
tree08ecc0f923b5f1fb4e8a7627aeabccb335d92ad1 /graphql/resolvers/bug.go
parent67a3752e176790e82a48706236f889cab4f8913d (diff)
downloadgit-bug-99b5c58d43137bd9f6503788a55484327b0c531f.tar.gz
finish the refactoring for the dedicated identifier type
Diffstat (limited to 'graphql/resolvers/bug.go')
-rw-r--r--graphql/resolvers/bug.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/graphql/resolvers/bug.go b/graphql/resolvers/bug.go
index 37766b95..8f994c0b 100644
--- a/graphql/resolvers/bug.go
+++ b/graphql/resolvers/bug.go
@@ -15,6 +15,14 @@ var _ graph.BugResolver = &bugResolver{}
type bugResolver struct{}
+func (bugResolver) ID(ctx context.Context, obj *bug.Snapshot) (string, error) {
+ return obj.Id().String(), nil
+}
+
+func (bugResolver) HumanID(ctx context.Context, obj *bug.Snapshot) (string, error) {
+ return obj.Id().Human(), nil
+}
+
func (bugResolver) Status(ctx context.Context, obj *bug.Snapshot) (models.Status, error) {
return convertStatus(obj.Status)
}