0

I've added this snippet into ./config/plugins.js

module.exports = {
  graphql: {
    enabled: true,
    config: {
      endpoint: "/graphql",
      shadowCRUD: true,
      playgroundAlways: process.env.NODE_ENV === "development",
      depthLimit: 50,
      amountLimit: 100,
      defaultLimit: 100,
      maxLimit: 100,
      apolloServer: {
        tracing: true,
      },
    },
  },
  ckeditor: true,
};


I also have changed `playgroundAlways` value like this:
    playgroundAlways:false

But I can see graphql playground in development and production mode.
How can I hide or disable graphql playground?

Sarah Diba
  • 87
  • 1
  • 9

1 Answers1

0

How are the start app script defined? Are you setting the NODE_ENV=production?

To double check set a breakpoint or console.log process.env variable to see what you are getting at the runtime.

  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/32908006) – user16217248 Oct 17 '22 at 01:48