overviews.rb 429 B

123456789101112131415
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. module Gql::Queries
  3. class Ticket::Overviews < BaseQuery
  4. description 'Ticket overviews available in the system'
  5. type Gql::Types::OverviewType.connection_type, null: false
  6. def resolve
  7. # This effectively scopes the overviews by `:use?` permission.
  8. ::Ticket::Overviews.all(current_user: context.current_user)
  9. end
  10. end
  11. end