diff options
author | Michael Muré <batolettre@gmail.com> | 2018-09-25 17:55:20 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-09-25 17:55:20 +0200 |
commit | 5d7c3a76af85a857a6bb0bff5bac5282c0a9908f (patch) | |
tree | dc0d051f09128a96eefba7a6d8cac458bb4e5379 /graphql/resolvers/operations.go | |
parent | a72ea453a919b8f456cc46fbb7a1156d9f649442 (diff) | |
download | git-bug-5d7c3a76af85a857a6bb0bff5bac5282c0a9908f.tar.gz |
bug: add the optional field AvatarUrl to Person
Diffstat (limited to 'graphql/resolvers/operations.go')
-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 } |