Skip to content

Commit

Permalink
Remove deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
gmcgibbon committed Oct 31, 2023
1 parent 97a09e7 commit 45267d3
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions lib/graphql/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,7 @@
module GraphQL
class Railtie < Rails::Railtie
config.graphql = ActiveSupport::OrderedOptions.new
config.graphql.parser_cache = nil

config.before_initialize do
if config.graphql.parser_cache.nil? && ::Object.const_defined?("Bootsnap::CompileCache::ISeq") && Bootsnap::CompileCache::ISeq.cache_dir
Deprecation.warn <<~MSG.squish
The GraphQL parser cache must be explicitly enabled in your application.
Please add `config.graphql.parser_cache = true` to your application config.
MSG
config.graphql.parser_cache = true
end
end
config.graphql.parser_cache = false

initializer("graphql.cache") do |app|
if config.graphql.parser_cache
Expand Down

0 comments on commit 45267d3

Please sign in to comment.