queries.rb 599 B

123456789101112131415
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. module Gql::EntryPoints
  3. class Queries < 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 queries'
  7. Mixin::RequiredSubPaths.eager_load_recursive Gql::Queries, "#{__dir__}/../queries/"
  8. Gql::Queries::BaseQuery.descendants.reject { |klass| klass.name.include?('::Base') }.each do |klass|
  9. klass.register_in_schema(self)
  10. end
  11. end
  12. end