Search code examples
dockergraphqlcontainershasurahasura-docker

Is it possible to export REST endpoints APIs in Hasura?


I am trying to move from a development Stack (that means a Docker stack) to an existing (but empty) production stack. Both of them are up with a docker-compose. I am using two different Portainer environments if it is useful to know.

I'd like to move all the Hasura REST APIs that I have created without re-creating them by hand, what is the best way to do it?

Thanks in advance,


Solution

  • It is possible to export and import Metadata:

    Settings--> Metadata Actions --> Export and Import metadata.

    You can easily export and import the JSON file provided that the underlying databases are identical (or you can try to edit manually the JSON).

    Metadata can be found in the Postgres DB (usually in a single Row):

    • schema hbd_catalog
    • table hbd_metadata