Class: Ecoportal::API::GraphQL::Logic::Payload
- Inherits:
-
BaseModel
- Object
- Common::Content::DoubleModel
- Common::GraphQL::Model
- BaseModel
- Ecoportal::API::GraphQL::Logic::Payload
- Defined in:
- lib/ecoportal/api/graphql/logic/payload.rb
Direct Known Subclasses
Payload::Action::Archive, Payload::Action::Create, Payload::Action::Update, Payload::ContractorEntity::Create, Payload::LocationStructure::ApplyCommands, Payload::LocationStructure::Draft::Create, Payload::LocationStructure::Draft::Delete, Payload::LocationStructure::Draft::Publish
Defined Under Namespace
Classes: GenericItem
Constant Summary
Constants included from Common::GraphQL::Model::Diffable
Common::GraphQL::Model::Diffable::DIFF_CLASS
Instance Method Summary collapse
Methods included from Common::GraphQL::Model::AsInput
Methods included from Common::GraphQL::Model::Diffable
Instance Method Details
#error? ⇒ Boolean
21 22 23 |
# File 'lib/ecoportal/api/graphql/logic/payload.rb', line 21 def error? errors && !errors.empty? end |
#error_doc ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/ecoportal/api/graphql/logic/payload.rb', line 29 def error_doc return unless (err_doc = errors&.doc) { validationErrors: err_doc } end |
#success? ⇒ Boolean
25 26 27 |
# File 'lib/ecoportal/api/graphql/logic/payload.rb', line 25 def success? !error? end |