lib/osso/graphql/mutations/create_enterprise_account.rb in osso-0.0.10 vs lib/osso/graphql/mutations/create_enterprise_account.rb in osso-0.0.11

- old
+ new

@@ -13,10 +13,13 @@ field :errors, [String], null: false def resolve(**args) enterprise_account = Osso::Models::EnterpriseAccount.new(args) - return response_data(enterprise_account: enterprise_account) if enterprise_account.save + 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 end end