hasura / hasura/graphql-engine
Multiple enpoint paths
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
Hi!
Now that v2.0 is out and allows for multiple databases, I was wondering if it would be possible to have multiple graphql endpoints on one Hasura instance.
Say I have two PostgreSQL databases connected on my instance, it could happen that existing databases share the same table names, somehow. Currently that would trigger an error when attempting to track tables with duplicate names. An interesting feature would be to be able to target a specific database when querying Hasura, maybe like `/dbname/v1/graphql`.
As I understand it, I could use different schemas to have a prefix on my table names, but I think it would be a great addition to be able to specify which database we want to query.
Thank you for any ideas you may have.
Contributor guide
Research direction
Start by reviewing how Hasura currently tracks tables across multiple PostgreSQL databases and how requests reach the v1/graphql endpoint. Compare that behavior with the proposed /dbname/v1/graphql form, including duplicate table names, and define the endpoint and routing behavior that would demonstrate the feature is complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, postgresql
- Domain
- api, database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100