subscriptions.rb 636 B

123456789101112131415
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. module Gql::EntryPoints
  3. class Subscriptions < Gql::Types::BaseObject
  4. # Don't implement the nodes query interface for security reasons.
  5. # IDs can be generated on the client side and used to fetch all records from the database.
  6. description 'All available subscriptions'
  7. Mixin::RequiredSubPaths.eager_load_recursive Gql::Subscriptions, "#{__dir__}/../subscriptions/"
  8. Gql::Subscriptions::BaseSubscription.descendants.reject { |klass| klass.name.include?('::Base') }.each do |klass|
  9. klass.register_in_schema(self)
  10. end
  11. end
  12. end