Is GraphQL-Ruby improving the development with Ruby on Rails?

From my experience

Tomoharu Tsutsumi
2 min readAug 25, 2024

--

I spend 4 years developing a service with simple RoR at my previous company, but for now I’m belonging to a company using GraphQL-Ruby. I believe that the tech is awesome and confidently contribute to the business. However, I’m trying to summarize the pros and cons.

Reasons why GraphQL-Ruby has become popular and the merits

  • Need to follow complex designs

User Interfaces have become more complex to make it attractive for users. For example, we can move box to change schedules in a calendar with D&D. It is hard to implement it without JavaScript. In this case, since RoR is optimized for simple web applications, engineers in the company would decide to use API mode of RoR.

  • Types are important

The rise of TypeScript has changed the situation of Frontend. Many organizations have started to adopt types to Frontend. Because Ruby has no type basically, we needed to add types to Ruby.

  • Simplifying queries

The more difficult design is becoming, the more complicated queries have become. It is possible to simplify queries by getting only necessary data from Backend and calling it as less as possible. This functionality is contributing to process speed.

On the other hand

I sometimes feel that GraphQL-Ruby is tough for me.

  • The duration of development has increased

One of the merit of Ruby on Rails is that the development is agile because one object is used from view to model. However, the technic can’t be used with Graph-QL because frontend and backend is almost separated by types. Moreover, we have to define types, which leads to more time-consuming development.

  • Became a little bit complicated

As I write before, we need to maintain types and resolvers, we have more stuff to consider that using simple Ruby on Rails.

Wrap up

This is just my opinion. Therefore, it might have some mistakes, but I felt those things from my experience of a company using Graph-QL and not.

Feel free to reach out to me on LinkedIn, which you can find below. Looking forward to connecting!

https://www.linkedin.com/in/tomoharu-tsutsumi-56051a126/

--

--

Tomoharu Tsutsumi

Senior Software Engineer at two industry-leading startups ( Go | Ruby | TypeScript | JavaScript | Gin | Echo | Rails | React | Redux | Next)