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

GQL Playground: Only run in dev mode #1655

Merged
merged 2 commits into from
Jan 18, 2021

Conversation

Tobbe
Copy link
Member

@Tobbe Tobbe commented Jan 18, 2021

Fixes #1591

@@ -95,7 +95,7 @@ export const createGraphQLHandler = ({
onHealthCheck,
...options
}: GraphQLHandlerOptions = {}) => {
const isDevEnv = process.env.NODE_ENV !== 'production'
const isDevEnv = process.env.NODE_ENV === 'development'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about adding || process.env.NODE_ENV === 'test' as well, but the playground isn't needed when running tests, right? And neither is introspection I guess. Maybe we want debug. What do you all think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed!

@github-actions
Copy link

github-actions bot commented Jan 18, 2021

@peterp peterp added this to the next release milestone Jan 18, 2021
Copy link
Contributor

@peterp peterp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 nice job Tobbe!

@dac09
Copy link
Contributor

dac09 commented Jan 18, 2021

This is great! 🎉thanks @Tobbe

@Tobbe Tobbe merged commit 3686353 into redwoodjs:main Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ApolloServer GraphQL Playground not necessarily turned off in production
3 participants