Remove the `schema` method
I don't think this method is actually used, and the lambda used to create the method holds a reference to the `cache` hash which can grow large.
This commit is contained in:
Родитель
8ceb5ce90d
Коммит
7ace9c6024
|
@ -70,10 +70,6 @@ module GraphQL
|
|||
mod = Module.new
|
||||
mod.extend ClassMethods
|
||||
|
||||
mod.define_singleton_method :schema do
|
||||
schema
|
||||
end
|
||||
|
||||
cache = {}
|
||||
schema.types.each do |name, type|
|
||||
next if name.start_with?("__")
|
||||
|
|
|
@ -73,10 +73,6 @@ class TestSchemaType < MiniTest::Test
|
|||
|
||||
Types = GraphQL::Client::Schema.generate(Schema)
|
||||
|
||||
def test_schema
|
||||
assert_equal Schema, Types.schema
|
||||
end
|
||||
|
||||
def test_query_object_class
|
||||
assert_equal QueryType, Types::Query.type
|
||||
assert_equal "TestSchemaType::Types::Query", Types::Query.inspect
|
||||
|
|
Загрузка…
Ссылка в новой задаче