Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

feat: update tag #49

Merged
merged 19 commits into from
Oct 23, 2021
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
206 changes: 204 additions & 2 deletions internal/adapter/gql/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions internal/adapter/gql/gqlmodel/models_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions internal/adapter/gql/resolver_mutation_tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,23 @@ func (r *mutationResolver) CreateTagGroup(ctx context.Context, input gqlmodel.Cr
}, nil
}

func (r *mutationResolver) UpdateTag(ctx context.Context, input gqlmodel.UpdateTagInput) (*gqlmodel.UpdateTagPayload, error) {
exit := trace(ctx)
defer exit()

tag, err := r.usecases.Tag.UpdateTag(ctx, interfaces.UpdateTagParam{
Label: input.Label,
SceneID: id.SceneID(input.SceneID),
TagID: id.TagID(input.TagID),
}, getOperator(ctx))
if err != nil {
return nil, err
}
return &gqlmodel.UpdateTagPayload{
Tag: gqlmodel.ToTagGroup(tag),
}, nil
}

func (r *mutationResolver) AttachTagItemToGroup(ctx context.Context, input gqlmodel.AttachTagItemToGroupInput) (*gqlmodel.AttachTagItemToGroupPayload, error) {
exit := trace(ctx)
defer exit()
Expand Down
Loading