rmosolgo / graphiql-rails

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

Remove sprockets #101

Closed scott-knight closed 10 months ago

scott-knight commented 2 years ago

Summary Removed all references to sprockets content and moved the CSS and JS calls to the SHOW view in the order defined in the original manifests.

Reason Sprockets is going away. This gem will not work with an ESBUILD based, rails 7 app.

//= require ./graphiql/js/react-16.14.0
//= require ./graphiql/js/react-dom-16.14.0
//= require ./graphiql/js/fetch-0.10.1
//= require ./graphiql/js/graphiql-1.4.2
//= require ./graphiql/js/graphiql_show

What you should see is a compilation of each file into the one manifest. However, sprockets is effectively neutered (turned off) with Rails 7. It doesn't work.

Solution

  1. Remove sprockets since it doesnt do anything.
  2. Move all file references to the view.
igor-alexandrov commented 1 year ago

Hello, what is the status of this PR? There are a lot of problems to start graphiql-rails with Vite. Thanks!