Strapi Cloud graphql playgroundAlways not working

System Information
  • Strapi Version: 4.10.2
  • Operating System: Mac OS 12.6
  • Database: SQLite
  • Node Version: 16.17.0
  • NPM Version:
  • Yarn Version: 1.22.19

Hi I’m new to Strapi. I’ve been able to get an instance hosted on Strapi Cloud and I can make graphql queries to it via Postman. However I can’t get the playgroundAlways functionality to work. In [project root directory]/config/plugins.ts I have tried this syntax:

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

and also this syntax (not at the same time):

export default { graphql: { enabled: true, config: { endpoint: "/graphql", shadowCRUD: true, playgroundAlways: true, depthLimit: 7, amountLimit: 100, apolloServer: { tracing: false, introspection: true, }, }, }, };

I also found an older post that suggested to use this in [project root directory]/src/extensions/graphql/config/settings.json:

{ "endpoint": "/graphql", "tracing": false, "shadowCRUD": true, "playgroundAlways": true, "depthLimit": 7, "amountLimit": 100 }
None of them work on my deployed instance. If I go to [deployed site]/graphql I get a message in the browser “GET query missing.”

Any thoughts would be appreciated!

Day 2 update:

The documents say to have this config file at ./config/plugins.ts, which is not working for me.

Following this thread I have placed the file at ./config/env/production/plugins.js

Now I can build locally, but on the server I get this error:

[2023-05-05 17:03:50] $ strapi start
[2023-05-05 17:03:56] Error: Could not load js config file /home/app/config/env/production/plugins.js: originalConfigFn is not a function
[2023-05-05 17:03:56]     at loadJsFile (/home/app/node_modules/@strapi/strapi/lib/core/app-configuration/load-config-file.js:18:11)
[2023-05-05 17:03:56]     at loadFile (/home/app/node_modules/@strapi/strapi/lib/core/app-configuration/load-config-file.js:35:14)
[2023-05-05 17:03:56]     at /home/app/node_modules/@strapi/strapi/lib/core/app-configuration/config-loader.js:18:18
[2023-05-05 17:03:56]     at Array.reduce (<anonymous>)
[2023-05-05 17:03:56]     at module.exports (/home/app/node_modules/@strapi/strapi/lib/core/app-configuration/config-loader.js:15:6)
[2023-05-05 17:03:56]     at module.exports (/home/app/node_modules/@strapi/strapi/lib/core/app-configuration/index.js:58:21)
[2023-05-05 17:03:56]     at new Strapi (/home/app/node_modules/@strapi/strapi/lib/Strapi.js:82:23)
[2023-05-05 17:03:56]     at module.exports (/home/app/node_modules/@strapi/strapi/lib/Strapi.js:573:18)
[2023-05-05 17:03:56]     at module.exports (/home/app/node_modules/@strapi/strapi/lib/commands/actions/start/action.js:24:10)
[2023-05-05 17:03:56]     at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2023-05-05 17:03:56] error Command failed with exit code 1.
[2023-05-05 17:03:56] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Downgraded all @strapi dependencies, still no luck.

  "dependencies": {
    "@strapi/plugin-graphql": "4.9.2",
    "@strapi/plugin-i18n": "4.9.2",
    "@strapi/plugin-users-permissions": "4.9.2",
    "@strapi/strapi": "4.9.2",
    "better-sqlite3": "8.0.1"
  },

OK, got it. Hopefully someone will get use of my monologue at some point. The documentation suggests that if you’re using typescript you should use a file at config/plugins.ts, but the code only supports config/plugins.js.

Screen Shot 2023-05-05 at 2.25.00 PM

Screen Shot 2023-05-05 at 2.27.37 PM

I made a PR in case anyone cares to support ts plugin config files: feat: enable ts files to be used as config files by AaronMullan · Pull Request #16637 · strapi/strapi · GitHub