-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Mutaions, project destroy added * Mutations Added mutations for creating and destroying the task Note : Task destroy works if to disable the notifier part in the interactor -> yet to figure out * Comments Added comment type & comment\s resolvers * Added the comment mutation-> Update * Returned files in order * Added empty lines to the end of each files * Did the rest of the required edits * Made the requested changes * Solving some conflicts /organizing edits/ * fixes problems * fixes 2 --------- Co-authored-by: deniszackharov <denis.zaharov@flatstack.com>
- Loading branch information
1 parent
404ce4d
commit 5b8e28b
Showing
6 changed files
with
21 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module Mutations | ||
class DestroyTask < BaseMutation | ||
argument :id, ID, required: true | ||
|
||
type Types::Payloads::TaskPayload | ||
|
||
def resolve(id:) | ||
task = Task.find(id) | ||
|
||
result = ::Tasks::Destroy.call(task: task, user: current_user) | ||
result.to_h.merge(errors: formatted_errors(result.task)) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters