Should I stick with REST or switch to GraphQL for my CRUD application?

0
3
Asked By TechSavvy123 On

I'm working on a full-stack business deal inventory and time-tracking application that primarily involves CRUD operations. I'm using React for the frontend and Node.js with TypeScript for the backend, with REST currently handling all CRUD functionalities. I have an ingestion service utilizing Vertex AI to process emails and input data into a PostgreSQL database via Sequelize. Given my setup, which includes multiple related tables and a growing number of data entries, I'm considering if switching from REST to GraphQL would be beneficial, especially with performance concerns related to querying. I'm also thinking about the future integration of an AI chatbot feature to handle user inquiries about deal information. What's the best approach for my situation?

3 Answers

Answered By WebDevGuru89 On

Honestly, you should stick with REST for your current project. It's perfectly fine for CRUD operations, and switching to GraphQL won't necessarily resolve your 30-column challenge. Performance issues typically arise from database optimizations like indexing, not from the API design itself. If you start running into performance problems later, focus on tuning your database instead.

CuriousCoder45 -

Thanks for clarifying that! I'll keep an eye on database indexing.

Answered By DevTalker66 On

In your case, GraphQL feels unnecessary. It’s more useful when you need flexibility in data retrieval and your app's data requirements are unpredictable. Since you have a single frontend and backend, just use REST and keep it simple!

Answered By CodingNinjaX On

If this is a learning or hobby project, go with what excites you. That said, for standard CRUD, REST is usually the way to go. GraphQL shines when you're dealing with nested data structures rather than straightforward CRUD operations. Stick to REST for now and think about GraphQL down the line if it fits better with your needs.

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.