module Ecoportal module API class GraphQL module Mutation module LocationStructure class ApplyCommands < Ecoportal::API::GraphQL::Logic::Mutation field_name :applyCommandsToLocationStructure class_resolver :payload_class, Ecoportal::API::GraphQL::Payload::LocationStructure::ApplyCommands class_resolver :input_class, Ecoportal::API::GraphQL::Input::LocationStructure::ApplyCommands private def basic_block(&block) payload_block = block || default_payload_block proc { mutation(input: :ApplyCommandsToLocationStructureInput!) { applyCommandsToLocationStructure(input: :input, &payload_block) } } end def default_payload_block proc { clientMutationId error { message conflictingIds validationErrors { error message } } results { ok command { id state __typename } error { conflictingIds message validationErrors { error message } } } structure { nodes(includeArchived: true) { ___Ecoportal__API__GraphQL__Fragment__LocationNode } } } end end end end end end end