<?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: rohan2734</title>
    <description>The latest articles on DEV Community by rohan2734 (@rohan2734).</description>
    <link>https://dev.to/rohan2734</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%2F447114%2Faa32392d-2c3a-4282-9e17-18b880da8261.jpeg</url>
      <title>DEV Community: rohan2734</title>
      <link>https://dev.to/rohan2734</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rohan2734"/>
    <language>en</language>
    <item>
      <title>👉 REST API vs GRAPHQL , which one is better? 🤔</title>
      <dc:creator>rohan2734</dc:creator>
      <pubDate>Mon, 06 Jun 2022 13:47:23 +0000</pubDate>
      <link>https://dev.to/rohan2734/rest-api-vs-graphql-which-one-is-better-33nk</link>
      <guid>https://dev.to/rohan2734/rest-api-vs-graphql-which-one-is-better-33nk</guid>
      <description>&lt;p&gt;🙋‍♂️ Hi guys , I always had a small doubt when I heard there are more than one API, I heard about GRAPHQL, and REST, so I got a doubt that which one should I use and which one is better to use.&lt;/p&gt;

&lt;p&gt;👉In this post, I would like to give a brief on which is the best, I know only REST API, but not GRAPHQL, so I am using some reference materials for completing this post.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;👉 REST API vs GRAPHQL&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let me start with which one is the best&lt;/p&gt;

&lt;p&gt;✍️ GraphQL is the better than REST &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;👨‍💻 The main difference between GRAPHQL and REST&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;👉 A REST API is an architectural concept for network-based software. GraphQL, on the other hand, is a query language, a specification, and a set of tools that operates over a single endpoint using HTTP&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;👨‍💻 Where GraphQL is better than REST API&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;👉 When using a REST API to fetch information, you’ll always get back a complete dataset. For example, if you wanted to request information from two objects, you’d need to perform two REST API requests.&lt;/p&gt;

&lt;p&gt;Lets say you need initial user data, and you need to fetch it from &lt;code&gt;/users/:userID&lt;/code&gt;, and secondly you need posts data for that user, so another end point may be. &lt;code&gt;/users/:userID/posts&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;So when the end point is REST API. It would take two HTTP GET requests. They are (I am using json data in this example)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/users/:userID


{

         “user”:{

             “id”:”user1”,

             “firstName”:”rohan”,

              “lastName”:”devaki”

         }

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

&lt;/div&gt;



&lt;p&gt;And one more request for posts of &lt;code&gt;userID&lt;/code&gt; with end point &lt;code&gt;/users/:userID/posts&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

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

     “posts”: [{

         “id” :”post1”,

         “title”: “REST_vs_GRAPHQL”,

         “content”:”graphql is better than REST”

      }]

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

&lt;/div&gt;



&lt;p&gt;In GRAPHQL, on the other hand, you need to simply send a query to the GRAPHQL server that includes the data requirements. Then the server responds with the JSON object where the requirements are fulfilled&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Query{

  User(id:”user1”){

      Name

      Posts{

           Title     

      }

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

&lt;/div&gt;



&lt;p&gt;👉 So by this we can understand that the GRAPHQL is powerful, flexible and efficient , where as REST is not that much flexible and inefficient.&lt;/p&gt;

&lt;p&gt;👉 GRAPHQL also fetches the data , that is actually required in the query. But REST in the other hand, it fetches all the data that is not even required.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; 👨‍💻  as in the above example you can see REST fetched, all of the user and the post details, where as GRAPHQL only fetched the user’s name and the post’s title.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Don’t just read it ,and get the knowledge, like and share so that others also get the knowledge 😃.&lt;/p&gt;

&lt;p&gt;you are welcomed to tell the points which are need to be improved in the comments section 😃.&lt;/p&gt;

&lt;p&gt;Follow me on &lt;a href="https://www.linkedin.com/in/rohandevaki/"&gt;Linkedin &lt;/a&gt;here , and I will be back with an informative post soon 😃.&lt;/p&gt;

&lt;p&gt;Check my next blog here :  &lt;a href="https://algorithammer.herokuapp.com/blog/best-laptops-for-students-2021-under-65000-1"&gt;best laptops for students under 65K&lt;/a&gt; 😃&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>restapi</category>
      <category>graphql</category>
    </item>
    <item>
      <title>From struggling in searching the issues to completing the Hacktoberfest Challenge.</title>
      <dc:creator>rohan2734</dc:creator>
      <pubDate>Fri, 16 Oct 2020 15:32:42 +0000</pubDate>
      <link>https://dev.to/rohan2734/from-struggling-in-searching-the-issues-to-completing-the-hacktoberfest-challenge-17bg</link>
      <guid>https://dev.to/rohan2734/from-struggling-in-searching-the-issues-to-completing-the-hacktoberfest-challenge-17bg</guid>
      <description>&lt;p&gt;well, Why I have mentioned that I have struggled in finding the issues is....., First let me walk you through my journey.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned From Hacktoberfest
&lt;/h2&gt;

&lt;p&gt;What I learnt from Hacktoberfest is that, how to contribute to open source issues, thinking of a way to do it, solving the issue and ammeding the PR according to the Repo admin.&lt;/p&gt;

&lt;p&gt;First of all I selected the issues by searching them from &lt;a href="http://issuehub.io/" rel="noopener noreferrer"&gt;issuehub.io&lt;/a&gt;, which are completely new to me, so that I could really learn something, and not just to grab a T-Shirt or to plant a tree , but Obviously e I had the excitement to complete the Hacktoberfest challenge.&lt;/p&gt;

&lt;p&gt;The exciting part here was, will I be able to do it, will I be able to solve  the issues, in which I am less familiar or not at all familiar.Well , I have spent lots of time in it , by searching on the documentation, stackoverflow, blogs etc etc, and then I slowly gained knowledge on the issues, and solved  them finally 😁.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the strategy I should be following ?
&lt;/h2&gt;

&lt;p&gt;Many of us has this issue thinking about what strategy to follow, but here is the simple way.so Lets get started.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flc7rrce444ibypft2us1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flc7rrce444ibypft2us1.gif" alt="rocket"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;step-1:Finding the issues&lt;/strong&gt;&lt;br&gt;
The common questions that strike everyones mind is that, when should I start searching the errors and where?&lt;/p&gt;

&lt;p&gt;Well ,the top two places to search the issues are&lt;br&gt;
&lt;strong&gt;1.github&lt;/strong&gt; (obviously)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Make use of the github search, and filter options, you can filter with the &lt;strong&gt;Hactkoberfest&lt;/strong&gt; and the domain in  which  you want to find issues.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;2.issuehub.io&lt;/strong&gt;(my preferance)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;step-2:reaching out the Project Admins&lt;/strong&gt;&lt;br&gt;
1.many of the project admins, will assign the task to you, only if you comment something like &lt;em&gt;Hey I would like to work on the issue, can you assign me this task?&lt;/em&gt;&lt;br&gt;
2.you can also ask them to assign it to only you, but be careful and loyal , dont cheat them by neglecting their issue&lt;br&gt;
3.once they have assigned you , only then start working on it, otherwise find an other one.&lt;br&gt;
4.sometimes they ask you to do the task and they will take the best one, well it is your choice at this point of time, choose any of them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;step-3:working on the issues&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;After getting assigned, ask them to elaborate the task,so that you are clear about it, and you wouldn't have  wasted time in doing the wrong way.&lt;/li&gt;
&lt;li&gt;Always for the repo, learn basic git commands,refer the &lt;em&gt;contribution.md&lt;/em&gt; file, or &lt;em&gt;readme.md&lt;/em&gt; &lt;/li&gt;
&lt;li&gt;And always create  a branch for you PR, and create a Pull Request(PR).
4.create the  PR as soon as possible, so that you can ammend them as per the Project Admin(PA).
5.Be in touch with them, unitl your PR gets merged, getting PR merged is really the &lt;strong&gt;important step&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;step-4:wait for the evaluation&lt;/strong&gt;&lt;br&gt;
1.wait for the evaluation from the hacktoberfest team.&lt;br&gt;
2.If all 4 of your PRs are good to go , you have completed the Hacktoberfest challenge.&lt;/p&gt;

&lt;h1&gt;
  
  
  Finally I am suggesting you to take up a good issue which imporves your skills and you can gain some knowledge.
&lt;/h1&gt;

&lt;p&gt;so here ,this was my journey in completing the hacktoberfest2020 challenge, hope you too would complete. even if you couldn't do it, dont worry , you are gonna make it next time. &lt;/p&gt;

&lt;p&gt;See you next time,&lt;br&gt;
Thanks.😊😊😊&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here is my github profile link &lt;a href="//https:github.com/rohan2734"&gt;rohan2734&lt;/a&gt;&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fx8vft4n4q7nmb3oz6tif.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fx8vft4n4q7nmb3oz6tif.JPG" alt="congrats_screen"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>hacktoberfest</category>
    </item>
  </channel>
</rss>
