rmosolgo / graphiql-rails

Mount the GraphiQL query editor in a Rails app
MIT License
447 stars 135 forks source link

Allow the `header_editor_enabled` config to be set from the initializer #96

Closed mseverini closed 2 years ago

mseverini commented 2 years ago

I am running on rails 6 using version 1.8 of the gem.

When I followed the readme and added an initializer at config/initializers/graphiql.rb with just one line GraphiQL::Rails.config.header_editor_enabled = true my rails app through the following error:

undefined method `header_editor_enabled=' for #<GraphiQL::Rails::Config:0x00007f99805d3380> (NoMethodError)

By simply allowing the new header_editor_enabled parameter to be passed to the initializer, the config can now be set on boot.

mseverini commented 2 years ago

fixed in https://github.com/PlacewiseMedia/graphiql-rails/pull/1

caffeineflo commented 2 years ago

Any reason this was closed on not merged? Hitting the same issue over here

mseverini commented 2 years ago

It appears that the same change was made here It's in master but it looks like there hasn't been a new version bundled up yet. If you want an interim solution you can just point your gemfile to the head of master. I will leave it to the author to speculate on if/when a new version will be cut.

caffeineflo commented 2 years ago

Thank you! That's helpful