Long live the REST API; it’s not dead yet!
The REST API will be alive for many years to come because many companies set up integrations and forget about them until there’s a problem. It is still one of the dominant types of application integrations: REST API, SOAP, and more recently GraphQL.
For those not, aware, REST is a type of API design pattern. REST focuses on interacting with resources and managing their lifecycle through CRUD like API calls.
In 2022, there are many more developers comfortable with REST than there are GraphQL developers. The majority of enterprise software systems like NetSuite, Salesforce, Oracle, Dynamics and etc don’t have GraphQL enabled APIs or are missing a lot of functionality.
The biggest problem with RESTful APIs is that they tend to require many different endpoints to make a website or application work. This means the client must make multiple time consuming trips to the server to get data. The client doesn’t generally have much control of what data is returned or isn’t returned unless they ask for a specific request.
I think GraphQL solves some of REST APIs limitations but adds other drawbacks that might be a problem. For example, cacheability, security, and consistency can be very difficult. Literally every one that does an API call will potentially be getting back different resources.
I’m still mainly developing REST API’s and occasionally still using SOAP although I prefer not to use it. 😊 I think GraphQL might be great for mobile applications although I do feel that the client ends up knowing more about the API and it’s implementation than it probably should.
If you follow the RESTful Constraints and think about the future, you should be fine with building a REST API.
Also published on Medium.