hasura / graphql-engine

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.
https://hasura.io
Apache License 2.0
31.18k stars 2.77k forks source link

Cloud: allow users to set `HASURA_GRAPHQL_METADATA_DATABASE_URL` #9127

Open BenoitRanque opened 2 years ago

BenoitRanque commented 2 years ago

Is your proposal related to a problem?

Hasura cloud stores the user's metadata in a dedicated database hosted and managed by us. This database is required for startup, so managing this ourselves improves reliability and performance.

However, it can negatively impact power users who wish to interact directly with the hdb_catalog schema. This is an ask that arises most often concerning events.

Another problem is portability: with the current setup, users can lose data or configuration when a project is deleted.

Describe the solution you'd like

If users are allowed to set the HASURA_GRAPHQL_METADATA_DATABASE_URL on cloud, they could host the metadata themselves. This would give the users more control over the aspects of a project handled by the metadata db.

This is both a good and a bad thing, and users would be responsible for and reliability or performance implications. This is more targeted at power users.

Describe alternatives you've considered

Solutions to the specific reasons users ask for this may be provided individually. For example, migration state can and should be stored in the user's db. For events, additional apis should be created allowing users to get counts of pending events, get events filtered by status, etc. The current apis are quite limited and not all of them are documented..

BenoitRanque commented 2 years ago

Note: I don't necessarily think this should be implemented, but if it is not alternative solutions should exist for all problems that would lead users to want this feature.