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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/mutations/customer_relations/contacts/base.rb')
-rw-r--r--app/graphql/mutations/customer_relations/contacts/base.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/app/graphql/mutations/customer_relations/contacts/base.rb b/app/graphql/mutations/customer_relations/contacts/base.rb
new file mode 100644
index 00000000000..5d49d48ebe2
--- /dev/null
+++ b/app/graphql/mutations/customer_relations/contacts/base.rb
@@ -0,0 +1,25 @@
+# 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