<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pablo Yeverino</title>
    <description>The latest articles on DEV Community by Pablo Yeverino (@pabloyeverino).</description>
    <link>https://dev.to/pabloyeverino</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F99582%2F15dc8eff-bc54-4d07-a14b-cf72b56e0864.jpeg</url>
      <title>DEV Community: Pablo Yeverino</title>
      <link>https://dev.to/pabloyeverino</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pabloyeverino"/>
    <language>en</language>
    <item>
      <title>Debouncing vs Throttling</title>
      <dc:creator>Pablo Yeverino</dc:creator>
      <pubDate>Thu, 20 Jun 2024 21:47:49 +0000</pubDate>
      <link>https://dev.to/pabloyeverino/debouncing-vs-throttling-3cm6</link>
      <guid>https://dev.to/pabloyeverino/debouncing-vs-throttling-3cm6</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/challenges/cs"&gt;DEV Computer Science Challenge v24.06.12: One Byte Explainer&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Explainer
&lt;/h2&gt;

&lt;p&gt;Debouncing is like me waiting for you to finish your question to be able to answer it. Throttling is me answering just 1 question every 5 minutes.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>cschallenge</category>
      <category>computerscience</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Cleaner React validations</title>
      <dc:creator>Pablo Yeverino</dc:creator>
      <pubDate>Wed, 28 Oct 2020 17:06:30 +0000</pubDate>
      <link>https://dev.to/pabloyeverino/cleaner-react-validations-3mmo</link>
      <guid>https://dev.to/pabloyeverino/cleaner-react-validations-3mmo</guid>
      <description>&lt;p&gt;10/28 - Yesterday I finished an assignment related to a 'Change phone-number form and it looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fai7r2ppqauhltdtnii06.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fai7r2ppqauhltdtnii06.png" alt="Alt Text" width="650" height="818"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, to validate I need to check every change of the Input fields in order to enable or disable the button... easy right??&lt;/p&gt;

&lt;p&gt;Just for context, I'm using useState hooks for each value of the field and another one to the enabling state of the button. Also, I'm managing state with &lt;a href="https://mobx.js.org/README.html"&gt;MobX&lt;/a&gt;, so the user's current phone number and country code properties of userStore. Hopefully it's enough context for the next snippets.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fir4gjm4p38fxp5p4x9f9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fir4gjm4p38fxp5p4x9f9.png" alt="Alt Text" width="800" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After some really nice PR review, my code was simplified to this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6bch42br2w74yk99as4j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6bch42br2w74yk99as4j.png" alt="Alt Text" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I really like the approach because is pretty much self explanatory and a little bit cleaner.&lt;/p&gt;

&lt;p&gt;What am I doing today: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start doing push ups each two brakes.
That means that if I take a brake every hour, I should do 4 rounds of push-ups a day. &lt;strong&gt;What do you thing??&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Take at least 30 minutes of video editing course.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you got all the way over here, I really appreciate it!! &lt;/p&gt;

&lt;p&gt;If you want to, follow me on &lt;a href="https://twitter.com/PabloYeverino"&gt;Twitter&lt;/a&gt; &lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>forms</category>
      <category>validation</category>
    </item>
    <item>
      <title>Basic differences between three GraphQL-servers.</title>
      <dc:creator>Pablo Yeverino</dc:creator>
      <pubDate>Sun, 17 Nov 2019 01:07:17 +0000</pubDate>
      <link>https://dev.to/pabloyeverino/differences-between-express-graphql-apollo-and-graphql-yoga-3m82</link>
      <guid>https://dev.to/pabloyeverino/differences-between-express-graphql-apollo-and-graphql-yoga-3m82</guid>
      <description>&lt;p&gt;Hello!!!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;: A comparison between express-graphql, apollo and yoga was made for a &lt;em&gt;Hello World!&lt;/em&gt; Query. In order to setup a simple GraphQL API, considering the size and number of files, Express-graphql is the champion here🥇. The complexity of the SDL Implementation is not very different and definitely a more extensive analysis has to be done in order to choose a tool for an enterprise size application.&lt;/p&gt;

&lt;p&gt;I wanted to compare express-graphql, apollo and graphql-yoga with &lt;strong&gt;Node.js&lt;/strong&gt; The main information that I want to get are dependencies, size of development project and the most important, the way to implement the &lt;em&gt;Schema definition language&lt;/em&gt; (&lt;strong&gt;SDL&lt;/strong&gt;), in order to build the schema.&lt;/p&gt;

&lt;h2&gt;
  
  
  Express-graphql.
&lt;/h2&gt;

&lt;p&gt;This is the simplest way to run a GraphQL API.&lt;/p&gt;

&lt;h4&gt;
  
  
  Dependencies:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;graphql&lt;/li&gt;
&lt;li&gt;express&lt;/li&gt;
&lt;li&gt;express-graphql&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Size:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;5.1 MB&lt;/li&gt;
&lt;li&gt;862 files.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  SDL implementation.
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;buildSchema&lt;/code&gt; method is imported from &lt;code&gt;graphql&lt;/code&gt; in order to build the schema.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;buildSchema&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;graphql&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;schema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;buildSchema&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`
  type Query {
    hello: String!
  }
`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Here is the video of all the steps.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.youtube.com/watch?feature=player_embedded&amp;amp;v=qy2rs3aKV8w" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fimg.youtube.com%2Fvi%2Fqy2rs3aKV8w%2F0.jpg" alt="Video preview"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Apollo Server.
&lt;/h2&gt;

&lt;p&gt;At the &lt;a href="https://www.apollographql.com/docs/apollo-server/" rel="noopener noreferrer"&gt;Apollo Documentation&lt;/a&gt; we can read that Apollo Server is the best way to build a production-ready, self-documenting API for GraphQL API clients, using data from any source.&lt;/p&gt;

&lt;h4&gt;
  
  
  Dependencies:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;graphql&lt;/li&gt;
&lt;li&gt;apollo-server&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Size:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;16.7 MB&lt;/li&gt;
&lt;li&gt;4,502 files.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  SDL Implementation
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;gql&lt;/code&gt; function is imported from &lt;code&gt;apollo-server&lt;/code&gt; to parse the plain string that contains the GraphQL code.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;gql&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;apollo-server&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;typeDefs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;qgl&lt;/span&gt;&lt;span class="s2"&gt;`
  type Query {
    hello: String!
  }
`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Is worth to note a difference between the resolvers with Express and Apollo, in the former you only add the function which will resolve the &lt;code&gt;hello&lt;/code&gt; Query. In the last, you have to define the resolvers according to the types. &lt;/p&gt;

&lt;p&gt;Also I made a video implementing the Apollo server.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.youtube.com/watch?feature=player_embedded&amp;amp;v=JftEqTGhkjU" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fimg.youtube.com%2Fvi%2FJftEqTGhkjU%2F0.jpg" alt="Video preview"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  GraphQL-Yoga Server
&lt;/h2&gt;

&lt;p&gt;Graphql-yoga is a fully-featured GraphQL Server focused on easy setup, performance and great developer experience as can be read at the &lt;a href="https://github.com/prisma-labs/graphql-yoga" rel="noopener noreferrer"&gt;creator's repo&lt;/a&gt;. It was created by Prisma.&lt;/p&gt;

&lt;h4&gt;
  
  
  Dependencies:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;graphql-yoga&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Size:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;14.6 MB&lt;/li&gt;
&lt;li&gt;4,634 files.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  SDL Implementation
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;In this case, any function has to be imported in order to parse the plain string, so the schema is created out of it completely.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;


&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;typeDefs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`
  type Query {
    hello(name: String): String!
  }
`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The resolvers have to be defined in the same way as with Apollo, by type and field.&lt;/p&gt;

&lt;p&gt;Here is the video of the same API that have been created in the other two cases. In this example, the query can take an String argument.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.youtube.com/watch?feature=player_embedded&amp;amp;v=B1pAzfPudQA" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fimg.youtube.com%2Fvi%2FB1pAzfPudQA%2F0.jpg" alt="Video preview"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>graphql</category>
      <category>javascript</category>
      <category>node</category>
      <category>vsc</category>
    </item>
    <item>
      <title>How can you show your work if you are a backend developer???</title>
      <dc:creator>Pablo Yeverino</dc:creator>
      <pubDate>Sat, 16 Nov 2019 18:07:12 +0000</pubDate>
      <link>https://dev.to/pabloyeverino/how-can-you-show-your-work-if-you-are-a-backend-developer-1912</link>
      <guid>https://dev.to/pabloyeverino/how-can-you-show-your-work-if-you-are-a-backend-developer-1912</guid>
      <description>&lt;p&gt;Hello, there!!&lt;/p&gt;

&lt;p&gt;I just read a post from Lady Bug (I lost the link, but I'll put it in the comments), then I went to her profile and noticed she has a link to Dribbble, so I went there and it's a cool platform for designers. So this question popped out!! Hope you have some ideas!! &lt;/p&gt;

&lt;p&gt;Have a great weekend!!&lt;/p&gt;

</description>
      <category>backend</category>
      <category>design</category>
      <category>blog</category>
    </item>
    <item>
      <title>Studying by writting</title>
      <dc:creator>Pablo Yeverino</dc:creator>
      <pubDate>Sat, 16 Nov 2019 04:19:57 +0000</pubDate>
      <link>https://dev.to/pabloyeverino/studying-by-writting-24j5</link>
      <guid>https://dev.to/pabloyeverino/studying-by-writting-24j5</guid>
      <description>&lt;p&gt;I am preparing to land a job in the next months, so I want to review the basic, and not so basic, concepts of all the stack I've used along my working experience since Vanilla Javascript, Node JS, GraphQL to MongoDB and AWS.&lt;/p&gt;

&lt;p&gt;A very helpful way to study and learn for me is to write down what I read, as well as to build examples so I tought that if I am doing that anyway, it is a good idea to share it. Let' see how it works.&lt;/p&gt;

&lt;p&gt;At the moment, the topics that I know I have to review are:&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GraphQL and RESTful API's difference&lt;/li&gt;
&lt;li&gt;Tracking MongoDB document changes with NodeJS&lt;/li&gt;
&lt;li&gt;GraphQL pagination&lt;/li&gt;
&lt;li&gt;Defining AWS Architecture&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  GraphQL and RESTful API's difference &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;First, from my point of view, a definition of a RESTful API is the way a server expose its data and it makes stateless transfer. There are 5 fundamentals of the &lt;strong&gt;REST&lt;/strong&gt; &lt;em&gt;architecture&lt;/em&gt;: 1&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Everything is a Resource:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is important to think in terms of resources instead of physical files. Client has access to the resources over some &lt;em&gt;URI&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Unique identifier:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In REST, every resource should be represented by a &lt;strong&gt;unique URI&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Simple and uniform Interfaces&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To send and request data to those resources, HTTP methods are used to replace a list of English-based methods like GetCustomer. In this case, we need the URI that represents the resource (&lt;a href="http://www.mysite.com/Customers/1234"&gt;www.mysite.com/Customers/1234&lt;/a&gt;), and the GET method.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Representations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the requests/responses from/to the API, what actually we are sending are represantations of the resource data, which could be XML, JSON, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Stateless:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each request is independent to the others.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's imagine a page where the name of a blogger, the titles of her blog posts and the last three followers has to be displayed. &lt;/p&gt;

&lt;p&gt;In order to accomplish the task, three different GET fetches have to be done:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/users/&amp;lt;id&amp;gt; //To get the user name
/users/&amp;lt;id&amp;gt;/post // To get her posts
/users/&amp;lt;id&amp;gt;/followers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With GraphQL, you should &lt;strong&gt;think in graphs, not in endpoins&lt;/strong&gt;, as Lee Byron, co-inventor of GraphQL, says in his Lessosns From 4 Years of GraphQL. &lt;a href="https://www.graphql.com/articles/4-years-of-graphql-lee-byron"&gt;[2]&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A query with GraphQL to accomplish our hypothetical task would look like the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Query&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;exampleId123&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;name&lt;/span&gt;
    &lt;span class="nx"&gt;posts&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;title&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nf"&gt;followers &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;last&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;name&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the response for that query looks like the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "data": {
    "User": {
      "name": "Mary",
      "posts": [
        { title: "Learn GraphQL today" }
      ],
      "followers": [
        {"name":"John"},
        {"name":"Alice"},
        {"name":"Sarah"}
      ]
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As we see, one simple query with the POST method can retrieve the information with the exact data, which could be very difficult to implement with a RESTful API.&lt;/p&gt;

&lt;p&gt;Some problems that we are solving with GraphQL will be the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Overfetching: When a query is made to get just specific data but the response is complex and with an specifica data structure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Underfetching: In order to complete the information, a second query has to be done. This issue is known as the &lt;strong&gt;n+1-request&lt;/strong&gt; problem.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rapid Product iterations on the Frontend: A common pattern with RESTful APIs is to structure the endpoints according to the views, so if the front end changes, backend has to change also. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Insightful Analytics: Queries and resolvers performance can be monitored.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Schema and type system: GraphQL use the Schema Definition Language to define the &lt;strong&gt;schema&lt;/strong&gt; of an API based on &lt;strong&gt;types&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I am just watching the GraphQL documentary and they give a great explanation: &lt;a href="https://www.youtube.com/watch?v=783ccP__No8&amp;amp;feature=youtu.be"&gt;[3]&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Think APIs as a vending machine.
&lt;/h2&gt;

&lt;p&gt;To get information, you put a quarter, push a button and get a product, so if you want many products, you have to push so many buttons. Then, REST come to the scene and try to figure out which products belong together, so the machine vending is programmed in order tu push a button and get any ammount of product that the vending machine owner decides, and maybe it returns some spare change in order to get more products.&lt;/p&gt;

&lt;p&gt;Now &lt;strong&gt;GraphQL&lt;/strong&gt; comes to the vending machines and bring the hability to the client to decide which buttons to press in order to get multiple products at one time. &lt;/p&gt;

&lt;p&gt;I am gonna stop here this post and for sure I will continue with practice and snippets.&lt;/p&gt;

&lt;p&gt;Hope you like it!! And if so, keep the conversation on &lt;a href="https://twitter.com/PabloYeverino"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>node</category>
      <category>aws</category>
    </item>
  </channel>
</rss>
