3 ms·
Pretty recently, as of 2.0, hasura has added support for multiple databases.
by kall 5y ago
Pretty recently, as of 2.0, hasura has added support for multiple databases.
- piaste 5y agoIt's a VERY fragile support: https://github.com/hasura/graphql-engine/issues/6648 https://github.com/hasura/graphql-engine/issues/6648 Basically, if two entities in the databases have the same names, Hasura fails unless you manually define a unique `custom_name` for each such entity. Given that the most common multiple database scenario involves different databases with either the exact same schema (one-db-per-tenant) or similar schemas (staging vs. production database), it forces you to painstakingly set a custom_name for basically every single entity in your db. Thankfully there is an API so in theory you could set this programmatically, but it still means that your client code needs to be manually kept in-sync with whatever custom name generator rule you used.
- kall 5y agoFor what it's worth, this is addressed in 2.1, which is only out in beta. Maybe should have been there from the start.