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

Add NODE_ENV as value for api to allow graphql playground #12

Closed
cmbirk opened this issue Oct 5, 2020 · 4 comments
Closed

Add NODE_ENV as value for api to allow graphql playground #12

cmbirk opened this issue Oct 5, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@cmbirk
Copy link
Contributor

cmbirk commented Oct 5, 2020

It looks like we need to enable a setting for NODE_ENV other than production so that it's possible to create a deployment that has a graphql playground available.

@ghost
Copy link

ghost commented Oct 7, 2020

Thinking out loud. It sounds like OP is looking to enable GQL playground for development builds (substitute for your own environments). Is that correct? I noticed in the Reaction Development platform itself graphql is available for production builds at the URL https://api.reaction.local/graphql (substitute for your URL) thereby making the API available to outside consumers. Is that something which servicing this issue could help achieve?

@dcrdev
Copy link
Contributor

dcrdev commented Oct 7, 2020

So because NODE_ENV = production , the default is that playground is disabled. Playground can be independently controlled via the GRAPHQL_PLAYGROUND_ENABLED var, I would be happy to add that as a chart value. NODE_ENV as a chart value is not typically the done thing, so not sure on that one.

I am however contemplating adding an additional environment variables section to the values, that would allow you to inject your own custom environment variables without modifying the chart.

Thoughts?

@ghost
Copy link

ghost commented Oct 7, 2020

I am however contemplating adding an additional environment variables section to the values, that would allow you to inject your own custom environment variables without modifying the chart.

I haven't personally tried the Helm Chart yet but it's on my list of TODOs. If it works anything like Compose files, perhaps an override.yml file of some sort could be used to adjust existing ENV vars only so as not to confuse what's in Reaction proper with the Helm Chart. Otherwise perhaps a prefix (e.g. HELM_) could be used? In Storefront, there's some specific care needed to ensure server-side env vars aren't leaked into the generated bundles AFIAK—something also to consider.

@dcrdev
Copy link
Contributor

dcrdev commented Oct 7, 2020

Added support for playground in #14

Closing this issue and will create another for adhoc config.

@dcrdev dcrdev closed this as completed Oct 7, 2020
@dcrdev dcrdev added the enhancement New feature or request label Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants