Skip to content

A NodeJS tool to import domain migrations and metadata to hasura.

License

Notifications You must be signed in to change notification settings

rfieve/hasura-from-domains

Repository files navigation

hasura-from-domains

A NodeJS tool to import domain migrations and metadata to hasura.

Table of Content

Installation

yarn add @romainfieve/hasura-from-domains

or

npm install @romainfieve/hasura-from-domains

Usage

// ...
// |__ hasura
// |   |__ metadata
// |   |__ migrations
// |       |__ default
// |
// |__ src
//     |__ domains
//         |__ users
//             |__ user.permissions.yml
//             |__ user.constraints.sql
//             |__ user.tables.sql
//             |__ user.triggers.sql
// ...

generate({
    metadataPath: './hasura/metadata',
    migrationsPath: './hasura/migrations/default',
    sourceDirectory: './src/domains',
})

// ...
// |__ hasura
// |   |__ metadata
// |   |__ migrations
// |       |__ default
// |           |__ 0000000000_tables_user
// |           |   |__ up.sql
// |           |__ 0000000001_constraints_user
// |           |   |__ up.sql
// |           |__ 0000000002_triggers_user
// |               |__ up.sql
// |
// |__ src
//     |__ domains
//         |__ users
//             |__ user.permissions.yml
//             |__ user.constraints.sql
//             |__ user.tables.sql
//             |__ user.triggers.sql
// ...

About

A NodeJS tool to import domain migrations and metadata to hasura.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published