Comparing REST and GraphQL
This article will compare REST with the lesser known GraphQL style APIs. What is a REST API? REST (Representational State Transfer) is a client-server architecture style centred around resources and the state transitions can go through. A resource is named and located via a URI (Uniform Resource Identifier) . Usually, the HTTP transport protocol is used which give access to the standard HTTP methods/verbs allowing CRUD (create, read, update, delete) operations to be performed on the resources. The accepted CRUD operation to HTTP verb mappings can be found here . For instance: curl -X GET http://api.com/users/1/photos/1 -H 'Content-Type: application/json' In the above example, the HTTP verb GET is used to indicate a read operation, the Content-Type: application/JSON header indicates the desired representation. There are many more REST architectural constraints which would make an API truly RESTful but this is the general minimal you'll...