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

Example ideas #1

Open
5 of 13 tasks
kbrandwijk opened this issue Oct 26, 2017 · 3 comments
Open
5 of 13 tasks

Example ideas #1

kbrandwijk opened this issue Oct 26, 2017 · 3 comments

Comments

@kbrandwijk
Copy link
Owner

kbrandwijk commented Oct 26, 2017

  • Auth0 authentication
  • Linking new node to current user -> linking-node-to-current-user
  • Overriding existing mutation -> linking-node-to-current-user
  • Grouping/Aggregations
  • File API
  • Relay edge types
  • Facebook Delegated Account Recovery
  • Current user -> current-user
  • Permission query mocking https://launchpad.graphql.com/l15mwzl3q, but now part of GC
  • Mocking data
  • Remove pagination limit
  • Nested filtering/ordering
  • Interfaces/unions -> interfaces

Ideas welcome!

@antho1404
Copy link

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

@kbrandwijk
Copy link
Owner Author

kbrandwijk commented Oct 28, 2017

@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
}))

@antho1404
Copy link

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

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