Closed tripleee closed 4 years ago
@makyen says this is not the link we want. Reopening.
https://chat.stackexchange.com/transcript/message/52492944#52492944
The GraphIQL interface used to work; I don't know why it doesn't now.
For now, I've updated the dropdown nav menu to have both a GraphiQL link and GraphQL link. Basically, I wanted to leave a link that's functional, but don't want to indicate that GraphiQL isn't something that should be working.
I have not tested it, but the GraphQL link appears to lack some features which are needed to construct the spectrum of GraphQL queries.
Could this be because of a bundle update or something? This page comes completely from the graphql gem, so I'm not really sure why/how it broke.
Seems like this is the same as our problem: https://github.com/rmosolgo/graphiql-rails/issues/58
@thesecretmaster From reading that graphiql-rails issue, it looks like people are reporting that just restricting the graphiql-rails version to 1.4.11 will get GraphiQL working (we were previously functional with 1.5.0, so that would probably be a better version to use). Obviously, we'd want to track the graphiql-rails issue and remove that restriction once there's a newer version which is working again.
That gem also hasn't had any commits in almost the last year, so it may be unmaintained. If I'm remembering correctly, the way that our GraphQL setup works is that graphiql-rails provides the handy IDE page, but we don't depend on that for the GraphQL API as a whole (i.e. we could do without it)
Personally, I found what we had with GraphiQL to be quite useful. It definitely was significantly better than the alternative here. If the older version of the graphiql-rails gem works and doesn't cause us a loss of functionality to use (e.g. it works with the separately specified/loaded GraphQL) or have security problems, then I'd prefer that we use the older version, rather than just dropping it.
If there's a better/alternate way to have the GraphiQL functionality from a maintained project, that would be better than using an older version.
The version we were previously using was 1.5.0. The graphiql-rails gem version was changed to 1.7.0 as an update for most existing packages. It was likely the result of a normal "update" command, rather than a targeted update to the graphiql-rails gem.
I'd suggest that we just roll it back to 1.5.0.
The upstream issue looks like theirs started in 1.5.0 though. Maybe ours is different?
I made the change to the Gemfile.lock file to have graphiql-rails on 1.5.0. It looks like it's working. While I am seeing some errors in the browser console, I'm not sure if the errors existed previously, or not. The query I had stored on my own machine is working.
If we're comfortable with it at version 1.5.0, the Gemfile should be changed to indicate that the version is locked and the Gemfile.lock file should be regenerated.
Looks good to me. Thank you for testing that out!
It looks like this is back to not working.
Unfortunately, 1.4.11 isn't working either.
The error in the page is that the script from https://metasmoke.erwaysoftware.com/javascripts/graphiql/rails/application.js doesn't get loaded. When that URL is requested, it results in an error:
No route matches [GET] "/javascripts/graphiql/rails/application.js"
Fixed in b8da74d606e2ab3ec779b4dd377c2b925fca7ebc, tl;dr the assets that this page required weren't getting precompiled in the asset pipeline.
The menu item in the Core menu on the metasmoke dashboard links to
/api/graphiql
but the actual functionality is on/api/graphql
as far as I can find out.I see a "Loading..." indicator where I would expect the site to appear, it sort of looks like it's supposed to be a redirect?