aboutsummaryrefslogtreecommitdiffstats
path: root/graphql/resolvers/operations.go
diff options
context:
space:
mode:
authorAmine Hilaly <hilalyamine@gmail.com>2019-04-09 17:43:17 +0200
committerAmine Hilaly <hilalyamine@gmail.com>2019-04-09 17:43:17 +0200
commit6e8496f4c1767ca8a8b95716a04f1b492bef7397 (patch)
treeb1fecc50675159ef48056166ce906ca7f38cb7ea /graphql/resolvers/operations.go
parent30efc99f4493f3a09e94bf322cbf8ef844beea13 (diff)
downloadgit-bug-6e8496f4c1767ca8a8b95716a04f1b492bef7397.tar.gz
Support gqlgen v0.8.3
Diffstat (limited to 'graphql/resolvers/operations.go')
-rw-r--r--graphql/resolvers/operations.go30
1 files changed, 18 insertions, 12 deletions
diff --git a/graphql/resolvers/operations.go b/graphql/resolvers/operations.go
index c8089ac1..90817567 100644
--- a/graphql/resolvers/operations.go
+++ b/graphql/resolvers/operations.go
@@ -11,32 +11,37 @@ import (
type createOperationResolver struct{}
-func (createOperationResolver) Date(ctx context.Context, obj *bug.CreateOperation) (time.Time, error) {
- return obj.Time(), nil
+func (createOperationResolver) Date(ctx context.Context, obj *bug.CreateOperation) (*time.Time, error) {
+ t := obj.Time()
+ return &t, nil
}
type addCommentOperationResolver struct{}
-func (addCommentOperationResolver) Date(ctx context.Context, obj *bug.AddCommentOperation) (time.Time, error) {
- return obj.Time(), nil
+func (addCommentOperationResolver) Date(ctx context.Context, obj *bug.AddCommentOperation) (*time.Time, error) {
+ t := obj.Time()
+ return &t, nil
}
type editCommentOperationResolver struct{}
-func (editCommentOperationResolver) Date(ctx context.Context, obj *bug.EditCommentOperation) (time.Time, error) {
- return obj.Time(), nil
+func (editCommentOperationResolver) Date(ctx context.Context, obj *bug.EditCommentOperation) (*time.Time, error) {
+ t := obj.Time()
+ return &t, nil
}
type labelChangeOperation struct{}
-func (labelChangeOperation) Date(ctx context.Context, obj *bug.LabelChangeOperation) (time.Time, error) {
- return obj.Time(), nil
+func (labelChangeOperation) Date(ctx context.Context, obj *bug.LabelChangeOperation) (*time.Time, error) {
+ t := obj.Time()
+ return &t, nil
}
type setStatusOperationResolver struct{}
-func (setStatusOperationResolver) Date(ctx context.Context, obj *bug.SetStatusOperation) (time.Time, error) {
- return obj.Time(), nil
+func (setStatusOperationResolver) Date(ctx context.Context, obj *bug.SetStatusOperation) (*time.Time, error) {
+ t := obj.Time()
+ return &t, nil
}
func (setStatusOperationResolver) Status(ctx context.Context, obj *bug.SetStatusOperation) (models.Status, error) {
@@ -45,8 +50,9 @@ func (setStatusOperationResolver) Status(ctx context.Context, obj *bug.SetStatus
type setTitleOperationResolver struct{}
-func (setTitleOperationResolver) Date(ctx context.Context, obj *bug.SetTitleOperation) (time.Time, error) {
- return obj.Time(), nil
+func (setTitleOperationResolver) Date(ctx context.Context, obj *bug.SetTitleOperation) (*time.Time, error) {
+ t := obj.Time()
+ return &t, nil
}
func convertStatus(status bug.Status) (models.Status, error) {