Sha256: bdd52dfa73f341e1513f2a561568926e02cdc110117f151bdcc30410e39060bb

Contents?: true

Size: 656 Bytes

Versions: 12

Compression:

Stored size: 656 Bytes

Contents

module Eco::API::UseCases::GraphQL::Helpers
  module Base
    require_relative 'base/case_env'
    include Eco::API::UseCases::GraphQL::Helpers::Base::CaseEnv

    def graphql
      @graphql ||= session.api(version: :graphql)
    end

    # Keep a copy of the requests/responses for future reference
    def backup(data, type:)
      dry_run   = simulate? ? "_dry_run" : ""
      dir       = config.people.requests_folder
      file      = File.join(dir, "#{type}#{dry_run}.json")
      session.file_manager.save_json(data, file, :timestamp)
    end

    def exit_error(msg)
      log(:error) { msg }
      exit(1)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
eco-helpers-2.6.4 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.6.3 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.6.2 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.6.1 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.6.0 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.5.10 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.5.9 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.5.8 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.5.7 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.5.6 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.5.5 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.5.4 lib/eco/api/usecases/graphql/helpers/base.rb