Although there are many differences between Graphql APIs and common REST APIs implemented with HTTP, I am wondering if these differences are syntactical or if Relay and Graphql are fundamentally non-RESTful. If so which constraint of REST do they violate?
Asked
Active
Viewed 419 times
1 Answers
1
GraphQL is not RESTful as it doesn't use uris and http methods to express the nature of the operations. You have one route (for example: /graphql) that you send all operations to - both queries and mutations, on all types of entities.

Eran Kampf
- 8,928
- 8
- 49
- 47
-
I believe an application can be RESTful without specifically implementing URIs and HTTP methods. That just happens to be the implementation for the World Wide Web. Correct me if I'm wrong. – danield9tqh Aug 08 '16 at 22:30
-
1@Daniel an application cannot be RESTful without URIs, HTTP and the Web because REST isn't some general software architecture (like, idk, micro services or whatever) but a convention of how to use said URIs and HTTP protocol for a CRUD application. As its name - "representational state transfer" - suggests, it deals with how to represent state over HTTP (of course you can implement the same conventions over other communication protocols by emulating HTTP's attributes - URI, method, etc - over that protocol) – Eran Kampf Aug 12 '16 at 17:08
-
I suspect that this answer is very poor and misleading. I understand that REST "REpresentational State Transfer" is an ideal where a server transfers a representation of it's state/operations for transforming state to a client. I don't think the means of representation is specified... – Zach Smith Aug 30 '19 at 07:54
-
A related question: https://stackoverflow.com/questions/57723123/is-a-graphql-api-restful-by-default – Zach Smith Aug 30 '19 at 08:22