Sha256: dfea054b9888ab15e102a7aa43b8865859d7113e5d8a9aee349c46a91aed2b28
Contents?: true
Size: 831 Bytes
Versions: 25
Compression:
Stored size: 831 Bytes
Contents
# frozen_string_literal: true require "decidim/api/engine" require "decidim/api/types" module Decidim # This module holds all business logic related to exposing a Public API for # decidim. module Api # This declares all the types an interface or union can resolve to. This needs # to be done in order to be able to have them found. This is a shortcoming of # graphql-ruby and the way it deals with loading types, in combination with # rail's infamous autoloading. def self.orphan_types Decidim.component_manifests.map(&:query_type).map(&:constantize).uniq + Decidim.participatory_space_manifests.map(&:query_type).map(&:constantize).uniq + (@orphan_types || []) end def self.add_orphan_type(type) @orphan_types ||= [] @orphan_types += [type] end end end
Version data entries
25 entries across 25 versions & 1 rubygems