Open lukashornych opened 1 year ago
Because there is a lot of settings I don't think the production mode is a good idea. Can we simply add configuration option for exposing API schemas to ApiOptions of REST / GraphQL API endpoints instead?!
Why do you think that? Wouldn't it be the same to switch the mode for the entire database for API only? The database doesn't have to use it right now.
You'd probably want different settings for queue sizes, thread count, limits and many more settings between different environments. So I don't think that adding "environment modes" is a good idea. Let alone to control specific behaviour of APIs. When the database is within DMZ (not publicly accessible) it might be ok - and maybe even necessary for it to provide API schemas even in production mode. In short - the abstraction for environments is maybe not correct enough to justify itself.
Based on the previous discussion I'm going to redefine this task to be able to selectively disable developer tools via. configuration options.
Provide way to disable introspection in GraphQL and disable OpenAPI schema endpoint via configuration options.