Class: Ecoportal::API::GraphQL::Logic::Mutation
- Defined in:
- lib/ecoportal/api/graphql/logic/mutation.rb
Direct Known Subclasses
Mutation::Action::Archive, Mutation::Action::Update, Mutation::ContractorEntity::Create, Mutation::ContractorEntity::Update, Mutation::LocationStructure::ApplyCommands
Defined Under Namespace
Classes: GenericInput, GenericPayload
Instance Attribute Summary
Attributes inherited from BaseQuery
Instance Method Summary collapse
-
#query(input:, path: self.path, &block) ⇒ Class
Query rely that manages the different blocks.
- #response_class ⇒ Object
Methods inherited from BaseQuery
accepted_params, #access_point, clear_accepted_params, field_name, #initialize, param_defaults, #path, slice_params
Constructor Details
This class inherits a constructor from Ecoportal::API::GraphQL::Logic::BaseQuery
Instance Method Details
#query(input:, path: self.path, &block) ⇒ Class
Query rely that manages the different blocks.
22 23 24 25 26 27 28 29 30 |
# File 'lib/ecoportal/api/graphql/logic/mutation.rb', line 22 def query(input:, path: self.path, &block) request(*path) do client.query(input: as_input(input), &basic_block(&block)) end rescue Faraday::ParsingError, Graphlient::Errors::FaradayServerError => e puts "Internal Error with these input ('#{input.class}'):" pp input raise end |
#response_class ⇒ Object
32 33 34 |
# File 'lib/ecoportal/api/graphql/logic/mutation.rb', line 32 def response_class payload_class end |