Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional database schema prefix #5394

Closed
ludovicc opened this issue Jul 16, 2020 · 6 comments
Closed

Optional database schema prefix #5394

ludovicc opened this issue Jul 16, 2020 · 6 comments
Assignees

Comments

@ludovicc
Copy link

Hello,

In my company, we use Postgres schemas to segregate data by customer. The table structure is the same for different schemas, but data in one schema is always linked to a customer and cannot be accessed from another customer.

This architecture makes compliance and multi-tenancy easier to manage, but with Hasura we have what looks like many different schemas but differ only by the schema prefix (cust1_tableA, cust2_tableA...). Ideally from GraphQL only tableA should be used when there are no ambiguities.

In Postgres, search_path is used to remove the need to specify the schema on each statement, can a similar functionality be added to Hasura, for example as a prefix in the url (/cust1/v1/graphql) or as x-hasura-search-path=cust1 header?

This issue is related to:

@tirumaraiselvan
Copy link
Contributor

This is highly related to #3606

@jflambert
Copy link
Contributor

I would love being able to prefix hasura schema names... same situation as @ludovicc

@MarcusBondezan
Copy link

Same situation here! It would be great to have such way to work with different schemas.

@nezzard
Copy link

nezzard commented Oct 29, 2021

Have the same problem

@tirumaraiselvan
Copy link
Contributor

One idea to solve this is being discussed in #3606

Would love all you feedback there!

@tirumaraiselvan
Copy link
Contributor

Closing this in favour of #3606

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants