summaryrefslogtreecommitdiff
path: root/app/graphql/mutations/notes/update/note.rb
blob: 73b9b9bc49aa6179ffa65e05d212fed0dbce6dbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# frozen_string_literal: true

module Mutations
  module Notes
    module Update
      class Note < Mutations::Notes::Update::Base
        graphql_name 'UpdateNote'

        argument :body,
                  GraphQL::STRING_TYPE,
                  required: false,
                  description: copy_field_description(Types::Notes::NoteType, :body)

        argument :confidential,
                  GraphQL::BOOLEAN_TYPE,
                  required: false,
                  description: 'The confidentiality flag of a note. Default is false.'

        private

        def pre_update_checks!(_note, _args)
          # no-op
        end
      end
    end
  end
end