Module: Ecoportal::API::GraphQL::Model::Template
- Defined in:
- lib/ecoportal/api/graphql/model/template.rb,
lib/ecoportal/api/graphql/model/template/node.rb,
lib/ecoportal/api/graphql/model/template/read.rb,
lib/ecoportal/api/graphql/model/template/field.rb,
lib/ecoportal/api/graphql/model/template/force.rb,
lib/ecoportal/api/graphql/model/template/stage.rb,
lib/ecoportal/api/graphql/model/template/helper.rb,
lib/ecoportal/api/graphql/model/template/option.rb,
lib/ecoportal/api/graphql/model/template/binding.rb,
lib/ecoportal/api/graphql/model/template/section.rb,
lib/ecoportal/api/graphql/model/template/instance.rb,
lib/ecoportal/api/graphql/model/template/command_grouper.rb,
lib/ecoportal/api/graphql/model/template/staged_executor.rb,
lib/ecoportal/api/graphql/model/template/change_log_entry.rb,
lib/ecoportal/api/graphql/model/template/command_synthesis.rb,
lib/ecoportal/api/graphql/model/template/command_normalizer.rb
Overview
Concrete counterparts of Base::Template::* (see there for the page-vs-Template
type asymmetry). Information and RelatedPages need no extra wiring — both are
flat, read-only models; ChangeLogEntry adds the owner embed.
This module ALSO carries the mutable, editable template model (the repo's internal docs) — "the three lines":
template = Ecoportal::API::GraphQL::Model::Template.load(api, id: page_id)
template.fields.each { |f| f.label = "#{f.label} (reviewed)" }
template.save!(api)
Instance is the class .load returns; .load is the ergonomic module-level entry
point so callers never have to spell Instance themselves.
Defined Under Namespace
Modules: CommandGrouper, Node, Read Classes: Binding, ChangeLogEntry, CommandNormalizer, CommandSynthesis, Field, Force, Helper, Information, Instance, Option, RelatedPages, Section, Stage, StagedExecutor
Class Method Summary collapse
Class Method Details
.load(client, id:) ⇒ Instance
44 45 46 |
# File 'lib/ecoportal/api/graphql/model/template.rb', line 44 def self.load(client, id:) Instance.load(client, id: id) end |