1. 3

  2. 1

    I’m kind of tired of everyone comparing GraphQL to REST. Most GraphQL APIs are RESTful. They change the data representation, but they’re still HTTP APIs.

    We didn’t stop calling it REST when we moved from XML to JSON, because that would have been silly. Same story here.

    1. 1

      GraphQL is an RPC system, most analogous to things like SOAP but also somewhat comparable to things like XML-RPC and JSON-RPC.

      GraphQL has you send verbs in the body of an HTTP POST request to a single URL, thus using HTTP (itself an RPC protocol of course) as a dumb transport layer and not making use of HTTP features or URLs.

      GraphQL is about as far away from REST as you can possibly get.

      1. 2

        I actually decided that I was wrong here, but I don’t think it’s because HTTP methods aren’t used. HTTP methods and URLs mapping to resources isn’t necessary for REST. REST is really a lot more about resources being uniform, and I don’t know that GraphQL fulfills that. :)