Welcome to mirror list, hosted at ThFree Co, Russian Federation.

note.rb « update « notes « mutations « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ca97dad6deda1c5b10543c8bee3d3378d071f048 (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)
          check_object_is_note!(note)
        end
      end
    end
  end
end