Module: Decidim::Api
- Includes:
- ActiveSupport::Configurable
- Defined in:
- lib/decidim/api.rb,
lib/decidim/api/types.rb,
lib/decidim/api/engine.rb,
lib/decidim/api/schema.rb,
lib/decidim/api/version.rb,
lib/decidim/api/query_type.rb,
lib/decidim/api/mutation_type.rb,
lib/decidim/api/types/base_enum.rb,
lib/decidim/api/types/base_field.rb,
lib/decidim/api/types/base_union.rb,
lib/decidim/api/types/base_object.rb,
lib/decidim/api/types/base_scalar.rb,
lib/decidim/api/types/base_argument.rb,
lib/decidim/api/types/base_mutation.rb,
lib/decidim/api/types/base_interface.rb,
lib/decidim/api/types/base_input_object.rb,
app/controllers/decidim/api/queries_controller.rb,
app/controllers/decidim/api/graphiql_controller.rb,
app/controllers/decidim/api/application_controller.rb,
app/controllers/decidim/api/documentation_controller.rb
Overview
This holds the decidim-api version.
Defined Under Namespace
Modules: Types Classes: ApplicationController, DocumentationController, Engine, GraphiQLController, MutationType, QueriesController, QueryType, Schema
Class Method Summary collapse
- .add_orphan_type(type) ⇒ Object
-
.orphan_types ⇒ Object
This declares all the types an interface or union can resolve to.
- .version ⇒ Object
Class Method Details
.add_orphan_type(type) ⇒ Object
37 38 39 40 |
# File 'lib/decidim/api.rb', line 37 def self.add_orphan_type(type) @orphan_types ||= [] @orphan_types += [type] end |
.orphan_types ⇒ Object
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.
31 32 33 34 35 |
# File 'lib/decidim/api.rb', line 31 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 ⇒ Object
6 7 8 |
# File 'lib/decidim/api/version.rb', line 6 def self.version "0.29.1" end |