Sha256: 066231283ddf9089859216844c916f2325593c32befc252cbc494db50be6391d

Contents?: true

Size: 1.75 KB

Versions: 14

Compression:

Stored size: 1.75 KB

Contents

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.new {
                mutation(input: :ApplyCommandsToLocationStructureInput!) {
                  applyCommandsToLocationStructure(input: :input, &payload_block)
                }
              }
            end

            def default_payload_block
              Proc.new {
                clientMutationId
                error {
            			message
            			conflictingIds
            			validationErrors {
            				error
            				message
            			}
            		}
            		results {
            			command {
            				id
            				state
                    __typename
            			}
            			ok
            			error {
            				conflictingIds
            				message
            				validationErrors {
            					error
            					message
            				}
            			}
            		}
                structure {
                  nodes(includeArchived: true) {
                    ___Ecoportal__API__GraphQL__Fragment__LocationNode
                  }
                }
              }
            end
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ecoportal-api-graphql-0.3.13 lib/ecoportal/api/graphql/mutation/location_structure/apply_commands.rb
ecoportal-api-graphql-0.3.12 lib/ecoportal/api/graphql/mutation/location_structure/apply_commands.rb
ecoportal-api-graphql-0.3.11 lib/ecoportal/api/graphql/mutation/location_structure/apply_commands.rb
ecoportal-api-graphql-0.3.10 lib/ecoportal/api/graphql/mutation/location_structure/apply_commands.rb
ecoportal-api-graphql-0.3.9 lib/ecoportal/api/graphql/mutation/location_structure/apply_commands.rb
ecoportal-api-graphql-0.3.8 lib/ecoportal/api/graphql/mutation/location_structure/apply_commands.rb
ecoportal-api-graphql-0.3.7 lib/ecoportal/api/graphql/mutation/location_structure/apply_commands.rb
ecoportal-api-graphql-0.3.6 lib/ecoportal/api/graphql/mutation/location_structure/apply_commands.rb
ecoportal-api-graphql-0.3.5 lib/ecoportal/api/graphql/mutation/location_structure/apply_commands.rb
ecoportal-api-graphql-0.3.3 lib/ecoportal/api/graphql/mutation/location_structure/apply_commands.rb
ecoportal-api-graphql-0.3.1 lib/ecoportal/api/graphql/mutation/location_structure/apply_commands.rb
ecoportal-api-graphql-0.2.3 lib/ecoportal/api/graphql/mutation/location_structure/apply_commands.rb
ecoportal-api-graphql-0.2.2 lib/ecoportal/api/graphql/mutation/location_structure/apply_commands.rb
ecoportal-api-graphql-0.2.1 lib/ecoportal/api/graphql/mutation/location_structure/apply_commands.rb