3 ms·
REST and GraphQL are in orthogonal domains and mutually compatible. This would be more obvious in the most common case for each where they are being used over H
by dragonwriter 8y ago
REST and GraphQL are in orthogonal domains and mutually compatible. This would be more obvious in the most common case for each where they are being used over HTTP if HTTP had generic (not specific to, e.g., WebDAV) safe method that took a request body with a representation of a query and returned a representation of the resource satisfying the query. [0]
GraphQL is basically just a generic resource representation for queries.
[0] Like the one proposed here: https://www.ietf.org/id/draft-snell-search-method-01.txt https://www.ietf.org/id/draft-snell-search-method-01.txt
- headcanon 8y agoThis. GraphQL is agnostic to the application layer, whereas REST is tied to HTTP. For instance, we have various REST-style endpoints that execute GQL queries directly on the backend.
- RussianCow 8y agoREST is also transport-agnostic and definitely not tied to HTTP, even though that's by far the most common way in which it's used.
- mstade 8y ago> This. GraphQL is agnostic to the application layer, whereas REST is tied to HTTP. If anything it's the other way around really, HTTP is tied to REST, but even that would be a misnomer. HTTP is an implementation of the architectural style REST, and undoubtedly the most popular in terms of application. There are others though, such as CoAP for example.