info.rb 561 B

12345678910111213141516171819202122232425
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. module Gql::Queries
  3. class System::Setup::Info < BaseQuery
  4. description 'Get current system setup state'
  5. type Gql::Types::SystemSetupInfoType, null: false
  6. # TODO: Create a new base query class for queries that do not require
  7. # authorization???
  8. def self.authorize(...)
  9. true
  10. end
  11. def resolve
  12. setup = Service::System::CheckSetup.new
  13. setup.execute
  14. {
  15. status: setup.status,
  16. type: setup.type
  17. }
  18. end
  19. end
  20. end