debian-mirror-gitlab/app/graphql/mutations/customer_relations/contacts/base.rb
2022-07-16 19:58:13 +02:00

25 lines
608 B
Ruby

# frozen_string_literal: true
module Mutations
module CustomerRelations
module Contacts
class Base < BaseMutation
include ResolvesIds
include Gitlab::Graphql::Authorize::AuthorizeResource
field :contact,
Types::CustomerRelations::ContactType,
null: true,
description: 'Contact after the mutation.'
authorize :admin_crm_contact
def set_organization!(args)
return unless args[:organization_id]
args[:organization_id] = args[:organization_id].model_id
end
end
end
end
end