diff options
Diffstat (limited to 'graphql/resolvers')
-rw-r--r-- | graphql/resolvers/operations.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/graphql/resolvers/operations.go b/graphql/resolvers/operations.go index b49b4f83..e964388b 100644 --- a/graphql/resolvers/operations.go +++ b/graphql/resolvers/operations.go @@ -12,24 +12,40 @@ import ( type addCommentOperationResolver struct{} +func (addCommentOperationResolver) Author(ctx context.Context, obj *operations.AddCommentOperation) (bug.Person, error) { + return obj.Author, nil +} + func (addCommentOperationResolver) Date(ctx context.Context, obj *operations.AddCommentOperation) (time.Time, error) { return obj.Time(), nil } type createOperationResolver struct{} +func (createOperationResolver) Author(ctx context.Context, obj *operations.CreateOperation) (bug.Person, error) { + return obj.Author, nil +} + func (createOperationResolver) Date(ctx context.Context, obj *operations.CreateOperation) (time.Time, error) { return obj.Time(), nil } type labelChangeOperation struct{} +func (labelChangeOperation) Author(ctx context.Context, obj *operations.LabelChangeOperation) (bug.Person, error) { + return obj.Author, nil +} + func (labelChangeOperation) Date(ctx context.Context, obj *operations.LabelChangeOperation) (time.Time, error) { return obj.Time(), nil } type setStatusOperationResolver struct{} +func (setStatusOperationResolver) Author(ctx context.Context, obj *operations.SetStatusOperation) (bug.Person, error) { + return obj.Author, nil +} + func (setStatusOperationResolver) Date(ctx context.Context, obj *operations.SetStatusOperation) (time.Time, error) { return obj.Time(), nil } @@ -40,6 +56,10 @@ func (setStatusOperationResolver) Status(ctx context.Context, obj *operations.Se type setTitleOperationResolver struct{} +func (setTitleOperationResolver) Author(ctx context.Context, obj *operations.SetTitleOperation) (bug.Person, error) { + return obj.Author, nil +} + func (setTitleOperationResolver) Date(ctx context.Context, obj *operations.SetTitleOperation) (time.Time, error) { return obj.Time(), nil } |