lib/osso/graphql/mutations/update_app_config.rb in osso-0.0.10 vs lib/osso/graphql/mutations/update_app_config.rb in osso-0.0.11
- old
+ new
@@ -13,10 +13,13 @@
field :app_config, Types::AppConfig, null: true
field :errors, [String], null: false
def resolve(**args)
app_config = Osso::Models::AppConfig.find
- return response_data(app_config: app_config) if app_config.update(**args)
+ if app_config.update(**args)
+ Osso::Analytics.capture(email: context[:email], event: self.class.name.demodulize, properties: args)
+ return response_data(app_config: app_config)
+ end
response_error(app_config.errors)
end
def ready?(*)