Sha256: 7c45ac80f071aecc81a438a5efb501c25ffe5b70629443a2da8beadfe99924cf

Contents?: true

Size: 1.06 KB

Versions: 5

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 {
                mutation(input: :UpdateActionInput!) {
                  updateAction(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/update.rb
ecoportal-api-graphql-0.4.2 lib/ecoportal/api/graphql/mutation/action/update.rb
ecoportal-api-graphql-0.4.1 lib/ecoportal/api/graphql/mutation/action/update.rb
ecoportal-api-graphql-0.4.0 lib/ecoportal/api/graphql/mutation/action/update.rb
ecoportal-api-graphql-0.3.16 lib/ecoportal/api/graphql/mutation/action/update.rb