Does anyone know if/ how you could add additional ...
# orm-help
j
Does anyone know if/ how you could add additional rest api routes to a graphql-yoga server?
t
I’m doing this, it turned out to be rather simple in the end
Under the hood yoga is all express
I’m guessing somewhere in your index or elsewhere you are creating a GraphQLServer object?
The GraphQLServer object will have a property ‘express’
the express property is the underlying express app
so you can use it like so
express.get(‘/somePath’, (req, res) => res.send(‘Hello World!’))
j
Oh interesting! Thank you!
t
Let me know if you have any issues
j
Will do, thanks
t
And no worries!