Should I Use REST or Switch to GraphQL for a CRUD Application?

0
1
Asked By CuriousCoder42 On

I'm currently working on a full-stack business deal inventory and time-tracking application that's primarily CRUD-focused. My tech stack includes React for the frontend and Node.js with TypeScript for the backend, and I've set up all CRUD operations using REST. I also have an ingestion service that processes emails and stores the data in a PostgreSQL database using Sequelize.

Since I now have about 30 columns in my tables and may add more later, I'm worried that performance might take a hit as the number of entries grows into the thousands. I'm wondering if switching to GraphQL would be a better option for my situation or if I should just stick with REST and consider using Elasticsearch for advanced querying later. I'm mostly interested in the right approach for handling my current and future data needs. What do you think?

2 Answers

Answered By JackOfAllTech On

In my opinion, GraphQL is unnecessary for your setup. It’s great for projects where the data structure is unpredictable, but for a straightforward CRUD application with a single frontend and backend, REST is simpler and more effective. Focus on getting REST right before considering a switch.

Answered By DataDude22 On

If you’re doing this project mainly for learning, go with what excites you. But for simple CRUD operations, REST is the way to go. GraphQL shines when dealing with nested data or when the frontend needs flexibility in what it requests. For your case, REST should serve you well until you hit limitations.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.