21st Week: Cloudflare Workers and GraphQL Yoga

I’ve been working on adding a backend for qwert-learner.

To keep this App a static site, I decided to ditch the Restful API and use GraphQL instead. Since it only requires one endpoint. A lot schemes can found like Azure functions, AWS Lambda, Google Cloud Functions, DigitalOcean Functions and Cloudflare Workers. MongoDB Atlas is a cheap choice for database. But Cloudflare workers can use KV to store data, which is a better choice for me.

Campared with Apollo Server, GraphQL Yoga is a lightweight one. Can be simply integrated with a lot providers like cloudflare. Here is the document.

Developing cloudfalre workers is much easier with wrangler. Can use miniflare to do unit testing.