Class: Ecoportal::API::GraphQL::Payload::Kickstand::BulkUpdateWorkflows

Inherits:
Logic::BaseModel show all
Defined in:
lib/ecoportal/api/graphql/payload/kickstand/bulk_update_workflows.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

#error?Boolean

Returns:

  • (Boolean)


25
26
27
28
29
30
# File 'lib/ecoportal/api/graphql/payload/kickstand/bulk_update_workflows.rb', line 25

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

  !Array(errs).empty?
end

#errorsObject



17
18
19
# File 'lib/ecoportal/api/graphql/payload/kickstand/bulk_update_workflows.rb', line 17

def errors
  @errors ||= Error::ValidationErrors.from_doc(doc['errors'])
end

#itemsObject



13
14
15
# File 'lib/ecoportal/api/graphql/payload/kickstand/bulk_update_workflows.rb', line 13

def items
  @items ||= Array(doc['items'] || []).map { |w| workflow_class.from_doc(w) }
end

#success?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/ecoportal/api/graphql/payload/kickstand/bulk_update_workflows.rb', line 21

def success?
  !error?
end