Sha256: 88cdef542e6f9de0be2a76348855cbf3c91a203b2bedf04b2bc5b900aa1f960e

Contents?: true

Size: 1.09 KB

Versions: 5

Compression:

Stored size: 1.09 KB

Contents

module Ecoportal
  module API
    class GraphQL
      module Mutation
        module Action
          class Archive < Ecoportal::API::GraphQL::Logic::Mutation
            field_name :archiveAction
            accepted_params :id

            class_resolver :payload_class, Ecoportal::API::GraphQL::Payload::Action::Archive
            class_resolver :input_class, Ecoportal::API::GraphQL::Input::Action::Archive

            private

            def basic_block(&block)
              payload_block = block || default_payload_block
              proc {
                mutation(input: :ArchiveActionInput!) {
                  archiveAction(input: :input, &payload_block)
                }
              }
            end

            def default_payload_block
              proc {
                clientMutationId
                errors {
                  details
                  fullMessages
                }
                item {
                  ___Fragment__Action
                }
              }
            end
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ecoportal-api-graphql-0.4.3 lib/ecoportal/api/graphql/mutation/action/archive.rb
ecoportal-api-graphql-0.4.2 lib/ecoportal/api/graphql/mutation/action/archive.rb
ecoportal-api-graphql-0.4.1 lib/ecoportal/api/graphql/mutation/action/archive.rb
ecoportal-api-graphql-0.4.0 lib/ecoportal/api/graphql/mutation/action/archive.rb
ecoportal-api-graphql-0.3.16 lib/ecoportal/api/graphql/mutation/action/archive.rb