Rest vs GraphQL
VS GraphQL REST o The Journey - Timeline RPC SOAP GrahpQL Graph Query Language Remote Procedure Call Simple Object Access Protocol 1981 1991 1998 2000 2011 COBRA The Common Object Request Broker Architecture REST Representational State Transfer REST uses HTTP Data Resources o GET POST JSON HTTP PUT DELETE Client sends a Request Server sends a Request o GraphQL Gateway Server 1 Server 2 Central Arbiter Gateway Server 3 Loads data from GraphQL API and Client data Decoupled GraphQL services describing their own schema Data fetching with GraphQL vs REST REST o HTTP GET /users/<id> "user": { "id": "283gbkmlaewo" "name": "James", "address": {..}, "birthday": "July 19, 1982" /users/<id>/posts /users/<id>/followers > HTTP GET /users/<id> { "posts": [{ "id": "shgbcde5ydjk" "title": "graphQL benefits", "content": "Lorem ipsum .", /users/<id>/posts /users/<id>/followers "comments": [...], HTTP GET /users/<id> "followers": [{ "id": "ghtsdlo235ry" "name": "Jill", "address": {.), "birthday": " May 10, 1982", ). ..] /users/<id>/posts /users/<id>/followers o GraphQL query { User(id: "283gbkmlaewo") { name posts { title followers(last: 3) { name HTTP POST "data": ( "User": { "name : "James", *"posts: [ { title: "graphQL benefits" } "followers": [ { name: "Jill" ), ( name: "Jaden" ), { name: "Amanda" }, Jelvix jelvix.com
Rest vs GraphQL
Source
https://jelv...ql-vs-restCategory
TechnologyGet a Quote