module Decidim::Api
This module holds all business logic related to exposing a Public API for decidim.
This holds the decidim-api version.
Public Class Methods
add_orphan_type(type)
click to toggle source
# File lib/decidim/api.rb, line 20 def self.add_orphan_type(type) @orphan_types ||= [] @orphan_types += [type] end
orphan_types()
click to toggle source
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.
# File lib/decidim/api.rb, line 14 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
version()
click to toggle source
# File lib/decidim/api/version.rb, line 6 def self.version "0.24.3" end