evitaDB icon indicating copy to clipboard operation
evitaDB copied to clipboard

Switching off developer tools on demand

Open lukashornych opened this issue 2 years ago • 4 comments

Provide way to disable introspection in GraphQL and disable OpenAPI schema endpoint via configuration options.

lukashornych avatar May 31 '23 11:05 lukashornych

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?!

novoj avatar Jun 24 '24 11:06 novoj

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.

lukashornych avatar Jun 24 '24 11:06 lukashornych

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.

novoj avatar Jun 24 '24 11:06 novoj

Based on the previous discussion I'm going to redefine this task to be able to selectively disable developer tools via. configuration options.

novoj avatar Jun 26 '24 10:06 novoj