Class: Ecoportal::API::GraphQL::Payload::OkPayload
- Inherits:
-
Logic::BaseModel
- Object
- Common::Content::DoubleModel
- Common::GraphQL::Model
- Logic::BaseModel
- Ecoportal::API::GraphQL::Payload::OkPayload
- Defined in:
- lib/ecoportal/api/graphql/payload/ok_payload.rb
Overview
Payload for mutations that return { ok: Boolean, errors } instead of an item.
Used by submitPageAiSummaryFeedback (SubmitFeedbackPayload).
The smartFillGenerate / smartFillSubmitFeedback users named here before 2026-07-30
never existed in the schema — see the CHANGELOG entry that removed them.
Constant Summary
Constants included from Common::GraphQL::Model::Diffable
Common::GraphQL::Model::Diffable::DIFF_CLASS
Instance Method Summary collapse
Methods included from Concerns::SnakeCamelAccess
#method_missing, #respond_to_missing?
Methods included from Common::GraphQL::Model::AsInput
Methods included from Common::GraphQL::Model::Diffable
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Ecoportal::API::GraphQL::Concerns::SnakeCamelAccess
Instance Method Details
#error? ⇒ Boolean
21 22 23 24 25 |
# File 'lib/ecoportal/api/graphql/payload/ok_payload.rb', line 21 def error? return false if errors.nil? !errors.empty? end |
#error_doc ⇒ Object
27 28 29 30 31 |
# File 'lib/ecoportal/api/graphql/payload/ok_payload.rb', line 27 def error_doc return unless (err_doc = errors&.doc) { errors: err_doc } end |
#success? ⇒ Boolean
17 18 19 |
# File 'lib/ecoportal/api/graphql/payload/ok_payload.rb', line 17 def success? !!ok && !error? end |