debian-mirror-gitlab/app/graphql/mutations/customer_relations/contacts/base.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
608 B
Ruby
Raw Normal View History

2022-07-16 23:28:13 +05:30
# 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