Sha256: f63e79061ef647eaee5f5596219477195a733271a2fcf01ff076a613e38f3057
Contents?: true
Size: 765 Bytes
Versions: 19
Compression:
Stored size: 765 Bytes
Contents
# frozen_string_literal: true module Osso module GraphQL module Mutations class DeleteEnterpriseAccount < BaseMutation null false argument :id, ID, required: true field :enterprise_account, Types::EnterpriseAccount, null: true field :errors, [String], null: false def enterprise_account(id:, **_args) @enterprise_account ||= Osso::Models::EnterpriseAccount.find(id) end def resolve(**args) customer = enterprise_account(**args) return response_data(enterprise_account: nil) if customer.destroy response_error(customer.errors) end def domain(**args) enterprise_account(**args).domain end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems