Class: Ecoportal::API::GraphQL::Payload::LocationStructure::Draft::Create

Inherits:
Logic::Payload show all
Defined in:
lib/ecoportal/api/graphql/payload/location_structure/draft/create.rb

Direct Known Subclasses

AddCommands

Constant Summary

Constants included from Common::GraphQL::Model::Diffable

Common::GraphQL::Model::Diffable::DIFF_CLASS

Instance Method Summary collapse

Methods inherited from Logic::Payload

#success?

Methods included from Common::GraphQL::Model::AsInput

#as_input

Methods included from Common::GraphQL::Model::Diffable

#as_update, #dirty?

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


13
14
15
16
# File 'lib/ecoportal/api/graphql/payload/location_structure/draft/create.rb', line 13

def error?
  super ||
    draft.error?
end

#error_docObject



18
19
20
21
22
23
24
25
26
27
# File 'lib/ecoportal/api/graphql/payload/location_structure/draft/create.rb', line 18

def error_doc
  err_doc = super
  return err_doc if err_doc

  if draft.error? && draft.respond_to?(:error_doc)
    {
      draft: draft.error_doc
    }
  end
end