Enabling graphql queries in production (Error: Server cannot be reached)

Hello guys. The solution is to create a new file in the directory config/env/production.

// ./config/env/production/plugins.js

module.exports = {
  graphql: {
    config: {
      endpoint: '/graphql',
      shadowCRUD: true,
      playgroundAlways: true,
      depthLimit: 10,
      amountLimit: 100,
      apolloServer: {
        tracing: false,
        introspection: true,
      },
    },
  },
};

Reference https://github.com/strapi/strapi/issues/9105#issuecomment-1080073060

3 Likes