Class: Osso::GraphQL::Mutations::CreateEnterpriseAccount
- Inherits:
-
BaseMutation
- Object
- GraphQL::Schema::RelayClassicMutation
- BaseMutation
- Osso::GraphQL::Mutations::CreateEnterpriseAccount
- Defined in:
- lib/osso/graphql/mutations/create_enterprise_account.rb
Instance Method Summary collapse
Methods inherited from BaseMutation
#account_domain, #admin_ready?, #domain_ready?, #field_errors, #internal_ready?, #provider_domain, #ready?, #response_data, #response_error
Instance Method Details
#resolve(**args) ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/osso/graphql/mutations/create_enterprise_account.rb', line 15 def resolve(**args) enterprise_account = Osso::Models::EnterpriseAccount.new(args) if enterprise_account.save Osso::Analytics.capture(email: context[:email], event: self.class.name.demodulize, properties: args) return response_data(enterprise_account: enterprise_account) end response_error(enterprise_account.errors) end |