Open gstewart-aiwyn opened 2 years ago
@rahulagarwal13 ☝️ this sounds like something that might be solved by the dynamic DB connection string work that your team is doing.
Thanks @gstewart-anduin for the feature request. We are currently working on dynamic Db connection feature which is in alpha stage currently. Do you have different schema per tenant? If not, we believe you can use the new feature for this use-case. Here is the RFC for it. Can you please check and let know if our solution will work for you and any other feedback you have for us?
We do have a separate schema per tenant in our Postgres instance so this won't help us currently with that issue, which we currently have to work around with Apollo. This feature could be useful for us in the future if extended to BigQuery and possibly Postgres for other use cases besides tenancy.
On Fri, Dec 16, 2022 at 6:39 PM Rahul Agarwal @.***> wrote:
Thanks @gstewart-anduin https://github.com/gstewart-anduin for the feature request. We are currently working on dynamic Db connection feature which is in alpha stage currently. Do you have different schema per tenant? If not, we believe you can use the new feature for this use-case. Here https://github.com/hasura/graphql-engine/pull/9310/files is the RFC for it. Can you please check and let know if our solution will work for you and any other feedback you have for us?
— Reply to this email directly, view it on GitHub https://github.com/hasura/graphql-engine/issues/8779#issuecomment-1355828057, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUG72ZQRW3IPHYKB2PMVO63WNT4UZANCNFSM56KIJU4A . You are receiving this because you were mentioned.Message ID: @.***>
Related to : https://github.com/hasura/graphql-engine/issues/3606
Is your proposal related to a problem?
We use schema per tenant approach in PostgreSql. Currently we have to use apollo client to modify the query by adding the correct tenant to the front of the query and then map the tenant claim in the JWT to a user which has access to the proper tables/views/actions for that tenant.
Describe the solution you'd like
It would be awesome if we could map the tenant claim in the token directly to a DB schema so that we didn't have to use Apollo client to rewrite the query dynamically or map to a tenant specific user.
If the feature is approved, would you be willing to submit a PR?
Yes, we would be willing to do the dev work if this feature is approved.