Hello :wave: Is there a way in `graphql-yoga` to s...
# orm-help
p
Hello 👋 Is there a way in
graphql-yoga
to serve two different GraphQL endpoints on the same port? Something like
localhost:4000/api
&
localhost:4000/admin
?
s
If you use Zeit Now for your deployments you can use their routing feature to deploy two endpoints at two different paths.
👍 1
Locally - a bit more challenging, but you could run two servers as separate processes and route them with a proxy like this: https://stackoverflow.com/questions/18342418/routing-to-different-node-js-express-apps-on-one-server
👍 1
j
graphql-yoga is deprecated from what I’ve seen, you may want to try apollo-server
👍 1
s
yoga released an update 19 days ago. 🤣 I’m with you that I’d probably go with apollo-server though, their version 2 is awesome and it would have features you wouldn’t see in yoga (like persisted queries)
👍 1
p
I'll look into using
apollo-server
then. Thanks, guys! 🙏