diff options
Diffstat (limited to 'graphql/resolvers/timeline.go')
-rw-r--r-- | graphql/resolvers/timeline.go | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/graphql/resolvers/timeline.go b/graphql/resolvers/timeline.go index 42e0a643..27f799ba 100644 --- a/graphql/resolvers/timeline.go +++ b/graphql/resolvers/timeline.go @@ -10,40 +10,47 @@ import ( type commentHistoryStepResolver struct{} -func (commentHistoryStepResolver) Date(ctx context.Context, obj *bug.CommentHistoryStep) (time.Time, error) { - return obj.UnixTime.Time(), nil +func (commentHistoryStepResolver) Date(ctx context.Context, obj *bug.CommentHistoryStep) (*time.Time, error) { + t := obj.UnixTime.Time() + return &t, nil } type addCommentTimelineItemResolver struct{} -func (addCommentTimelineItemResolver) CreatedAt(ctx context.Context, obj *bug.AddCommentTimelineItem) (time.Time, error) { - return obj.CreatedAt.Time(), nil +func (addCommentTimelineItemResolver) CreatedAt(ctx context.Context, obj *bug.AddCommentTimelineItem) (*time.Time, error) { + t := obj.CreatedAt.Time() + return &t, nil } -func (addCommentTimelineItemResolver) LastEdit(ctx context.Context, obj *bug.AddCommentTimelineItem) (time.Time, error) { - return obj.LastEdit.Time(), nil +func (addCommentTimelineItemResolver) LastEdit(ctx context.Context, obj *bug.AddCommentTimelineItem) (*time.Time, error) { + t := obj.LastEdit.Time() + return &t, nil } type createTimelineItemResolver struct{} -func (createTimelineItemResolver) CreatedAt(ctx context.Context, obj *bug.CreateTimelineItem) (time.Time, error) { - return obj.CreatedAt.Time(), nil +func (createTimelineItemResolver) CreatedAt(ctx context.Context, obj *bug.CreateTimelineItem) (*time.Time, error) { + t := obj.CreatedAt.Time() + return &t, nil } -func (createTimelineItemResolver) LastEdit(ctx context.Context, obj *bug.CreateTimelineItem) (time.Time, error) { - return obj.LastEdit.Time(), nil +func (createTimelineItemResolver) LastEdit(ctx context.Context, obj *bug.CreateTimelineItem) (*time.Time, error) { + t := obj.LastEdit.Time() + return &t, nil } type labelChangeTimelineItem struct{} -func (labelChangeTimelineItem) Date(ctx context.Context, obj *bug.LabelChangeTimelineItem) (time.Time, error) { - return obj.UnixTime.Time(), nil +func (labelChangeTimelineItem) Date(ctx context.Context, obj *bug.LabelChangeTimelineItem) (*time.Time, error) { + t := obj.UnixTime.Time() + return &t, nil } type setStatusTimelineItem struct{} -func (setStatusTimelineItem) Date(ctx context.Context, obj *bug.SetStatusTimelineItem) (time.Time, error) { - return obj.UnixTime.Time(), nil +func (setStatusTimelineItem) Date(ctx context.Context, obj *bug.SetStatusTimelineItem) (*time.Time, error) { + t := obj.UnixTime.Time() + return &t, nil } func (setStatusTimelineItem) Status(ctx context.Context, obj *bug.SetStatusTimelineItem) (models.Status, error) { @@ -52,6 +59,7 @@ func (setStatusTimelineItem) Status(ctx context.Context, obj *bug.SetStatusTimel type setTitleTimelineItem struct{} -func (setTitleTimelineItem) Date(ctx context.Context, obj *bug.SetTitleTimelineItem) (time.Time, error) { - return obj.UnixTime.Time(), nil +func (setTitleTimelineItem) Date(ctx context.Context, obj *bug.SetTitleTimelineItem) (*time.Time, error) { + t := obj.UnixTime.Time() + return &t, nil } |