Class: Ecoportal::API::GraphQL::Payload::ForceCommands Deprecated

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

Overview

Deprecated.

Kept for backwards compatibility with existing execute_force_commands callers.

New callers should use Payload::ExecuteWorkflowCommands, which is returned by Mutation::Page::ExecuteWorkflowCommands and Builder::Page#execute_workflow_commands.

Payload for executeWorkflowCommands — returns updated patchVer + errors. No item class — the response is not a page model, it is a PagesWorkflow type.

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

#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



24
25
26
# File 'lib/ecoportal/api/graphql/payload/force_commands.rb', line 24

def body
  doc['errors']
end

#error?Boolean

Returns:

  • (Boolean)


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

def error?
  return false unless (err = doc['errors'])

  !Array(err).empty?
end

#success?Boolean

Returns:

  • (Boolean)


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

def success?
  !error?
end