<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Web Development on Boyang Yue</title><link>http://blog.boyangyue.com/tags/web-development/</link><description>Recent content in Web Development on Boyang Yue</description><generator>Hugo</generator><language>en-us</language><copyright>A Good Year Ahead</copyright><lastBuildDate>Tue, 06 Jul 2021 10:00:00 +0900</lastBuildDate><atom:link href="http://blog.boyangyue.com/tags/web-development/index.xml" rel="self" type="application/rss+xml"/><item><title>How REST and GraphQL Draw the API Boundary</title><link>http://blog.boyangyue.com/2021/07/how-rest-and-graphql-draw-the-api-boundary/</link><pubDate>Tue, 06 Jul 2021 10:00:00 +0900</pubDate><guid>http://blog.boyangyue.com/2021/07/how-rest-and-graphql-draw-the-api-boundary/</guid><description>&lt;p&gt;From the front end, a profile screen on a code-hosting service looks simple: show a user&amp;rsquo;s name, list a few of their repositories, and include each one&amp;rsquo;s star count. The API boundary decides where that screen gets assembled, and REST and GraphQL draw it in different places.&lt;/p&gt;
&lt;p&gt;REST is the established, widely familiar style for building web application programming interfaces (APIs); &lt;a href="https://graphql.org/" target="_blank" rel="nofollow noopener noreferrer"&gt;GraphQL&lt;/a&gt;, publicly released by Facebook in 2015 and adopted more widely in the years since, is a newer alternative built on a different premise. Lining the two up as rival techniques is tempting, but they are not defined at the same layer: Representational State Transfer (REST) is an architectural style, a set of constraints on how a client and server exchange representations of resources over a protocol such as HTTP,&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; while GraphQL is a query language and runtime in which a &lt;a href="https://spec.graphql.org/June2018/" target="_blank" rel="nofollow noopener noreferrer"&gt;typed schema&lt;/a&gt; describes what a service can return and each request states which parts it wants. Here, REST means the resource-oriented HTTP style common in API design discussions, not every possible interpretation of Fielding&amp;rsquo;s constraints or every way to model resources over HTTP.&lt;/p&gt;</description></item></channel></rss>