Class: Mutations::Notes::Update::ImageDiffNote
- Inherits:
-
Base
- Object
- GraphQL::Schema::RelayClassicMutation
- BaseMutation
- Base
- Base
- Mutations::Notes::Update::ImageDiffNote
- Defined in:
- app/graphql/mutations/notes/update/image_diff_note.rb
Constant Summary
Constants inherited from Base
Base::QUICK_ACTION_ONLY_WARNING
Constants inherited from BaseMutation
Constants included from Gitlab::Graphql::Authorize::AuthorizeResource
Gitlab::Graphql::Authorize::AuthorizeResource::ConfigurationError, Gitlab::Graphql::Authorize::AuthorizeResource::RESOURCE_ACCESS_ERROR
Instance Method Summary collapse
Methods inherited from Base
Methods inherited from BaseMutation
#api_user?, authorization, authorized?, authorizes_object?, #current_user, #errors_on_object, #load_application_object, #read_only?, #unauthorized_object
Methods included from Gitlab::Graphql::Authorize::AuthorizeResource
#authorize!, #authorized_find!, #authorized_resource?, #find_object, #raise_resource_not_available_error!
Instance Method Details
#ready?(**args) ⇒ Boolean
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'app/graphql/mutations/notes/update/image_diff_note.rb', line 23 def ready?(**args) # As both arguments are optional, validate here that one of the # arguments are present. # # This may be able to be done using InputUnions in the future # if this RFC is merged: # https://github.com/graphql/graphql-spec/blob/master/rfcs/InputUnion.md if args.values_at(:body, :position).compact.blank? raise Gitlab::Graphql::Errors::ArgumentError, 'body or position arguments are required' end super(**args) end |