-
Notifications
You must be signed in to change notification settings - Fork 0
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
Example ideas #1
Comments
If I can add something, I have a saas product (not on graphcool) and I was thinking how I could migrate it because I'm using multi-tenancy with postgres and I think gateway could be a way to do that with different project and the gateway redirect to one api or the other. I don't know if that make sense to use gateways like that |
@antho1404 Can you explain a bit more about your set up? From what I understand, you now have a multi-tenancy setup, and you are thinking of creating a seperate service for each tenant, and redirect to the right service in the API Gateway? In that case, the Gateway would just do the routing, and I don't think you need to setup the Gateway as a graphql endpoint, but a 'proxy' solution would also work. You could simply use something like https://www.npmjs.com/package/express-http-proxy, and use a method to determine where to route: function getHost() {
// determine endpoint based on authorization header
return `https://api.graph.cool/simple/v1/${tenantServiceId}`
}
app.use('/graphql', proxy(getHost, {
memoizeHost: false
})) |
You exactly get the idea, and yes the proxy will definitely do the job, I just see the gateway as a proxy but I guess it can be more that this, I will try to take time to look more about what's the real benefits with the gateway |
Permission query mockinghttps://launchpad.graphql.com/l15mwzl3q, but now part of GCIdeas welcome!
The text was updated successfully, but these errors were encountered: