Sha256: 0d6a610ec55ba5dce9d2fd29743be65f65ab00cb31b818a9f0c430fc3ab0c6aa

Contents?: true

Size: 495 Bytes

Versions: 1

Compression:

Stored size: 495 Bytes

Contents

# frozen_string_literal: true

require 'graphql'

module RSpec
  module GraphqlMatchers
    module TypesHelper
      class << self
        extend Gem::Deprecate

        GraphQL::Types.constants.each do |constant_name|
          klass = GraphQL::Types.const_get(constant_name)

          define_method(constant_name) { klass }

          deprecate constant_name, "GraphQL::Types::#{constant_name}", 2023, 10
        end
      end

      def types
        TypesHelper
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rspec-graphql_matchers-2.0.0.pre.rc.0 lib/rspec/graphql_matchers/types_helper.rb