hasura / hasura/graphql-engine

Request for aliases for PG schema names to be used for Hasura GraphQL endpoints

Open
#7,203 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

**Problem statement**: Today the schema names are embedded inside Hasura migrations and metadata. This schema names is also the prefix for all GQL queries and mutations created by the Hasura resolvers. There is a need to be able to configure schema name aliases, these aliases then to be used as the prefix for GQL qs and ms. If no alias is configured then the default prefix can be used as the schema name itself.

**Scenario**: As a product company we have standard schema names for the various product schemas we use in PG. But our customers and their DBAs will have schema naming conventions. Thus fixing product schema names is sometimes not an option. Eg: Our product schema could be called "VAM", but our customer may need it as 'HSBC_CBX_VAM'. While we can regenerate new metadata and migration scripts with the updated schema name, this will cause too much change on the UI side where the GQLs are consumed. And hence the request.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by tracing how PostgreSQL schema names flow through Hasura migrations, metadata, and generated GraphQL query and mutation prefixes; done means a configurable alias is used while the schema name remains the fallback.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, postgres, typescript
Domain
api, database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.