hasura / hasura/graphql-engine
add 'from_env' for 'schema' in metadata files like for 'database_url'
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Is your proposal related to a problem?
Please implement capability to configure schema for tables in metadata yaml files using environment variables
### Describe the solution you'd like
Now in database.yaml I can configure database.url using environment variable:
```
- name: reference_data
kind: postgres
configuration:
connection_info:
database_url:
from_env: HASURA_DB_URL_REFERENCE_DATA
isolation_level: read-committed
use_prepared_statements: false
tables: "!include reference_data/tables/tables.yaml"
```
I would like to have a possibility to configure the same way 'schema' in metadata files for tables:
```
table:
name: carrier
schema:
from_env: HASURA_DB_SCHEMA_REFERENCE_DATA
array_relationships:
- name: terminal_groups
using:
foreign_key_constraint_on:
column: carrier_id
table:
name: terminal_group
schema:
from_env: HASURA_DB_SCHEMA_REFERENCE_DATA
```
### If the feature is approved, would you be willing to submit a PR?
I'm not sure, I havn't seen you sources yet, but I can try.
My workaround:
I create docker image where I run shell script to replace values of 'shema' before run of main process
Contributor guide
Assessment
This issue has not been assessed yet.