Sha256: 17c6bb1ac30f06e44e47b32d7fe97d5ea440490b2c360f38ae438012c0bb2d33

Contents?: true

Size: 678 Bytes

Versions: 7

Compression:

Stored size: 678 Bytes

Contents

class Eco::API::UseCases::GraphQL::Base < Eco::API::Common::Loaders::UseCase
  name "graphql-base"
  type :other

  attr_reader :session, :options, :usecase

  def main(session, options, usecase)
    options[:end_get] = false
    @session = session; @options = options; @usecase = usecase
    process
  end

  # Write here your script
  def process
    raise "You need to inherit from this class ('#{self.class}') and call super with a block"
  end

  private

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

  def simulate?
    options.dig(:simulate)
  end

  def exit_error(msg)
    logger.error(msg)
    exit(1)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
eco-helpers-2.5.2 lib/eco/api/usecases/graphql/base.rb
eco-helpers-2.5.1 lib/eco/api/usecases/graphql/base.rb
eco-helpers-2.4.9 lib/eco/api/usecases/graphql/base.rb
eco-helpers-2.4.8 lib/eco/api/usecases/graphql/base.rb
eco-helpers-2.4.7 lib/eco/api/usecases/graphql/base.rb
eco-helpers-2.4.6 lib/eco/api/usecases/graphql/base.rb
eco-helpers-2.4.5 lib/eco/api/usecases/graphql/base.rb