The tiniest, very cute, ruby graphQL microservice Setup
I’ve decided to open up an old repo from 2018. In this repo, I’ve built a small example of how one might want to create a microservice with a GraphQL and Ruby setup.
I would recommend against using microservices unless you really, really, really can’t do otherwise. But if you have to, this might be the simplest approach. The microservices themselves are written in Ruby with Distributed Ruby, meaning you can quickly and easily call the underlying microservices without any HTTP layer. Oh my!
The setup is as follows:
- A user service for fetching users
- A comment service for fetching comments
- A GraphQL service as an umbrella
- All services run in Docker containers for easy building and deployment
Under the hood, it uses Drb, Docker, and Sinatra.
Check out the GitHub repo here, just promise me you won’t use microservices!