{"id":246280,"date":"2016-10-13T06:57:16","date_gmt":"2016-10-13T13:57:16","guid":{"rendered":"http:\/\/css-tricks.com\/?p=246280"},"modified":"2017-04-06T16:55:37","modified_gmt":"2017-04-06T23:55:37","slug":"declarative-data-fetching-graphql","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/declarative-data-fetching-graphql\/","title":{"rendered":"Declarative Data Fetching with GraphQL"},"content":{"rendered":"

The following is a guest post by Nilan Marktanner from Graph.cool<\/a>. I don’t know about y’all but I’ve spent plenty of time in my career dealing with REST API’s. It’s a matter of always trying to figure out what URL to hit, what data to expect back, and how you can control that data. A quick glance at GraphQL makes it seem like it simplifies things both for the creators and consumers of the API. Let’s let Nilan explain.<\/em><\/p>\n

<\/p>\n

When it comes to standards for designing the API architecture for web services of all kinds, REST has been the state of the art for many years already. With the widespread popularity of REST, GraphQL’s claim to replace it as the API bridge between front end and back end has received a lot of scepticism. But GraphQL is already very well established, as evidenced by Facebook’s announcement of GraphQL being production ready<\/a> and GitHub’s reveal of their GitHub GraphQL API<\/a>.<\/p>\n

The Infrastructure Required for GraphQL<\/h3>\n

Like with REST, several components are needed before we can use a GraphQL API.<\/p>\n