hasura / graphql-engine

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.
https://hasura.io
Apache License 2.0
30.95k stars 2.74k forks source link

docs: add a guide on multi-tenant modelling with hasura #2836

Open coco98 opened 4 years ago

coco98 commented 4 years ago

We should talk about the different approaches, how-to with hasura and their trade-offs:

  1. Different databases
  2. Different schemas
  3. tenant_id (shard column) type modelling
richardgirges commented 4 years ago

Really interested to see how we can do this with different databases. Is there any existing information already out there on that?

mnlbox commented 4 years ago

@coco98 very interesting. Any plan for this?

bjensen commented 4 years ago

I would like to know about this as well..

undefinedExpert commented 4 years ago

Any plans to support this? Would be really helpful to have that!

petecorreia-appital commented 4 years ago

This would be massively helpful. Is this stalled?

marionschleifer commented 4 years ago

@petecorreia-appital no this is not stalled. We'll work on this in the next weeks and hope to publish soon 🙂

petecorreia-appital commented 4 years ago

@marionschleifer that's amazing! thank you all at hasura for the hard work and please remember to take it easy, all this can wait in light of the pandemic. stay safe!

mubaidr commented 4 years ago

Looking forward to it, especially the 3. tenant_id (shard column) type modelling, this will add support for citus data: https://www.citusdata.com/use-cases/multi-tenant-apps

GavinRay97 commented 4 years ago

I wrote a gist summarized from a conversation with @leoalves and another Discord member about how to do Organization-based/Multi-tenant permissions modeling without the use of X-Hasura-Organization-Id or other session variables that some may find useful:

https://gist.github.com/GavinRay97/d7b8805078a47e00001e58eb8b1027b9

tirumaraiselvan commented 4 years ago

Hey folks,

This blogpost covers multi-tenancy using Hasura Authz quite comprehensively (also include Gavin's gist above): https://hasura.io/blog/authorization-rules-for-multi-tenant-system-google-cloud/

Hope this helps.

MarcusBondezan commented 3 years ago

I'm currently defining an app architecture. A documentation like that would help me a lot! I'm looking forward to study it! :clap: :smiley: