GraphQL configuration

I need to enable GraphQL introspection in a production configuration of Strapi v4. In accordance with the documentation, I’ve tried to add this configuration to config/plugins.js and it’s seems to have made no difference. It hasn’t even enabled the playground in the production build. What am I doing wrong?

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

I’ve got the same problem, did you figure it out in the end?

1 Like

I haven’t looked at the issues since posting my question, but I’ve just checked and it’s now working with the configuration in my JSON snippet, in the production build. I’m now using Strapi 4.3.4, but I have no idea which version fixed it, or whether some other unconnected change did.

Thanks. Adding introspection: true, as you did, does indeed fix it.