articles.rb 513 B

123456789101112131415161718
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. module Gql::Queries
  3. class Ticket::Articles < BaseQuery
  4. description 'Fetch ticket articles by ticket ID'
  5. argument :ticket, Gql::Types::Input::Locator::TicketInputType, description: 'Ticket locator'
  6. type Gql::Types::Ticket::ArticleType.connection_type, null: false
  7. def resolve(ticket:)
  8. Service::Ticket::Article::List
  9. .new(current_user: context.current_user)
  10. .execute(ticket:)
  11. end
  12. end
  13. end