Sha256: b34588b6e3a4836a7b30b675d1b845408275af96f092df03e0774cd568326be7

Contents?: true

Size: 1.06 KB

Versions: 4

Compression:

Stored size: 1.06 KB

Contents

module Ecoportal
  module API
    class GraphQL
      module Mutation
        module Action
          class Update < Ecoportal::API::GraphQL::Logic::Mutation
            field_name :updateAction

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

            private

            def basic_block(&block)
              payload_block = block || default_payload_block
              Proc.new {
                mutation(input: :UpdateActionInput!) {
                  updateAction(input: :input, &payload_block)
                }
              }
            end

            def default_payload_block
              Proc.new {
                clientMutationId
                errors {
                  details
                  fullMessages
                }
                item {
                  ___Fragment__Action
                }
              }
            end
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ecoportal-api-graphql-0.3.15 lib/ecoportal/api/graphql/mutation/action/update.rb
ecoportal-api-graphql-0.3.14 lib/ecoportal/api/graphql/mutation/action/update.rb
ecoportal-api-graphql-0.3.13 lib/ecoportal/api/graphql/mutation/action/update.rb
ecoportal-api-graphql-0.3.12 lib/ecoportal/api/graphql/mutation/action/update.rb