Class: Ecoportal::API::GraphQL::Payload::ExecuteWorkflowCommands

Inherits:
Logic::BaseModel show all
Defined in:
lib/ecoportal/api/graphql/payload/execute_workflow_commands.rb

Constant Summary collapse

SCHEMA_VERSION =
'20260605'.freeze

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

#as_input

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

#as_update, #dirty?

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Ecoportal::API::GraphQL::Concerns::SnakeCamelAccess

Instance Method Details

#bodyObject



29
30
31
# File 'lib/ecoportal/api/graphql/payload/execute_workflow_commands.rb', line 29

def body
  doc['errors']
end

#error?Boolean

Returns:

  • (Boolean)


22
23
24
25
26
27
# File 'lib/ecoportal/api/graphql/payload/execute_workflow_commands.rb', line 22

def error?
  errs = doc['errors']
  return false if errs.nil?

  !Array(errs).empty?
end

#itemObject



12
13
14
15
16
# File 'lib/ecoportal/api/graphql/payload/execute_workflow_commands.rb', line 12

def item
  return nil unless (raw = doc['item'])

  @item ||= pages_workflow_class.from_doc(raw)
end

#success?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/ecoportal/api/graphql/payload/execute_workflow_commands.rb', line 18

def success?
  !error?
end