Search code examples
graphqlhasura

Hasura GraphQL `hdb_catalog` v1 vs v2


I'm playing around with Hasura v2 engine (self hosted) and it's ability to connect multiple DB. What I was hoping is to be able to connect v2 and maintain v1 connection to the same DB by using separate metadata DB for v2.

But after trying a bit I was not able to this as apparently Hasura v2 is still using hdb_catalog on the connected DB along with hdb_catalog on metadata DB.

I see that there is minimal use for connected DB hdb_catalog v2 vs v1.

v1

v1 hdb_catalog

v2

v2 hdb_catalog

Does anyone know if this even archivable to run v1 and v2 Hasura engines connected to the same DB with v2 storing metadata on separate DB, and what is the use of hdb_catalog on non metadata connected DBs for v2?

Thanks!


Solution

  • Couple of things that I should to mention:

    • if you connecting v2 to db which has v1 connected, v2 will upgrade hdb_version which will stop v1 from starting. Running version of v1 will still work with bunch of console errors, mainly due to event logs tables being changed.
    • V2 is changing structure of event log tables so it could become incompatible with v1.
    • If you connecting v1 to db which has v2 connection it will not start due to event log tables incompatibilities mentioned above.

    So overall, while it is technically "possible" to connect v1 and v2 to the same db, there are a lot of shortcomings which make this not viable solution outside of pure curiosity exploration.

    Does not mean it will not change in the future though.

    Hope this is helpful.