rmosolgo / graphiql-rails

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

CSS change to allow easier integration into existing Rails stack #78

Closed duffyjp closed 4 years ago

duffyjp commented 4 years ago

With these changes, I'm able to require your CSS / JS base application files without effectively altering my host app's html and body rules. I'm doing that so I can embed GraphiQL in my existing stack with authentication, look-n-feel etc.

As I'm using it When used normally (nothing changes)
Screen Shot 2019-12-20 at 10 05 58 AM Screen Shot 2019-12-20 at 10 07 00 AM

To do this I copied in two files making changes to use our layout.

Host application.css

 *= require graphiql/rails/application

Host application.js

//= require graphiql/rails/application

TLDR;

duffyjp commented 4 years ago

I ran into https://github.com/rmosolgo/graphiql-rails/issues/70 when actually using this. I'm going to close for now since you can't actually use this in production as I expected.