DEV Community

Discussion on: Building A GraphQL Server With Next.js API Routes

Collapse
 
pakman198 profile image
Pako

So my first thought was:
Vercel basically allows you to deploy compiled frontend apps, so maybe I would need to compile the playground to present it as my frontend app and all my routes move them to lambdas.
But I didn't know in what direction to go so I just went with Heroku.

2 years ago I took Wes Bos' advanced react course with graphql and I was able to deploy the app in vercel, but that was before they added the new /api file structure.

Anyways, I'll try to update my code and upload it to vercel and if I have some problems deploying I might reach out for help :P

Thread Thread
 
lyonwj profile image
William Lyon

Gotcha. You can serve GraphQL Playground from a Next.js API Route. In Apollo Server 3 you'll just need to enable it via a plugin: apollographql.com/docs/apollo-serv...