Graphql-engine: Multi App on single Hasura instance

Created on 20 Nov 2018  Â·  9Comments  Â·  Source: hasura/graphql-engine

Hi guys,

Is it possible to use a single instance of Hasura for multi apps?
I want to host multi app on a single instance because I want SSO (Single Sign On) and share e-wallet between apps.

Is it possible now in Hasura? How?

question

Most helpful comment

@mnlbox The best practise, I think, would be to use different databases and different Hasuras. But in case your apps are related and might share data at some point or you just want to use one Hasura for operational convenience then yes, you can use separate schemas. You can create a schema through hasura console in the SQL tab (CREATE SCHEMA myschema; ) and then just switch the schemas through the button on the top left.

All 9 comments

You can use a single instance of hasura if all these apps use the same database.

Is it possible now in Hasura? How?

Can you expand a bit more on your architecture? What are the apps? How is data accessed? How is SSO used?

@0x777 I want create 3 mobile app backend with Hasura. I want separate apart table from each other for simpler access to each app data. Is it possible through schema option like below or any other setting are needs:
screenshot from 2019-01-24 08-25-46

For example If we have ability to group tables together (with ability to add some tag or category to each table) we can show table as a tree in left menu in console.
something like this:
react-bootstrap-treeview

Maybe related: #337

@0x777, @tirumaraiselvan can you guide me about this?

@mnlbox Yes you can use separate schemas in the same database!

On Wed, Feb 13, 2019, 5:46 AM mnlbox <[email protected] wrote:

@0x777 https://github.com/0x777, @tirumaraiselvan
https://github.com/tirumaraiselvan can you guide me about this?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/hasura/graphql-engine/issues/1067#issuecomment-463056488,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIQyEnNq4x89TMOEO23N0bklBOhBS-m8ks5vM5i1gaJpZM4Yqn73
.

Thanks @tirumaraiselvan.
So the best practise is to split each app to separate schema. yes?

How we can create schema?
Is it possible through Hasura console?

@mnlbox The best practise, I think, would be to use different databases and different Hasuras. But in case your apps are related and might share data at some point or you just want to use one Hasura for operational convenience then yes, you can use separate schemas. You can create a schema through hasura console in the SQL tab (CREATE SCHEMA myschema; ) and then just switch the schemas through the button on the top left.

Thanks man @tirumaraiselvan
I think we can close this issue and discuss about table grouping feature in separate issue for this:
react-bootstrap-treeview

Let's talk more about table grouping here: #1945

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bogdansoare picture bogdansoare  Â·  3Comments

tirumaraiselvan picture tirumaraiselvan  Â·  3Comments

lishine picture lishine  Â·  3Comments

anisjonischkeit picture anisjonischkeit  Â·  3Comments

EmrysMyrddin picture EmrysMyrddin  Â·  3Comments