From cc7788ad44bbf6d3a272c15cd8858fb6dc3c1536 Mon Sep 17 00:00:00 2001 From: Sascha Date: Tue, 16 Mar 2021 17:29:56 +0100 Subject: GraphQL: Add target to EditCommentInput --- api/graphql/resolvers/mutation.go | 3 ++- api/graphql/schema/mutations.graphql | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'api/graphql') diff --git a/api/graphql/resolvers/mutation.go b/api/graphql/resolvers/mutation.go index 60746b8b..9cd936a6 100644 --- a/api/graphql/resolvers/mutation.go +++ b/api/graphql/resolvers/mutation.go @@ -5,6 +5,7 @@ import ( "time" "github.com/MichaelMure/git-bug/api/auth" + "github.com/MichaelMure/git-bug/entity" "github.com/MichaelMure/git-bug/api/graphql/graph" "github.com/MichaelMure/git-bug/api/graphql/models" "github.com/MichaelMure/git-bug/bug" @@ -100,7 +101,7 @@ func (r mutationResolver) EditComment(ctx context.Context, input models.EditComm return nil, err } - op, err := b.EditCommentRaw(author, time.Now().Unix(), input.Target, input.Message, nil) + op, err := b.EditCommentRaw(author, time.Now().Unix(), entity.Id(input.Target), input.Message, nil) if err != nil { return nil, err } diff --git a/api/graphql/schema/mutations.graphql b/api/graphql/schema/mutations.graphql index 1544fe67..f5209917 100644 --- a/api/graphql/schema/mutations.graphql +++ b/api/graphql/schema/mutations.graphql @@ -49,6 +49,8 @@ input EditCommentInput { repoRef: String """The bug ID's prefix.""" prefix: String! + """The target.""" + target: String! """The new message to be set.""" message: String! """The collection of file's hash required for the first message.""" -- cgit