Class: Mutations::Todos::MarkDone
- Inherits:
-
Base
- Object
- GraphQL::Schema::RelayClassicMutation
- BaseMutation
- Base
- Mutations::Todos::MarkDone
- Defined in:
- app/graphql/mutations/todos/mark_done.rb
Constant Summary
Constants inherited from BaseMutation
Instance Method Summary collapse
Methods inherited from BaseMutation
#api_user?, #current_user, #errors_on_object, #ready?
Instance Method Details
#resolve(id:) ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'app/graphql/mutations/todos/mark_done.rb', line 19 def resolve(id:) todo = (id: id) mark_done(todo) { todo: todo.reset, errors: errors_on_object(todo) } end |