Thanks for sharing
I want to give it a try man, I was 2 days ago trying to upload my graphql server to vercel but with no success I ended up going to heroku.
I noticed you have everything inside your api endpoint, but if you decided to have everything organized in different files and folders, would you keep all those files and folders inside the api folder ?
Hi Pako - what issues did you run into?
Yes, you can use whatever file strucutre makes sense and import as modules as necessary, and still leverage Next.js's file-based router convention (so in pages/api/foobar.js just import as modules any lib type code that you want to use).
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
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...
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.