davidkomer
davidkomer

Reputation: 3098

Apollo Playground on remote server

When I install the Apollo Server 2 dependencies, follow the quickstart, and spin up a local server - I see the GraphQL Playground on local host

However, when I deploy the same exact code to a remote server, and visit the url, I see "GET query missing."

If I visit the url and supply a query as a parameter - e.g. https://example.com?query={books{title author}} - then I do see relevant results (as json)

What is causing the difference between seeing the playground view vs. just the raw api "view" ?

Upvotes: 2

Views: 1433

Answers (1)

Daniel Jakobsen Hallel
Daniel Jakobsen Hallel

Reputation: 584

Probably what is happening is that when you deploy your code then the NODE_ENV is changed to production and when that happens Graphql Playground is disabled, you can find more about it here:
apollo-server graphql-playground

if you want to enable it in production follow this guide:
Enabling-GraphQL-Playground-in-production

Upvotes: 3

Related Questions