class Osso::GraphQL::Mutations::UpdateAppConfig

Public Instance Methods

ready?(*) click to toggle source
# File lib/osso/graphql/mutations/update_app_config.rb, line 26
def ready?(*)
  admin_ready?
end
resolve(**args) click to toggle source
# File lib/osso/graphql/mutations/update_app_config.rb, line 16
def resolve(**args)
  app_config = Osso::Models::AppConfig.find
  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