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

Add support for multiple schemas #79

Open
lundberg opened this issue Mar 25, 2022 · 3 comments
Open

Add support for multiple schemas #79

lundberg opened this issue Mar 25, 2022 · 3 comments

Comments

@lundberg
Copy link
Contributor

lundberg commented Mar 25, 2022

Thoughts ...

  • Allow multiple API schemas to be configured/setup
  • Instantiate multiple clients
  • Merge routes from all configured clients or instantiate multiple routers
  • Show a merged navigation or add a new top-level navigation for each router (client/api/schema) e.g. like slack orgs

Caveats ...

  • Authentication against multiple APIs
@hbystrom91
Copy link
Contributor

hbystrom91 commented Mar 25, 2022

Right now we get the api instance by referring to BananasAdminContext.api so we would need to either merge the different api(s) into the single api or we would need another way to get access api instances. I guess merging two different apis would come with the risk of having two different endpoints with the same name. I think that would be a minor risk though since the names are prefixed. If I recall correctly the pattern usually looks like: {prefix/namespace}_product_read. The other option would perhaps be to have named apis? In that case you would get the api from BananasAdminContext.api[foo].

@lundberg
Copy link
Contributor Author

Agree, probably named apis is the way to go, could help the other parts as well, e.g. named prefix for routes and the top level navigation if thats the way to go.

@lundberg
Copy link
Contributor Author

An alternative is to completely instantiate the admin per schema and make the user login at each api, if not shared auth.

This approach would leave the router and client instance intact since it is per admin app instance.

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

No branches or pull requests

2 participants