https://github.com/rfieve/hasura-from-domains
A NodeJS tool to import domain migrations and metadata to hasura.
https://github.com/rfieve/hasura-from-domains
Last synced: 10 months ago
JSON representation
A NodeJS tool to import domain migrations and metadata to hasura.
- Host: GitHub
- URL: https://github.com/rfieve/hasura-from-domains
- Owner: rfieve
- License: mit
- Created: 2023-10-21T07:01:42.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-21T07:46:58.000Z (over 2 years ago)
- Last Synced: 2025-06-02T05:57:33.445Z (about 1 year ago)
- Language: TypeScript
- Size: 82 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hasura-from-domains
A NodeJS tool to import domain migrations and metadata to hasura.
## Table of Content
- [hasura-from-domains](#hasura-from-domains)
- [Table of Content](#table-of-content)
- [Installation](#installation)
- [Usage](#usage)
## Installation
```sh
yarn add @romainfieve/hasura-from-domains
```
or
```sh
npm install @romainfieve/hasura-from-domains
```
## Usage
```typescript
// ...
// |__ 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
// ...
```
---