Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken link to GraphQL Data Exploder #690

Closed
tripleee opened this issue Nov 9, 2019 · 15 comments
Closed

Broken link to GraphQL Data Exploder #690

tripleee opened this issue Nov 9, 2019 · 15 comments
Assignees
Labels
area: data explorer AKA the data exploders (any of them - JS or SQL)

Comments

@tripleee
Copy link
Member

tripleee commented Nov 9, 2019

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?

tripleee added a commit that referenced this issue Nov 9, 2019
Typo fixed, thanks double-beep for the link to the source
@tripleee tripleee added the area: data explorer AKA the data exploders (any of them - JS or SQL) label Nov 9, 2019
@tripleee tripleee closed this as completed Nov 9, 2019
@tripleee
Copy link
Member Author

tripleee commented Nov 9, 2019

@makyen says this is not the link we want. Reopening.

https://chat.stackexchange.com/transcript/message/52492944#52492944

@ArtOfCode-
Copy link
Member

The GraphIQL interface used to work; I don't know why it doesn't now.

@makyen
Copy link
Contributor

makyen commented Nov 19, 2019

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.

@thesecretmaster
Copy link
Member

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.

@thesecretmaster
Copy link
Member

Seems like this is the same as our problem: rmosolgo/graphiql-rails#58

@makyen
Copy link
Contributor

makyen commented Dec 31, 2019

@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.

@thesecretmaster
Copy link
Member

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)

@makyen
Copy link
Contributor

makyen commented Jan 1, 2020

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.

@tripleee
Copy link
Member Author

tripleee commented Jan 2, 2020

The upstream issue looks like theirs started in 1.5.0 though. Maybe ours is different?

@makyen
Copy link
Contributor

makyen commented Jan 3, 2020

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.

@thesecretmaster
Copy link
Member

Looks good to me. Thank you for testing that out!

@makyen
Copy link
Contributor

makyen commented Jan 24, 2020

It looks like this is back to not working.

@makyen
Copy link
Contributor

makyen commented Jan 25, 2020

Unfortunately, 1.4.11 isn't working either.

@makyen
Copy link
Contributor

makyen commented May 9, 2020

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"

@thesecretmaster
Copy link
Member

Fixed in b8da74d, tl;dr the assets that this page required weren't getting precompiled in the asset pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: data explorer AKA the data exploders (any of them - JS or SQL)
Development

No branches or pull requests

4 participants