Hasura Seed Data
Last updated
Was this helpful?
Last updated
Was this helpful?
Hasura comes with a seeding mechanism, it basically runs SQL files against your Hasura server. There is some seed data available in the repository; however, you might find yourself needing to create new seed data for an existing table or a new table.
Hasura lets you:
Create a new table seed with a SQL file.
Create a new seed by exporting data already present in the database (copy from another table)
Create a new seed from multiple existing tables.
Create a new seed file
Once you have your seed files created, it is time to apply them (run them against your database). To do this we use the apply command:
Apply seed data