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

GraphQL Playground does not load in Safari #3576

Closed
orta opened this issue Oct 15, 2021 · 4 comments
Closed

GraphQL Playground does not load in Safari #3576

orta opened this issue Oct 15, 2021 · 4 comments

Comments

@orta
Copy link
Contributor

orta commented Oct 15, 2021

It's hard to say if this specifically is a redwood problem from these logs, but it's a vended dependency which I don't necessarily have control over at my app's level. So, worth raising for your visibility at least.

Screen Shot 2021-10-15 at 2 10 13 PM

Sidenote, graphql-playground is pretty much abandoned (it was donated to the GraphQL foundation last year, so at least I have write access) and you should consider switching to GraphiQL even if it is a bit less pretty because it's in reasonably active development and will probably never get deprecated.

@thedavidprice thedavidprice moved this to New issues in Triage Oct 15, 2021
@orta
Copy link
Contributor Author

orta commented Oct 15, 2021

There's a non-zero chance this is a jsdelivr bug, given that the underlaying issue Safari is raising is that it's 301-ing back to the same URL on a loop:

Screen Shot 2021-10-15 at 2 19 09 PM

Screen Shot 2021-10-15 at 2 19 40 PM

( /cc @MartinKolarik - sorry, I seem to be finding all sorts of strange Safari things lately )

@MartinKolarik
Copy link

Not sure what exactly is going on here but the first screenshot suggests that the client makes a request via HTTP, we send a redirect to HTTPS (which is correct), and the client then proceeds to make the request again via plain HTTP, therefore receiving the redirect again.

@orta
Copy link
Contributor Author

orta commented Oct 15, 2021

Great spot, I think I have a sense of what's going on here. This is the code in graphql-playground

  <title>GraphQL Playground</title>
  <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/graphql-playground-react/build/static/css/index.css" />
  <link rel="shortcut icon" href="//cdn.jsdelivr.net/npm/graphql-playground-react/build/favicon.png" />
  <script src="//cdn.jsdelivr.net/npm/graphql-playground-react/build/static/js/middleware.js"></script>

Which matches my dev server's http. With Safari 15 has a new "Force HTTPS" feature:

Added support for automatic HTTPS upgrades.

Which is likely the cause, it doesn't have an off button in Safari which I can use to test - honestly, it kinda feels like a bug in Safari/WebKit to have it not respect the redirect (especially when it's HTTPS) - will need to see if I can make a small controlled repro. Thanks Martin.

@orta
Copy link
Contributor Author

orta commented Oct 15, 2021

I'm going to close this as its not realistically actionable for redwood, and there's been an issue in Safari for a while: graphql/graphql-playground#1301 - but I would recommend dropping it graphql/graphql-playground#1143

I tested the Safari 14 Tech Preview (I had it laying around), it also fails for a different reasons (it sees the redirect and just gives up \__(o.0)__/ )

Screenshot

Screen Shot 2021-10-15 at 4 12 37 PM

@orta orta closed this as completed Oct 15, 2021
Repository owner moved this from New issues to Done in Triage Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants