Skip to content

Commit

Permalink
docs: Improve deploy steps for Netlify Functions (#3005)
Browse files Browse the repository at this point in the history
* [docs]: Update Deploying with Netlify Functions

While going through [this section](https://www.apollographql.com/docs/apollo-server/deployment/netlify/#set-up-apollo-server), I couldn't get the GraphQL Playground to show up until I added `playground: true` on the ApolloServer options object (thanks to this [thread on Spectrum](https://spectrum.chat/zeit/general/apollo-server-get-query-missing~ae8d5ca5-2faf-4c8d-8097-c3f6e25cad56)).

* Update based on feedback
  • Loading branch information
jsjoeio authored and abernix committed Jul 17, 2019
1 parent c4ab5c6 commit 06c53b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/source/deployment/netlify.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ const server = new ApolloServer({
exports.handler = server.createHandler();
```

Now, make sure you've run `npm run start:lambda`, and navigate to `localhost:9000/graphql` in your browser. You should see GraphQL Playground, where you can run queries against your API!
Now, make sure you've run `NODE_ENV=development npm run start:lambda`, and navigate to `localhost:9000/graphql` in your browser. You should see GraphQL Playground, where you can run queries against your API!

*Note - The GraphQL Playground will only run if your `NODE_ENV` is set to `development`. If you don't pass this, or your `NODE_ENV` is set to `production`, you will not see the GraphQL Playground.*

![Local GraphQL Server](../images/graphql.png)

Expand Down

0 comments on commit 06c53b3

Please sign in to comment.