Graphql-playground: Playground not loading on my local machine

Created on 1 Dec 2017  路  10Comments  路  Source: graphql/graphql-playground

This issue pertains to:

  • [ ] GraphQL Playground Middleware

What OS and OS version are you experiencing the issue(s) on?

Mac High Sierra

What version of graphql-playground(-electron/-middleware) are you experience the issue(s) on?

graphql-playground-middleware: ^1.1.0

What is the expected behavior?

The Playground loads without any issues.

What is the actual behavior?

Playground never completes loading.

Throws error:
GET http://cdn.jsdelivr.net/npm/[email protected]/build/static/js/middleware.js net::ERR_CONTENT_DECODING_FAILED

Should the GET request for middleware.js go to an https:// location instead of http://?

What steps may we take to reproduce the behavior?

I'm attempting to use the Playground with the serverless-graphql-apollo stack here: https://github.com/graphcool/graphql-playground

Most helpful comment

@JstnEdr thanks for reporting!
It seems that you're trying to use the graphql-playground-middleware package, but we split it into multiple separate packages, for lambda it's graphql-playground-middleware-lambda.
Sorry for the incorrect docs there, that should be updated:
https://github.com/serverless/serverless-graphql-apollo/blob/master/app-backend/rest-api/handler.js

You can also refer to this part of our docs to see how to include it in your serverless application:
https://github.com/graphcool/graphql-playground#as-serverless-handler

Does that help?

All 10 comments

Maybe @sid88in could take a look?

@JstnEdr we merged a fix for graphql playground yesterday https://github.com/serverless/serverless-graphql-apollo/pull/192 and it works fine. There is a minor issue while running on sls offline https://github.com/graphcool/graphql-playground/issues/278 and @timsuchanek is already looking into https://github.com/graphcool/graphql-playground/issues/278 (reported by others too)

@JstnEdr thanks for reporting!
It seems that you're trying to use the graphql-playground-middleware package, but we split it into multiple separate packages, for lambda it's graphql-playground-middleware-lambda.
Sorry for the incorrect docs there, that should be updated:
https://github.com/serverless/serverless-graphql-apollo/blob/master/app-backend/rest-api/handler.js

You can also refer to this part of our docs to see how to include it in your serverless application:
https://github.com/graphcool/graphql-playground#as-serverless-handler

Does that help?

Yes that helps. Playground appears to be working now, but there's something up with the graphql endpoint. I'm now getting the error Schema could not be fetched. with a 404 on the /graphql route. I'll keep an eye on #278

I'm not exactly sure if this is a problem with GraphQL Playground, but I'm still having trouble accessing the Playground in the browser. Any clues as to how to resolve this?

screen shot 2017-12-13 at 1 49 54 pm

@JstnEdr still same version?

Thanks for the reply @Huvik! I've tried different versions. The screenshot shows I'm attempting to access version 1.3.6.

I've got "graphql-playground-middleware-lambda": "^1.3.6", in my package.json file.

Edit: I've also tried version 1.2.0 while following this serverless-graphql repo instructions.

Fixed in the latest version. Please let us know if you still have that issue, then we reopen it!

I had the exact same issue. What fixed it was changing my browser from Firefox to Chrome.

Was this page helpful?
0 / 5 - 0 ratings