graphql-playground
graphql-playground copied to clipboard
How to set playground only for specific env?
I tried something like:
app.get(
'/playground',
expressPlayground({
endpoint: '/graphql',
env: 'development'
})
);
Obviously doesnt seem to work. I could
I could make it work smth like:
if (process.env.NODE_ENV === 'development') {
app.get(
'/playground',
expressPlayground({
endpoint: '/graphql',
})
);
}
but to me doesnt seem very nice solution.