Sha256: 404c85ff7f2d1c9de5b7d44105591820c8a25009798d7386b0ded913909925a4

Contents?: true

Size: 604 Bytes

Versions: 22

Compression:

Stored size: 604 Bytes

Contents

# frozen_string_literal: true
# helpers to enable / disable error bubbling in a block scope
module ErrorBubblingHelpers
  def without_error_bubbling(schema)
    original_error_bubbling = schema.error_bubbling
    begin
      schema.error_bubbling = false
      yield if block_given?
    ensure
      schema.error_bubbling = original_error_bubbling
    end
  end

  def with_error_bubbling(schema)
    original_error_bubbling = schema.error_bubbling
    begin
      schema.error_bubbling = true
      yield if block_given?
    ensure
      schema.error_bubbling = original_error_bubbling
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
graphql-1.8.18 spec/support/error_bubbling_helpers.rb
graphql-1.9.11 spec/support/error_bubbling_helpers.rb
graphql-1.9.10 spec/support/error_bubbling_helpers.rb
graphql-1.9.9 spec/support/error_bubbling_helpers.rb
graphql-1.9.8 spec/support/error_bubbling_helpers.rb
graphql-1.9.7 spec/support/error_bubbling_helpers.rb
graphql-1.9.6 spec/support/error_bubbling_helpers.rb
graphql-1.9.5 spec/support/error_bubbling_helpers.rb
graphql-1.9.4 spec/support/error_bubbling_helpers.rb
graphql-1.9.3 spec/support/error_bubbling_helpers.rb
graphql-1.9.2 spec/support/error_bubbling_helpers.rb
graphql-1.8.17 spec/support/error_bubbling_helpers.rb
graphql-1.8.16 spec/support/error_bubbling_helpers.rb
graphql-1.9.1 spec/support/error_bubbling_helpers.rb
graphql-1.9.0 spec/support/error_bubbling_helpers.rb
graphql-1.8.15 spec/support/error_bubbling_helpers.rb
graphql-1.9.0.pre4 spec/support/error_bubbling_helpers.rb
graphql-1.8.14 spec/support/error_bubbling_helpers.rb
graphql-1.9.0.pre3 spec/support/error_bubbling_helpers.rb
graphql-1.9.0.pre2 spec/support/error_bubbling_helpers.rb