lib/graphql/query/null_context.rb in graphql-2.4.0 vs lib/graphql/query/null_context.rb in graphql-2.4.1
- old
+ new
@@ -16,20 +16,18 @@
end
extend Forwardable
attr_reader :schema, :query, :warden, :dataloader
- def_delegators GraphQL::EmptyObjects::EMPTY_HASH, :[], :fetch, :dig, :key?
+ def_delegators GraphQL::EmptyObjects::EMPTY_HASH, :[], :fetch, :dig, :key?, :to_h
def initialize
@query = NullQuery.new
@dataloader = GraphQL::Dataloader::NullDataloader.new
@schema = NullSchema
@warden = Schema::Warden::NullWarden.new(context: self, schema: @schema)
- end
-
- def types
- @types ||= Schema::Warden::VisibilityProfile.new(@warden)
+ @types = @warden.visibility_profile
+ freeze
end
end
end
end