Your comment makes me think I was maybe wrong about that? Could you confirm and/or link to some docs about this aspect?
Your comment makes me think I was maybe wrong about that? Could you confirm and/or link to some docs about this aspect?
However I think I’ve worked out a decent compromise:
- I start configuring the basics of my Hasura setup through the Admin GUI.
- I then use the CLI to download the metadata with the command `hasura metadata export`.
- Commit that to my repo.
- Using the existing metadata files as a template, make any changes when required.
- Use the cli-migrations docker image to apply my metadata on each deployment of Hasura (as detailed here: https://hasura.io/docs/1.0/graphql/manual/migrations/advance...)
Not sure if that’s the most efficient way to do it but it seems to work and it was pretty quick to setup.
1. You use the GUI and then export/import the metadata
2. You can use the GUI and as you do, the GUI will keep incrementally updating the metadata configuration file and even create database migrations for you in your folder on your machine, kind of like an IDE
3. You can stop using the UI altogether, and just write the configuration by hand
Docs: https://hasura.io/docs/1.0/graphql/manual/migrations/index.h...
Also, feel free to ask around on our discord if you need help: https://discord.gg/hasura
https://hasura.io/docs/1.0/graphql/manual/migrations/advance...
You can choose to bring in that configuration via a Kubernetes configmaps type thing, or by baking a new image for a release (like you would have done with your source code say).
That way you can leverage proper version control, merge feature branches, do copy paste of parts of models, reuse entire modules across projects, etc.
Slicknode: https://slicknode.com Github: https://github.com/slicknode/slicknode
(I'm from Slicknode)