Module: Ecoportal::API::Common::GraphQL::Model::AsInput

Included in:
Ecoportal::API::Common::GraphQL::Model
Defined in:
lib/ecoportal/api/common/graphql/model/as_input.rb

Overview

TODO:
  1. #as_input vs #to_input or named argument klass One gets the input to be already used in a mutation query. The other gets the Input class object out of the Base/Model.
    • To figure out when as_update should be called.
  2. Each Base/Model should have its Input class counterpart. This could be auto-inflected (via namespace constant lookup) at some point.
  3. Think if a service class can be used to this purpose (i.e. decorator of DiffService).

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#as_input(clientMutationId: '') ⇒ Object

INSTANCE METHODS



40
41
42
43
44
45
# File 'lib/ecoportal/api/common/graphql/model/as_input.rb', line 40

def as_input(clientMutationId: '')
  self.class.as_input(
    as_update,
    clientMutationId: clientMutationId
  )
end