Class: Ecoportal::API::GraphQL::Base::PagesWorkflow::OperationInterface

Inherits:
Logic::BaseModel show all
Defined in:
lib/ecoportal/api/graphql/base/pages_workflow/operation_interface.rb

Constant Summary collapse

SCHEMA_VERSION =
'20260605'.freeze

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

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

Class 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

Class Method Details

.from_doc(raw_doc) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/ecoportal/api/graphql/base/pages_workflow/operation_interface.rb', line 22

def self.from_doc(raw_doc)
  case raw_doc&.fetch('__typename', nil)
  when 'PagesWorkflowOperationsAssignTo'
    Operations::AssignTo.new(raw_doc)
  when 'PagesWorkflowOperationsCreatePage'
    Operations::CreatePage.new(raw_doc)
  when 'PagesWorkflowOperationsSendNotification'
    Operations::SendNotification.new(raw_doc)
  else
    new(raw_doc)
  end
end