radar/twist-v2

View on GitHub
backend/lib/twist/web/graphql/mutations/notes/open.rb

Summary

Maintainability
A
35 mins
Test Coverage
module Twist
  module Web
    module GraphQL
      module Mutations
        module Notes
          class Open < BaseMutation
            argument :id, ID, required: true

            type Types::Note

            def resolve(id:)
              open = Transactions::Notes::Open.new(
                note_repo: context[:note_repo],
              )
              open.(id: id).success
            end
          end
        end
      end
    end
  end
end