hasura-auto-aliases
v1.0.2
Published
turn snake_cased columns into camelCased graphql api
Downloads
6
Maintainers
Readme
Motivation
By convention tables in database are named in snake_case but fields in graphql in camelCase. Hasura generates graphql endpoint in snake case imposing a burden of manual alias creation on you.
This script will create aliases in camel case for every column
It won't overwrite existing aliases
Usage
- track table
- create permissions for columns you need
- export metadatata to metadata.json
- in terminal
npx hasura-auto-aliases metadata.json > metadata_new.json
- load generated config file metadata_new.json in hasura admin console and check