graphql-engine icon indicating copy to clipboard operation
graphql-engine copied to clipboard

Console: Distinguish between different environments clearly

Open mnlbox opened this issue 3 years ago • 4 comments
trafficstars

Is your proposal related to a problem?

Yes, it's a real story, I have my app in three environments (local development, test, and prod) and last week I just had open all of my environments in different tabs in my browser. I just wanted to test a SQL query in my localhost so I wrote my update query to update some rows and then I copied that from my editor to the SQL window in the Hasura console and clicked Run button and I realized all of the sudden that I run this script accidentally on my prod database. Fortunately, I had a good backup that I restored. Also, my app is not so big and I did that at midnight when no user was logged in so I'm sure I'm good. I asked my colleague and he also had the same issue before, so I think it's a common issue that may be happening to other users.

Describe the solution you'd like

As a solution I think it's good to choose a different theme or color for each environment then it's clear visually that you are in which environment. For example something like this:

Prod Env: 2022-08-23_13-48_1

Test Env: 2022-08-23_13-48

Local Env: 2022-08-23_13-49

Describe alternatives you've considered

We can add an environment variable flag or simple setting to set Hasura console as a read only mode then you can disable some dangerous features like: SQL or mutations or edit and delete button in the data viewer to prevent these actions in prod, something like this: 2022-08-23_13-57

If the feature is approved, would you be willing to submit a PR?

Unfortunately, I don't have a lot of time but I definitely try to contribute as much as I can.

Please use :+1: if you like this feature idea.

mnlbox avatar Aug 23 '22 12:08 mnlbox

Related issue for Read only Console: #5349

manasag avatar Aug 23 '22 12:08 manasag

Hi @mnlbox , thank you for submitting this enhancement request. This feature is currently available in our Cloud and Enterprise products. You can try it out on cloud for 30 days for free here

manasag avatar Sep 01 '22 12:09 manasag

Thanks @manasag :+1: Any plan for adding this feature to the community edition of Hasura also?

mnlbox avatar Sep 07 '22 09:09 mnlbox

Can someone explain where I can find the resources to do this with the enterprise version?

Pascal-Orthopy avatar May 16 '24 08:05 Pascal-Orthopy