Sha256: 4d2ea86c383bb832525b6d90213e8f29532d416c9670a71de53a7663f47e40ce
Contents?: true
Size: 787 Bytes
Versions: 10
Compression:
Stored size: 787 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(errors: customer.errors.full_messages) end def domain(**args) enterprise_account(**args).domain end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems