Closed gregology closed 6 years ago
I had this issue and it turned it to be caused because I was trying to use the graphiql gem on an API only rails project.
i had a same issue! what is the solution?
Which middlewares to add ?
I had a play with the graphiql-rails gem. I tried bumping the graphiql version and re ordering the assets with no luck. Then I added a 500ms delay so the assets are all loaded. It's not elegant but it's a temporary fix.
gem 'graphiql-rails', git: 'https://github.com/gregology/graphiql-rails'
Also I just noticed the error trace has turbolinks in it. Does this happen on a direct visit to /graphiql
, or only after clicking a link? If it's only from clicking a link, you can see if you can disable turbolinks for that link.
Yes @rmosolgo, that fixed it. I disabled turbolinks in my rails 5.2 app with:
<%= link_to "GraphiQL", '/graphiql', data: { turbolinks: false } %>
Thanks team!
@Spots did you manage to get this working using an API only project?
Hey Team, I'm getting a
Uncaught ReferenceError: ReactDOM is not defined
error when trying to load/graphiql
in my app. Hitting refresh fixes the problem. The issue occurs on multiple browsers and with extensions disabled.I've tried updating to the latest gem versions.
And the console error is
Any suggestions for further troubleshooting?
Cheers Team!